summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/food.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-11-15 14:39:35 -0500
committerCharles Otto <ottochar@gmail.com>2009-11-15 23:46:45 -0500
commit0da3322c570c3e94859b94fe3bc747c01d1e1364 (patch)
tree88d0cc79fac060d6f02046eab87dece4c9286c8c /crawl-ref/source/food.cc
parent01e5123d492ba9292a52960031c18d8069d25d83 (diff)
downloadcrawl-ref-0da3322c570c3e94859b94fe3bc747c01d1e1364.tar.gz
crawl-ref-0da3322c570c3e94859b94fe3bc747c01d1e1364.zip
On second thought abstract increasing/setting durations a little.
Add (and use) player methods for setting/increasing durations.
Diffstat (limited to 'crawl-ref/source/food.cc')
-rw-r--r--crawl-ref/source/food.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index ed5061be01..2338a85098 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -929,7 +929,7 @@ bool food_change(bool suppress_message)
{
mpr("Your blood-deprived body can't sustain your "
"transformation much longer.", MSGCH_DURATION);
- you.duration[DUR_TRANSFORMATION] = 2 * BASELINE_DELAY;
+ you.set_duration(DUR_TRANSFORMATION, 2);
}
}
else if (player_in_bat_form()
@@ -940,7 +940,7 @@ bool food_change(bool suppress_message)
"much longer.", MSGCH_WARN);
// Give more time because suddenly stopping flying can be fatal.
- you.duration[DUR_TRANSFORMATION] = 5 * BASELINE_DELAY;
+ you.set_duration(DUR_TRANSFORMATION, 5);
}
else if (newstate == HS_ENGORGED && is_vampire_feeding()) // Alive
{