summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/items/grenade.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/npc/items/grenade.txt b/npc/items/grenade.txt
index 5768b66cd..c9379bbff 100644
--- a/npc/items/grenade.txt
+++ b/npc/items/grenade.txt
@@ -4,7 +4,6 @@
// Description:
// Grenades workaround
-// Main loop - TODO: Should not affect boss
// grenade(range, damage - in 0.01%, flag) - defaults to 3x3 square, with 5% damage.
// If flag is set, damage will be deemed to be absolute values.
function script grenade {
@@ -18,13 +17,14 @@ function script grenade {
.@dm=max(1, .@hp*(10000-.@d)/10000);
if (getarg(2, false))
.@dm=max(1, .@hp-.@d);
- //debugmes "Hitting monster (%d hp) for %d damage", .@hp, .@dm;
- setunitdata(.@mbs[.@i], UDT_HP, .@dm);
- specialeffect(FX_ATTACK, AREA, .@mbs[.@i]);
+ if (!(getunitdata(.@mbs[.@i], UDT_MODE) & 32)) { // 32 = MD_BOSS
+ //debugmes "Hitting monster (%d hp) for %d damage", .@hp, .@dm;
+ setunitdata(.@mbs[.@i], UDT_HP, .@dm);
+ specialeffect(FX_ATTACK, AREA, .@mbs[.@i]);
+ }
}
return;
}
-// TODO: Should not affect boss
// smoke_grenade(range, time) - defaults to 3x3 square, stun for 500ms.
function script smoke_grenade {