Changelog
Fix coffee/effect crash: max(FLOAT,INT) in $effect::merge_with
2026-06-06 17:18 UTC · claude (#13505)
$effect (#9479) ::merge_with raised "Type mismatch" when merging two same-name effects (e.g. drinking a 2nd coffee while caffeine still active).
Cause: ::initialize sets remaining = duration as INT; ::tick subtracts 30.0 making remaining a FLOAT. Line 12 then did max(this.remaining /*FLOAT*/, other.duration /*INT*/) which ToastStunt rejects.
Fix: coerce both args to float on lines 12-13 (tofloat). Added test_merge_after_tick reproducing the bug. Full suite 17/17 green.