summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorsketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-06-19 08:05:57 +0000
committersketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-06-19 08:05:57 +0000
commit1e6705cfd482e09eecb66090166f9e4a51ac4ea9 (patch)
tree32d7024316a97c8906c257e80b954d6329f89b3c /src/map/skill.c
parente3eb0b1aa9fa47ddd790337faefcc6001b973e37 (diff)
downloadhercules-1e6705cfd482e09eecb66090166f9e4a51ac4ea9.tar.gz
hercules-1e6705cfd482e09eecb66090166f9e4a51ac4ea9.tar.bz2
hercules-1e6705cfd482e09eecb66090166f9e4a51ac4ea9.tar.xz
hercules-1e6705cfd482e09eecb66090166f9e4a51ac4ea9.zip
* Fixed SC_CHANGEUNDEAD behavior: Blessing and Increase AGI deals 1 damage and does not apply buffs to those inflicted by it.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12862 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b726419ac..db4605afb 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -278,8 +278,11 @@ int skill_calc_heal (struct block_list *src, struct block_list *target, int skil
}
// Making plagiarize check its own function [Aru]
-int can_copy (struct map_session_data *sd, int skillid)
+int can_copy (struct map_session_data *sd, int skillid, struct block_list* bl)
{
+ struct status_change* sc;
+ sc = status_get_sc(bl);
+
// Never copy NPC/Wedding Skills
if (skill_get_inf2(skillid)&(INF2_NPC_SKILL|INF2_WEDDING_SKILL))
return 0;
@@ -293,6 +296,10 @@ int can_copy (struct map_session_data *sd, int skillid)
return (sd->status.class_ == JOB_STALKER);
}
+ //don't copy increase agi or blessing from someone who is inflicted with sc_changeundead
+ if ((skillid == AL_INCAGI || skillid == AL_BLESSING) && sd->sc.data[SC_CHANGEUNDEAD])
+ return 0;
+
return 1;
}
@@ -1465,6 +1472,9 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
}
damage = dmg.damage + dmg.damage2;
+
+ if (skillid == AL_INCAGI || skillid == AL_BLESSING && tsd->sc.data[SC_CHANGEUNDEAD])
+ damage = 1;
if (damage > 0 && dmg.flag&BF_WEAPON && src != bl && src == dsrc &&
skillid != WS_CARTTERMINATION) // FIXME(?): Quick and dirty check, but HSCR does bypass Shield Reflect... so I make it bypass the whole reflect thing [DracoRPG]
@@ -1611,7 +1621,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
&& damage < tsd->status.hp)
{ //Updated to not be able to copy skills if the blow will kill you. [Skotlex]
if ((!tsd->status.skill[skillid].id || tsd->status.skill[skillid].flag >= 13) &&
- can_copy(tsd,skillid)) // Split all the check into their own function [Aru]
+ can_copy(tsd,skillid,bl)) // Split all the check into their own function [Aru]
{
int lv = skilllv;
if (tsd->cloneskill_id && tsd->status.skill[tsd->cloneskill_id].flag == 13){
@@ -3293,6 +3303,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case AL_INCAGI:
case AL_BLESSING:
+ if (dstsd != NULL && tsc->data[SC_CHANGEUNDEAD]) {
+ skill_attack(BF_MISC,src,src,bl,skillid,skilllv,tick,flag);
+ break;
+ }
case PR_SLOWPOISON:
case PR_IMPOSITIO:
case PR_LEXAETERNA: