From 4e381e6a083d562fabe8c1d7a2be60720be59238 Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 23 Feb 2009 13:22:17 +0000 Subject: Add Deep Dwarves patch, with some minor changes. Add a new mutation, MUT_SLOW_HEALING, which at level 3 blocks all healing; it can't be acquired randomly, but deep dwarves start with it at level 3. This overrides regeneration, including the god-given kind (Trog's Hand.) Fix mutation listings (hopefully I got this right.) There are still some cases where DD HP shaving is not applied: ability HP costs, Staff of Dispater effect, vampiric draining backlash, Sublimation of Blood spell. Fix dancing weapons leaving mgrd incorrect if their weapon can't be generated. Breaks saves. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9173 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/ouch.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/ouch.cc') diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index ea31b2e37c..56367fede5 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -844,6 +844,18 @@ void ouch(int dam, int death_source, kill_method_type death_type, { ASSERT(!crawl_state.arena); + if (dam != INSTANT_DEATH && you.species == SP_DEEP_DWARF) + { + // Deep Dwarves get to shave _any_ hp loss. + int shave = 1 + random2(2 + random2(1 + you.experience_level / 3)); +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, "HP shaved: %d.", shave); +#endif + dam -= shave; + if (dam <= 0) + return; + } + ait_hp_loss hpl(dam, death_type); interrupt_activity(AI_HP_LOSS, &hpl); @@ -856,7 +868,7 @@ void ouch(int dam, int death_source, kill_method_type death_type, return; } - if (dam != INSTANT_DEATH) // that is, a "death" caused by hp loss {dlb} + if (dam != INSTANT_DEATH) { if (dam >= you.hp) { -- cgit v1.2.3-54-g00ecf