summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-stuff.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/mon-stuff.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/mon-stuff.cc')
-rw-r--r--crawl-ref/source/mon-stuff.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index 49b407ebe6..86398d9d33 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -1488,22 +1488,23 @@ int monster_die(monsters *monster, killer_type killer,
if (you.religion == GOD_TROG
&& !player_under_penance() && you.piety > random2(1000))
{
- const int bonus = 3 + random2avg( 10, 2 );
+ const int bonus = (3 + random2avg( 10, 2 )) / 2;
- you.duration[DUR_BERSERKER] += bonus;
- you.duration[DUR_MIGHT] += bonus;
- haste_player(bonus);
+ you.increase_duration(DUR_BERSERKER, bonus);
+ you.increase_duration(DUR_MIGHT, bonus);
+ haste_player(bonus * 2);
mpr("You feel the power of Trog in you as your rage grows.",
MSGCH_GOD, GOD_TROG);
}
else if (wearing_amulet(AMU_RAGE) && one_chance_in(30))
{
- const int bonus = 2 + random2(4);
+ const int bonus = (2 + random2(4)) / 2;;
- you.duration[DUR_BERSERKER] += bonus;
- you.duration[DUR_MIGHT] += bonus;
- haste_player(bonus);
+
+ you.increase_duration(DUR_BERSERKER, bonus);
+ you.increase_duration(DUR_MIGHT, bonus);
+ haste_player(bonus * 2);
mpr("Your amulet glows a violent red.");
}