Add sound on creature piercing damage

This commit is contained in:
2025-06-22 09:19:37 +01:00
parent 4e9739afa5
commit 2db3342532
6 changed files with 565 additions and 482 deletions
+3 -1
View File
@@ -1,5 +1,6 @@
module Dodge.Creature.Damage (applyCreatureDamage) where
import Dodge.Material.Damage
import Data.List
import Dodge.Creature.Mass
import Dodge.Creature.Material
@@ -48,7 +49,8 @@ applyCreatureDamage dms cr w = foldl' (applyIndividualDamage cr) w dms
--p = _dmAt dm
applyIndividualDamage :: Creature -> World -> Damage -> World
applyIndividualDamage cr w dm = case dm of
applyIndividualDamage cr w dm = damageMaterial dm (crMaterial (_crType cr)) (Left cr) $
case dm of
Piercing{} -> applyPiercingDamage cr dm w
_ -> w & damageHP cr (_dmAmount dm)