Major item refactor, still broken
This commit is contained in:
@@ -20,9 +20,10 @@ applyIndividualDamage cr w dm = damMatSideEffect dm (crMaterial (_crType cr)) (L
|
||||
_ -> w & damageHP cr (_dmAmount dm)
|
||||
|
||||
applyPiercingDamage :: Creature -> Damage -> World -> World
|
||||
applyPiercingDamage cr dm
|
||||
| crIsArmouredFrom p cr = f . makeSpark NormalSpark p1 (argV (p1 - p))
|
||||
| otherwise = f . damageHP cr (_dmAmount dm)
|
||||
applyPiercingDamage cr dm w
|
||||
| crIsArmouredFrom (w ^. cWorld . lWorld . items) p cr
|
||||
= f . makeSpark NormalSpark p1 (argV (p1 - p)) $ w
|
||||
| otherwise = f . damageHP cr (_dmAmount dm) $ w
|
||||
where
|
||||
f = cWorld . lWorld . creatures . ix (_crID cr) . crPos +~ _dmVector dm
|
||||
/ V2 x x
|
||||
|
||||
Reference in New Issue
Block a user