summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level2-lightning-strike.txt
diff options
context:
space:
mode:
authorAJ K <aj@keresztes.us>2024-08-28 14:37:48 -0400
committerAJ K <aj@keresztes.us>2024-08-28 14:37:48 -0400
commite39be783e852f390d61776c51c006d444a131f0b (patch)
tree8183fcb880c427c10f0ff341e8981a4e1afa7e6f /world/map/npc/magic/level2-lightning-strike.txt
parentcca41e5ba8fcd2e971303fd54be8786c86d82c7e (diff)
parent59aa2316201d785beee4abe7a4cfe6b87f53beb1 (diff)
downloadserverdata-master.tar.gz
serverdata-master.tar.bz2
serverdata-master.tar.xz
serverdata-master.zip
Diffstat (limited to 'world/map/npc/magic/level2-lightning-strike.txt')
-rw-r--r--world/map/npc/magic/level2-lightning-strike.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/world/map/npc/magic/level2-lightning-strike.txt b/world/map/npc/magic/level2-lightning-strike.txt
index bdd311a6..0a97dc63 100644
--- a/world/map/npc/magic/level2-lightning-strike.txt
+++ b/world/map/npc/magic/level2-lightning-strike.txt
@@ -30,12 +30,11 @@
OnAttack:
if (target(BL_ID, @target_id, 0x36) != 0x36) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 | 0x20
-
set .@p, get(.max_radius, "rain") + 1;
set @ingravspell[5], @target_id; // store it because foreach overwrites it
foreach 1, getmap(), POS_X-.@p, POS_Y-.@p, POS_X+.@p, POS_Y+.@p, strnpcinfo(0)+"::OnNpc";
set @target_id, @ingravspell[5]; // now restore it
-
+ if (@ingravspell[2] <= 0) overrideattack; // workaround for caster in rain death case
set @ingravspell[2], @ingravspell[2] - 1;
if (@ingravspell[4] & 1) goto L_InRain;
void call("elt_damage", @ingravspell[0], (@ingravspell[0]/2)+1, ELT_EARTH, ELT_WIND, FX_LIGHTNING1 + rand(3));
@@ -49,6 +48,7 @@ L_FreeRecast:
OnDischarge:
if (@ingravspell[2] < 1) end;
set @ingravspell[2], 0;
+ set @ingravspell[4], 0; // Clean up "in rain" flag, it caused funny bugs.
misceffect FX_MAGIC_DISCHARGE, strcharinfo(0);
overrideattack;
end;