From fc944616f69e347423c408a9d3e3efee9140a46d Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sun, 30 Sep 2007 05:56:13 +0000 Subject: This commit breaks save file compatability. Lots of new things that amuse/stimulate Xom, and a few things which don't amuse him as much anymore. Among the new things is a corpse turning into a skeleton while butchering it; if this is too harsh to do just for Xom's amusement (previously turning into a skeleton while butchering was an ignored case and still produced chunks of flesh) it can be changed back. Also, if a Xom worshiper draws the Blank card, Xom makes it act like a Xom card, since a plain old Blank card is boring. Keep track of which branch the Orb is in, if the player isn't carrying it. Keep track of how/why the player ended up in a particular level type (Abyss, Pan, etc). Changed most "a distortion effect" cause strings for distortion caused tranlsocation miscast effects to something more specific. Added new wizard commands 'C' to curse or uncruse an item, and 'Ctrl-A' to re-generate the Abyss. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2256 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/view.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'crawl-ref/source/view.cc') diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 0fd7ced541..0fd01f982c 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -66,6 +66,7 @@ #include "terrain.h" #include "travel.h" #include "tutorial.h" +#include "xom.h" // These are hidden from the rest of the world... use the functions // below to get information about the map grid. @@ -1011,6 +1012,8 @@ void monster_grid(bool do_updates) void fire_monster_alerts() { + int num_hostile = 0; + for (int s = 0; s < MAX_MONSTERS; s++) { monsters *monster = &menv[s]; @@ -1037,6 +1040,9 @@ void fire_monster_alerts() // Monster was viewed this turn monster->flags |= MF_WAS_IN_VIEW; + + if (mons_attitude(monster) == ATT_HOSTILE) + num_hostile++; } else { @@ -1051,6 +1057,21 @@ void fire_monster_alerts() } } + // Xom thinks it's hilarious the way the player picks up an ever + // growing entourage of monsters while running through the Abyss. + // To approximate this, if the number of hostile monsters in view + // is greater than it ever was for this particular trip to the + // Abyss, Xom is stimulated in proprotion to the number of + // hostile monsters. Thus if the entourage doesn't grow, then + // Xom becomes bored. + if (you.level_type == LEVEL_ABYSS + && you.attribute[ATTR_ABYSS_ENTOURAGE] < num_hostile) + { + you.attribute[ATTR_ABYSS_ENTOURAGE] = num_hostile; + + xom_is_stimulated(16 * num_hostile); + } + monsters_seen_this_turn.clear(); } -- cgit v1.2.3-54-g00ecf