diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-30 06:01:16 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-04-30 06:01:16 +0000 |
commit | f11d79e00eeeffc1a7be0d75b78f580e396b2e7a (patch) | |
tree | c849129758118b86221ba09ec6b5832ad46b5354 /src/map/skill.c | |
parent | cafe5e222686411dbfd080eb1efa1083850e60c2 (diff) | |
download | hercules-f11d79e00eeeffc1a7be0d75b78f580e396b2e7a.tar.gz hercules-f11d79e00eeeffc1a7be0d75b78f580e396b2e7a.tar.bz2 hercules-f11d79e00eeeffc1a7be0d75b78f580e396b2e7a.tar.xz hercules-f11d79e00eeeffc1a7be0d75b78f580e396b2e7a.zip |
- Removed attack_type from sd->state structure (it's only use was for soul-drain!)
- Moved the soul-drain code to skill_counter_additionaleffect
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6392 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index ea673682d..8040127fb 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1451,6 +1451,21 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * }
}
+ if(sd && bl->type == BL_MOB && status_isdead(bl) && skill_get_inf(skillid)!=INF_GROUND_SKILL && (rate=pc_checkskill(sd,HW_SOULDRAIN))>0)
+ { //Soul Drain should only work on targetted spells [Skotlex]
+ int sp;
+ if (pc_issit(sd)) pc_setstand(sd); //Character stuck in attacking animation while 'sitting' fix. [Skotlex]
+ clif_skill_nodamage(src,bl,HW_SOULDRAIN,rate,1);
+ sp = (status_get_lv(bl))*(95+15*rate)/100;
+ if (sp > 0) {
+ if(sd->status.sp + sp > sd->status.max_sp)
+ sp = sd->status.max_sp - sd->status.sp;
+ sd->status.sp += sp;
+ if (sp > 0 && battle_config.show_hp_sp_gain)
+ clif_heal(sd->fd,SP_SP,sp);
+ }
+ }
+
//Trigger counter-spells to retaliate against damage causing skills. [Skotlex]
if(dstsd && !status_isdead(bl) && src != bl && !(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE))
{
|