Refactor, try to limit dependencies

This commit is contained in:
2022-07-28 00:59:56 +01:00
parent 8aa5c17ab9
commit 160560af5f
418 changed files with 15104 additions and 13342 deletions
+4 -3
View File
@@ -1,9 +1,10 @@
module Dodge.Machine.Damage where
import Dodge.Data
import Dodge.Data.World
import LensHelp
basicMachineApplyDamage :: Machine -> World -> World
basicMachineApplyDamage mc = cWorld . machines . ix mcid %~ ( (mcDamage .~ []) . (mcHP -~ dams) )
basicMachineApplyDamage mc = cWorld . machines . ix mcid %~ ((mcDamage .~ []) . (mcHP -~ dams))
where
dams = sum $ map _dmAmount $ _mcDamage mc
dams = sum $ map _dmAmount $ _mcDamage mc
mcid = _mcID mc