summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 998fad0af..7e7317935 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -303,7 +303,7 @@ int battle_attr_ratio(int atk_elem,int def_type, int def_lv)
if (atk_elem < 0 || atk_elem >= ELE_MAX)
return 100;
- if (def_type < 0 || def_type > ELE_MAX || def_lv < 1 || def_lv > 4)
+ if (def_type < 0 || def_type >= ELE_MAX || def_lv < 1 || def_lv > 4)
return 100;
return battle->attr_fix_table[def_lv-1][atk_elem][def_type];