From 2cc88f46f53a765e1cfaf7214a08540421f7f694 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sun, 15 Nov 2009 00:11:40 -0500 Subject: Modify DUR_LIQUID_FLAMES to count delay instead of turns Decrease (and increase) sticky flames duration by the players delay instead of using perceived turns. This is a behavioral change, previously sticky flame did damage proportional to delay but the counter was only decreased once per perceived turn. Compared to the old behavior slow players take less damage and fast players take more damage over the course of the sticky flame. --- crawl-ref/source/player.cc | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 22e4717f91..503d26b330 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4886,10 +4886,10 @@ bool napalm_player(int amount) return (false); const int old_value = you.duration[DUR_LIQUID_FLAMES]; - you.duration[DUR_LIQUID_FLAMES] += amount; + you.duration[DUR_LIQUID_FLAMES] += amount * BASELINE_DELAY; - if (you.duration[DUR_LIQUID_FLAMES] > 100) - you.duration[DUR_LIQUID_FLAMES] = 100; + if (you.duration[DUR_LIQUID_FLAMES] > 100 * BASELINE_DELAY) + you.duration[DUR_LIQUID_FLAMES] = 100 * BASELINE_DELAY; if (you.duration[DUR_LIQUID_FLAMES] > old_value) mpr("You are covered in liquid flames!", MSGCH_WARN); @@ -4897,9 +4897,9 @@ bool napalm_player(int amount) return (true); } -void dec_napalm_player() +void dec_napalm_player(int delay) { - if (you.duration[DUR_LIQUID_FLAMES] > 1) + if (you.duration[DUR_LIQUID_FLAMES] > BASELINE_DELAY) { if (feat_is_watery(grd(you.pos()))) { @@ -4907,7 +4907,6 @@ void dec_napalm_player() you.duration[DUR_LIQUID_FLAMES] = 0; return; } - you.duration[DUR_LIQUID_FLAMES]--; mpr("You are covered in liquid flames!", MSGCH_WARN); @@ -4917,27 +4916,29 @@ void dec_napalm_player() if (res_fire > 0) { - ouch((((random2avg(9, 2) + 1) * you.time_taken) / - (1 + (res_fire * res_fire))) / 10, NON_MONSTER, + ouch((((random2avg(9, 2) + 1) * delay) / + (1 + (res_fire * res_fire))) / BASELINE_DELAY, NON_MONSTER, KILLED_BY_BURNING); } if (res_fire <= 0) { - ouch(((random2avg(9, 2) + 1) * you.time_taken) / 10, + ouch(((random2avg(9, 2) + 1) * delay) / BASELINE_DELAY, NON_MONSTER, KILLED_BY_BURNING); if (res_fire < 0) { - ouch(((random2avg(9, 2) + 1) * you.time_taken) / 10, - NON_MONSTER, KILLED_BY_BURNING); + ouch(((random2avg(9, 2) + 1) * delay) + / BASELINE_DELAY, NON_MONSTER, KILLED_BY_BURNING); } } if (you.duration[DUR_CONDENSATION_SHIELD] > 0) remove_condensation_shield(); } - else if (you.duration[DUR_LIQUID_FLAMES] == 1) + + you.duration[DUR_LIQUID_FLAMES] -= delay; + if (you.duration[DUR_LIQUID_FLAMES] < 0) you.duration[DUR_LIQUID_FLAMES] = 0; } -- cgit v1.2.3-54-g00ecf