summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/abl-show.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-08 21:31:51 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-08 21:31:51 +0000
commitca54ca53590788e28c47f0ea7f6c072d65a640d9 (patch)
tree4bcfe3c14e06d51289054a5dde3e28d4fdf4abca /crawl-ref/source/abl-show.cc
parent1b08247fbd1c4a95902188cd01e5510e8c2e79d3 (diff)
downloadcrawl-ref-ca54ca53590788e28c47f0ea7f6c072d65a640d9.tar.gz
crawl-ref-ca54ca53590788e28c47f0ea7f6c072d65a640d9.zip
Make vampires' spell (and ability) hunger dependent on their hunger state.
Thirsty: 75% Very thirsty: 50% Near Bloodless: 25% Bloodless: None git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4933 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abl-show.cc')
-rw-r--r--crawl-ref/source/abl-show.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc
index 1ab70b9a0f..98919800d1 100644
--- a/crawl-ref/source/abl-show.cc
+++ b/crawl-ref/source/abl-show.cc
@@ -932,7 +932,8 @@ static bool _activate_talent(const talent& tal)
break;
}
- if (hungerCheck && you.hunger_state == HS_STARVING)
+ if (hungerCheck && you.species != SP_VAMPIRE
+ && you.hunger_state == HS_STARVING)
{
mpr("You're too hungry.");
crawl_state.zero_turns_taken();
@@ -963,7 +964,7 @@ static bool _activate_talent(const talent& tal)
// don't insta-starve the player
// (happens at 100, losing consciousness possible from 500 downward)
- if (hungerCheck)
+ if (hungerCheck && you.species != SP_VAMPIRE)
{
const int expected_hunger = you.hunger - abil.food_cost * 2;
#ifdef DEBUG_DIAGNOSTICS
@@ -1867,7 +1868,7 @@ static void _pay_ability_costs(const ability_def& abil)
// currently only delayed fireball is instantaneous -- bwr
you.turn_is_over = !(abil.flags & ABFLAG_INSTANT);
- const int food_cost = abil.food_cost + random2avg(abil.food_cost, 2);
+ const int food_cost = abil.food_cost + random2avg(abil.food_cost, 2);
const int piety_cost = abil.piety_cost.cost();
#if DEBUG_DIAGNOSTICS
@@ -1890,7 +1891,7 @@ static void _pay_ability_costs(const ability_def& abil)
}
if (food_cost)
- make_hungry( food_cost, false );
+ make_hungry( food_cost, false, true );
if (piety_cost)
lose_piety( piety_cost );