summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index be60ae18f..451cd7e51 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1931,14 +1931,13 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
case ASC_BREAKER: // [celest]
if (attack_type&BF_WEAPON) { // the 1st attack won't really deal any damage
tmpdmg = damage; // store the temporary weapon damage
- } else { // only display damage for the 2nd attack
- if (tmpdmg == 0 || damage == 0) // if one or both attack(s) missed, display a 'miss'
- clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, 0, dmg.div_, skillid, skilllv, type);
- damage += tmpdmg; // add weapon and magic damage
- tmpdmg = 0; // clear the temporary weapon damage
- if (damage > 0) // if both attacks missed, do not display a 2nd 'miss'
- dmg.dmotion = clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skillid, skilllv, type);
- }
+ return 0; //Wait for the second iteration to do all the work below.
+ }
+ if (tmpdmg == 0 || damage == 0) // if one or both attack(s) missed, display a 'miss'
+ clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, 0, dmg.div_, skillid, skilllv, type);
+ damage += tmpdmg; // add weapon and magic damage
+ tmpdmg = 0; // clear the temporary weapon damage
+ dmg.dmotion = clif_skill_damage(dsrc, bl, tick, dmg.amotion, dmg.dmotion, damage, dmg.div_, skillid, skilllv, type);
break;
case NPC_SELFDESTRUCTION:
if(src->type==BL_PC)
@@ -1992,7 +1991,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
if (su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP)
damage = 0; //Only Heaven's drive may damage traps. [Skotlex]
}
- if ((skillid || flag) && !(attack_type&BF_WEAPON)) { // do not really deal damage for ASC_BREAKER's 1st attack
+ if (!dmg.amotion) { // do not really deal damage for ASC_BREAKER's 1st attack
battle_damage(src,bl,damage,dmg.dmotion,0); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
if (dmg.dmg_lv == ATK_DEF || damage > 0) {
if (!status_isdead(bl))
@@ -2007,7 +2006,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
skill_blown(dsrc,bl,dmg.blewcount);
//Delayed damage must be dealt after the knockback (it needs to know actual position of target)
- if ((skillid || flag) && attack_type&BF_WEAPON && skillid != ASC_BREAKER) { // do not really deal damage for ASC_BREAKER's 1st attack
+ if (dmg.amotion) { // do not really deal damage for ASC_BREAKER's 1st attack
battle_delay_damage(tick+dmg.amotion,src,bl,attack_type,skillid,skilllv,damage,dmg.dmg_lv,dmg.dmotion,0);
}
@@ -2027,7 +2026,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
}
if (rdamage>0) {
- if (attack_type&BF_WEAPON)
+ if (dmg.amotion)
battle_delay_damage(tick+dmg.amotion,bl,src,0,0,0,rdamage,ATK_DEF,0,0);
else
battle_damage(bl,src,rdamage,0,0);