Clarify number of distortions, play with distorting bullets

This commit is contained in:
2025-11-19 21:49:20 +00:00
parent 610936a5fa
commit 10dbb238c8
7 changed files with 93 additions and 72 deletions
+11 -1
View File
@@ -154,7 +154,17 @@ makeFlak bu _ w = w & cWorld . lWorld . bullets .++~ [f x | x <- xs]
g x v = v +.+ x *.* normalizeV (vNormal v)
hitEffFromBul :: World -> Bullet -> (World, Bullet)
hitEffFromBul w bu = case _buEffect bu of
hitEffFromBul w bu = hitEffFromBul' w' bu
where
w' = w & cWorld . lWorld . distortions .:~ x
x = RadialDistortion (_buPos bu + _buVel bu) (V2 50 0) (V2 0 50)
(v3 & _3 .~ t) (v3 & _3 .~ negate t) v3 1
v3 = V3 (V2 1 0) (V2 0 1) 0
t = vNormal (_buVel bu)
-- (V2 1 0) (V2
hitEffFromBul' :: World -> Bullet -> (World, Bullet)
hitEffFromBul' w bu = case _buEffect bu of
PenetrateBullet -> movePenBullet bu hitstream w
BounceBullet -> fromMaybe (expireAndDamage bu hitstream w) $ do
(hp, crwl) <- hitstream ^? _head