From 67c7f8f9dbea5d17bdf1ecca94c33a8ac85a5133 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sun, 15 Nov 2009 15:21:39 -0500 Subject: Update delay for exhaustion, confusing touch, and sure blade --- crawl-ref/source/fight.cc | 8 +++++--- crawl-ref/source/godwrath.cc | 4 ++-- crawl-ref/source/main.cc | 3 +-- crawl-ref/source/player.cc | 10 ++++++---- crawl-ref/source/spells1.cc | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 0090ce03e0..0bbc50f53a 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3389,7 +3389,8 @@ bool melee_attack::apply_damage_brand() if (attacker->atype() == ACT_PLAYER && damage_brand == SPWPN_CONFUSE) { ASSERT(you.duration[DUR_CONFUSING_TOUCH]); - you.duration[DUR_CONFUSING_TOUCH] -= roll_dice(3, 5); + you.duration[DUR_CONFUSING_TOUCH] -= roll_dice(3, 5) + * BASELINE_DELAY; if (you.duration[DUR_CONFUSING_TOUCH] < 1) you.duration[DUR_CONFUSING_TOUCH] = 1; @@ -3909,9 +3910,10 @@ int melee_attack::player_to_hit(bool random_factor) if (weapon && wpn_skill == SK_SHORT_BLADES && you.duration[DUR_SURE_BLADE]) { + int turn_duration = you.duration[DUR_SURE_BLADE] / BASELINE_DELAY; your_to_hit += 5 + - (random_factor ? random2limit( you.duration[DUR_SURE_BLADE], 10 ) : - you.duration[DUR_SURE_BLADE] / 2); + (random_factor ? random2limit( turn_duration, 10 ) : + turn_duration / 2); } // other stuff diff --git a/crawl-ref/source/godwrath.cc b/crawl-ref/source/godwrath.cc index ab8c93fab1..a75f6655df 100644 --- a/crawl-ref/source/godwrath.cc +++ b/crawl-ref/source/godwrath.cc @@ -381,7 +381,7 @@ static bool _cheibriados_retribution() { dec_penance(god, 1); mpr("You feel the world leave you behind!", MSGCH_WARN); - you.duration[DUR_EXHAUSTED] = 100; + you.set_duration(DUR_EXHAUSTED, 100); slow_player(100); } break; @@ -599,7 +599,7 @@ static bool _trog_retribution() { dec_penance(god, 1); mpr( "You suddenly feel exhausted!", MSGCH_WARN ); - you.duration[DUR_EXHAUSTED] = 100; + you.set_duration(DUR_EXHAUSTED, 100); slow_player(100); } break; diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index f501307bbc..a1658e2c06 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -2502,8 +2502,7 @@ static void _decrement_durations() // This resets from an actual penalty or from NO_BERSERK_PENALTY. you.berserk_penalty = 0; - int dur = 12 + roll_dice(2, 12); - you.duration[DUR_EXHAUSTED] += dur; + you.increase_duration(DUR_EXHAUSTED, 12 + roll_dice(2,12)); // Don't trigger too many tutorial messages. const bool tut_slow = Options.tutorial_events[TUT_YOU_ENCHANTED]; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 45b77308f5..93dfd415b7 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3698,17 +3698,19 @@ void display_char_status() if (you.duration[DUR_CONFUSING_TOUCH]) { + int hi = 40 * BASELINE_DELAY; + int low = 20 * BASELINE_DELAY; mprf("Your hands are glowing %s red.", - (you.duration[DUR_CONFUSING_TOUCH] > 40) ? "an extremely bright" : - (you.duration[DUR_CONFUSING_TOUCH] > 20) ? "bright" + (you.duration[DUR_CONFUSING_TOUCH] > hi) ? "an extremely bright" : + (you.duration[DUR_CONFUSING_TOUCH] > low) ? "bright" : "a soft"); } if (you.duration[DUR_SURE_BLADE]) { mprf("You have a %sbond with your blade.", - (you.duration[DUR_SURE_BLADE] > 15) ? "strong " : - (you.duration[DUR_SURE_BLADE] > 5) ? "" + (you.duration[DUR_SURE_BLADE] > 15 * BASELINE_DELAY) ? "strong " : + (you.duration[DUR_SURE_BLADE] > 5 * BASELINE_DELAY) ? "" : "weak "); } diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index dccf3a4516..226319fb2b 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -1536,7 +1536,7 @@ bool cast_sure_blade(int power) { if (!you.duration[DUR_SURE_BLADE]) mpr("You become one with your weapon."); - else if (you.duration[DUR_SURE_BLADE] < 25) + else if (you.duration[DUR_SURE_BLADE] < 25 * BASELINE_DELAY) mpr("Your bond becomes stronger."); you.increase_duration(DUR_SURE_BLADE, 8 + (random2(power) / 10), -- cgit v1.2.3-54-g00ecf