summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/items/grenade.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt
index 218758b8a..13685f0a2 100644
--- a/npc/items/grenade.txt
+++ b/npc/items/grenade.txt
@@ -24,4 +24,19 @@ function script grenade {
}
return;
}
+// TODO: Should not affect boss
+
+// smoke_grenade(range, time) - defaults to 3x3 square, stun for 500ms.
+function script smoke_grenade {
+ .@r=getarg(0, 3);
+ .@d=getarg(1, 500);
+
+ getmapxy(.@m$, .@x, .@y, 0);
+ .@c=getunits(BL_MOB, .@mbs, false, .@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r);
+ for (.@i = 0; .@i < .@c; .@i++) {
+ sc_start SC_SLEEP, .@d, 1;
+ specialeffect(FX_ATTACK, AREA, .@mbs[.@i]);
+ }
+ return;
+}