diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-30 16:41:54 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-30 16:41:54 +0000 |
commit | d8514a81bbd118303e62e109ca56950b50fa82f3 (patch) | |
tree | 326195de0fe591b629dbc71174641ef231673faf /src/map/battle.c | |
parent | de3e9a7aea38e374a91d9f036da043f14e58b9f3 (diff) | |
download | hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.tar.gz hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.tar.bz2 hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.tar.xz hercules-d8514a81bbd118303e62e109ca56950b50fa82f3.zip |
Follow up r16981:
- Where it causes nullpo_info warnings or even map crash(bugreport:6954)
- Fixed wrong display of info using HW_MAGICPOWER in pre-re/skill_cast_db.txt(bugreport:5663)
Synced 'skill_cast_db.txt'(new skills only) of RE with PRE RE
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16988 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 27f67ee3b..3bbdcc210 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -502,7 +502,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li } break; case BF_WEAPON: - if( sd && !(nk&NK_NO_CARDFIX_ATK) ) + if( sd && !(nk&NK_NO_CARDFIX_ATK) && (left&2) ) { short cardfix_ = 1000; if(sd->state.arrow_atk) @@ -550,7 +550,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li if( tstatus->race != RC_DEMIHUMAN ) cardfix=cardfix*(100+sd->right_weapon.addrace[RC_NONDEMIHUMAN])/100; - if( left ) + if( left&1 ) { cardfix_=cardfix_*(100+sd->left_weapon.addrace[tstatus->race])/100; if (!(nk&NK_NO_ELEFIX)) { @@ -610,7 +610,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li } } - if( left ) + if( left&1 ) { for( i = 0; i < ARRAYLENGTH(sd->left_weapon.add_dmg) && sd->left_weapon.add_dmg[i].rate; i++ ) { @@ -630,7 +630,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li cardfix_ = cardfix_ * (100 + sd->sc.data[SC_EDP]->val1 * 60 ) / 100; } #endif - if( left && cardfix_ != 1000 ) + if( (left&1) && cardfix_ != 1000 ) damage = damage * cardfix_ / 1000; else if( cardfix != 1000 ) damage = damage * cardfix / 1000; @@ -649,7 +649,7 @@ int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_li ele_fix += tsd->subele2[i].rate; } cardfix=cardfix*(100-ele_fix)/100; - if( left && s_ele_ != s_ele ) + if( left&1 && s_ele_ != s_ele ) { int ele_fix_lh = tsd->subele[s_ele_]; for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++) @@ -3311,9 +3311,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo } //Card Fix, sd side - wd.damage = battle_calc_cardfix(BF_WEAPON, src, (tsd?NULL:target), nk, s_ele, s_ele_, wd.damage, 0, wd.flag); + wd.damage = battle_calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage, 2, wd.flag); if( flag.lh ) - wd.damage2 = battle_calc_cardfix(BF_WEAPON, src, (tsd?NULL:target), nk, s_ele, s_ele_, wd.damage2, 1, wd.flag); + wd.damage2 = battle_calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage2, 3, wd.flag); if (skill_num == CR_SHIELDBOOMERANG || skill_num == PA_SHIELDCHAIN) { //Refine bonus applies after cards and elements. @@ -3323,9 +3323,9 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo } } //if (sd) - //Card Fix, tsd sid + //Card Fix, tsd side if(tsd) - wd.damage = battle_calc_cardfix(BF_WEAPON, (sd?NULL:src), target, nk, s_ele, s_ele_, wd.damage, flag.lh, wd.flag); + wd.damage = battle_calc_cardfix(BF_WEAPON, src, target, nk, s_ele, s_ele_, wd.damage, flag.lh, wd.flag); if (flag.infdef) { //Plants receive 1 damage when hit |