From 86eb5a8857b04c2479f1d46a65847336e6f01a23 Mon Sep 17 00:00:00 2001 From: mekolat Date: Fri, 13 May 2016 19:06:56 -0400 Subject: add caster checks to summon spells --- world/map/npc/magic/level1-summon-maggots.txt | 4 +++- world/map/npc/magic/level2-summon-fluffies.txt | 4 +++- world/map/npc/magic/level2-summon-mouboo.txt | 4 +++- world/map/npc/magic/level2-summon-pinkie.txt | 4 +++- world/map/npc/magic/level2-summon-snakes.txt | 4 +++- world/map/npc/magic/level2-summon-spiky-mushroom.txt | 4 +++- world/map/npc/magic/level2-summon-wickedmushroom.txt | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) (limited to 'world/map/npc/magic') diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt index 49022635..28e99a87 100644 --- a/world/map/npc/magic/level1-summon-maggots.txt +++ b/world/map/npc/magic/level1-summon-maggots.txt @@ -27,6 +27,8 @@ OnCast: end; OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map specialeffect FX_PENTAGRAM_BURST; set .@i, 0; set .@x, getnpcx(); @@ -42,7 +44,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1002, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-fluffies.txt b/world/map/npc/magic/level2-summon-fluffies.txt index 2ca630ed..f4d60475 100644 --- a/world/map/npc/magic/level2-summon-fluffies.txt +++ b/world/map/npc/magic/level2-summon-fluffies.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map specialeffect FX_PENTAGRAM_BURST; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1020, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-mouboo.txt b/world/map/npc/magic/level2-summon-mouboo.txt index f6a68fcf..b098a3dd 100644 --- a/world/map/npc/magic/level2-summon-mouboo.txt +++ b/world/map/npc/magic/level2-summon-mouboo.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map specialeffect FX_PENTAGRAM_BURST; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1028, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-pinkie.txt b/world/map/npc/magic/level2-summon-pinkie.txt index 785c8364..059d16f6 100644 --- a/world/map/npc/magic/level2-summon-pinkie.txt +++ b/world/map/npc/magic/level2-summon-pinkie.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map specialeffect FX_PENTAGRAM_BURST; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1018, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-snakes.txt b/world/map/npc/magic/level2-summon-snakes.txt index 2c46f28b..a9d0dbfe 100644 --- a/world/map/npc/magic/level2-summon-snakes.txt +++ b/world/map/npc/magic/level2-summon-snakes.txt @@ -29,6 +29,8 @@ OnCast: end; OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map specialeffect FX_PENTAGRAM_BURST; set .@i, 0; set .@x, getnpcx(); @@ -44,7 +46,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1010, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_DARK; diff --git a/world/map/npc/magic/level2-summon-spiky-mushroom.txt b/world/map/npc/magic/level2-summon-spiky-mushroom.txt index 5659fc32..188e9b9f 100644 --- a/world/map/npc/magic/level2-summon-spiky-mushroom.txt +++ b/world/map/npc/magic/level2-summon-spiky-mushroom.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map specialeffect FX_PENTAGRAM_BURST; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1019, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-wickedmushroom.txt b/world/map/npc/magic/level2-summon-wickedmushroom.txt index 02442c6b..3b8b9cfc 100644 --- a/world/map/npc/magic/level2-summon-wickedmushroom.txt +++ b/world/map/npc/magic/level2-summon-wickedmushroom.txt @@ -29,6 +29,8 @@ OnCast: end; OnSummon: + if(get(Hp, .master) < 1) destroy; // destroy if master is missing + if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map specialeffect FX_PENTAGRAM_BURST; set .@i, 0; set .@x, getnpcx(); @@ -44,7 +46,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1106, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_DARK; -- cgit v1.2.3-60-g2f50