summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-16 19:36:16 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-04-16 19:36:16 +0000
commite726f6c7ad515a16991569f754528462399e6490 (patch)
tree28e07e15b58f478733d771be73163f21fd6cbd58 /src/map/battle.c
parent1a75630d6773c52675d2c987d3c3448c4d7c6d63 (diff)
downloadhercules-e726f6c7ad515a16991569f754528462399e6490.tar.gz
hercules-e726f6c7ad515a16991569f754528462399e6490.tar.bz2
hercules-e726f6c7ad515a16991569f754528462399e6490.tar.xz
hercules-e726f6c7ad515a16991569f754528462399e6490.zip
- Corrected the attack_attr_none setting to behave as it should: for those whom it is set, their "innate" attack element is "not elemental", meaning it deals 100% against all elements (rather than making only NEUTRAL attacks become not elemental).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13676 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 9a274b28c..55c52a8b0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1030,6 +1030,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
s_ele_ = sstatus->lhw.ele;
if (flag.arrow && sd && sd->arrow_ele)
s_ele = sd->arrow_ele;
+ if (battle_config.attack_attr_none&src->type)
+ nk|=NK_NO_ELEFIX; //Weapon's element is "not elemental"
} else if (s_ele == -2) { //Use enchantment's element
s_ele = s_ele_ = status_get_attack_sc_element(src,sc);
}
@@ -1886,8 +1888,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if(skill_num==TF_POISON)
ATK_ADD(15*skill_lv);
- if(!(nk&NK_NO_ELEFIX || (s_ele == ELE_NEUTRAL &&
- battle_config.attack_attr_none&src->type)))
+ if(!(nk&NK_NO_ELEFIX))
{ //Elemental attribute fix
if (wd.damage > 0)
{