diff options
author | Shayne Halvorson <N78291@gmail.com> | 2014-05-10 13:16:05 -0500 |
---|---|---|
committer | reaverb <reaverb.Crawl@gmail.com> | 2014-05-28 01:14:20 -0400 |
commit | 2adf8a44e96d103f4d8971d1fdb1203c2a633945 (patch) | |
tree | 18cdfb197c2d97242c78652ce84d5b44be5b8c80 /crawl-ref/source/ouch.cc | |
parent | 5d578cf1fbba9286d1b334168093ea050fe201b9 (diff) | |
download | crawl-ref-2adf8a44e96d103f4d8971d1fdb1203c2a633945.tar.gz crawl-ref-2adf8a44e96d103f4d8971d1fdb1203c2a633945.zip |
Replace Hammer card with Fortitude.
It grants damage shaving along with a strength boost, as Battlelust
is likely not to make it into Nemelex's decks.
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 98bafc98da..4f048d2b3c 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -1018,13 +1018,20 @@ void ouch(int dam, int death_source, kill_method_type death_type, dam = div_rand_round(dam * (10 - min(degree, 5)), 10); } - if (you.species == SP_DEEP_DWARF && dam != INSTANT_DEATH - && death_type != KILLED_BY_POISON) + if ((you.duration[DUR_FORTITUDE] || you.species == SP_DEEP_DWARF) + && dam != INSTANT_DEATH && death_type != KILLED_BY_POISON) { - // Deep Dwarves get to shave any hp loss. - int shave = 1 + random2(2 + random2(1 + you.experience_level / 3)); - dprf("HP shaved: %d.", shave); - dam -= shave; + if (you.species == SP_DEEP_DWARF) + { + // Deep Dwarves get to shave any hp loss. + int shave = 1 + random2(2 + random2(1 + you.experience_level / 3)); + dprf("HP shaved: %d.", shave); + dam -= shave; + } + + if (you.duration[DUR_FORTITUDE]) + dam -= random2(10); + if (dam <= 0) { // Rotting and costs may lower hp directly. |