Commit mid add time scroll

This commit is contained in:
2022-10-24 10:44:23 +01:00
parent 21dc670c9f
commit 86a9ab7582
17 changed files with 62 additions and 55 deletions
+6 -12
View File
@@ -20,19 +20,13 @@ useL lu = case lu of
LBoost -> boostSelfL 10
useRewindGun :: Item -> Creature -> World -> World
useRewindGun _ _ w = case w ^. cWorld . cwTime . rewindWorlds of
[w'] -> rewindusing w' [w']
(w' : ws) -> rewindusing w' ws
useRewindGun _ _ w = case w ^. cwTime . rewindWorlds of
[w'] -> w & cwTime . maybeWorld .~ Just' w'
(w' : ws) -> w
& cwTime . maybeWorld
.~ Just' w'
& cwTime . rewindWorlds .~ ws
_ -> w
where
rewindusing :: CWorld -> [CWorld] -> World
rewindusing w' ws =
w
& cWorld . cwTime . maybeWorld
.~ Just'
( w'
& cwTime . rewindWorlds .~ ws
)
-- be careful changing this around; potential problems include updating the
-- creature but using the old crInvSel value