From b51dc9e9720a5cdb08d240da53948d34bb8a6c5a Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 28 Mar 2009 19:59:33 +0000 Subject: Xom again: * tweak values for tension and amusement * Xom only laughs about "funny" deaths * gift_timeout rerolling after a bad act depends on its severity * replace the blink effect with position swapping git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9561 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/delay.cc | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/delay.cc') diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index d1f9f04bc1..7b1f8f0e85 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -676,6 +676,16 @@ bool is_vampire_feeding() return (delay.type == DELAY_FEED_VAMPIRE); } +bool player_stair_delay() +{ + if (!you_are_delayed()) + return (false); + + const delay_queue_item &delay = you.delay_queue.front(); + return (delay.type == DELAY_ASCENDING_STAIRS + || delay.type == DELAY_DESCENDING_STAIRS); +} + // Check whether there are monsters who might be influenced by Recite. // Returns 0, if no monsters found // Returns 1, if eligible audience found @@ -1539,10 +1549,22 @@ void armour_wear_effects(const int item_slot) mpr("Oops, that feels deathly cold."); learned_something_new(TUT_YOU_CURSED); + int amusement = 32; + // Cursed cloaks prevent you from removing body armour. - const int cloak_mult = (get_armour_slot(arm) == EQ_CLOAK) ? 2 : 1; + if (get_armour_slot(arm) == EQ_CLOAK) + amusement *= 2; + + if (!known_cursed) + { + amusement *= 2; - xom_is_stimulated(32 * cloak_mult * (!known_cursed ? 2 : 1)); + god_type god; + if (origin_is_god_gift(arm, &god) && god == GOD_XOM) + amusement *= 2; + } + + xom_is_stimulated(amusement); } if (eq_slot == EQ_SHIELD) @@ -1757,11 +1779,8 @@ static bool _should_stop_activity(const delay_queue_item &item, delay_type curr = current_delay_action(); - if (ai == AI_SEE_MONSTER && (curr == DELAY_ASCENDING_STAIRS - || curr == DELAY_DESCENDING_STAIRS)) - { + if (ai == AI_SEE_MONSTER && player_stair_delay()) return (false); - } if (ai == AI_FULL_HP || ai == AI_FULL_MP) { -- cgit v1.2.3-54-g00ecf