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/player.cc | |
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/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 25 |
1 files changed, 13 insertions, 12 deletions
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; } |