Files
impostor/inc/decision/decision.go_to_toilet.lua
Zoltan Timar 7df42dd2cd
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
feat: added game over screen, fixed bar filling on ddr, applied tamagochi logic to game
2026-04-27 22:26:16 +02:00

24 lines
755 B
Lua

local function apply_home_toilet_meter_delta()
local max = Meter.get_max()
Meter.add("bm", -math.floor(max * 0.15))
Meter.add("ism", -math.floor(max * 0.10))
Meter.add("wpm", math.floor(max * 0.05))
end
Decision.register({
id = "go_to_toilet",
label = "Go to Toilet",
handle = function()
if not Context.have_done_work_today and not Context.toilet_meters_today_morning then
apply_home_toilet_meter_delta()
Context.toilet_meters_today_morning = true
elseif Context.have_been_to_office
and Context.have_done_work_today
and not Context.toilet_meters_today_evening then
apply_home_toilet_meter_delta()
Context.toilet_meters_today_evening = true
end
Util.go_to_screen_by_id("toilet")
end,
})