diff --git a/main.lua b/main.lua index 04f739e..c5d532d 100644 --- a/main.lua +++ b/main.lua @@ -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')