diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-02 22:40:40 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-02 22:40:40 +0000 |
commit | 4ba581107a1d56ce5706593f4a3917f457afb929 (patch) | |
tree | b32318795a7f152f1fd92043e182dba09bea9bea /crawl-ref/source/misc.cc | |
parent | 6b34259b6ce235196c3f2f70e706d9235dc100cb (diff) | |
download | crawl-ref-4ba581107a1d56ce5706593f4a3917f457afb929.tar.gz crawl-ref-4ba581107a1d56ce5706593f4a3917f457afb929.zip |
Made Xom be smarter about being amused at losing/missing runes, and
made Xom also be amused at runes being destroyed. Related changes:
* Keep track of which items have ever been held by the player with
ISFLAG_BEEN_IN_INV.
* item_was_destroyed() is called when an item is destroyed (as in
dropped in lava, not destroy_item() being called), and item_was_lost()
is called if the item was lost (i.e., being left behind in the Abyss).
* Keeps track of the number of runes that the character has collected,
and how many have been left in the Halls of Zot.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2300 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r-- | crawl-ref/source/misc.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 96c66ab2c2..6ddf4eae07 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -684,10 +684,15 @@ void up_stairs(dungeon_feature_type force_stair, // of dropping some runes within Zot), but need to get back in Zot // to get the Orb? Zom finds that funny. if (stair_find == DNGN_RETURN_FROM_ZOT - && runes_in_pack() < NUMBER_OF_RUNES_NEEDED - && (branches[BRANCH_HALL_OF_ZOT].branch_flags & BFLAG_HAS_ORB)) + && branches[BRANCH_HALL_OF_ZOT].branch_flags & BFLAG_HAS_ORB) { - xom_is_stimulated(255, "Xom snickers loudly.", true); + int runes_avail = you.attribute[ATTR_UNIQUE_RUNES] + + you.attribute[ATTR_DEMONIC_RUNES] + + you.attribute[ATTR_ABYSSAL_RUNES] + - you.attribute[ATTR_RUNES_IN_ZOT]; + + if (runes_avail < NUMBER_OF_RUNES_NEEDED) + xom_is_stimulated(255, "Xom snickers loudly.", true); } if (you.skills[SK_TRANSLOCATIONS] > 0 && !allow_control_teleport( true )) |