diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-22 08:13:47 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-22 08:13:47 +0000 |
commit | 50286f06b77aefd2cebc397b3debaa4c09f22549 (patch) | |
tree | 4d0d7b3427f6b6c791013e6ac89a8c45776c0b12 /crawl-ref | |
parent | c7d56c3833d635c55a0c2c97c2ddabebdc11feed (diff) | |
download | crawl-ref-50286f06b77aefd2cebc397b3debaa4c09f22549.tar.gz crawl-ref-50286f06b77aefd2cebc397b3debaa4c09f22549.zip |
Some arena tweaks:
* When Kirke dies and hogs are turned into humans, don't change their
attitute if in arena mode, since that messes up arena book-keeping.
* Give an error if a neutral monster is placed in the arena.
* If a summoned band leader makes it past the summon throttle restriction,
let in all of its band members, even if that will exceed the throttle.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10368 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/arena.cc | 14 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 9 |
2 files changed, 19 insertions, 4 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc index 1e825db7e7..b706eae19b 100644 --- a/crawl-ref/source/arena.cc +++ b/crawl-ref/source/arena.cc @@ -1023,7 +1023,10 @@ bool arena_veto_random_monster(monster_type type) bool arena_veto_place_monster(const mgen_data &mg, bool first_band_member, const coord_def& pos) { - if (mg.abjuration_duration > 0) + // If the first band member makes it past the summon throttle cut, + // let all of the rest of its band in too regardless of the summon + // throttle. + if (mg.abjuration_duration > 0 && first_band_member) { if (mg.behaviour == BEH_FRIENDLY && arena::faction_a.active_members > arena::summon_throttle) @@ -1053,7 +1056,14 @@ void arena_placed_monster(monsters *monster) arena::faction_b.active_members++; arena::faction_a.won = false; } - + else + { + mprf(MSGCH_ERROR, "Placed neutral (%d) monster %s", + (int) monster->attitude, + monster->name(DESC_PLAIN, true).c_str()); + more(); + } + if (monster->type == MONS_TEST_SPAWNER) { if (monster->attitude == ATT_FRIENDLY) diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 530e768313..3ab36fd41f 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1161,9 +1161,14 @@ static void _hogs_to_humans() monsters *monster = &menv[i]; if (monster->type == MONS_HOG) { + // A monster changing factions while in the arena messes up + // arena book-keeping. + if (!crawl_state.arena) + { + monster->attitude = ATT_GOOD_NEUTRAL; + monster->flags |= MF_WAS_NEUTRAL; + } monster->type = MONS_HUMAN; - monster->attitude = ATT_GOOD_NEUTRAL; - monster->flags |= MF_WAS_NEUTRAL; behaviour_event(monster, ME_EVAL); any++; |