diff options
author | AJ K <aj@keresztes.us> | 2024-08-28 14:37:48 -0400 |
---|---|---|
committer | AJ K <aj@keresztes.us> | 2024-08-28 14:37:48 -0400 |
commit | e39be783e852f390d61776c51c006d444a131f0b (patch) | |
tree | 8183fcb880c427c10f0ff341e8981a4e1afa7e6f /world/map/npc/magic/level2-rain.txt | |
parent | cca41e5ba8fcd2e971303fd54be8786c86d82c7e (diff) | |
parent | 59aa2316201d785beee4abe7a4cfe6b87f53beb1 (diff) | |
download | serverdata-e39be783e852f390d61776c51c006d444a131f0b.tar.gz serverdata-e39be783e852f390d61776c51c006d444a131f0b.tar.bz2 serverdata-e39be783e852f390d61776c51c006d444a131f0b.tar.xz serverdata-e39be783e852f390d61776c51c006d444a131f0b.zip |
Diffstat (limited to 'world/map/npc/magic/level2-rain.txt')
-rw-r--r-- | world/map/npc/magic/level2-rain.txt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt index 6a7f288b..291af009 100644 --- a/world/map/npc/magic/level2-rain.txt +++ b/world/map/npc/magic/level2-rain.txt @@ -102,9 +102,18 @@ OnHit: if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map if(target(.caster, @target_id, 16) != 16 && .caster != @target_id) end; - if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc + if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc if(get(ELTTYPE, @target_id) == ELT_FIRE) injure .caster, @target_id, ((rand((@spellpower/15)+5)+2) * (100 - get(MDEF1, @target_id))) / 100; + if ($NO_RAIN_SPAWNS) end; // server-wide killswitch for rain pranks if spawns logic would backfire. + if (mobcount(getmap(), "rain::OnRainSpawnDeath") > 30) end; // Abort if too crowded. + if(get(Class, @target_id) == EntAbomination) // Rain hit Ent? This scores little perk! + monster getmap(), getnpcx(), getnpcy(), "", LogHead, 1+rand(1+(.max/150)), "rain::OnRainSpawnDeath"; + if((get(Class, @target_id) == LogHead) && (rand(5) == 3)) // Rain hit LogHead? Little perk as well (plants) + monster getmap(), getnpcx(), getnpcy(), "", MauvePlant+rand(5), 1, "rain::OnRainSpawnDeath"; + end; + +OnRainSpawnDeath: end; OnDestroy: |