diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-18 06:27:26 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-18 06:27:26 +0000 |
commit | aab0644bfd82ee1069bf5973a5e8aae9f8fe1a93 (patch) | |
tree | c7b774bcd352747db5a6389f48e5c3c0e12d55fb /src/map | |
parent | c86904cba63003d2c46a6b5dac1b05028e601010 (diff) | |
download | hercules-aab0644bfd82ee1069bf5973a5e8aae9f8fe1a93.tar.gz hercules-aab0644bfd82ee1069bf5973a5e8aae9f8fe1a93.tar.bz2 hercules-aab0644bfd82ee1069bf5973a5e8aae9f8fe1a93.tar.xz hercules-aab0644bfd82ee1069bf5973a5e8aae9f8fe1a93.zip |
RE Defense damage reduction fixed, bugreport:5111
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15160 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index ec2dc6dfa..ced01c77b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2151,11 +2151,23 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo vit_def += def1*battle_config.weapon_defense_type; def1 = 0; } - if (def1 > 100) def1 = 100; - ATK_RATE2( - flag.idef ?100:(flag.pdef ?(int)(flag.pdef *(def1+vit_def)):(100-def1)), - flag.idef2?100:(flag.pdef2?(int)(flag.pdef2*(def1+vit_def)):(100-def1)) - ); + #if REMODE + /** + * In Renewal 100% damage reduction is 900 DEF + * Formula: (1+(900-def1)/9)% + **/ + if (def1 > 900) def1 = 900; + ATK_RATE2( + flag.idef ?100:(flag.pdef ?(int)(flag.pdef *(def1+vit_def)):(1+(900-def1)/9)), + flag.idef2?100:(flag.pdef2?(int)(flag.pdef2*(def1+vit_def)):(1+(900-def1)/9)) + ); + #else + if (def1 > 100) def1 = 100; + ATK_RATE2( + flag.idef ?100:(flag.pdef ?(int)(flag.pdef *(def1+vit_def)):(100-def1)), + flag.idef2?100:(flag.pdef2?(int)(flag.pdef2*(def1+vit_def)):(100-def1)) + ); + #endif ATK_ADD2( flag.idef ||flag.pdef ?0:-vit_def, flag.idef2||flag.pdef2?0:-vit_def |