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
