Add randomness to multiple crab evasions

This commit is contained in:
2026-04-09 13:28:39 +01:00
parent 0a8a2210c0
commit c8a06bc084
14 changed files with 194 additions and 179 deletions
+1
View File
@@ -23,6 +23,7 @@ import System.Random
-- note SwitchToItem doesn't necessarily update the root item correctly
followImpulse :: Int -> World -> Impulse -> World
followImpulse cid w = \case
UpdateRandGen -> w & randGen %~ (snd . (randomR (0::Int,0)))
ImpulseNothing -> w
RandomImpulse rimp ->
let (newimp, newgen) = runState (doRandImpulse rimp) (_randGen w)