diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-06 01:37:30 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-06 01:37:30 +0000 |
commit | b047730f0c88df6ab5d53aac6470a47aae2a7af3 (patch) | |
tree | 77f59865f0ce7a9c089101fb9ca752111d7aed15 /crawl-ref/source/view.cc | |
parent | d91b7c79b321690ca48ec952cd6012b419eb3c03 (diff) | |
download | crawl-ref-b047730f0c88df6ab5d53aac6470a47aae2a7af3.tar.gz crawl-ref-b047730f0c88df6ab5d53aac6470a47aae2a7af3.zip |
In arena mode, make mons_friendly() and mons_wont_attack() always return false,
with mons_friendly_real() and monst_wont_attack_real() having the old behaviour
of ignoring arena mode. Remove all special casing of
"mons_friendly(mon) && !crawl_state.arena", instead using mons_friendly_real()
and mons_wont_attack_real() in the monster code which distinguishes friend from
foe. Might be a bit buggy.
Make Zot traps affect all monsters in arena mode, and never the player.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8255 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 1c552ec1f0..465f294115 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -828,7 +828,7 @@ int get_mons_colour(const monsters *mons) if (mons->has_ench(ENCH_BERSERK)) col = RED; - if (mons_friendly(mons)) + if (mons_friendly_real(mons)) { col |= COLFLAG_FRIENDLY_MONSTER; } @@ -917,7 +917,7 @@ static void _good_god_follower_attitude_change(monsters *monster) void beogh_follower_convert(monsters *monster, bool orc_hit) { - if (you.species != SP_HILL_ORC) + if (you.species != SP_HILL_ORC || crawl_state.arena) return; // For followers of Beogh, decide whether orcs will join you. @@ -3960,7 +3960,13 @@ bool mon_enemies_around(const monsters *monster) if (monster->foe != MHITNOT && monster->foe != MHITYOU) return (true); - if (mons_wont_attack(monster)) + if (crawl_state.arena) + { + // If the arena-mode code in _handle_behaviour() hasn't set a foe then + // we don't have one. + return (false); + } + else if (mons_wont_attack(monster)) { // Additionally, if an ally is nearby and *you* have a foe, // consider it as the ally's enemy too. |