diff options
author | Charles Otto <ottochar@gmail.com> | 2009-11-15 00:11:40 -0500 |
---|---|---|
committer | Charles Otto <ottochar@gmail.com> | 2009-11-15 23:46:23 -0500 |
commit | 2cc88f46f53a765e1cfaf7214a08540421f7f694 (patch) | |
tree | 4d50fa28008d8a4d3af62f0632a4ec1ad3a14992 /crawl-ref/source | |
parent | 08a05ceabdeee2bdb7f6257b9e5e5ae845159ab2 (diff) | |
download | crawl-ref-2cc88f46f53a765e1cfaf7214a08540421f7f694.tar.gz crawl-ref-2cc88f46f53a765e1cfaf7214a08540421f7f694.zip |
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.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/main.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 25 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/spl-mis.cc | 2 |
4 files changed, 16 insertions, 20 deletions
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc index 198328964b..41acd40da2 100644 --- a/crawl-ref/source/main.cc +++ b/crawl-ref/source/main.cc @@ -2196,12 +2196,7 @@ static void _decrement_durations() if (_decrement_a_duration(DUR_SLEEP, delay)) you.awake(); - // Sticky flame paradox: It both lasts longer and does more damage - // overall if you're moving more slowly. - // - // Rationalisation: I guess it gets rubbed off/falls off/etc. if you - // move around more. - dec_napalm_player(); + dec_napalm_player(delay); if (_decrement_a_duration(DUR_ICY_ARMOUR, delay, "Your icy armour evaporates.", coinflip(), 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; } diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index 20c8bcdeab..c435b9d608 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -741,7 +741,7 @@ void reduce_poison_player(int amount); bool miasma_player(); bool napalm_player(int amount); -void dec_napalm_player(); +void dec_napalm_player(int delay); bool slow_player(int amount); void dec_slow_player(); diff --git a/crawl-ref/source/spl-mis.cc b/crawl-ref/source/spl-mis.cc index 78882d374c..dcc7c1764d 100644 --- a/crawl-ref/source/spl-mis.cc +++ b/crawl-ref/source/spl-mis.cc @@ -2110,7 +2110,7 @@ void MiscastEffect::_fire(int severity) do_msg(); if (target->atype() == ACT_PLAYER) - you.duration[DUR_LIQUID_FLAMES] += random2avg(7, 3) + 1; + napalm_player(random2avg(7,3) + 1); else { monsters* mon_target = target_as_monster(); |