From ca86c98390011569f788db8ce396ca509fb09caa Mon Sep 17 00:00:00 2001 From: zelgadis Date: Fri, 9 Jan 2009 04:18:30 +0000 Subject: Change arena item culling to cull oldest items first instead of most boring items first. Removed arena tag "move_spawners", replaced it with "move_summons", which moves summons to a random location as soon as they're placed. Added tag "summon_throttle:", which if set prevents summons from being placed if the summoner has N or more allies. Make arena monsters ignore test spawners, since spawners are only pseudo-monsters placed in order to summons real monsters (plus attacking them is a waste of time since they're unkillable). Tell the arena when a corpse is placed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8349 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index db999f59e5..d1907b6b5e 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1160,9 +1160,6 @@ void monster_die(monsters *monster, killer_type killer, } } - if (crawl_state.arena) - arena_monster_died(monster, killer, killer_index, silent); - bool death_message = !silent && !did_death_message && mons_near(monster) && (player_monster_visible(monster) || crawl_state.arena); @@ -1596,11 +1593,12 @@ void monster_die(monsters *monster, killer_type killer, _monster_die_cloud(monster, !mons_reset, silent, summoned, summon_type); + int corpse = -1; if (!mons_reset) { // Have to add case for disintegration effect here? {dlb} if (!summoned) - place_monster_corpse(monster, silent); + corpse = place_monster_corpse(monster, silent); } if (!mons_reset && !crawl_state.arena) @@ -1632,24 +1630,17 @@ void monster_die(monsters *monster, killer_type killer, _fire_monster_death_event(monster, killer, killer_index, false); + if (crawl_state.arena) + arena_monster_died(monster, killer, killer_index, silent, corpse); + const coord_def mwhere = monster->pos(); if (drop_items) monster_drop_ething(monster, YOU_KILL(killer) || pet_kill); else - { // Destroy the items belonging to MF_HARD_RESET monsters so they // don't clutter up mitm[] - for (int i = 0; i < NUM_MONSTER_SLOTS; i++) - { - int item = monster->inv[i]; + monster->destroy_inventory(); - if (item != NON_ITEM) - { - destroy_item(item); - monster->inv[i] = NON_ITEM; - } - } - } monster_cleanup(monster); // Force redraw for monsters that die. @@ -3581,6 +3572,16 @@ static void _arena_set_foe(monsters *mons) if (!other->alive() || mons_aligned(mind, i)) continue; + // Don't fight test spawners, since they're only pseduo-monsters + // placed to spawn real monsters, plus they're impossible to kill. + // But test spawners can fight each other, to give them a target o + // spawn against. + if (other->type == MONS_TEST_SPAWNER + && mons->type != MONS_TEST_SPAWNER) + { + continue; + } + const int distance = grid_distance(mons->pos(), other->pos()); const bool seen = mons->can_see(other); -- cgit v1.2.3-54-g00ecf