Refactor and improve flamelets
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user