summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level2-happy-curse.txt
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/magic/level2-happy-curse.txt')
-rw-r--r--world/map/npc/magic/level2-happy-curse.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/world/map/npc/magic/level2-happy-curse.txt b/world/map/npc/magic/level2-happy-curse.txt
index a82dce21..535afa11 100644
--- a/world/map/npc/magic/level2-happy-curse.txt
+++ b/world/map/npc/magic/level2-happy-curse.txt
@@ -7,22 +7,22 @@
if (getskilllv(SKILL_MAGIC) < .level) end;
if (.@level <= 3 && countitem("GingerBreadMan") >= 1) delitem "GingerBreadMan", 1;
elif (.@level <= 3) end;
- set @target_id, getcharid(3, @args$);
- if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id))
- set @target_id, BL_ID; // fallback to self
set @_M_BLOCK, 1; // block casting, until the timer clears it
addtimer 1000, "Magic Timer::OnClear"; // set the new debuff
callfunc "adjust_spellpower";
set Sp, Sp - 13;
- misceffect FX_MAGIC_GREEN, strcharinfo(0);
+ misceffect FX_MAGIC_JOY_CAST, strcharinfo(0);
callfunc "magic_exp";
- if (distance(BL_ID, @target_id) >= (@spellpower/100)+1) set @target_id, BL_ID;
- if (BL_ID == @target_id) set @args$, strcharinfo(0);
+ set @distance, (@spellpower / 100) + 1;
+ foreach 0, getmap(), (POS_X - @distance), (POS_Y - @distance), (POS_X + @distance), (POS_Y + @distance), strnpcinfo(0) + "::OnHit";
+ end;
+
+OnHit:
set @joyplim_count, 1, @target_id;
set @joyplim_emote, if_then_else(getskilllv(SKILL_MAGIC_DARK) > 1, EMOTE_EVIL, EMOTE_HAPPY), @target_id;
- set @joyplim_total, (@spellpower/10), @target_id;
+ set @joyplim_total, (@spellpower / 10), @target_id;
emotion @joyplim_emote, strcharinfo(0, @target_id);
addtimer 500, strnpcinfo(0)+"::OnEmote", @target_id;
end;