From 0bd8f00f48363b713105ba476661176913316ef4 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sat, 3 Jan 2009 08:42:03 +0000 Subject: The arena now prevents undesired random monsters from being placed by telling pick_random_monster() to try something else, rather than by culling them after they're placed. By default the arena prevents zero xp monsters from being randomly placed. To allow them to be placed use the spec tag "allow_zero_xp". Removed the arena spec tag "alert", since it's no longer needed. Added the arena spec tag "cycle_random", which if set causes pick_random_monster() to cycle through all the monsters valid for the level_id chosen as the arena's place. Produces a greater variety of monsters when using test spawners. If arena mode is dumping message to the output file then prefix error messages with "ERROR: " and diagnostic messages with "DIAG: " git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8165 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index c3d5290a88..f083d43f1c 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -20,6 +20,7 @@ #include "externs.h" +#include "arena.h" #include "beam.h" #include "cloud.h" #include "database.h" @@ -997,6 +998,9 @@ void monster_die(monsters *monster, killer_type killer, if (!silent && _monster_avoided_death(monster, killer, killer_index)) return; + if (crawl_state.arena) + arena_monster_died(monster, killer, killer_index, silent); + mons_clear_trapping_net(monster); // Update list of monsters beholding player. @@ -3584,7 +3588,13 @@ static void _arena_set_foe(monsters *mons) else if (nearest_unseen != -1) { mons->target = menv[nearest_unseen].pos(); - mons->behaviour = BEH_WANDER; + if (mons->type == MONS_TEST_SPAWNER) + { + mons->foe = nearest_unseen; + mons->behaviour = BEH_SEEK; + } + else + mons->behaviour = BEH_WANDER; } else { -- cgit v1.2.3-54-g00ecf