From 0da3322c570c3e94859b94fe3bc747c01d1e1364 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sun, 15 Nov 2009 14:39:35 -0500 Subject: On second thought abstract increasing/setting durations a little. Add (and use) player methods for setting/increasing durations. --- crawl-ref/source/spells2.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/spells2.cc') diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 649c516bf0..21e67164f8 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -366,12 +366,8 @@ bool brand_weapon(brand_type which_brand, int power) else mprf("%s flashes.", weapon.name(DESC_CAP_YOUR).c_str()); - const int dur_change = duration_affected + roll_dice(2, power); - - you.duration[DUR_WEAPON_BRAND] += dur_change * BASELINE_DELAY; - - if (you.duration[DUR_WEAPON_BRAND] > 50 * BASELINE_DELAY) - you.duration[DUR_WEAPON_BRAND] = 50 * BASELINE_DELAY; + you.increase_duration(DUR_WEAPON_BRAND, + duration_affected + roll_dice(2, power), 50); return (true); } -- cgit v1.2.3-54-g00ecf