From dea58872adf42144fad9d1dbdeb5f09cf4433402 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 10 Sep 2007 09:59:37 +0000 Subject: Applying several patches by dolorous: * 1789774: intrinsic mutations for undead * 1790380: kobold special handling of disease * 1790723: missing periods * 1791092: Xom potion handling It's arguable whether we want such fine distinction between races. As David pointed out, small things of lesser importance might clutter the mutations screen. For now, I think transparency is good. And if it seems to much, we could remove a few. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2064 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 42b1138904..145a490d7f 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -1229,7 +1229,7 @@ bool player_control_teleport(bool calc_unid) { int player_res_torment(bool) { - return (you.is_undead || you.mutation[MUT_TORMENT_RESISTANCE]); + return (you.mutation[MUT_TORMENT_RESISTANCE]); } // funny that no races are susceptible to poisons {dlb} @@ -1472,8 +1472,6 @@ int player_prot_life(bool calc_unid) { pl += 2; } - else if (you.is_undead && you.species != SP_VAMPIRE) - pl += 3; switch (you.attribute[ATTR_TRANSFORMATION]) { @@ -1496,7 +1494,7 @@ int player_prot_life(bool calc_unid) // randart wpns pl += scan_randarts(RAP_NEGATIVE_ENERGY, calc_unid); - // demonic power + // undead/demonic power pl += you.mutation[MUT_NEGATIVE_ENERGY_RESISTANCE]; if (pl > 3) @@ -3352,7 +3350,7 @@ void display_char_status() } if (you.disease || you.species == SP_VAMPIRE && you.hunger_state < HS_HUNGRY) - mpr("You do not regenerate."); + mpr("You do not heal."); // prints a contamination message contaminate_player( 0, true ); @@ -4520,15 +4518,15 @@ void reduce_poison_player( int amount ) } } -void confuse_player( int amount, bool resistable ) +bool confuse_player( int amount, bool resistable ) { if (amount <= 0) - return; + return false; if (resistable && wearing_amulet(AMU_CLARITY)) { mpr( "You feel momentarily confused." ); - return; + return false; } const int old_value = you.duration[DUR_CONF]; @@ -4545,6 +4543,7 @@ void confuse_player( int amount, bool resistable ) xom_is_stimulated(you.duration[DUR_CONF] - old_value); } + return true; } void reduce_confuse_player( int amount ) @@ -4561,13 +4560,16 @@ void reduce_confuse_player( int amount ) } } -void slow_player( int amount ) +bool slow_player( int amount ) { if (amount <= 0) - return; + return false; if (wearing_amulet( AMU_RESIST_SLOW )) + { mpr("You feel momentarily lethargic."); + return false; + } else if (you.duration[DUR_SLOW] >= 100) mpr( "You already are as slow as you could be." ); else @@ -4583,6 +4585,7 @@ void slow_player( int amount ) you.duration[DUR_SLOW] = 100; learned_something_new(TUT_YOU_ENCHANTED); } + return true; } void dec_slow_player( void ) @@ -4667,6 +4670,7 @@ void dec_disease_player( void ) { you.disease--; + // kobolds and regenerators recuperate quickly if (you.disease > 5 && (you.species == SP_KOBOLD || you.duration[ DUR_REGENERATION ] @@ -4680,10 +4684,16 @@ void dec_disease_player( void ) } } -void rot_player( int amount ) +bool rot_player( int amount ) { if (amount <= 0) - return; + return false; + + if (you.is_undead) + { + mpr( "You feel terrible." ); + return false; + } if (you.rotting < 40) { @@ -4694,6 +4704,7 @@ void rot_player( int amount ) you.rotting += amount; } + return true; } -- cgit v1.2.3-54-g00ecf