Separate incendiary ebs and flamelets
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
module Dodge.EnergyBall (
|
||||
updateEnergyBall,
|
||||
incBallAt,
|
||||
makeFlashBall,
|
||||
makeFlamelet,
|
||||
makeMovingEB,
|
||||
@@ -48,14 +47,17 @@ updateEnergyBall w eb
|
||||
|
||||
ebEffect :: EnergyBall -> World -> World
|
||||
ebEffect eb = case _ebEff eb of
|
||||
ElectricalBall ->
|
||||
soundContinue (EBSound 0) (_ebPos eb) elecCrackleS (Just 2)
|
||||
ElectricalBall i ->
|
||||
soundContinue (EBSound i) (_ebPos eb) elecCrackleS (Just 2)
|
||||
. randSparkExtraVel
|
||||
(_ebVel eb)
|
||||
ElectricSpark
|
||||
(state (randomR (3, 6)))
|
||||
(state (randomR (0, 2 * pi)))
|
||||
(_ebPos eb)
|
||||
IncendiaryBall{}
|
||||
| _ebTimer eb == 20 ->
|
||||
soundStart (EBSound (-1)) (_ebPos eb) fireFadeS Nothing
|
||||
_ -> id
|
||||
|
||||
energyBallAt :: EnergyBallType -> Point2 -> World -> World
|
||||
@@ -78,9 +80,6 @@ makeMovingEB v ebt p =
|
||||
, _ebEff = ebt
|
||||
}
|
||||
|
||||
incBallAt :: Point2 -> World -> World
|
||||
incBallAt = energyBallAt (FlameletBall 5 0)
|
||||
|
||||
makeFlashBall :: Point2 -> World -> World
|
||||
makeFlashBall = energyBallAt FlashBall
|
||||
|
||||
@@ -93,8 +92,9 @@ ebFlicker pt
|
||||
|
||||
ebColor :: EnergyBall -> Color
|
||||
ebColor eb = case eb ^. ebEff of
|
||||
IncendiaryBall{} -> red
|
||||
FlameletBall{} -> red
|
||||
ElectricalBall -> cyan
|
||||
ElectricalBall{} -> cyan
|
||||
ExplosiveBall -> yellow
|
||||
FlashBall -> white
|
||||
|
||||
@@ -114,7 +114,8 @@ damageCircle sp dt w =
|
||||
ebtToDamage :: Point2 -> EnergyBallType -> Damage
|
||||
ebtToDamage p = \case
|
||||
FlameletBall{} -> Flaming 1
|
||||
ElectricalBall -> Electrical 10
|
||||
IncendiaryBall{} -> Flaming 10
|
||||
ElectricalBall{} -> Electrical 10
|
||||
ExplosiveBall -> Explosive 10 p
|
||||
FlashBall -> Flashing 10 p
|
||||
|
||||
|
||||
Reference in New Issue
Block a user