summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 10:50:12 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-18 10:50:12 +0000
commita7c16941b77fcdcc841c3edbcd0514c16ac4c2e5 (patch)
treee3fddfcf268b8dba46eb242b328b051cf3578faf /crawl-ref/source/spells3.cc
parent70eeeeec718a95bee1845c48545577551b2abbb7 (diff)
downloadcrawl-ref-a7c16941b77fcdcc841c3edbcd0514c16ac4c2e5.tar.gz
crawl-ref-a7c16941b77fcdcc841c3edbcd0514c16ac4c2e5.zip
Fix tiles compile (in a hacky way, since I don't know what the mp/hp
bar change was really about). Modify mutations screen for Vampires to allow a toggle to a second page that lists all those resistances and stuff depending on their blood level. The screen (designed by David) is really neat, but the underlying could stand to be improved, and it might be too large, as well. Also restrict Sublimation of Blood to Vampires that are at least Full, and it also makes them a bit more thirsty (since they presumably lose blood when using it). Dispel Undead only does half damage to Vampires at Alive, and 66% damage at Full or Very Full. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4325 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 0adb191068..90a6bc6ca3 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -366,6 +366,11 @@ void sublimation(int power)
mpr( "A conflicting enchantment prevents the spell from "
"coming into effect." );
}
+ else if (you.species == SP_VAMPIRE && you.hunger_state < HS_FULL)
+ {
+ mpr("You don't have enough blood to draw power from your "
+ "own body.");
+ }
else if (!enough_hp( 2, true ))
{
mpr("Your attempt to draw power from your own body fails.");
@@ -374,11 +379,16 @@ void sublimation(int power)
{
mpr("You draw magical energy from your own body!");
- while (you.magic_points < you.max_magic_points && you.hp > 1)
+ int food = 0; // for Vampires
+ while (you.magic_points < you.max_magic_points && you.hp > 1
+ && (you.species != SP_VAMPIRE || you.hunger - food >= 7000))
{
inc_mp(1, false);
dec_hp(1, false);
+ if (you.species == SP_VAMPIRE)
+ food += 15;
+
for (loopy = 0; loopy < (you.hp > 1 ? 3 : 0); loopy++)
{
if (random2(power) < 6)
@@ -388,6 +398,7 @@ void sublimation(int power)
if (random2(power) < 6)
break;
}
+ make_hungry(food, false);
}
}