diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-10-26 00:16:31 -0700 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2009-10-26 13:40:51 +0530 |
commit | d55c844e48e7f56c4ec9b9bb6badd21a68022ea7 (patch) | |
tree | d18c6ca3bb1d6f02e7f0fb252dedee500ee7f621 /crawl-ref/source/effects.cc | |
parent | 270ec5c73a1bf0f0514a8a8f95d4c191424b03bb (diff) | |
download | crawl-ref-d55c844e48e7f56c4ec9b9bb6badd21a68022ea7.tar.gz crawl-ref-d55c844e48e7f56c4ec9b9bb6badd21a68022ea7.zip |
Add stochastic torment resistance per dpeg
The mutation comes in three levels and blocks 20%, 40%, or 60% (shown
to the user) of torments. Right now, you can cast Symbol of Torment
with it; I doubt this is too good. It is on the tier-1 list for
demonspawn mutations, and I expect it to be balanced appropriately.
Signed-off-by: Darshan Shaligram <dshaligram@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 0f1ecf5046..770eb74959 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -194,7 +194,7 @@ int torment_player(int pow, int caster) // correctly. int hploss = 0; - if (!player_res_torment()) + if (!player_res_torment(false)) { // Negative energy resistance can alleviate torment. hploss = std::max(0, you.hp * (50 - player_prot_life() * 5) / 100 - 1); @@ -203,14 +203,13 @@ int torment_player(int pow, int caster) // Kiku protects you from torment to a degree. bool kiku_shielding_player = (you.religion == GOD_KIKUBAAQUDGHA - && !player_res_torment() && !player_under_penance() && you.piety > 80 && you.gift_timeout == 0); // no protection during pain branding weapon if (kiku_shielding_player) { - if (!player_res_torment()) + if (hploss > 0) { if (random2(600) < you.piety) // 13.33% to 33.33% chance { |