diff --git a/src/Dodge/EnergyBall.hs b/src/Dodge/EnergyBall.hs index 1a122c0d6..a2d17e701 100644 --- a/src/Dodge/EnergyBall.hs +++ b/src/Dodge/EnergyBall.hs @@ -17,8 +17,6 @@ import RandomHelp makeFlamelet :: -- | Position Point2 -> - -- | z position - Float -> -- | Velocity Point2 -> -- | Size @@ -27,7 +25,7 @@ makeFlamelet :: Int -> World -> World -makeFlamelet (V2 x y) z vel size time w = +makeFlamelet (V2 x y) vel size time w = w & randGen .~ g & cWorld . lWorld . energyBalls @@ -50,7 +48,7 @@ updateEnergyBall w eb | otherwise = ( ebFlicker eb $ uncurry (damageCircle 5 (_ebPos eb)) (_ebEff eb) w -- , Just $ eb & ebTimer -~ 1 & ebPos .+.+~ _ebVel eb & ebVel .*.*~ 0.9 - , Just $ eb & ebTimer -~ 1 & ebPos .~ bp & ebVel .~ 0.7 * bv + , Just $ eb & ebTimer -~ 1 & ebPos .~ bp & ebVel .~ 0.8 * bv ) where p = eb ^. ebPos + eb ^. ebVel diff --git a/src/Dodge/Projectile/Update.hs b/src/Dodge/Projectile/Update.hs index 757b39fd8..a8e2b0517 100644 --- a/src/Dodge/Projectile/Update.hs +++ b/src/Dodge/Projectile/Update.hs @@ -77,7 +77,7 @@ doThrust pj w = & randGen .~ g & cWorld . lWorld . projectiles . ix i . prjVel %~ (\v -> accel +.+ frict *.* v) & soundContinue (ShellSound i) newPos missileLaunchS (Just 1) - & makeFlamelet (oldPos -.- vel) 0 (vel +.+ rotateV (pi + sparkD) accel) 3 10 + & makeFlamelet (oldPos -.- vel) (vel +.+ rotateV (pi + sparkD) accel) 3 10 & shellTrailCloud trailage trailfadetime (addZ 20 (oldPos +.+ r1 +.+ 30 *.* normalizeV (oldPos -.- newPos))) where diff --git a/src/Dodge/TestString.hs b/src/Dodge/TestString.hs index 3c8e97e2f..7fefe855a 100644 --- a/src/Dodge/TestString.hs +++ b/src/Dodge/TestString.hs @@ -27,7 +27,7 @@ import qualified Data.Map.Strict as M testStringInit :: Universe -> [String] testStringInit u = - (map show $ u ^. uvWorld . cWorld . lWorld . oldMagnets) + (map (show . _ebPos) $ u ^. uvWorld . cWorld . lWorld . energyBalls) -- <> -- (foldMap prettyShort $ u ^. uvWorld . cWorld . lWorld . bullets) -- fromMaybe mempty $ do diff --git a/src/Dodge/WorldEvent/Explosion.hs b/src/Dodge/WorldEvent/Explosion.hs index a5a79454d..edf737dc4 100644 --- a/src/Dodge/WorldEvent/Explosion.hs +++ b/src/Dodge/WorldEvent/Explosion.hs @@ -74,23 +74,18 @@ makeExplosionAt p vel w = w & soundMultiFrom [Explosion 0, Explosion 1] p bangS Nothing & addFlames --- & cWorld . lWorld . tempLightSources .:~ theTLS - & cWorld . lWorld . worldEvents .:~ thels + & cWorld . lWorld . worldEvents + .:~ MakeTempLight (LSParam (addZ 20 p) 150 (V3 1 0.5 0)) 20 & makeShockwaveAt [] p 50 50 1 white where - thels = MakeTempLight (LSParam (addZ 20 p) 150 (V3 1 0.5 0)) 20 --- theTLS = tlsTimeRadColPos 20 150 (V3 1 0.5 0) (addZ 20 p) fVs = replicateM 100 (randInCirc 1) & evalState $ _randGen w - --fPs'' = replicateM 100 (fmap (15 *.*.*) randInHemisphere) & evalState $ _randGen w - fPs'' = replicateM 100 (fmap (15 *.*.*) randInHemisphere) & evalState $ _randGen w - (fPs', zs) = - let (a, b, c) = unzip3 $ map fromV3 fPs'' - in (zipWith V2 a b, c) - --fPs = map (pushAgainstWalls . (+.+) p . (*.*) 0.5) fPs' + fPs' = replicateM 100 (randInCirc 5) & evalState $ _randGen w inversePushOut v = (15 - magV v) * 0.01 *.* v fVs' = zipWith (+.+) fVs $ map inversePushOut fPs' sizes = randomRs (2, 9) $ _randGen w times = randomRs (15, 20) $ _randGen w - mF q z v size time = makeFlamelet (q - vel) z (v + vel) size time - newFs = zipWith4 (mF p) zs (zipWith ((+) . xyV3) fPs'' (fmap (3 *.*) fVs')) sizes times + mF q v size time = makeFlamelet (q - vel) (v + vel) size time + newFs = zipWith3 (mF p) (zipWith (+) fPs' (fmap (3 *.*) fVs')) sizes times +-- newFs = zipWith3 (mF p) (fmap (3 *.*) fVs') sizes times +-- newFs = zipWith3 (mF p) fPs' sizes times addFlames w' = foldl' (flip ($)) w' newFs