summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-03 16:26:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-03 16:26:38 +0000
commit443cecd840029f0b758d32eb3e51d12e555ef0a1 (patch)
tree2f978e6e3faf1a18769a95cfcb8e2f47deb1c926 /src/map/skill.c
parent5e4f830c297c26c9bccb1bac30c04f086b5e2ab2 (diff)
downloadhercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.tar.gz
hercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.tar.bz2
hercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.tar.xz
hercules-443cecd840029f0b758d32eb3e51d12e555ef0a1.zip
- Moved skill_counter_additional_effect calls to trigger right after skill_additional_effect (which means they trigger at the end of the attack motion for physical attacks)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5888 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index fcb0547af..e97e4c2e0 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1981,8 +1981,12 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
}
if ((skillid || flag) && !(attack_type&BF_WEAPON)) { // do not really deal damage for ASC_BREAKER's 1st attack
battle_damage(src,bl,damage, 0); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
- if (!status_isdead(bl) && (dmg.dmg_lv == ATK_DEF || damage > 0))
- skill_additional_effect(src,bl,skillid,skilllv,attack_type,tick);
+ if (dmg.dmg_lv == ATK_DEF || damage > 0) {
+ if (!status_isdead(bl))
+ skill_additional_effect(src,bl,skillid,skilllv,attack_type,tick);
+ //Counter status effects [Skotlex]
+ skill_counter_additional_effect(dsrc,bl,skillid,skilllv,attack_type,tick);
+ }
}
//Only knockback if it's still alive, otherwise a "ghost" is left behind. [Skotlex]
@@ -2002,9 +2006,6 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
skill_addtimerskill(src,tick + 800,bl->id,0,0,skillid,skilllv,0,flag);
}
- if (dmg.dmg_lv == ATK_DEF || damage > 0) //Counter status effects [Skotlex]
- skill_counter_additional_effect(dsrc,bl,skillid,skilllv,attack_type,tick);
-
if(sd && dmg.flag&BF_WEAPON && src != bl && src == dsrc && damage > 0) {
int hp = 0,sp = 0;
if(sd->right_weapon.hp_drain_rate && sd->right_weapon.hp_drain_per > 0 && dmg.damage > 0 && rand()%1000 < sd->right_weapon.hp_drain_rate) {