diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-08 11:36:34 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-08 11:36:34 +0000 |
commit | bce77426d42cb845ca1c2d81b027d3f1ced293d5 (patch) | |
tree | 6e0ee15b16f0a949087b7b9a5728a68c33d981eb /src/map/battle.c | |
parent | 89bb1a8cd77e095cd85d698cd134b91f00c8d99c (diff) | |
download | hercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.tar.gz hercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.tar.bz2 hercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.tar.xz hercules-bce77426d42cb845ca1c2d81b027d3f1ced293d5.zip |
Fixed bugreport:5513 Chaos Panic should now inflict Confusion/Chaos effect work properly.
Follow up r16085 Fixed the min cap value for negative mdef. Thanks Epoque
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16086 54d463be-8e91-2dee-dedb-b68131a5f0ec
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; |