Remove creature records

This commit is contained in:
2025-06-06 13:36:18 +01:00
parent 73c79f2f4d
commit 0f55257bff
48 changed files with 621 additions and 610 deletions
+5 -4
View File
@@ -129,10 +129,11 @@ internalCreatureUpdate cr = cWorld . lWorld . creatures . ix (_crID cr) %~ updat
TODO make sure this doesn't mess up any ItemPosition
-}
dropByState :: Creature -> World -> World
dropByState cr w = foldl' (flip (dropItem cr)) w $ case cr ^. crState . csDropsOnDeath of
DropAll -> IM.keys $ _crInv cr
DropSpecific xs -> xs
DropAmount n -> take n $ evalState (shuffle $ IM.keys $ _crInv cr) (_randGen w)
dropByState cr w = foldl' (flip (dropItem cr)) w $ IM.keys $ _crInv cr
-- case cr ^. crState . csDropsOnDeath of
-- DropAll -> IM.keys $ _crInv cr
-- DropSpecific xs -> xs
-- DropAmount n -> take n $ evalState (shuffle $ IM.keys $ _crInv cr) (_randGen w)
doDamage :: Creature -> World -> World
doDamage cr = applyPastDamages cr . applyCreatureDamage dams cr