diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-20 21:54:16 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-20 21:54:16 +0000 |
commit | 45c42254b104ae5bf1cff744e4a2d672d82cdb41 (patch) | |
tree | 91b3c06a05b6bfcb656c9ee2dbe49bbcec140ac5 /crawl-ref/source/spells1.cc | |
parent | 266bf3090d34f03bbf4f54b19bb2563225ef4cd3 (diff) | |
download | crawl-ref-45c42254b104ae5bf1cff744e4a2d672d82cdb41.tar.gz crawl-ref-45c42254b104ae5bf1cff744e4a2d672d82cdb41.zip |
Fix chaining when alternating between divine stamina and divine
robustness if mutations affect how the alternation goes.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5160 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r-- | crawl-ref/source/spells1.cc | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 60775e86bb..630ca22fbe 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -999,7 +999,16 @@ stamina_robustness: modify_stat(STAT_STRENGTH, stamina_amt, true, ""); modify_stat(STAT_INTELLIGENCE, stamina_amt, true, ""); modify_stat(STAT_DEXTERITY, stamina_amt, true, ""); - need_chain = true; + + // Keep vitalisation chaining on if divine stamina can + // be increased two vitalisation attempts from now, or + // if divine robustness can be increased one + // vitalisation attempt from now. + need_chain = + ((player_mutation_level(MUT_STRONG) / 5) < (2 - estep) + && (player_mutation_level(MUT_CLEVER) / 5) < (2 - estep) + && (player_mutation_level(MUT_AGILE) / 5) < (2 - estep)) + || (player_mutation_level(MUT_ROBUST) < (3 - estep)); break; } @@ -1030,7 +1039,16 @@ stamina_robustness: const int old_hp_max = you.hp_max; calc_hp(); set_hp(you.hp * you.hp_max / old_hp_max, false); - need_chain = true; + + // Keep vitalisation chaining on if divine robustness + // can be increased two vitalisation attempts from now, + // or if divine stamina can be increased one + // vitalisation attempt from now. + need_chain = + (player_mutation_level(MUT_ROBUST) < (2 - estep)) + || ((player_mutation_level(MUT_STRONG) / 5) < (3 - estep) + && (player_mutation_level(MUT_CLEVER) / 5) < (3 - estep) + && (player_mutation_level(MUT_AGILE) / 5) < (3 - estep)); break; } |