summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/acr.cc40
-rw-r--r--crawl-ref/source/xom.cc6
2 files changed, 39 insertions, 7 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 54138ed04b..bea7f1e501 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -995,11 +995,43 @@ static void handle_wizard_command( void )
case '^':
{
- int old_piety = you.piety;
+ if (you.religion == GOD_NO_GOD)
+ {
+ mpr("You are not religious!");
+ break;
+ }
+ else if (you.religion == GOD_XOM) // increase amusement instead
+ {
+ xom_is_stimulated(50, XM_NORMAL, true);
+ break;
+ }
+
+ const int old_piety = you.piety;
+ const int old_penance = you.penance[you.religion];
+ if (old_piety >= MAX_PIETY && !old_penance)
+ {
+ mprf("Your piety (%d) is already %s maximum.",
+ old_piety, old_piety == MAX_PIETY ? "at" : "above");
+ }
- gain_piety(50);
- mprf("Congratulations, your piety went from %d to %d!",
- old_piety, you.piety);
+ // even at maximum, you can still gain gifts
+ // try at least once f. maximum, or repeat until something happens
+ // Rarely, this might result in several gifts during the same round!
+ do {
+ gain_piety(50);
+ } while (old_piety < MAX_PIETY && old_piety == you.piety
+ && old_penance == you.penance[you.religion]);
+
+ if (old_penance)
+ {
+ mprf("Congratulations, your penance was decreased from %d to %d!",
+ old_penance, you.penance[you.religion]);
+ }
+ else if (you.piety > old_piety)
+ {
+ mprf("Congratulations, your piety went from %d to %d!",
+ old_piety, you.piety);
+ }
}
break;
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 789ecc7207..227798e990 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -182,9 +182,9 @@ static void _xom_is_stimulated(int maxinterestingness,
god_speaks(GOD_XOM,
((interestingness > 200) ? message_array[5] :
(interestingness > 100) ? message_array[4] :
- (interestingness > 75) ? message_array[3] :
- (interestingness > 50) ? message_array[2] :
- (interestingness > 25) ? message_array[1] :
+ (interestingness > 75) ? message_array[3] :
+ (interestingness > 50) ? message_array[2] :
+ (interestingness > 25) ? message_array[1] :
message_array[0]));
}