From df9bbe2bc324f8403ecc78f4d1d29a932a072a5e Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Wed, 21 Oct 2009 17:55:18 -0700 Subject: arena.cc: Make sure adjust_spells() gets all mons Apply arena::adjust_spells() in arena_placed_monster() to make sure that it gets absolutely everything. --- crawl-ref/source/arena.cc | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc index 44bdc34b59..e6e1c14556 100644 --- a/crawl-ref/source/arena.cc +++ b/crawl-ref/source/arena.cc @@ -134,17 +134,6 @@ namespace arena void adjust_monsters() { - if (!allow_summons || !allow_animate) - { - for (int m = 0; m < MAX_MONSTERS; ++m) - { - monsters *mons(&menv[m]); - if (!mons->alive()) - continue; - adjust_spells(mons, !allow_summons, !allow_animate); - } - } - for (int i = 0; i < MAX_MONSTERS; i++) { monsters *mon = &menv[i]; @@ -1170,6 +1159,10 @@ void arena_placed_monster(monsters *monster) more(); } + if (!arena::allow_summons || !arena::allow_animate) + arena::adjust_spells(monster, !arena::allow_summons, + !arena::allow_animate); + if (monster->type == MONS_TEST_SPAWNER) { if (monster->attitude == ATT_FRIENDLY) @@ -1222,9 +1215,8 @@ void arena_placed_monster(monsters *monster) if (arena::move_summons) monster_teleport(monster, true, true); - if (!arena::allow_chain_summons || !arena::allow_animate) - arena::adjust_spells(monster, !arena::allow_chain_summons, - !arena::allow_animate); + if (!arena::allow_chain_summons) + arena::adjust_spells(monster, true, false); } } -- cgit v1.2.3-54-g00ecf