Cleanup terminal display
This commit is contained in:
@@ -19,7 +19,7 @@ defaultApplyDamage ds cr w = foldl' (applyIndividualDamage cr) w ds'
|
||||
& creatures . ix (_crID cr) %~ doPoisonDam
|
||||
where
|
||||
(ps,ds') = partition isPoison ds
|
||||
isPoison Damage{_dmType=PoisonDam} = True
|
||||
isPoison Damage{_dmType=POISONDAM} = True
|
||||
isPoison _ = False
|
||||
poisonDam = quot (max 0 (sum (map _dmAmount ps))) 10
|
||||
doPoisonDam = crHP -~ poisonDam
|
||||
@@ -60,7 +60,7 @@ applyIndividualDamage cr w dm = applyDamageEffect dm (_dmEffect dm) cr $ applyIn
|
||||
|
||||
applyIndividualDamage' :: Creature -> World -> Damage -> World
|
||||
applyIndividualDamage' cr w dm = case _dmType dm of
|
||||
Piercing -> applyPiercingDamage cr dm w
|
||||
PIERCING -> applyPiercingDamage cr dm w
|
||||
_ -> w & damageHP cr (_dmAmount dm)
|
||||
|
||||
applyPiercingDamage :: Creature -> Damage -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user