diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 28 | ||||
-rw-r--r-- | src/map/skill.h | 3 |
2 files changed, 18 insertions, 13 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 0b4aa2f69..8a0bd5c7d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -307,7 +307,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i } if(sc->data[SC_AUTOGUARD].timer != -1 && flag&BF_WEAPON && - !(skill_get_nk(skill_num)&NK_NO_CARDFIX) && + !(skill_get_nk(skill_num)&NK_NO_CARDFIX_ATK) && rand()%100 < sc->data[SC_AUTOGUARD].val2) { int delay; clif_skill_nodamage(bl,bl,CR_AUTOGUARD,sc->data[SC_AUTOGUARD].val1,1); @@ -363,7 +363,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i if ((sc->data[SC_UTSUSEMI].timer != -1 || sc->data[SC_BUNSINJYUTSU].timer != -1) && - flag&BF_WEAPON && !(skill_get_nk(skill_num)&NK_NO_CARDFIX)) + flag&BF_WEAPON && !(skill_get_nk(skill_num)&NK_NO_CARDFIX_ATK)) { if (sc->data[SC_UTSUSEMI].timer != -1) { clif_specialeffect(bl, 462, AREA); @@ -1845,7 +1845,7 @@ static struct Damage battle_calc_weapon_attack( } //Card Fix, sd side - if ((wd.damage || wd.damage2) && !(nk&NK_NO_CARDFIX)) + if ((wd.damage || wd.damage2) && !(nk&NK_NO_CARDFIX_ATK)) { short cardfix = 1000, cardfix_ = 1000; short t_race2 = status_get_race2(target); @@ -1918,17 +1918,21 @@ static struct Damage battle_calc_weapon_attack( } } //if (sd) - //Card Fix, tsd side - Cards always apply on the target. [Skotlex] - if (tsd) { + //Card Fix, tsd sid + if (tsd && !(nk&NK_NO_CARDFIX_DEF)) + { short s_race2,s_class; short cardfix=1000; s_race2 = status_get_race2(src); s_class = status_get_class(src); - cardfix=cardfix*(100-tsd->subele[s_ele])/100; - if (flag.lh && s_ele_ != s_ele) - cardfix=cardfix*(100-tsd->subele[s_ele_])/100; + if (!(nk&NK_NO_ELEFIX)) + { + 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; @@ -2364,7 +2368,7 @@ struct Damage battle_calc_magic_attack( if (!(nk&NK_NO_ELEFIX)) ad.damage=battle_attr_fix(src, target, ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv); - if (sd && !(nk&NK_NO_CARDFIX)) { + if (sd && !(nk&NK_NO_CARDFIX_ATK)) { short t_class = status_get_class(target); short cardfix=1000; @@ -2383,8 +2387,8 @@ struct Damage battle_calc_magic_attack( MATK_RATE(cardfix/10); } - if (tsd && skill_num != HW_GRAVITATION && skill_num != PF_SOULBURN) - { //Card fixes always apply on the target side. [Skotlex] + if (tsd && !(nk&NK_NO_CARDFIX_DEF)) + { //Target cards. short s_race2=status_get_race2(src); short s_class= status_get_class(src); short cardfix=1000; @@ -2605,7 +2609,7 @@ struct Damage battle_calc_misc_attack( } } - if(md.damage && tsd && !(nk&NK_NO_CARDFIX)){ + if(md.damage && tsd && !(nk&NK_NO_CARDFIX_DEF)){ int cardfix = 10000; int race2 = status_get_race2(src); if (!(nk&NK_NO_ELEFIX)) diff --git a/src/map/skill.h b/src/map/skill.h index dc1bcbe23..bc850af21 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -26,10 +26,11 @@ #define NK_NO_DAMAGE 0x01 #define NK_SPLASH (0x02|0x04) // 0x4 = splash & split #define NK_SPLASHSPLIT 0x04 -#define NK_NO_CARDFIX 0x08 +#define NK_NO_CARDFIX_ATK 0x08 #define NK_NO_ELEFIX 0x10 #define NK_IGNORE_DEF 0x20 #define NK_IGNORE_FLEE 0x40 +#define NK_NO_CARDFIX_DEF 0x08 //A skill with 3 would be no damage + splash: area of effect. //Constants to identify a skill's inf2 value. |