summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/decks.cc2
-rw-r--r--crawl-ref/source/main.cc15
-rw-r--r--crawl-ref/source/player.cc8
-rw-r--r--crawl-ref/source/spells4.cc4
-rw-r--r--crawl-ref/source/transfor.cc4
5 files changed, 18 insertions, 15 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index 47785496c7..03e812faac 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1834,7 +1834,7 @@ static void _helm_card(int power, deck_rarity_type rarity)
{
if (you.duration[DUR_MAGIC_SHIELD] == 0)
mpr("A magical shield forms in front of you.");
- you.duration[DUR_MAGIC_SHIELD] += random2(power/6) + 1;
+ you.increase_duration(DUR_MAGIC_SHIELD, random2(power/6) + 1);
}
}
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 138b3e32ae..f501307bbc 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -2234,8 +2234,12 @@ static void _decrement_durations()
{
if (you.duration[DUR_DIVINE_SHIELD] > 1)
{
- if (--you.duration[DUR_DIVINE_SHIELD] == 1)
+ you.duration[DUR_DIVINE_SHIELD] -= delay;
+ if(you.duration[DUR_DIVINE_SHIELD] <= 1)
+ {
+ you.duration[DUR_DIVINE_SHIELD] = 1;
mpr("Your divine shield starts to fade.", MSGCH_DURATION);
+ }
}
if (you.duration[DUR_DIVINE_SHIELD] == 1 && !one_chance_in(3))
@@ -2488,7 +2492,7 @@ static void _decrement_durations()
else if (one_chance_in(chance))
{
mpr("You pass out from exhaustion.", MSGCH_WARN);
- you.duration[DUR_PARALYSIS] += roll_dice(1, 4);
+ you.increase_duration(DUR_PARALYSIS, roll_dice(1,4));
}
}
@@ -2640,7 +2644,7 @@ static void _decrement_durations()
if (you.hp > allowed_deaths_door_hp())
{
mpr("Your life is in your own hands once again.", MSGCH_DURATION);
- you.duration[DUR_PARALYSIS] += 5 + random2(5);
+ you.increase_duration(DUR_PARALYSIS, 5 + random2(5));
confuse_player(10 + random2(10));
you.hp_max--;
deflate_hp(you.hp_max, false);
@@ -2869,10 +2873,7 @@ void world_reacts()
mpr("You lose consciousness!", MSGCH_FOOD);
stop_running();
- you.duration[DUR_PARALYSIS] += 5 + random2(8);
-
- if (you.duration[DUR_PARALYSIS] > 13)
- you.duration[DUR_PARALYSIS] = 13;
+ you.increase_duration(DUR_PARALYSIS, 5 + random2(8), 13);
}
if (you.hunger <= 100)
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index a36799c8f8..45b77308f5 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -6710,17 +6710,19 @@ void player::paralyse(actor *who, int str)
mprf("You %s the ability to move!",
paralysis ? "still haven't" : "suddenly lose");
+ str *= BASELINE_DELAY;
if (str > paralysis && (paralysis < 3 || one_chance_in(paralysis)))
paralysis = str;
- if (paralysis > 13)
- paralysis = 13;
+ if (paralysis > 13 * BASELINE_DELAY)
+ paralysis = 13 * BASELINE_DELAY;
}
void player::petrify(actor *who, int str)
{
ASSERT(!crawl_state.arena);
+ str *= BASELINE_DELAY;
int &petrif(duration[DUR_PETRIFIED]);
mprf("You %s the ability to move!",
@@ -6729,7 +6731,7 @@ void player::petrify(actor *who, int str)
if (str > petrif && (petrif < 3 || one_chance_in(petrif)))
petrif = str;
- petrif = std::min(13, petrif);
+ petrif = std::min(13 * BASELINE_DELAY, petrif);
}
void player::slow_down(actor *foe, int str)
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 47eda3c4ab..5b965b3d72 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1944,8 +1944,8 @@ void cast_divine_shield()
you.redraw_armour_class = true;
// duration of complete shield bonus from 35 to 80 turns
- you.duration[DUR_DIVINE_SHIELD] =
- 35 + (you.skills[SK_SHIELDS] + you.skills[SK_INVOCATIONS]*4)/3;
+ you.set_duration(DUR_DIVINE_SHIELD,
+ 35 + (you.skills[SK_INVOCATIONS] * 4) / 3);
// shield bonus up to 8
you.attribute[ATTR_DIVINE_SHIELD] = 3 + you.skills[SK_SHIELDS]/5;
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index c81574ef0d..762c3e00c8 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -720,8 +720,8 @@ bool transform(int pow, transformation_type which_trans, bool force,
if (which_trans == TRAN_PIG)
{ // no easy way around this!
mpr("A dreadful feeling locks you in place!");
- if (you.duration[DUR_PARALYSIS]<10)
- you.duration[DUR_PARALYSIS]=10;
+ if (you.duration[DUR_PARALYSIS]<10 * BASELINE_DURATION)
+ you.duration[DUR_PARALYSIS]=10 * BASELINE_DURATION;
}
return (_abort_or_fizzle(just_check));
}