prevent reward gained from fireworks

This commit is contained in:
Connor Olding 2018-06-08 14:12:21 +02:00
parent c40e1f929d
commit c30f07f407

View File

@ -644,7 +644,12 @@ local function doit(dummy)
if cfg.decrement_reward and reward_delta == 0 then reward_delta = reward_delta - 1 end
if not ingame_paused then reward = reward + reward_delta end
if not ingame_paused and game.get_state() ~= 'win_walking' then
-- note that we exclude points gained walking into the castle.
-- this way, we avoid adding the timer-based fireworks to our reward,
-- which are basically unwanted noise due to the way they trigger.
reward = reward + reward_delta
end
--gui.text(72, 12, ("%+4i"):format(reward_delta), '#FFFFFF', '#0000003F')
gui.text(89, 16, ("%+5i"):format(reward), '#FFFFFF', '#0000003F')