Work on placements
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user