diff options
author | Charles Otto <ottochar@gmail.com> | 2009-11-15 01:37:59 -0500 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-11-15 23:46:31 -0500 |
commit | 2fdb9bf3159ff508ace17afa23a295db175cc573 (patch) | |
tree | 89bc87f030ec2625b3bb4f5c58b03eaeb8e5f056 | |
parent | b2e9640e0788a9d0ef6b6a9488b0eb39d8bae475 (diff) | |
download | crawl-ref-2fdb9bf3159ff508ace17afa23a295db175cc573.tar.gz crawl-ref-2fdb9bf3159ff508ace17afa23a295db175cc573.zip |
Convert some sources of temporary insulation to delays
Specifically potions of resistance and the helm card.
-rw-r--r-- | crawl-ref/source/decks.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/it_use2.cc | 12 |
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. |