summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-03-20 19:00:36 -0300
committerJesusaves <cpntb1@ymail.com>2021-03-20 19:00:36 -0300
commit28b0a6321dde257fa27d8afa24609db718608254 (patch)
tree40046fa907beb2265daa7e4a9cdb414fa4d0d1f5
parent69ad008c791786582477ac5e01aca704e79483d7 (diff)
downloadhercules-28b0a6321dde257fa27d8afa24609db718608254.tar.gz
hercules-28b0a6321dde257fa27d8afa24609db718608254.tar.bz2
hercules-28b0a6321dde257fa27d8afa24609db718608254.tar.xz
hercules-28b0a6321dde257fa27d8afa24609db718608254.zip
Force MDEF to follow the same arithmetic formula as regular DEF.
I don't want to keep doing crazy calculations for MDEF.
-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 2f6a1e245..a797903e8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1484,7 +1484,7 @@ static int64 battle_calc_defense(int attack_type, struct block_list *src, struct
mdef = -99; // in aegis it set to 1 but in our case it may lead to exploitation so limit it to 99
//return 1;
- damage = (int)((100.0f - mdef / (mdef + 100.0f) * 90.0f) / 100.0f * damage - mdef2);
+ damage = (int)((100.0f - mdef / (mdef + 400.0f) * 90.0f) / 100.0f * damage - mdef2);
#else
if(battle_config.magic_defense_type)
damage = damage - mdef*battle_config.magic_defense_type - mdef2;