summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 17:44:58 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 17:44:58 +0000
commitac56a9becca22b5e86f2d92ee3e49c40d3c42b81 (patch)
tree04e9743b5a7ddb1b27906abf743be7459e07eb54 /src/map/battle.c
parent6749d6567aa972b5cc46e1ed85986be21e2ec799 (diff)
downloadhercules-ac56a9becca22b5e86f2d92ee3e49c40d3c42b81.tar.gz
hercules-ac56a9becca22b5e86f2d92ee3e49c40d3c42b81.tar.bz2
hercules-ac56a9becca22b5e86f2d92ee3e49c40d3c42b81.tar.xz
hercules-ac56a9becca22b5e86f2d92ee3e49c40d3c42b81.zip
- Fixed the subele bonus (elemental reduction) being applied to the element of the attacker instead of the element of the attack.
- mob skills now won't trigger on unit_stopwalking calls. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7614 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 25bacc337..0b30f4f1d 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1833,7 +1833,9 @@ static struct Damage battle_calc_weapon_attack(
s_race2 = status_get_race2(src);
s_class = status_get_class(src);
- cardfix=cardfix*(100-tsd->subele[sstatus->def_ele])/100;
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
+ if (flag.lh && s_ele_ != s_ele)
+ cardfix=cardfix*(100-tsd->subele[s_ele_])/100;
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
@@ -2357,7 +2359,7 @@ struct Damage battle_calc_magic_attack(
short cardfix=100;
if (flag.elefix)
- cardfix=cardfix*(100-tsd->subele[sstatus->def_ele])/100;
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;
@@ -2595,7 +2597,7 @@ struct Damage battle_calc_misc_attack(
if(md.damage && flag.cardfix && tsd){
int cardfix = 10000;
int race2 = status_get_race(src);
- cardfix=cardfix*(100-tsd->subele[sstatus->def_ele])/100;
+ cardfix=cardfix*(100-tsd->subele[s_ele])/100;
cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;
cardfix=cardfix*(100-tsd->subrace2[race2])/100;
cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;