diff options
author | Charles Otto <ottochar@gmail.com> | 2009-11-15 17:31:12 -0500 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-11-15 23:46:51 -0500 |
commit | f77c84bb4c94205933c5a0dc7a7eda82f5460103 (patch) | |
tree | beefbf8316d4ea441f7769d36fcd4877f0af11ca | |
parent | 13d70d82c4c9875a414c4c29f709c12f2c5d2c9d (diff) | |
download | crawl-ref-f77c84bb4c94205933c5a0dc7a7eda82f5460103.tar.gz crawl-ref-f77c84bb4c94205933c5a0dc7a7eda82f5460103.zip |
Delay adjustment for might, brilliance and agility
-rw-r--r-- | crawl-ref/source/it_use2.cc | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc index a9c630671c..35b0bc49da 100644 --- a/crawl-ref/source/it_use2.cc +++ b/crawl-ref/source/it_use2.cc @@ -153,11 +153,7 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known) modify_stat(STAT_STRENGTH, 5, true, ""); // conceivable max gain of +184 {dlb} - you.duration[DUR_MIGHT] += (35 + random2(pow)) / factor; - - // files.cc permits values up to 215, but ... {dlb} - if (you.duration[DUR_MIGHT] > 80) - you.duration[DUR_MIGHT] = 80; + you.increase_duration(DUR_MIGHT, (35 + random2(pow)) / factor, 80); did_god_conduct(DID_STIMULANTS, 4 + random2(4), was_known); break; @@ -175,10 +171,8 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known) else modify_stat(STAT_INTELLIGENCE, 5, true, ""); - you.duration[DUR_BRILLIANCE] += (35 + random2(pow)) / factor; - - if (you.duration[DUR_BRILLIANCE] > 80) - you.duration[DUR_BRILLIANCE] = 80; + you.increase_duration(DUR_BRILLIANCE, + (35 + random2(pow)) / factor, 80); did_god_conduct(DID_STIMULANTS, 4 + random2(4), was_known); break; @@ -196,11 +190,7 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known) else modify_stat(STAT_DEXTERITY, 5, true, ""); - you.duration[DUR_AGILITY] += (35 + random2(pow)) / factor; - - if (you.duration[DUR_AGILITY] > 80) - you.duration[DUR_AGILITY] = 80; - + you.increase_duration(DUR_AGILITY, (35 + random2(pow)) / factor, 80); you.redraw_evasion = true; did_god_conduct(DID_STIMULANTS, 4 + random2(4), was_known); |