Work on terminals and machines
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user