Work on what happens when creatures fall down chasms
This commit is contained in:
@@ -119,11 +119,9 @@ scorchSPic = _1 %~ overColSH (mixColors 0.9 0.1 black . normalizeColor)
|
||||
poisonSPic :: SPic -> SPic
|
||||
poisonSPic = _1 %~ overColSH (mixColors 0.5 0.5 green . normalizeColor)
|
||||
|
||||
{- | Drop items according to the creature state.
|
||||
TODO make sure this doesn't mess up any ItemPosition
|
||||
-}
|
||||
-- reverse keys, otherwise two or more inv items will cause errors
|
||||
dropAll :: Creature -> World -> World
|
||||
dropAll cr w = foldl' (flip (dropItem cr)) w $ IM.keys $ _crInv cr
|
||||
dropAll cr w = foldl' (flip (dropItem cr)) w . reverse . IM.keys $ _crInv cr
|
||||
|
||||
doDamage :: Creature -> World -> World
|
||||
doDamage cr = applyPastDamages cr . applyCreatureDamage (cr ^. crDamage) cr
|
||||
|
||||
Reference in New Issue
Block a user