diff options
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index f7c206228..b38214d52 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3590,7 +3590,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list * Damage from magic = Magic Attack * 111.5/(111.5+eMDEF) * Damage = Magic Attack * 111.5/(111.5+eMDEF) - sMDEF **/ - ad.damage = ad.damage * 1115 / ((mdef*-1>111?-1:1)*(1115 + mdef * 10)) - mdef2; + if(mdef < -111) mdef = -111; // value smaller -111 brings back the damage to origin up to -223. + ad.damage = ad.damage * 1115 / (1115 + mdef * 10) - mdef2; #else if(battle_config.magic_defense_type) ad.damage = ad.damage - mdef*battle_config.magic_defense_type - mdef2; |