Add damage origins
This commit is contained in:
@@ -29,7 +29,7 @@ blinkActionMousePos cr w =
|
||||
& blinkDistortions cpos p3
|
||||
& cWorld . lWorld . creatures . ix cid . crPos . _xy .~ p3
|
||||
& blinkShockwave cid p3
|
||||
& inverseShockwaveAt (cpos `v2z` 20) 40 2 2
|
||||
& inverseShockwaveAt (cpos `v2z` 20) 40 2 2 (CrIndirectO cid)
|
||||
where
|
||||
cid = _crID cr
|
||||
p1 = w ^. cWorld . lWorld . lAimPos
|
||||
@@ -63,11 +63,11 @@ unsafeBlinkAction cr w
|
||||
. blinkDistortions cpos mwp
|
||||
. set (cWorld . lWorld . creatures . ix cid . crPos . _xy) mwp
|
||||
. blinkShockwave cid mwp
|
||||
$ inverseShockwaveAt (cpos `v2z` 20) 40 2 2 w
|
||||
$ inverseShockwaveAt (cpos `v2z` 20) 40 2 2 (CrIndirectO cid) w
|
||||
| otherwise =
|
||||
w
|
||||
& blinkActionFail cr
|
||||
& cWorld . lWorld . creatures . ix cid . crDamage .:~ Enterrement 100000000
|
||||
& cWorld . lWorld . creatures . ix cid . crDamage .:~ Enterrement 100000000 (CrIndirectO cid)
|
||||
where
|
||||
success = fromMaybe True $ do
|
||||
wl <- snd $ collidePointWallsFilter (const True) mwp cpos w
|
||||
@@ -82,7 +82,7 @@ blinkShockwave ::
|
||||
Point2 ->
|
||||
World ->
|
||||
World
|
||||
blinkShockwave i p = makeShockwaveAt [i] (p `v2z` 20) 60 1 2 cyan
|
||||
blinkShockwave i p = makeShockwaveAt [i] (p `v2z` 20) 60 1 2 cyan (CrIndirectO i)
|
||||
|
||||
-- | Like a blink action, but no ingoing distortion
|
||||
blinkActionFail :: Creature -> World -> World
|
||||
@@ -91,7 +91,7 @@ blinkActionFail cr w =
|
||||
& soundMultiFrom [TeleSound 0, TeleSound 1] p3 teleS Nothing
|
||||
-- & cWorld . lWorld . distortions .:~ distortionBulge
|
||||
& cWorld . lWorld . creatures . ix cid . crPos . _xy .~ p3
|
||||
& inverseShockwaveAt (cpos `v2z` 20) 40 2 2
|
||||
& inverseShockwaveAt (cpos `v2z` 20) 40 2 2 (CrIndirectO cid)
|
||||
where
|
||||
-- distR = 120
|
||||
-- distortionBulge = RadialDistortion cpos (cpos +.+ V2 distR 0) (cpos +.+ V2 0 distR) 1.9
|
||||
|
||||
Reference in New Issue
Block a user