summaryrefslogtreecommitdiff
path: root/npc/items
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-18 14:13:41 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-18 14:13:41 -0300
commit14439b05bd6f1606839a63e023420cedb086f805 (patch)
treeb42eed52d037644d2fd09474e437a874acf11f78 /npc/items
parent268c4eb59d9422a8f0fc3f5a7c2f06c9fc483c2c (diff)
downloadserverdata-14439b05bd6f1606839a63e023420cedb086f805.tar.gz
serverdata-14439b05bd6f1606839a63e023420cedb086f805.tar.bz2
serverdata-14439b05bd6f1606839a63e023420cedb086f805.tar.xz
serverdata-14439b05bd6f1606839a63e023420cedb086f805.zip
Grenades now doesn't work on BOSS monsters.
It's more fair this way.
Diffstat (limited to 'npc/items')
-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 {