diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-22 22:01:10 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-22 22:01:10 +0000 |
commit | 7adf2d18d2d3ea426a4724f2672e291630e26cba (patch) | |
tree | 23491afa4bd53827854609a7c48f62f2cd8d6836 /crawl-ref/source/spells1.cc | |
parent | ddc0e17079b9b3aece830366ff5af4319479787d (diff) | |
download | crawl-ref-7adf2d18d2d3ea426a4724f2672e291630e26cba.tar.gz crawl-ref-7adf2d18d2d3ea426a4724f2672e291630e26cba.zip |
Have cast_revitalisation() do all its own piety handling, as it's a bit
cleaner that way.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5183 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 1aa1ae40cb..4d014f7e8b 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -1099,26 +1099,28 @@ stamina_robustness: (type == 2) ? "better" : "powerful"); - // The more the step counter has advanced, the greater the piety - // cost is. + // If vitalisation has succeeded, pay the extended piety cost, + // based on how far the step counter has advanced. int loss_amt = step + 1 + (random2(3) - 1); if (loss_amt > 0) lose_piety(loss_amt); - // If there's not enough piety left to vitalise again, turn off - // vitalisation chaining. Note that, if the piety cost for this - // in abl-show.cc::Ability_List[] is changed from 2, this needs - // to be changed as well. - if (you.piety < piety_breakpoint(1) + 2) - need_chain = false; - // Increment the step counter. step++; } else canned_msg(MSG_NOTHING_HAPPENS); + // Whether vitalisation has succeeded or failed, pay the minimum + // piety cost. + lose_piety(2); + + // If there's not enough piety left to vitalise again, turn off + // vitalisation chaining. + if (you.piety < piety_breakpoint(1)) + need_chain = false; + // If vitalisation has succeeded, it hasn't succeeded as far as // possible, and vitalisation chaining is needed, turn on // vitalisation chaining for several turns. |