diff options
author | shennetsind <ind@henn.et> | 2014-02-10 13:59:24 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-02-10 13:59:24 -0200 |
commit | cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e (patch) | |
tree | 70e501ba613ef8d4586c5f6c4be7424f3e953198 /src/map/battle.c | |
parent | 9ca281d0a03ea083c4dba20de9d109d581a5ee4f (diff) | |
parent | ac45ebca3e9537eca665ba042412ddc1e65e9f73 (diff) | |
download | hercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.tar.gz hercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.tar.bz2 hercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.tar.xz hercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.zip |
Merge branch 'master' of https://github.com/HerculesWS/Hercules
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 95 |
1 files changed, 82 insertions, 13 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 8ad54f413..687db1b95 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2498,12 +2498,14 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block } //Skill damage modifiers that stack linearly if(sc && skill_id != PA_SACRIFICE){ +#ifdef RENEWAL_EDP if( sc->data[SC_EDP] ){ if( skill_id == AS_SONICBLOW || skill_id == GC_COUNTERSLASH || skill_id == GC_CROSSIMPACT ) skillratio >>= 1; } +#endif if(sc->data[SC_OVERTHRUST]) skillratio += sc->data[SC_OVERTHRUST]->val3; if(sc->data[SC_OVERTHRUSTMAX]) @@ -3409,11 +3411,36 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list ad.damage = battle->calc_cardfix(BF_MAGIC, src, target, nk, s_ele, 0, ad.damage, 0, ad.flag); #endif if(sd) { + uint16 skill; //Damage bonuses if ((i = pc->skillatk_bonus(sd, skill_id))) ad.damage += ad.damage*i/100; - - if( (i = battle->adjust_skill_damage(src->m,skill_id)) ) + switch(skill_id){ + case WL_CHAINLIGHTNING_ATK: + skill = WL_CHAINLIGHTNING; + break; + case AB_DUPLELIGHT_MAGIC: + skill = AB_DUPLELIGHT; + break; + case WL_TETRAVORTEX_FIRE: + case WL_TETRAVORTEX_WATER: + case WL_TETRAVORTEX_WIND: + case WL_TETRAVORTEX_GROUND: + skill = WL_TETRAVORTEX; + break; + case WL_SUMMON_ATK_FIRE: + case WL_SUMMON_ATK_WIND: + case WL_SUMMON_ATK_WATER: + case WL_SUMMON_ATK_GROUND: + skill = WL_RELEASE; + break; + case WM_REVERBERATION_MAGIC: + skill = WM_REVERBERATION; + break; + default: + skill = skill_id; + } + if( (i = battle->adjust_skill_damage(src->m,skill)) ) MATK_RATE(i); //Ignore Defense? @@ -3849,10 +3876,18 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * } #endif md.damage = battle->calc_cardfix(BF_MISC, src, target, nk, s_ele, 0, md.damage, 0, md.flag); - - if (sd && (i = pc->skillatk_bonus(sd, skill_id))) - md.damage += md.damage*i/100; - + if(skill_id){ + uint16 skill; + switch(skill_id){ + case GN_HELLS_PLANT_ATK: + skill = GN_HELLS_PLANT; + break; + default: + skill = skill_id; + } + if (sd && (i = pc->skillatk_bonus(sd, skill))) + md.damage += md.damage*i/100; + } if( (i = battle->adjust_skill_damage(src->m,skill_id)) ) md.damage = md.damage * i / 100; @@ -4543,6 +4578,10 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list ATK_ADD( 30 * tsc->data[SC_DARKCROW]->val1 ); } + if ( sc && !skill_id && sc->data[SC_EXEEDBREAK] ) { + ATK_ADDRATE(sc->data[SC_EXEEDBREAK]->val1); + status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER); + } #ifdef RENEWAL if( sd && skill_id == NJ_KUNAI ){ flag.tdef = 1; @@ -4694,9 +4733,43 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list ATK_ADDRATE(50); break; } - - if( (i = battle->adjust_skill_damage(src->m,skill_id)) ) - ATK_RATE(i); + if( skill_id ){ + uint16 skill; + switch(skill_id){ + case AB_DUPLELIGHT_MELEE: + skill = AB_DUPLELIGHT; + break; + case LG_OVERBRAND_BRANDISH: + case LG_OVERBRAND_PLUSATK: + skill = LG_OVERBRAND; + break; + case WM_SEVERE_RAINSTORM_MELEE: + skill = WM_SEVERE_RAINSTORM; + break; + case WM_REVERBERATION_MELEE: + skill = WM_REVERBERATION; + break; + case GN_CRAZYWEED_ATK: + skill = GN_CRAZYWEED; + break; + case GN_SLINGITEM_RANGEMELEEATK: + skill = GN_SLINGITEM; + break; + case RL_R_TRIP_PLUSATK: + skill = RL_R_TRIP; + break; + case RL_B_FLICKER_ATK: + skill = RL_FLICKER; + break; + case RL_GLITTERING_GREED_ATK: + skill = RL_GLITTERING_GREED; + break; + default: + skill = skill_id; + } + if( (i = battle->adjust_skill_damage(src->m,skill)) ) + ATK_RATE(i); + } if( sd ) { if (skill_id && (i = pc->skillatk_bonus(sd, skill_id))) @@ -5532,10 +5605,6 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t wd = battle->calc_attack(BF_WEAPON, src, target, 0, 0, flag); if( sc && sc->count ) { - if (sc->data[SC_EXEEDBREAK]) { - ATK_RATER(sc->data[SC_EXEEDBREAK]->val1); - status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER); - } if( sc->data[SC_SPELLFIST] ) { if( --(sc->data[SC_SPELLFIST]->val1) >= 0 ){ struct Damage ad = battle->calc_attack(BF_MAGIC,src,target,sc->data[SC_SPELLFIST]->val3,sc->data[SC_SPELLFIST]->val4,flag|BF_SHORT); |