summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/decks.cc3
-rw-r--r--crawl-ref/source/it_use2.cc12
2 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 5b26c0d37e..65190511b9 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1820,7 +1820,8 @@ static void _helm_card(int power, deck_rarity_type rarity)
if (x_chance_in_y(num_resists, 4-i))
{
// Add a temporary resistance.
- you.duration[possible_resists[i]] += random2(power/7) + 1;
+ int duration = (random2(power/7) + 1) * BASELINE_DELAY;
+ you.duration[possible_resists[i]] += duration;
msg::stream << "You feel resistant to " << resist_names[i]
<< '.' << std::endl;
--num_resists;
diff --git a/crawl-ref/source/it_use2.cc b/crawl-ref/source/it_use2.cc
index 0175b0850a..00a2c19a85 100644
--- a/crawl-ref/source/it_use2.cc
+++ b/crawl-ref/source/it_use2.cc
@@ -445,10 +445,14 @@ bool potion_effect(potion_type pot_eff, int pow, bool drank_it, bool was_known)
case POT_RESISTANCE:
mpr("You feel protected.", MSGCH_DURATION);
- you.duration[DUR_RESIST_FIRE] += (random2(pow) + 35) / factor;
- you.duration[DUR_RESIST_COLD] += (random2(pow) + 35) / factor;
- you.duration[DUR_RESIST_POISON] += (random2(pow) + 35) / factor;
- you.duration[DUR_INSULATION] += (random2(pow) + 35) / factor;
+ you.duration[DUR_RESIST_FIRE] +=
+ (random2(pow) + 35) * BASELINE_DURATION / factor;
+ you.duration[DUR_RESIST_COLD] +=
+ (random2(pow) + 35) * BASELINE_DURATION / factor;
+ you.duration[DUR_RESIST_POISON] +=
+ (random2(pow) + 35) * BASELINE_DURATION / factor;
+ you.duration[DUR_INSULATION] +=
+ (random2(pow) + 35) * BASELINE_DURATION / factor;
// Just one point of contamination. These potions are really rare,
// and contamination is nastier.