diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-15 21:33:27 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-02-15 21:33:27 +0000 |
commit | e3c41fc21fc88f1e1edb67992a7cb0bbe68abe83 (patch) | |
tree | f3d1eb8db6523130b30cdf9b1c974f7f16d7a367 /crawl-ref | |
parent | 3ad5935cd7f7c5798e2f4e0103c8c7ee343ad920 (diff) | |
download | crawl-ref-e3c41fc21fc88f1e1edb67992a7cb0bbe68abe83.tar.gz crawl-ref-e3c41fc21fc88f1e1edb67992a7cb0bbe68abe83.zip |
Add better feedback on piety gain command (^) in wizard mode.
(Resulting from the mysterious FR 1892989.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3440 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/acr.cc | 40 | ||||
-rw-r--r-- | crawl-ref/source/xom.cc | 6 |
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])); } |