More nesting of fields in CWorld

This commit is contained in:
2022-08-19 11:41:07 +01:00
parent 3b7841677a
commit 2e34481ab1
9 changed files with 58 additions and 40 deletions
+4 -4
View File
@@ -26,10 +26,10 @@ onOffEff f g it
rewindEffect :: Item -> Creature -> World -> World
rewindEffect itm cr w
| Just invid == _crLeftInvSel cr =
w & cWorld . rewindWorlds %~ (take maxcharge . (cw :))
& ptrWpCharge .~ length (_rewindWorlds (_cWorld w))
w & cWorld . cwTime . rewindWorlds %~ (take maxcharge . (cw :))
& ptrWpCharge .~ length (w ^. cWorld . cwTime . rewindWorlds)
| otherwise =
w & cWorld . rewindWorlds .~ []
w & cWorld . cwTime . rewindWorlds .~ []
& ptrWpCharge .~ 0
where
invid = _ipInvID $ _itLocation itm
@@ -37,7 +37,7 @@ rewindEffect itm cr w
maxcharge = itm ^?! itUse . leftConsumption . wpMaxCharge
cw =
_cWorld w
& rewindWorlds .~ []
& cwTime . rewindWorlds .~ []
--resetAttachmentEffect :: Item -> Creature -> World -> World
--resetAttachmentEffect itm cr w