From 4e6876c9833520dbde1fbfea5c36197d2a5f9431 Mon Sep 17 00:00:00 2001 From: justin Date: Sat, 22 Nov 2025 11:47:35 +0000 Subject: [PATCH] Cleanup --- src/Dodge/Creature/Update.hs | 27 ++----------------- .../Data/Item/Use/Consumption/LoadAction.hs | 3 +-- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/src/Dodge/Creature/Update.hs b/src/Dodge/Creature/Update.hs index 64a60c42c..8ae7e33e8 100644 --- a/src/Dodge/Creature/Update.hs +++ b/src/Dodge/Creature/Update.hs @@ -76,36 +76,13 @@ checkDeath' cr w = case cr ^. crHP of HP x | x > -200 && _crDeathTimer cr < 5 -> w & tocr . crDamage .~ [] & tocr . crDeathTimer +~ 1 - HP x | x > -200 -> w - & dropAll cr -- the order of --- & removecr -- these is important + HP _ -> w + & dropAll cr -- the order of these is possibly important & stopSoundFrom (CrWeaponSound (_crID cr) 0) & corpseOrGib cr - HP _ -> w - & dropAll cr -- the order of - & tocr . crHP .~ CrIsGibs --- & destroyCreature cr -- these is important - & stopSoundFrom (CrWeaponSound (_crID cr) 0) - & addCrGibs cr _ -> w --- | otherwise = w --- & dropAll cr -- the order of --- & removecr -- these is important --- & stopSoundFrom (CrWeaponSound (_crID cr) 0) --- & corpseOrGib cr where tocr = cWorld . lWorld . creatures . ix (_crID cr) --- removecr --- | _crID cr == 0 = id --- -- hack to get around player creature being killed but left with more than 0 hp --- | otherwise = cWorld . lWorld . creatures . at (_crID cr) .~ Nothing - ---destroyCreature :: Creature -> World -> World ---destroyCreature cr --- | _crID cr == 0 = id --- -- cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ 0 --- -- hack to get around player creature being killed but left with more than 0 hp --- | otherwise = cWorld . lWorld . creatures . at (_crID cr) .~ Nothing -- could look at the amount of damage here (given by maxDamage) too corpseOrGib :: Creature -> World -> World diff --git a/src/Dodge/Data/Item/Use/Consumption/LoadAction.hs b/src/Dodge/Data/Item/Use/Consumption/LoadAction.hs index 1f8437221..15d36f190 100644 --- a/src/Dodge/Data/Item/Use/Consumption/LoadAction.hs +++ b/src/Dodge/Data/Item/Use/Consumption/LoadAction.hs @@ -12,8 +12,7 @@ import Data.Aeson.TH --import Sound.Data data Manipulation -- should be ManipulatedObject? - = Manipulator {_manObject :: ManipulatedObject - } + = Manipulator {_manObject :: ManipulatedObject } | Brute deriving (Eq, Ord, Show, Read) --Generic, Flat)