Add damage origins
This commit is contained in:
@@ -29,7 +29,7 @@ updateExpBarrel ps cr w = case cr ^. crHP of
|
||||
& flip (foldl' f) ps
|
||||
HP _ ->
|
||||
w
|
||||
& makeExplosionAt ((cr ^. crPos) & _z +~ 20) 0
|
||||
& makeExplosionAt (CrIndirectO (cr ^. crID)) ((cr ^. crPos) & _z +~ 20) 0
|
||||
& cWorld . lWorld . creatures . ix (_crID cr) . crHP .~ CrDestroyed Gibbed
|
||||
_ -> w
|
||||
where
|
||||
@@ -51,7 +51,7 @@ damsToExpBarrel = flip $ foldl' damToExpBarrel
|
||||
|
||||
damToExpBarrel :: Creature -> Damage -> Creature
|
||||
damToExpBarrel cr dm = case dm of
|
||||
Piercing x p _ ->
|
||||
Piercing x p _ _ ->
|
||||
cr & crHP . _HP -~ div x 200
|
||||
& crType . barrelType . piercedPoints .:~ (p - cr ^. crPos . _xy)
|
||||
Poison{} -> cr
|
||||
|
||||
Reference in New Issue
Block a user