summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-11-15 17:19:26 -0500
committerCharles Otto <ottochar@gmail.com>2009-11-15 23:46:50 -0500
commit13d70d82c4c9875a414c4c29f709c12f2c5d2c9d (patch)
treee6305d0ede77c47b222b1ed458b26daa5c3b3899 /crawl-ref/source/misc.cc
parentb0b6e9bc525e05d682f33311086d506b941a0b3f (diff)
downloadcrawl-ref-13d70d82c4c9875a414c4c29f709c12f2c5d2c9d.tar.gz
crawl-ref-13d70d82c4c9875a414c4c29f709c12f2c5d2c9d.zip
Adjust slow and haste durations
Attempt to keep the number of slowed/hasted turns a player gets constant by doubling/halving the total amount of delay needed for the effects to wear off. Also adjust durations for berserk.
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index ad256dbec2..e78751def9 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -2708,7 +2708,12 @@ bool go_berserk(bool intentional)
mpr("You feel yourself moving faster!");
mpr("You feel mighty!");
- you.duration[DUR_BERSERKER] += 20 + random2avg(19, 2);
+ // Cutting the duration in half since berserk causes haste and hasted
+ // actions have half the usual delay. This keeps player turns
+ // approximately consistent withe previous versions. -cao
+ int berserk_duration = (20 + random2avg(19,2)) / 2;
+
+ you.increase_duration(DUR_BERSERKER, berserk_duration);
calc_hp();
you.hp *= 2;
@@ -2718,8 +2723,11 @@ bool go_berserk(bool intentional)
if (!you.duration[DUR_MIGHT])
modify_stat(STAT_STRENGTH, 5, true, "going berserk");
- you.duration[DUR_MIGHT] += you.duration[DUR_BERSERKER];
- haste_player(you.duration[DUR_BERSERKER]);
+ you.increase_duration(DUR_MIGHT, berserk_duration);
+ /// doubling the duration here since haste_player already cuts input
+ // durations in half
+ haste_player(berserk_duration * 2);
+
did_god_conduct(DID_HASTY, 8, intentional);
if (you.berserk_penalty != NO_BERSERK_PENALTY)