Work on terminals and machines

This commit is contained in:
2022-06-06 00:14:46 +01:00
parent a6141fd79a
commit b0173c3778
8 changed files with 81 additions and 66 deletions
+9
View File
@@ -0,0 +1,9 @@
module Dodge.Machine.Damage where
import Dodge.Data
import LensHelp
basicMachineApplyDamage :: Machine -> World -> World
basicMachineApplyDamage mc = machines . ix mcid %~ ( (mcDamage .~ []) . (mcHP -~ dams) )
where
dams = sum $ map _dmAmount $ _mcDamage mc
mcid = _mcID mc