Add in "linear" lWorld to separate time reversable worlds

This commit is contained in:
2022-10-28 12:24:51 +01:00
parent 5f6bd43599
commit 7e790b7153
130 changed files with 827 additions and 980 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import Dodge.Data.World
import LensHelp
basicMachineApplyDamage :: Machine -> World -> World
basicMachineApplyDamage mc = cWorld . machines . ix mcid %~ ((mcDamage .~ []) . (mcHP -~ dams))
basicMachineApplyDamage mc = cWorld . lWorld . machines . ix mcid %~ ((mcDamage .~ []) . (mcHP -~ dams))
where
dams = sum $ map _dmAmount $ _mcDamage mc
mcid = _mcID mc