summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-25 14:33:36 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-25 14:33:36 +0000
commite6cc066b99c74af0ab0002aa48e1e950035b7511 (patch)
tree8b80d66f33a395232ea353e87f6891f1f4d5e67c /crawl-ref/source
parent3c1801de248398a54a01daa2d107c4bd2d00a2b1 (diff)
downloadcrawl-ref-e6cc066b99c74af0ab0002aa48e1e950035b7511.tar.gz
crawl-ref-e6cc066b99c74af0ab0002aa48e1e950035b7511.zip
Fix specific references to vampires versus generic references to
semi-undead. The latter are now only used for determining the following: whether the player can mutate, whether the player can rot, and how much the player resists Dispel Undead. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4621 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/beam.cc2
-rw-r--r--crawl-ref/source/player.cc8
-rw-r--r--crawl-ref/source/spl-cast.cc2
3 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 7045e08851..bc89d8d296 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -3427,7 +3427,7 @@ static int _affect_player( bolt &beam, item_def *item )
if (beam.aux_source.empty())
beam.aux_source = "by dispel undead";
- if (you.species == SP_VAMPIRE)
+ if (you.is_undead == US_SEMI_UNDEAD)
{
if (you.hunger_state == HS_ENGORGED)
beam.damage.size /= 2;
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 3d213aa444..74ca17a0fa 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5132,7 +5132,7 @@ bool rot_player( int amount )
return false;
if (you.is_undead
- && (you.species != SP_VAMPIRE || you.hunger_state < HS_SATIATED))
+ && (you.is_undead != US_SEMI_UNDEAD || you.hunger_state < HS_SATIATED))
{
mpr( "You feel terrible." );
return false;
@@ -6131,8 +6131,8 @@ int player_mutation_level(mutation_type mut)
if (mutation_is_fully_active(mut))
return (mlevel);
- // For now, dynamic mutation only apply to vampires.
- ASSERT(you.species == SP_VAMPIRE);
+ // For now, dynamic mutations only apply to semi-undead.
+ ASSERT(you.is_undead == US_SEMI_UNDEAD);
// Assumption: stat mutations are physical, and thus always fully active.
switch (you.hunger_state)
@@ -6311,7 +6311,7 @@ void player::drain_stat(int stat, int amount, actor* attacker)
void player::rot(actor *who, int rotlevel, int immed_rot)
{
if (you.is_undead
- && (you.species != SP_VAMPIRE || you.hunger_state < HS_SATIATED))
+ && (you.is_undead != US_SEMI_UNDEAD || you.hunger_state < HS_SATIATED))
{
return;
}
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index cc4fb2aeea..5c09d2c00e 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -663,7 +663,7 @@ bool cast_a_spell()
return (false);
}
- if (you.is_undead != US_UNDEAD && you.is_undead != US_SEMI_UNDEAD
+ if (you.is_undead != US_UNDEAD && you.species != SP_VAMPIRE
&& (you.hunger_state == HS_STARVING
|| you.hunger <= spell_hunger( spell )))
{