summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-22 19:26:52 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-22 19:26:52 +0000
commitbcf9ac014442b4ca6690f188f2c0eec7f2bb506c (patch)
tree224d9722c805babf09818cbbc5e59dd0cce936aa /crawl-ref
parent2f5785ca4f55ddfd7365d2888475ba9c28032c96 (diff)
downloadcrawl-ref-bcf9ac014442b4ca6690f188f2c0eec7f2bb506c.tar.gz
crawl-ref-bcf9ac014442b4ca6690f188f2c0eec7f2bb506c.zip
Make the routine to check for mutations that only acticate sometimes
generic to the semi-undead. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4480 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/mutation.cc12
-rw-r--r--crawl-ref/source/player.cc6
2 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/mutation.cc b/crawl-ref/source/mutation.cc
index 2ae11a51dc..4754a81435 100644
--- a/crawl-ref/source/mutation.cc
+++ b/crawl-ref/source/mutation.cc
@@ -1017,8 +1017,8 @@ void fixup_mutations()
bool mutation_is_fully_active(mutation_type mut)
{
- // for all species except vampires their mutations always apply
- if (you.species != SP_VAMPIRE)
+ // for all except the semi-undead, mutations always apply
+ if (you.is_undead != US_SEMI_UNDEAD)
return (true);
// innate mutations are always active
@@ -1029,7 +1029,7 @@ bool mutation_is_fully_active(mutation_type mut)
if (mutation_defs[mut].physical)
return (true);
- // ... as well as all mutations for vampires at Alive
+ // ... as well as all mutations for the living semi-undead
if (you.hunger_state == HS_ENGORGED)
return (true);
@@ -1038,7 +1038,7 @@ bool mutation_is_fully_active(mutation_type mut)
static bool _mutation_is_fully_inactive(mutation_type mut)
{
- return (you.species == SP_VAMPIRE && you.hunger_state < HS_SATIATED
+ return (you.is_undead == US_SEMI_UNDEAD && you.hunger_state < HS_SATIATED
&& !you.demon_pow[mut] && !mutation_defs[mut].physical);
}
@@ -1686,7 +1686,7 @@ bool mutate(mutation_type which_mutation, bool failMsg, bool force_mutation,
force_mutation = true;
bool rotting = you.is_undead;
- if (you.species == SP_VAMPIRE)
+ if (you.is_undead == US_SEMI_UNDEAD)
{
// The stat gain mutation always come through at Satiated or
// higher (mostly for convenience), and, for consistency, also
@@ -1722,7 +1722,7 @@ bool mutate(mutation_type which_mutation, bool failMsg, bool force_mutation,
// except for demonspawn (or other permamutations) in lichform -- haranp
if (rotting && !demonspawn)
{
- if (!wearing_amulet(AMU_RESIST_MUTATION)? !one_chance_in(3)
+ if (!wearing_amulet(AMU_RESIST_MUTATION) ? !one_chance_in(3)
: one_chance_in(10))
{
mpr( "Your body decomposes!", MSGCH_MUTATION );
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index a1699b348d..a98a2ed5b5 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5133,7 +5133,7 @@ bool rot_player( int amount )
return false;
if (you.is_undead
- && (you.species != SP_VAMPIRE || you.hunger_state <= HS_HUNGRY))
+ && (you.species != SP_VAMPIRE || you.hunger_state < HS_SATIATED))
{
mpr( "You feel terrible." );
return false;
@@ -5974,8 +5974,8 @@ bool player::can_go_berserk(bool verbose) const
return (false);
}
- if (you.is_undead && (you.species != SP_VAMPIRE
- || you.hunger_state < HS_FULL))
+ if (you.is_undead &&
+ (you.species != SP_VAMPIRE || you.hunger_state <= HS_SATIATED))
{
if (verbose)
mpr("You cannot raise a blood rage in your lifeless body.");