Allow rewinding after combining items

This commit is contained in:
2022-02-19 11:04:52 +00:00
parent 9923897fe2
commit 3f20398ed0
7 changed files with 25 additions and 19 deletions
+2 -3
View File
@@ -38,13 +38,12 @@ rewindEffect _ cr invid w
ptrWpCharge = creatures . ix (_crID cr) . crInv . ix invid . itConsumption . wpCharge
maxcharge = _wpMaxCharge . _itConsumption $ _crInv cr IM.! invid
w' = w & rewindWorlds .~ []
& rewinding .~ True
& rewinding .~ RewindingNow
useRewindGun :: Item -> Creature -> World -> World
useRewindGun _ _ w = case _rewindWorlds w of
[w'] -> rewindusing w' []
[w'] -> rewindusing w' [w']
(w':ws) -> rewindusing w' ws
(_:w':ws) -> rewindusing w' ws
_ -> w
where
rewindusing w' ws = w