Add z levels to shockwaves

This commit is contained in:
2025-08-05 08:30:57 +01:00
parent 09428f2707
commit 22dafda9bd
12 changed files with 27 additions and 39 deletions
+4 -4
View File
@@ -27,7 +27,7 @@ blinkActionMousePos cr w =
& blinkDistortions cpos p3
& cWorld . lWorld . creatures . ix cid . crPos .~ p3
& blinkShockwave cid p3
& inverseShockwaveAt cpos 40 2 2
& inverseShockwaveAt (cpos `v2z` 20) 40 2 2
where
cid = _crID cr
p1 = w ^. cWorld . lWorld . lAimPos
@@ -63,7 +63,7 @@ unsafeBlinkAction cr w
. blinkDistortions cpos mwp
. set (cWorld . lWorld . creatures . ix cid . crPos) mwp
. blinkShockwave cid mwp
$ inverseShockwaveAt cpos 40 2 2 w
$ inverseShockwaveAt (cpos `v2z` 20) 40 2 2 w
| otherwise =
w
& blinkActionFail cr
@@ -82,7 +82,7 @@ blinkShockwave ::
Point2 ->
World ->
World
blinkShockwave i p = makeShockwaveAt [i] p 60 1 2 cyan
blinkShockwave i p = makeShockwaveAt [i] (p `v2z` 20) 60 1 2 cyan
-- | Like a blink action, but no ingoing distortion
blinkActionFail ::
@@ -94,7 +94,7 @@ blinkActionFail cr w =
& soundMultiFrom [TeleSound 0, TeleSound 1] p3 teleS Nothing
& cWorld . lWorld . distortions .:~ distortionBulge
& cWorld . lWorld . creatures . ix cid . crPos .~ p3
& inverseShockwaveAt cpos 40 2 2
& inverseShockwaveAt (cpos `v2z` 20) 40 2 2
where
distR = 120
distortionBulge = RadialDistortion cpos (cpos +.+ V2 distR 0) (cpos +.+ V2 0 distR) 1.9