Refactor and improve flamelets

This commit is contained in:
2021-03-24 22:42:43 +01:00
parent baecb8e15a
commit bc5ad33652
4 changed files with 76 additions and 86 deletions
+6 -7
View File
@@ -94,18 +94,17 @@ reducePastDamage = over (crState . crPastDamage) rdpdam
| x > 0 = x - 1
| otherwise = 0
movementSideEff :: Creature -> World -> World
movementSideEff cr w
| hasJetPack
= case cr ^? crState . stance . carriage of
Just (Boosting v)
-> makeFlamelet (oldPos +.+ (_crRad cr + 3) *.* (unitVectorAtAngle $ _crDir cr + pi))
(momentum +.+ 1 *.* rotateV randDir (vInverse v))
66
Nothing
1
-> makeFlameletTimed
(oldPos +.+ (_crRad cr + 3) *.* (unitVectorAtAngle $ _crDir cr + pi))
(momentum +.+ 1 *.* rotateV randDir (vInverse v))
Nothing
1
20
$ set randGen g
w
_ -> w