From 70c78824f39b7a56b7e5cc8be9b5d92938d8e994 Mon Sep 17 00:00:00 2001 From: justin Date: Sun, 8 Jun 2025 20:40:58 +0100 Subject: [PATCH] Cleanup, redo damage direction --- src/Dodge/Barreloid.hs | 2 +- src/Dodge/Bullet.hs | 2 +- src/Dodge/Creature.hs | 3 +- src/Dodge/Creature/Damage.hs | 8 +--- src/Dodge/Damage.hs | 27 +++++------ src/Dodge/Data/AimStance.hs | 1 - src/Dodge/Data/EnergyBall/Type.hs | 3 +- src/Dodge/EnergyBall.hs | 58 ++++++++-------------- src/Dodge/EnergyBall/Draw.hs | 11 ++--- src/Dodge/Spark.hs | 51 +++++++------------- src/Dodge/Zoning/Base.hs | 6 +++ tags | 80 ++++++++++++++++--------------- 12 files changed, 105 insertions(+), 147 deletions(-) diff --git a/src/Dodge/Barreloid.hs b/src/Dodge/Barreloid.hs index 6f2d51511..ce55b4d73 100644 --- a/src/Dodge/Barreloid.hs +++ b/src/Dodge/Barreloid.hs @@ -27,7 +27,7 @@ updateExpBarrel cr w pierceSparks :: [World -> World] pierceSparks = zipWith - (\p a -> createBarrelSpark (_crPos cr +.+ p) (a + argV p)) + (\p a -> sparkRandDir 0.1 (_crPos cr +.+ p) (a + argV p)) poss as as = randomRs (-0.7, 0.7) g diff --git a/src/Dodge/Bullet.hs b/src/Dodge/Bullet.hs index 7b4362249..476798b0f 100644 --- a/src/Dodge/Bullet.hs +++ b/src/Dodge/Bullet.hs @@ -114,7 +114,7 @@ useBulletPayload bu = case _buPayload bu of BulFlak -> makeFlak bu BulFrag -> makeFragBullets BulGas -> (`makeGasCloud` V2 0 0) - BulBall FlamingBall -> incBallAt +-- BulBall FlamingBall -> incBallAt BulBall ExplosiveBall -> \p -> cWorld . lWorld . shockwaves .:~ concBall p BulBall ElectricalBall -> makeStaticBall BulBall FlashBall -> makeFlashBall diff --git a/src/Dodge/Creature.hs b/src/Dodge/Creature.hs index a09a13744..d6fc1f860 100644 --- a/src/Dodge/Creature.hs +++ b/src/Dodge/Creature.hs @@ -281,8 +281,7 @@ inventoryX c = case c of , megaTinMag 10200 ] <> -- [bulletTargetingModule btt | btt <- [minBound .. maxBound]] - [bulletModule (BulletModPayload (BulBall x)) | x <- [ FlamingBall - , FlameletBall 5 0 + [bulletModule (BulletModPayload (BulBall x)) | x <- [ FlameletBall 5 0 , ElectricalBall , ExplosiveBall , FlashBall ]] diff --git a/src/Dodge/Creature/Damage.hs b/src/Dodge/Creature/Damage.hs index f8c563228..de18f5295 100644 --- a/src/Dodge/Creature/Damage.hs +++ b/src/Dodge/Creature/Damage.hs @@ -45,18 +45,14 @@ defaultApplyDamage ds cr w = --p = _dmAt dm applyIndividualDamage :: Creature -> World -> Damage -> World ---applyIndividualDamage cr w dm = applyDamageEffect dm (_dmEffect dm) cr $ applyIndividualDamage' cr w dm -applyIndividualDamage cr w dm = applyIndividualDamage' cr w dm - -applyIndividualDamage' :: Creature -> World -> Damage -> World -applyIndividualDamage' cr w dm = case dm of +applyIndividualDamage cr w dm = case dm of Piercing{} -> applyPiercingDamage cr dm w _ -> w & damageHP cr (_dmAmount dm) applyPiercingDamage :: Creature -> Damage -> World -> World applyPiercingDamage cr dm | crIsArmouredFrom p cr = f . makeSpark NormalSpark p1 (argV (p1 -.- p)) - | otherwise = f . (damageHP cr $ _dmAmount dm) + | otherwise = f . damageHP cr (_dmAmount dm) where f = cWorld . lWorld . creatures . ix (_crID cr) . crPos -~ _dmVector dm / V2 x x diff --git a/src/Dodge/Damage.hs b/src/Dodge/Damage.hs index e78f3b535..f3396c131 100644 --- a/src/Dodge/Damage.hs +++ b/src/Dodge/Damage.hs @@ -1,18 +1,18 @@ {-# LANGUAGE LambdaCase #-} -module Dodge.Damage - ( damageCrWl - , damageDirection - , damageCrWlID - , maxDamageType - ) where ---import qualified Data.Map.Strict as M +module Dodge.Damage ( + damageCrWl, + damageDirection, + damageCrWlID, + maxDamageType, +) where + +import Geometry.Vector +import ListHelp import Dodge.Data.CrWlID import Dodge.Data.World ---import FoldableHelp ---import Geometry.Vector -import LensHelp import qualified IntMapHelp as IM +import LensHelp damageCrWlID :: Damage -> CrWlID -> World -> World damageCrWlID dam = \case @@ -24,11 +24,9 @@ damageCrWl :: Damage -> Either Creature Wall -> World -> World damageCrWl dt (Left cr) = cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage .:~ dt damageCrWl dt (Right wl) = cWorld . lWorld . wallDamages %~ IM.insertWith (++) (_wlID wl) [dt] +-- could sort for damage amount as well damageDirection :: [Damage] -> Maybe Float -damageDirection _ = Nothing ---damageDirection ds = do --- dm <- safeMinimumOn (negate . _dmAmount) ds --- safeArgV (_dmTo dm -.- _dmFrom dm) +damageDirection ds = safeArgV =<< safeHead (ds ^.. each . dmVector) --collectDamageTypes :: [Damage] -> M.Map DamageType Int --collectDamageTypes = foldl' (flip f) M.empty @@ -37,4 +35,5 @@ damageDirection _ = Nothing -- maxDamageType :: [Damage] -> Maybe (Damage, Int) maxDamageType _ = Nothing + --maxDamageType = safeMinimumOn (negate . snd) . M.assocs . collectDamageTypes diff --git a/src/Dodge/Data/AimStance.hs b/src/Dodge/Data/AimStance.hs index 4646d0f9e..d4fe25b82 100644 --- a/src/Dodge/Data/AimStance.hs +++ b/src/Dodge/Data/AimStance.hs @@ -1,5 +1,4 @@ {-# LANGUAGE StrictData #-} -{-# LANGUAGE TemplateHaskell #-} module Dodge.Data.AimStance where diff --git a/src/Dodge/Data/EnergyBall/Type.hs b/src/Dodge/Data/EnergyBall/Type.hs index abdf112ef..2516c10c5 100644 --- a/src/Dodge/Data/EnergyBall/Type.hs +++ b/src/Dodge/Data/EnergyBall/Type.hs @@ -10,8 +10,7 @@ import Data.Aeson import Data.Aeson.TH data EnergyBallType - = FlamingBall - | FlameletBall {_fbSize :: Float, _fbRot :: Float} + = FlameletBall {_fbSize :: Float, _fbRot :: Float} | ElectricalBall | ExplosiveBall | FlashBall diff --git a/src/Dodge/EnergyBall.hs b/src/Dodge/EnergyBall.hs index 98f001bf5..b3b4519a2 100644 --- a/src/Dodge/EnergyBall.hs +++ b/src/Dodge/EnergyBall.hs @@ -18,17 +18,7 @@ import LensHelp import Picture import RandomHelp -makeFlamelet :: - -- | Position - Point2 -> - -- | Velocity - Point2 -> - -- | Size - Float -> - -- | Timer - Int -> - World -> - World +makeFlamelet :: Point2 -> Point2 -> Float -> Int -> World -> World makeFlamelet p v s t w = w & randGen .~ g @@ -53,35 +43,31 @@ updateEnergyBall w eb p = eb ^. ebPos + eb ^. ebVel (bp, bv) = fromMaybe (p, eb ^. ebVel) $ bouncePoint (const True) 0 (eb ^. ebPos) p w -incBallAt :: Point2 -> World -> World -incBallAt p = cWorld . lWorld . energyBalls - .:~ EnergyBall - { _ebVel = 0 - , _ebPos = p - , _ebTimer = 20 - , _ebEff = FlamingBall - } - -makeFlashBall :: Point2 -> World -> World -makeFlashBall p = +energyBallAt :: EnergyBallType -> Point2 -> World -> World +energyBallAt ebt p = cWorld . lWorld . energyBalls .:~ EnergyBall { _ebVel = 0 , _ebPos = p , _ebTimer = 20 - , _ebEff = FlashBall + , _ebEff = ebt } +incBallAt :: Point2 -> World -> World +incBallAt = energyBallAt (FlameletBall 5 0) + +makeFlashBall :: Point2 -> World -> World +makeFlashBall = energyBallAt FlashBall + ebFlicker :: EnergyBall -> World -> World ebFlicker pt | _ebTimer pt `mod` 7 == 0 = cWorld . lWorld . lights - .:~ LSParam (addZ 20 $ _ebPos pt) 70 (0.5 *.*.* xyzV4 (ebColor pt)) + .:~ LSParam (addZ 20 $ _ebPos pt) 70 (0.5 * xyzV4 (ebColor pt)) | otherwise = id ebColor :: EnergyBall -> Color ebColor eb = case eb ^. ebEff of - FlamingBall -> red FlameletBall{} -> red ElectricalBall -> cyan ExplosiveBall -> yellow @@ -93,28 +79,22 @@ damageCircle sp dt w = & cWorld . lWorld . wallDamages %~ addwalldamages & cWorld . lWorld . creatures %~ addcreaturedamages where - r = 5 - addwalldamages wlds = foldl' (damageWlCircle wldam) wlds wlstodam + addwalldamages wlds = foldl' (damageWlCircle dam) wlds wlstodam + addcreaturedamages crs = foldl' (damageCrCircle dam) crs crstodam wlstodam = wlsHitRadial sp r w - wldam p = ebtToDamage p dt - addcreaturedamages crs = foldl' (damageCrCircle crdam) crs crstodam - crdam = ebtToDamage sp dt crstodam = crsHitRadial sp r w + r = fromMaybe 5 $ dt ^? fbSize + dam = ebtToDamage sp dt ebtToDamage :: Point2 -> EnergyBallType -> Damage ebtToDamage p = \case - FlamingBall -> Flaming 10 - FlameletBall {} -> Flaming 1 + FlameletBall{} -> Flaming 1 ElectricalBall -> Electrical 10 ExplosiveBall -> Explosive 10 p FlashBall -> Flashing 10 p -damageWlCircle :: - (Point2 -> Damage) -> - IM.IntMap [Damage] -> - (Point2, Wall) -> - IM.IntMap [Damage] -damageWlCircle f wldams (p, wl) = IM.insertWith (++) (_wlID wl) [f p] wldams +damageWlCircle :: Damage -> IM.IntMap [Damage] -> (Point2, Wall) -> IM.IntMap [Damage] +damageWlCircle dam wls (_, wl) = wls & at (_wlID wl) . non mempty .:~ dam damageCrCircle :: Damage -> IM.IntMap Creature -> (Point2, Creature) -> IM.IntMap Creature -damageCrCircle crdam crs (_, cr) = crs & ix (_crID cr) . crState . csDamage .:~ crdam +damageCrCircle dam crs (_, cr) = crs & ix (_crID cr) . crState . csDamage .:~ dam diff --git a/src/Dodge/EnergyBall/Draw.hs b/src/Dodge/EnergyBall/Draw.hs index 4e33ced6d..10a93bc41 100644 --- a/src/Dodge/EnergyBall/Draw.hs +++ b/src/Dodge/EnergyBall/Draw.hs @@ -8,7 +8,6 @@ import Picture drawEnergyBall :: EnergyBall -> Picture drawEnergyBall eb = case _ebEff eb of - FlamingBall -> drawFlamelet 5 0 eb FlameletBall x a -> drawFlamelet x a eb ElectricalBall -> drawStaticBall eb ExplosiveBall -> mempty @@ -33,16 +32,12 @@ drawFlamelet size rot pt = ] where z = 20 - -- z = _ebZ pt sp = _ebPos pt - vel = _ebVel pt - ep = sp +.+ vel - --size = _ebWidth pt siz2 = size + 0.2 time = _ebTimer pt piu = setDepth (z + 25) - . uncurryV translate ep + . uncurryV translate sp . color ( mixColors (fromIntegral (max 0 (time -2))) @@ -58,7 +53,7 @@ drawFlamelet size rot pt = $ reverse (rectNSWE siz2 (- siz2) (- siz2) siz2) pi2 = setDepth (z + 25) - . uncurryV translate ep + . uncurryV translate sp . color ( mixColors (fromIntegral (max 0 (time -2))) @@ -75,7 +70,7 @@ drawFlamelet size rot pt = $ rectNSWE siz2 (- siz2) (- siz2) siz2 pic = setDepth (z + 20) - . uncurryV translate ep + . uncurryV translate sp . color ( mixColors (fromIntegral (max 0 (time -2))) diff --git a/src/Dodge/Spark.hs b/src/Dodge/Spark.hs index 58b29f933..926f6556a 100644 --- a/src/Dodge/Spark.hs +++ b/src/Dodge/Spark.hs @@ -1,21 +1,19 @@ module Dodge.Spark ( updateSpark, sparkRandDir, - createBarrelSpark, randDirSpark, randSpark, makeSpark, ) where -import Dodge.Damage import Control.Monad.State +import Dodge.Damage import Dodge.Data.World import Dodge.WorldEvent.ThingsHit import Geometry import LensHelp import System.Random - updateSpark :: World -> Spark -> (World, Maybe Spark) updateSpark w sk | magV (_skVel sk) < 1 = (w, Nothing) @@ -29,36 +27,26 @@ updateSpark w sk sp = _skPos sk ep = sp + _skVel sk -sparkDam :: - Spark -> - Either Creature Wall -> - World -> - World -sparkDam sk x = damageCrWl (sparkToDamage sk) x +sparkDam :: Spark -> Either Creature Wall -> World -> World +sparkDam sk = damageCrWl (sparkToDamage sk) sparkToDamage :: Spark -> Damage sparkToDamage sp = case _skType sp of - ElectricSpark -> Electrical 10 - FireSpark -> Flaming 1 - NormalSpark -> Sparking 10 - -createBarrelSpark :: Point2 -> Float -> World -> World -createBarrelSpark pos dir = sparkRandDir 0.1 pos dir + ElectricSpark -> Electrical 10 + FireSpark -> Flaming 1 + NormalSpark -> Sparking 10 makeSpark :: SparkType -> Point2 -> Float -> World -> World -makeSpark st p d = cWorld . lWorld . sparks - .:~ Spark - { _skVel = rotateV d (V2 5 0) - , _skPos = p - , _skOldPos = p - , _skType = st - } +makeSpark st p d = + cWorld . lWorld . sparks + .:~ Spark + { _skVel = rotateV d (V2 5 0) + , _skPos = p + , _skOldPos = p + , _skType = st + } -randDirSpark :: - State StdGen Float -> - Point2 -> - World -> - World +randDirSpark :: State StdGen Float -> Point2 -> World -> World randDirSpark randdir pos w = w & randGen .~ g @@ -70,9 +58,7 @@ randDirSpark randdir pos w = , _skType = NormalSpark } where - (dir, g) = (`runState` _randGen w) $ do - d <- randdir - return d + (dir, g) = randdir `runState` _randGen w randSpark :: SparkType -> @@ -98,7 +84,4 @@ randSpark dt randspeed randdir pos w = return (d, x) sparkRandDir :: Float -> Point2 -> Float -> World -> World -sparkRandDir a pos dir = - randDirSpark - (state $ randomR (dir - a, dir + a)) - pos +sparkRandDir a pos dir = randDirSpark (state $ randomR (dir - a, dir + a)) pos diff --git a/src/Dodge/Zoning/Base.hs b/src/Dodge/Zoning/Base.hs index bff40ca55..0edbf2178 100644 --- a/src/Dodge/Zoning/Base.hs +++ b/src/Dodge/Zoning/Base.hs @@ -11,6 +11,7 @@ module Dodge.Zoning.Base , zonesAroundPoint , xIntercepts , yIntercepts' + , updateInt2Map ) where import Control.Lens @@ -78,6 +79,7 @@ yIntercepts' s sp ep = map f $ xIntercepts s (f sp) (f ep) where f (V2 x y) = V2 y x +-- consider using: at x . non mempty . at y . non mempty <>~ a zoneMonoid :: Semigroup m => Int2 -> m -> IM.IntMap (IM.IntMap m) -> IM.IntMap (IM.IntMap m) {-# INLINE zoneMonoid #-} zoneMonoid (V2 !x !y) a = IM.insertWith f x $! IM.singleton y a @@ -87,6 +89,10 @@ zoneMonoid (V2 !x !y) a = IM.insertWith f x $! IM.singleton y a deZoneIX :: Int -> IM.IntMap (IM.IntMap IS.IntSet) -> Int2 -> IM.IntMap (IM.IntMap IS.IntSet) deZoneIX i im (V2 x y) = im & ix x . ix y %~ IS.delete i +updateInt2Map :: (Eq a,Monoid a) => + (a -> a) -> Int2 -> IM.IntMap (IM.IntMap a) -> IM.IntMap (IM.IntMap a) +updateInt2Map f (V2 x y) = at x . non mempty . at y . non mempty %~ f + zonesAroundPoint :: Float -> Point2 -> [Int2] zonesAroundPoint s p = [V2 a b | a <- [x -1 .. x + 1], b <- [y -1 .. y + 1]] where diff --git a/tags b/tags index 76660b932..7c74777c3 100644 --- a/tags +++ b/tags @@ -629,8 +629,8 @@ Enable_debug src/Dodge/Data/Config.hs 68;" C EncircleFlock src/Dodge/Data/Creature/State.hs 30;" C EnergyBall src/Dodge/Data/EnergyBall.hs 17;" t EnergyBall src/Dodge/Data/EnergyBall.hs 6;" m -EnergyBall src/Dodge/EnergyBall.hs 2;" m -EnergyBallType src/Dodge/Data/EnergyBall/Type.hs 11;" t +EnergyBall src/Dodge/EnergyBall.hs 3;" m +EnergyBallType src/Dodge/Data/EnergyBall/Type.hs 12;" t EnergyGeneratorSS src/Dodge/Data/Scenario.hs 109;" C EngineSS src/Dodge/Data/Scenario.hs 88;" C Enterrement src/Dodge/Data/Damage.hs 31;" C @@ -699,7 +699,6 @@ FlameletBall src/Dodge/Data/EnergyBall/Type.hs 13;" C Flamer src/Dodge/Data/SoundOrigin.hs 25;" C FlamerSmokeCloud src/Dodge/Data/Cloud.hs 31;" C Flaming src/Dodge/Data/Damage.hs 25;" C -FlamingBall src/Dodge/Data/EnergyBall/Type.hs 12;" C Flank src/Dodge/Data/ActionPlan.hs 177;" C FlareType src/Dodge/Data/Muzzle.hs 21;" t FlashBall src/Dodge/Data/EnergyBall/Type.hs 16;" C @@ -2551,7 +2550,6 @@ _dtRight src/Dodge/Data/DoubleTree.hs 30;" f _dtValue src/Dodge/Data/DoubleTree.hs 30;" f _ebEff src/Dodge/Data/EnergyBall.hs 21;" f _ebPos src/Dodge/Data/EnergyBall.hs 19;" f -_ebRot src/Dodge/Data/EnergyBall.hs 22;" f _ebTimer src/Dodge/Data/EnergyBall.hs 20;" f _ebVel src/Dodge/Data/EnergyBall.hs 18;" f _eboName src/Shader/Data.hs 89;" f @@ -2559,6 +2557,8 @@ _eboPtr src/Shader/Data.hs 90;" f _eeUse src/Dodge/Data/Item/Use/Equipment.hs 17;" f _emoMenuOption src/Dodge/Data/Universe.hs 77;" f _energyBalls src/Dodge/Data/LWorld.hs 109;" f +_fbRot src/Dodge/Data/EnergyBall/Type.hs 13;" f +_fbSize src/Dodge/Data/EnergyBall/Type.hs 13;" f _fbo2 src/Data/Preload/Render.hs 29;" f _fbo3 src/Data/Preload/Render.hs 30;" f _fboBase src/Data/Preload/Render.hs 33;" f @@ -3779,7 +3779,7 @@ craftInfo src/Dodge/Item/Info.hs 168;" f craftItemSPic src/Dodge/Item/Draw/SPic.hs 57;" f crankSlowS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 446;" f createArc src/Dodge/Tesla/Arc.hs 81;" f -createBarrelSpark src/Dodge/Spark.hs 45;" f +createBarrelSpark src/Dodge/Spark.hs 40;" f createFlIt src/Dodge/Placement/PlaceSpot.hs 180;" f createForceField src/Dodge/ForceField.hs 7;" f createGas src/Dodge/Gas.hs 8;" f @@ -3843,10 +3843,10 @@ damThingHitWith src/Dodge/WorldEvent/Damage.hs 10;" f damToExpBarrel src/Dodge/Barreloid.hs 56;" f damageBlocksBy src/Dodge/Wall/Damage.hs 36;" f damageCircle src/Dodge/DamageCircle.hs 12;" f -damageCircle src/Dodge/EnergyBall.hs 106;" f +damageCircle src/Dodge/EnergyBall.hs 76;" f damageCodeCommand src/Dodge/Terminal.hs 232;" f damageCrCircle src/Dodge/DamageCircle.hs 33;" f -damageCrCircle src/Dodge/EnergyBall.hs 135;" f +damageCrCircle src/Dodge/EnergyBall.hs 99;" f damageCrWl src/Dodge/Damage.hs 23;" f damageCrWlID src/Dodge/Damage.hs 17;" f damageDirection src/Dodge/Damage.hs 27;" f @@ -3859,7 +3859,7 @@ damageTypeThreshold src/Dodge/Placement/Instance/Sensor.hs 45;" f damageWall src/Dodge/Wall/Damage.hs 15;" f damageWallEffect src/Dodge/Wall/DamageEffect.hs 12;" f damageWlCircle src/Dodge/DamageCircle.hs 26;" f -damageWlCircle src/Dodge/EnergyBall.hs 128;" f +damageWlCircle src/Dodge/EnergyBall.hs 96;" f dampField src/Dodge/Magnet.hs 8;" f damsToExpBarrel src/Dodge/Barreloid.hs 49;" f dark src/Color.hs 108;" f @@ -3867,7 +3867,7 @@ darkenBackground src/Dodge/Render/MenuScreen.hs 52;" f dbArg src/Dodge/Base.hs 165;" f dbArgChain src/Dodge/Base.hs 170;" f dbwMuzzles src/Dodge/HeldUse.hs 287;" f -deZoneIX src/Dodge/Zoning/Base.hs 87;" f +deZoneIX src/Dodge/Zoning/Base.hs 89;" f deZoneWall src/Dodge/Zoning/Wall.hs 70;" f deadEndRoom src/Dodge/Room/Room.hs 235;" f deadFeet src/Dodge/Creature/Picture.hs 73;" f @@ -4154,7 +4154,7 @@ drawEquipment src/Dodge/Creature/Picture.hs 144;" f drawExamineInventory src/Dodge/Render/HUD.hs 196;" f drawFarWallDetect src/Dodge/Debug/Picture.hs 264;" f drawFlame src/Dodge/Flame/Draw.hs 8;" f -drawFlamelet src/Dodge/EnergyBall/Draw.hs 27;" f +drawFlamelet src/Dodge/EnergyBall/Draw.hs 26;" f drawFooterText src/Dodge/Render/MenuScreen.hs 72;" f drawForceField src/Dodge/Wall/Draw.hs 11;" f drawGapPlus src/Dodge/Render/Picture.hs 255;" f @@ -4215,7 +4215,7 @@ drawShadowsByImportance src/Dodge/Shadows.hs 8;" f drawShell src/Dodge/Projectile/Draw.hs 22;" f drawShockwave src/Dodge/Shockwave/Draw.hs 7;" f drawSpark src/Dodge/Spark/Draw.hs 7;" f -drawStaticBall src/Dodge/EnergyBall/Draw.hs 17;" f +drawStaticBall src/Dodge/EnergyBall/Draw.hs 16;" f drawSubInventory src/Dodge/Render/HUD.hs 161;" f drawSwitch src/Dodge/Button/Draw.hs 15;" f drawSwitchWire src/Dodge/LevelGen/Switch.hs 28;" f @@ -4257,9 +4257,9 @@ dtToLRAdjEither src/Dodge/DoubleTree.hs 114;" f dtToRootIntMap' src/Dodge/DoubleTree.hs 92;" f dtToUpDownAdj src/Dodge/DoubleTree.hs 96;" f dummyMenuOption src/Dodge/Menu/Option.hs 74;" f -ebColor src/Dodge/EnergyBall.hs 98;" f -ebFlicker src/Dodge/EnergyBall.hs 91;" f -ebtToDamage src/Dodge/EnergyBall.hs 120;" f +ebColor src/Dodge/EnergyBall.hs 69;" f +ebFlicker src/Dodge/EnergyBall.hs 62;" f +ebtToDamage src/Dodge/EnergyBall.hs 89;" f edgeFormatting src/Dodge/Combine/Graph.hs 131;" f edgeToPic src/Dodge/Debug/Picture.hs 431;" f effectOnEquip src/Dodge/Equipment.hs 32;" f @@ -4278,6 +4278,7 @@ encircleP src/Dodge/Creature/Boid.hs 28;" f endArcPos src/Dodge/Tesla.hs 87;" f endCombineRegex src/Dodge/Update/Input/InGame.hs 267;" f endRegex src/Dodge/Update/Input/InGame.hs 254;" f +energyBallAt src/Dodge/EnergyBall.hs 46;" f enterCombineInv src/Dodge/DisplayInventory.hs 323;" f epText src/Dodge/Inventory/SelectionList.hs 75;" f eqConstr src/SameConstr.hs 17;" f @@ -4595,7 +4596,7 @@ impulsiveAIBefore src/Dodge/Creature/Impulse.hs 23;" f inLink src/Dodge/RoomLink.hs 113;" f inSegArea src/Geometry/Intersect.hs 298;" f inTextInputFocus src/Dodge/InputFocus.hs 10;" f -incBallAt src/Dodge/EnergyBall.hs 57;" f +incBallAt src/Dodge/EnergyBall.hs 56;" f incidenceToFunction src/Dodge/Graph.hs 26;" f indefiniteExceptions src/StringHelp.hs 29;" f initCrItemLocation src/Dodge/Item/Location/Initialize.hs 41;" f @@ -4923,14 +4924,14 @@ makeExplosionAt src/Dodge/WorldEvent/Explosion.hs 71;" f makeFlak src/Dodge/Bullet.hs 139;" f makeFlame src/Dodge/Flame.hs 57;" f makeFlameExplosionAt src/Dodge/WorldEvent/Explosion.hs 54;" f -makeFlamelet src/Dodge/EnergyBall.hs 20;" f +makeFlamelet src/Dodge/EnergyBall.hs 21;" f makeFlamerSmokeAt src/Dodge/WorldEvent/Cloud.hs 68;" f -makeFlashBall src/Dodge/EnergyBall.hs 74;" f +makeFlashBall src/Dodge/EnergyBall.hs 59;" f makeFootstepSound src/Dodge/Creature/State/WalkCycle.hs 32;" f makeFragBullets src/Dodge/Bullet.hs 123;" f -makeGasCloud src/Dodge/WorldEvent/SpawnParticle.hs 77;" f +makeGasCloud src/Dodge/WorldEvent/SpawnParticle.hs 76;" f makeGrid src/Grid.hs 46;" f -makeIntInterval src/Dodge/Zoning/Base.hs 34;" f +makeIntInterval src/Dodge/Zoning/Base.hs 35;" f makeMuzzleFlare src/Dodge/HeldUse.hs 649;" f makeParagraph src/Justify.hs 6;" f makePathBetween src/Dodge/Path.hs 35;" f @@ -4946,7 +4947,7 @@ makeShaderVBO src/Shader/Compile.hs 32;" f makeShockwaveAt src/Dodge/WorldEvent/Shockwave.hs 12;" f makeShrapnelAt src/Dodge/Payload.hs 24;" f makeSourcedShader src/Shader/Compile.hs 167;" f -makeSpark src/Dodge/Spark.hs 48;" f +makeSpark src/Dodge/Spark.hs 43;" f makeStartCloudAt src/Dodge/WorldEvent/Cloud.hs 60;" f makeStaticBall src/Dodge/WorldEvent/SpawnParticle.hs 22;" f makeSubmenuOption src/Dodge/Menu/OptionType.hs 19;" f @@ -5440,7 +5441,7 @@ radToDeg src/Geometry/Vector.hs 122;" f randBlockBreakWeapon src/Dodge/Item/Random.hs 7;" f randC1 src/Dodge/Placement/Instance/Creature.hs 8;" f randDirPS src/Dodge/PlacementSpot.hs 56;" f -randDirSpark src/Dodge/Spark.hs 57;" f +randDirSpark src/Dodge/Spark.hs 52;" f randEdgeTank src/Dodge/Room/Tanks.hs 33;" f randEdgeTanks src/Dodge/Room/Tanks.hs 63;" f randEnergyBallAt src/Dodge/WorldEvent/SpawnParticle.hs 14;" f @@ -5457,7 +5458,7 @@ randOnUnitSphere src/RandomHelp.hs 90;" f randPeaked src/RandomHelp.hs 138;" f randPeakedParam src/RandomHelp.hs 130;" f randProb src/RandomHelp.hs 68;" f -randSpark src/Dodge/Spark.hs 77;" f +randSpark src/Dodge/Spark.hs 72;" f randWallReflect src/Dodge/Tesla/Arc.hs 57;" f randWallReflect src/Dodge/Update.hs 580;" f randomChallenges src/Dodge/Room/Start.hs 62;" f @@ -5875,10 +5876,10 @@ spanColLightI src/Dodge/Placement/Instance/LightSource.hs 183;" f spanLS src/Dodge/Placement/Instance/LightSource.hs 175;" f spanLSLightI src/Dodge/Placement/Instance/LightSource.hs 168;" f spanLightI src/Dodge/Placement/Instance/LightSource.hs 197;" f -sparkDam src/Dodge/Spark.hs 32;" f +sparkDam src/Dodge/Spark.hs 31;" f sparkGun src/Dodge/Item/Held/BatteryGuns.hs 13;" f -sparkRandDir src/Dodge/Spark.hs 100;" f -sparkToDamage src/Dodge/Spark.hs 39;" f +sparkRandDir src/Dodge/Spark.hs 95;" f +sparkToDamage src/Dodge/Spark.hs 34;" f spawnCrNextTo src/Dodge/Item/Weapon/Spawn.hs 20;" f spawnElectricalSparks src/Dodge/PosEvent.hs 19;" f spawnGun src/Dodge/Item/Weapon/Spawn.hs 12;" f @@ -5925,7 +5926,7 @@ ssfold src/FoldableHelp.hs 105;" f stackPicturesAt src/Dodge/Render/List.hs 98;" f stackPicturesAtOff src/Dodge/Render/List.hs 101;" f stackText src/Picture/Base.hs 188;" f -stackedInventory src/Dodge/Creature.hs 311;" f +stackedInventory src/Dodge/Creature.hs 310;" f startCr src/Dodge/Creature.hs 93;" f startCrafts src/Dodge/Room/Start.hs 92;" f startDrag src/Dodge/Update/Input/InGame.hs 279;" f @@ -6016,7 +6017,7 @@ teslaParams src/Dodge/Item/Held/BatteryGuns.hs 32;" f teslaParams src/Dodge/Tesla/ItemParams.hs 6;" f testCrossWalls src/Dodge/Room/Path.hs 47;" f testEvent src/Dodge/Event/Test.hs 10;" f -testInventory src/Dodge/Creature.hs 292;" f +testInventory src/Dodge/Creature.hs 291;" f testStringInit src/Dodge/TestString.hs 28;" f text src/Picture/Base.hs 193;" f textGrad src/Picture/Text.hs 5;" f @@ -6226,7 +6227,7 @@ updateDelayedEvents src/Dodge/Update.hs 801;" f updateDisplaySections src/Dodge/DisplayInventory.hs 116;" f updateDistortion src/Dodge/Distortion.hs 5;" f updateDistortions src/Dodge/Update.hs 533;" f -updateEnergyBall src/Dodge/EnergyBall.hs 45;" f +updateEnergyBall src/Dodge/EnergyBall.hs 35;" f updateEnergyBalls src/Dodge/Update.hs 598;" f updateEnterRegex src/Dodge/Update/Input/InGame.hs 480;" f updateExpBarrel src/Dodge/Barreloid.hs 20;" f @@ -6244,6 +6245,7 @@ updateIMl src/Dodge/Update.hs 502;" f updateIMl' src/Dodge/Update.hs 507;" f updateInGameCamera src/Dodge/Update/Camera.hs 78;" f updateInitialPressInGame src/Dodge/Update/Input/InGame.hs 400;" f +updateInt2Map src/Dodge/Zoning/Base.hs 92;" f updateInventoryPositioning src/Dodge/DisplayInventory.hs 86;" f updateItemTargeting src/Dodge/Creature/State.hs 376;" f updateItemWithOrientation src/Dodge/Creature/State.hs 286;" f @@ -6289,7 +6291,7 @@ updateShockwaves src/Dodge/Update.hs 592;" f updateSingleNodes src/TreeHelp.hs 97;" f updateSound src/Sound.hs 72;" f updateSounds src/Sound.hs 67;" f -updateSpark src/Dodge/Spark.hs 19;" f +updateSpark src/Dodge/Spark.hs 18;" f updateSparks src/Dodge/Update.hs 604;" f updateTempLightSource src/Dodge/LightSource/Update.hs 7;" f updateTeslaArc src/Dodge/Tesla/Arc.hs 23;" f @@ -6454,11 +6456,11 @@ writeConfig src/Dodge/Menu.hs 162;" f writeSaveSlot src/Dodge/Save.hs 34;" f xCylinder src/Shape.hs 136;" f xCylinderST src/Shape.hs 133;" f -xIntercepts src/Dodge/Zoning/Base.hs 59;" f +xIntercepts src/Dodge/Zoning/Base.hs 60;" f xV2 src/Geometry/Vector.hs 206;" f xyV3 src/Geometry/Vector.hs 218;" f xyzV4 src/Geometry/Vector.hs 214;" f -yIntercepts' src/Dodge/Zoning/Base.hs 75;" f +yIntercepts' src/Dodge/Zoning/Base.hs 76;" f yV2 src/Geometry/Vector.hs 210;" f yellow src/Color.hs 17;" f you src/Dodge/Base/You.hs 12;" f @@ -6483,23 +6485,23 @@ zoneCloud src/Dodge/Zoning/Cloud.hs 27;" f zoneClouds src/Dodge/Update.hs 441;" f zoneCreature src/Dodge/Zoning/Creature.hs 54;" f zoneCreatures src/Dodge/Update.hs 483;" f -zoneExtract src/Dodge/Zoning/Base.hs 51;" f -zoneMonoid src/Dodge/Zoning/Base.hs 81;" f -zoneOfCirc src/Dodge/Zoning/Base.hs 23;" f +zoneExtract src/Dodge/Zoning/Base.hs 52;" f +zoneMonoid src/Dodge/Zoning/Base.hs 83;" f +zoneOfCirc src/Dodge/Zoning/Base.hs 24;" f zoneOfCl src/Dodge/Zoning/Cloud.hs 24;" f zoneOfCr src/Dodge/Zoning/Creature.hs 44;" f zoneOfPe src/Dodge/Zoning/Pathing.hs 49;" f zoneOfPn src/Dodge/Zoning/Pathing.hs 27;" f -zoneOfPoint src/Dodge/Zoning/Base.hs 43;" f -zoneOfRect src/Dodge/Zoning/Base.hs 27;" f -zoneOfSeg src/Dodge/Zoning/Base.hs 46;" f +zoneOfPoint src/Dodge/Zoning/Base.hs 44;" f +zoneOfRect src/Dodge/Zoning/Base.hs 28;" f +zoneOfSeg src/Dodge/Zoning/Base.hs 47;" f zoneOfSight src/Dodge/Zoning/World.hs 9;" f zoneOfWl src/Dodge/Zoning/Wall.hs 55;" f zonePe src/Dodge/Zoning/Pathing.hs 52;" f zonePn src/Dodge/Zoning/Pathing.hs 30;" f zoneWall src/Dodge/Zoning/Wall.hs 65;" f -zonesAroundPoint src/Dodge/Zoning/Base.hs 90;" f -zonesExtract src/Dodge/Zoning/Base.hs 55;" f +zonesAroundPoint src/Dodge/Zoning/Base.hs 96;" f +zonesExtract src/Dodge/Zoning/Base.hs 56;" f zoomFloatingCamera src/Dodge/Update/Camera.hs 70;" f zoomInLongGun src/Dodge/Update/Scroll.hs 99;" f zoomOutLongGun src/Dodge/Update/Scroll.hs 107;" f