diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/acr.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/decks.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.h | 5 | ||||
-rw-r--r-- | crawl-ref/source/xom.cc | 10 |
5 files changed, 11 insertions, 12 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 8d5bf039c1..3951610e5b 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -545,9 +545,9 @@ static void _do_wizard_command(int wiz_command, bool silent_fail) case 'X': if (you.religion == GOD_XOM) - xom_acts(abs(you.piety - 100)); + xom_acts(abs(you.piety - HALF_MAX_PIETY)); else - xom_acts(coinflip(), random_range(0, MAX_PIETY/2)); + xom_acts(coinflip(), random_range(0, HALF_MAX_PIETY)); break; case 'p': diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc index b47442fe65..04b8cbed51 100644 --- a/crawl-ref/source/decks.cc +++ b/crawl-ref/source/decks.cc @@ -3048,7 +3048,7 @@ bool card_effect(card_type which_card, deck_rarity_type rarity, if (you.religion == GOD_XOM && !rc) { god_speaks(GOD_XOM, "\"How boring, let's spice things up a little.\""); - xom_acts(abs(you.piety - 100)); + xom_acts(abs(you.piety - HALF_MAX_PIETY)); } if (you.religion == GOD_NEMELEX_XOBEH && !rc) diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 71de0d3f88..ba7fd58626 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -6632,7 +6632,7 @@ void god_pitch(god_type which_god) if (you.religion == GOD_XOM) { // Xom uses piety and gift_timeout differently. - you.piety = (MAX_PIETY / 2); + you.piety = HALF_MAX_PIETY; you.gift_timeout = random2(40) + random2(40); } else diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h index 32bfb1e152..df3fc18451 100644 --- a/crawl-ref/source/religion.h +++ b/crawl-ref/source/religion.h @@ -14,8 +14,9 @@ #include "ouch.h" #include "externs.h" -#define MAX_PIETY 200 -#define MAX_PENANCE 200 +#define HALF_MAX_PIETY 100 +#define MAX_PIETY 200 +#define MAX_PENANCE 200 enum harm_protection_type { diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 933a40eab2..1c5af19b4a 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -60,8 +60,6 @@ REVISION("$Rev$"); # define DEBUG_GIFTS 1 #endif -#define HALF_MAX_PIETY MAX_PIETY / 2 - // Which spells? First I copied all spells from your_spells(), and then // I filtered some out, especially conjurations. Then I sorted them in // roughly ascending order of power. @@ -180,9 +178,9 @@ bool xom_is_nice(int tension) // at zero tension the opposite. const int tension_bonus = (tension == -1 ? 0 : - tension == 0 ? -std::min(abs(HALF_MAX_PIETY - you.piety)/2, - you.piety/10) - : std::min((MAX_PIETY - you.piety)/2, + tension == 0 ? -std::min(abs(HALF_MAX_PIETY - you.piety) / 2, + you.piety / 10) + : std::min((MAX_PIETY - you.piety) / 2, random2(tension))); #ifdef DEBUG_XOM @@ -2982,7 +2980,7 @@ void xom_acts(bool niceness, int sever, int tension) if (you.religion == GOD_XOM && one_chance_in(5)) { const std::string old_xom_favour = describe_xom_favour(); - you.piety = random2(MAX_PIETY+1); + you.piety = random2(MAX_PIETY + 1); const std::string new_xom_favour = describe_xom_favour(); if (was_bored || old_xom_favour != new_xom_favour) { |