Separate and reify laser beams

This commit is contained in:
2022-07-23 23:26:39 +01:00
parent 262ac237cd
commit 7563441154
13 changed files with 102 additions and 72 deletions
+2 -2
View File
@@ -290,7 +290,7 @@ shootTeslaArc it cr w = w'
dir = _crDir cr
shootLaser :: Item -> Creature -> World -> World
shootLaser it cr = instantParticles .:~ lasRayAt (_lasColor $ _itParams it) dam phasev pos dir
shootLaser it cr = lasers .:~ lasRayAt (_lasColor $ _itParams it) dam phasev pos dir
where
pos = _crPos cr
dir = _crDir cr
@@ -301,7 +301,7 @@ shootLaser it cr = instantParticles .:~ lasRayAt (_lasColor $ _itParams it) dam
circleLaser :: Item -> Creature -> World -> World
circleLaser it cr w
| hasLOSIndirect cpos pos w = w
& instantParticles .:~ lasRayAt (_lasColor $ _itParams it) dam phasev pos dir
& lasers .:~ lasRayAt (_lasColor $ _itParams it) dam phasev pos dir
| otherwise = w
where
cpos = _crPos cr