Work on placements

This commit is contained in:
2025-09-25 17:32:02 +01:00
parent 23f61081cf
commit f5a3486f72
13 changed files with 155 additions and 157 deletions
+3 -7
View File
@@ -109,17 +109,13 @@ checkDeath' cr w = case cr ^. crHP of
-- could look at the amount of damage here (given by maxDamage) too
corpseOrGib :: Creature -> World -> World
corpseOrGib cr w = w & case cr ^? crDamage . to maxDamageType . _Just . _1 of
Just CookingDamage -> -- addcorpse (thecorpse & cpSPic %~ scorchSPic)
sethp (CrIsCorpse $ scorchSPic thecorpse)
Just PoisonDamage -> --addcorpse (thecorpse & cpSPic %~ poisonSPic)
sethp (CrIsCorpse $ poisonSPic thecorpse)
Just CookingDamage -> sethp (CrIsCorpse $ scorchSPic thecorpse)
Just PoisonDamage -> sethp (CrIsCorpse $ poisonSPic thecorpse)
Just PhysicalDamage | _crPain cr > 200 -> addCrGibs cr
. sethp CrIsGibs
_ -> -- addcorpse thecorpse
sethp (CrIsCorpse thecorpse)
_ -> sethp (CrIsCorpse thecorpse)
where
sethp x = cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ x
-- addcorpse ctype = plNew (cWorld . lWorld . corpses) cpID ctype
thecorpse = makeCorpse cr
scorchSPic :: SPic -> SPic