Commit before generalising picture transformation to alternative

This commit is contained in:
2021-07-21 14:38:57 +02:00
parent e5bee30f5b
commit 0aa437d035
6 changed files with 25 additions and 20 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ defaultConsumable = Consumable
, _itAimStance = LeaveHolstered
}
defaultApplyDamage :: [DamageType] -> Creature -> (World -> World, Creature)
defaultApplyDamage ds cr = (id, doPoisonDam $ foldr (\d c -> snd $ applyIndividualDamage d c) cr ds')
defaultApplyDamage ds cr = (id, doPoisonDam $ foldl' (flip $ \d c -> snd $ applyIndividualDamage d c) cr ds')
where
(ps,ds') = partition isPoison ds
isPoison PoisonDam{} = True