diff --git a/src/Dodge/Barreloid.hs b/src/Dodge/Barreloid.hs index c5cd669f2..6f2d51511 100644 --- a/src/Dodge/Barreloid.hs +++ b/src/Dodge/Barreloid.hs @@ -1,5 +1,6 @@ module Dodge.Barreloid where +import Data.Maybe import Data.List import Dodge.Creature.State import Dodge.Data.World @@ -49,18 +50,14 @@ damsToExpBarrel :: [Damage] -> Creature -> Creature damsToExpBarrel ds cr = foldl' damToExpBarrel (foldl' damToExpBarrel cr pierceDam) otherDam where (pierceDam, otherDam) = partition isPierce ds - isPierce Damage{_dmType = PIERCING{}} = True + isPierce Piercing{} = True isPierce _ = False damToExpBarrel :: Creature -> Damage -> Creature -damToExpBarrel cr dm = case _dmType dm of - PIERCING -> - over (crState . csSpState . piercedPoints) ((:) $ int -.- _crPos cr) $ - cr & crHP -~ div amount 200 - POISONDAM -> cr - SPARKING -> cr - -- PUSHDAM -> cr LensHelp.& crPos .+.+~ (1 / _crMass cr *.* _dePushBack (_dmEffect dm)) - _ -> cr LensHelp.& crHP -~ amount - where - amount = _dmAmount dm - int = _dmAt dm +damToExpBarrel cr dm = case dm of + Piercing x p _ -> + over (crState . csSpState . piercedPoints) ((:) $ p -.- _crPos cr) $ + cr & crHP -~ div x 200 + Poison{} -> cr + Sparking{} -> cr + _ -> cr LensHelp.& crHP -~ fromMaybe 0 (dm ^? dmAmount) diff --git a/src/Dodge/Bullet.hs b/src/Dodge/Bullet.hs index a16f24710..a09059902 100644 --- a/src/Dodge/Bullet.hs +++ b/src/Dodge/Bullet.hs @@ -114,9 +114,9 @@ useBulletPayload bu = case _buPayload bu of BulFlak -> makeFlak bu BulFrag -> makeFragBullets BulGas -> (`makeGasCloud` V2 0 0) - BulBall IncBall -> incBallAt - BulBall ConcBall -> \p -> cWorld . lWorld . shockwaves .:~ concBall p - BulBall TeslaBall -> makeStaticBall + BulBall FlamingBall -> incBallAt + BulBall ExplosiveBall -> \p -> cWorld . lWorld . shockwaves .:~ concBall p + BulBall ElectricalBall -> makeStaticBall BulBall FlashBall -> makeFlashBall makeFragBullets :: Point2 -> World -> World @@ -164,12 +164,12 @@ hitEffFromBul w bu = case _buEffect bu of hitstream = thingsHit sp (sp + _buVel bu) w setFromToDams :: Bullet -> Point2 -> [Damage] -setFromToDams bu p = case _bu of - BullPlain x -> [Piercing x p v] +setFromToDams bu p = case _buPayload bu of + BulPlain x -> [Piercing x p v] _ -> [] where v = _buVel bu - f = (dmFrom .~ _buPos bu) . (dmAt .~ p) . (dmTo .~ _buPos bu +.+ _buVel bu) +-- f = (dmFrom .~ _buPos bu) . (dmAt .~ p) . (dmTo .~ _buPos bu +.+ _buVel bu) damageThingHit :: Bullet -> (Point2, Either Creature Wall) -> World -> World damageThingHit bu (p, crwl) = case crwl of diff --git a/src/Dodge/Creature.hs b/src/Dodge/Creature.hs index 80e2d600d..1e1a53116 100644 --- a/src/Dodge/Creature.hs +++ b/src/Dodge/Creature.hs @@ -22,6 +22,7 @@ module Dodge.Creature ( module Dodge.Creature.YourControl, ) where +import Dodge.Data.EnergyBall.Type import Dodge.Data.Magnet import Dodge.Item.Ammo import Dodge.Item.Scope @@ -280,7 +281,11 @@ inventoryX c = case c of , megaTinMag 10200 ] <> -- [bulletTargetingModule btt | btt <- [minBound .. maxBound]] - [bulletModule (BulletModPayload (BulBall x)) | x <- [minBound .. maxBound]] + [bulletModule (BulletModPayload (BulBall x)) | x <- [ FlamingBall + , FlameletBall 5 + , ElectricalBall + , ExplosiveBall + , FlashBall ]] <> [bulletModule (BulletModEffect x) | x <- [minBound .. maxBound]] _ -> [] diff --git a/src/Dodge/Creature/Damage.hs b/src/Dodge/Creature/Damage.hs index 6b37f77b1..f8c563228 100644 --- a/src/Dodge/Creature/Damage.hs +++ b/src/Dodge/Creature/Damage.hs @@ -21,7 +21,7 @@ defaultApplyDamage ds cr w = & cWorld . lWorld . creatures . ix (_crID cr) %~ doPoisonDam where (ps, ds') = partition isPoison ds - isPoison Damage{_dmType = POISONDAM} = True + isPoison Poison{} = True isPoison _ = False poisonDam = quot (max 0 (sum (map _dmAmount ps))) 10 doPoisonDam = crHP -~ poisonDam @@ -49,7 +49,7 @@ applyIndividualDamage :: Creature -> World -> Damage -> World applyIndividualDamage cr w dm = applyIndividualDamage' cr w dm applyIndividualDamage' :: Creature -> World -> Damage -> World -applyIndividualDamage' cr w dm = case _dmType dm of +applyIndividualDamage' cr w dm = case dm of Piercing{} -> applyPiercingDamage cr dm w _ -> w & damageHP cr (_dmAmount dm) @@ -61,7 +61,7 @@ applyPiercingDamage cr dm f = cWorld . lWorld . creatures . ix (_crID cr) . crPos -~ _dmVector dm / V2 x x x = crMass (_crType cr) - p = _dmAt dm + p = _dmPos dm p1 = p +.+ 2 *.* squashNormalizeV (p -.- _crPos cr) damageHP :: Creature -> Int -> World -> World diff --git a/src/Dodge/Creature/Impulse.hs b/src/Dodge/Creature/Impulse.hs index 45fa0d2d6..3c7839a3d 100644 --- a/src/Dodge/Creature/Impulse.hs +++ b/src/Dodge/Creature/Impulse.hs @@ -87,6 +87,6 @@ followImpulse cr w imp = case imp of rr a = randomR (- a, a) $ _randGen w hitCr i = ( cWorld . lWorld . creatures . ix i . crState . csDamage - .:~ Damage BLUNT 100 cpos (posFromID i) (posFromID i)-- (PushBackDamage 5) + .:~ Blunt 100 (posFromID i) (posFromID i-cpos)-- (PushBackDamage 5) ) . soundStart (CrSound cid) cpos hitS Nothing diff --git a/src/Dodge/Creature/State.hs b/src/Dodge/Creature/State.hs index 034bd6f15..eaa3e4eaf 100644 --- a/src/Dodge/Creature/State.hs +++ b/src/Dodge/Creature/State.hs @@ -108,9 +108,9 @@ checkDeath cr w -- could look at the amount of damage here (given by maxDamage) too corpseOrGib :: Creature -> World -> World corpseOrGib cr = case cr ^? crState . csDamage . to maxDamageType . _Just . _1 of - Just FLAMING -> plNew (cWorld . lWorld . corpses) cpID (thecorpse & cpSPic %~ scorchSPic) - Just ELECTRICAL -> plNew (cWorld . lWorld . corpses) cpID thecorpse - Just POISONDAM -> plNew (cWorld . lWorld . corpses) cpID (thecorpse & cpSPic %~ poisonSPic) + Just Flaming{} -> plNew (cWorld . lWorld . corpses) cpID (thecorpse & cpSPic %~ scorchSPic) + Just Electrical{} -> plNew (cWorld . lWorld . corpses) cpID thecorpse + Just Poison{} -> plNew (cWorld . lWorld . corpses) cpID (thecorpse & cpSPic %~ poisonSPic) _ | _crPastDamage cr > 200 -> addCrGibs cr _ -> plNew (cWorld . lWorld . corpses) cpID thecorpse where diff --git a/src/Dodge/Damage.hs b/src/Dodge/Damage.hs index c1fe7d702..e78f3b535 100644 --- a/src/Dodge/Damage.hs +++ b/src/Dodge/Damage.hs @@ -6,11 +6,11 @@ module Dodge.Damage , maxDamageType ) where -import qualified Data.Map.Strict as M +--import qualified Data.Map.Strict as M import Dodge.Data.CrWlID import Dodge.Data.World -import FoldableHelp -import Geometry.Vector +--import FoldableHelp +--import Geometry.Vector import LensHelp import qualified IntMapHelp as IM @@ -25,14 +25,16 @@ damageCrWl dt (Left cr) = cWorld . lWorld . creatures . ix (_crID cr) . crState damageCrWl dt (Right wl) = cWorld . lWorld . wallDamages %~ IM.insertWith (++) (_wlID wl) [dt] damageDirection :: [Damage] -> Maybe Float -damageDirection ds = do - dm <- safeMinimumOn (negate . _dmAmount) ds - safeArgV (_dmTo dm -.- _dmFrom dm) +damageDirection _ = Nothing +--damageDirection ds = do +-- dm <- safeMinimumOn (negate . _dmAmount) ds +-- safeArgV (_dmTo dm -.- _dmFrom dm) -collectDamageTypes :: [Damage] -> M.Map DamageType Int -collectDamageTypes = foldl' (flip f) M.empty - where - f dm = M.insertWith (+) (_dmType dm) (_dmAmount dm) - -maxDamageType :: [Damage] -> Maybe (DamageType, Int) -maxDamageType = safeMinimumOn (negate . snd) . M.assocs . collectDamageTypes +--collectDamageTypes :: [Damage] -> M.Map DamageType Int +--collectDamageTypes = foldl' (flip f) M.empty +-- where +-- f dm = M.insertWith (+) (_dmType dm) (_dmAmount dm) +-- +maxDamageType :: [Damage] -> Maybe (Damage, Int) +maxDamageType _ = Nothing +--maxDamageType = safeMinimumOn (negate . snd) . M.assocs . collectDamageTypes diff --git a/src/Dodge/Data/Damage.hs b/src/Dodge/Data/Damage.hs index 250763ddf..b66a3b556 100644 --- a/src/Dodge/Data/Damage.hs +++ b/src/Dodge/Data/Damage.hs @@ -20,7 +20,7 @@ data Damage = Piercing {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} | Blunt {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} | Sparking {_dmAmount :: Int} - | Crushing {_dmAmount :: Int} + | Crushing {_dmAmount :: Int, _dmVector :: Point2} | Shattering {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} | Flaming {_dmAmount :: Int} | Lasering {_dmAmount :: Int, _dmPos :: Point2, _dmVector :: Point2} diff --git a/src/Dodge/Data/EnergyBall/Type.hs b/src/Dodge/Data/EnergyBall/Type.hs index 08e123776..70579dfde 100644 --- a/src/Dodge/Data/EnergyBall/Type.hs +++ b/src/Dodge/Data/EnergyBall/Type.hs @@ -12,7 +12,7 @@ import Geometry.Data data EnergyBallType = FlamingBall - | FlameletBall + | FlameletBall Float | ElectricalBall | ExplosiveBall | FlashBall diff --git a/src/Dodge/EnergyBall.hs b/src/Dodge/EnergyBall.hs index 71836d21b..402ed2cd2 100644 --- a/src/Dodge/EnergyBall.hs +++ b/src/Dodge/EnergyBall.hs @@ -22,19 +22,21 @@ makeFlamelet :: Point2 -> -- | Velocity Point2 -> + -- | Size + Float -> -- | Timer Int -> World -> World -makeFlamelet (V2 x y) vel time w = +makeFlamelet (V2 x y) vel s t w = w & randGen .~ g & cWorld . lWorld . energyBalls .:~ EnergyBall { _ebVel = vel , _ebPos = V2 x y - , _ebTimer = time - , _ebEff = FlameletBall + , _ebTimer = t + , _ebEff = FlameletBall s , _ebRot = rot } where @@ -96,7 +98,7 @@ ebFlicker pt ebColor :: EnergyBall -> Color ebColor eb = case eb ^. ebEff of FlamingBall -> red - FlameletBall -> red + FlameletBall {} -> red ElectricalBall -> cyan ExplosiveBall -> yellow FlashBall -> white @@ -118,7 +120,7 @@ damageCircle sp dt w = 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 diff --git a/src/Dodge/EnergyBall/Draw.hs b/src/Dodge/EnergyBall/Draw.hs index f170c4960..d9053b6fb 100644 --- a/src/Dodge/EnergyBall/Draw.hs +++ b/src/Dodge/EnergyBall/Draw.hs @@ -2,16 +2,17 @@ module Dodge.EnergyBall.Draw ( drawEnergyBall, ) where -import Dodge.Data.Damage.Type import Dodge.Data.EnergyBall import Geometry import Picture drawEnergyBall :: EnergyBall -> Picture drawEnergyBall eb = case _ebEff eb of - (ELECTRICAL, _) -> drawStaticBall eb - (FLAMING, _) -> drawFlamelet eb - _ -> error "don't know how to draw an energy ball of this type" + FlamingBall -> drawFlamelet 5 eb + FlameletBall x -> drawFlamelet x eb + ElectricalBall -> drawStaticBall eb + ExplosiveBall -> mempty + FlashBall -> mempty drawStaticBall :: EnergyBall -> @@ -21,10 +22,10 @@ drawStaticBall pt = . setDepth 20 -- . setDepth (_ebZ pt + 20) . uncurryV translate (_ebPos pt) - $ circleSolidCol (_ebColor pt) (withAlpha 0.5 white) (_ebWidth pt + 5) + $ circleSolidCol blue (withAlpha 0.5 white) 8 -drawFlamelet :: EnergyBall -> Picture -drawFlamelet pt = +drawFlamelet :: Float -> EnergyBall -> Picture +drawFlamelet size pt = fold [ setLayer BloomLayer pic , setLayer BloomNoZWrite piu @@ -36,7 +37,7 @@ drawFlamelet pt = sp = _ebPos pt vel = _ebVel pt ep = sp +.+ vel - size = _ebWidth pt + --size = _ebWidth pt siz2 = size + 0.2 time = _ebTimer pt piu = diff --git a/src/Dodge/Flame.hs b/src/Dodge/Flame.hs index a543303e8..4bf1d74f5 100644 --- a/src/Dodge/Flame.hs +++ b/src/Dodge/Flame.hs @@ -4,10 +4,10 @@ module Dodge.Flame ( updateFlame, ) where -import Dodge.Creature.Radius -import Dodge.Data.World import Data.Foldable import Data.Tuple +import Dodge.Creature.Radius +import Dodge.Data.World import Dodge.SoundLogic import Dodge.WorldEvent.Cloud import Dodge.WorldEvent.ThingsHit @@ -38,34 +38,26 @@ aFlameParticle t pos vel = , _flOriginalVel = vel } -simpleDamFL :: DamageType -> Int -> Flame -> Point2 -> [Damage] -simpleDamFL dt amount bt p = [Damage dt amount sp p ep] - where - sp = _flPos bt - bulVel = _flVel bt - ep = sp +.+ bulVel - expireAndDamageFL :: - (Flame -> Point2 -> [Damage]) -> Flame -> [(Point2, Either Creature Wall)] -> World -> (World, Maybe Flame) -expireAndDamageFL fdm bt things w = case List.safeHead things of +expireAndDamageFL bt things w = case List.safeHead things of Nothing -> (w, Just $ bt & flTimer -~ 1) - Just x -> (doDamagesFL fdm x bt w, Nothing) + Just x -> (doDamagesFL x bt w, Nothing) doDamagesFL :: - (Flame -> Point2 -> [Damage]) -> (Point2, Either Creature Wall) -> Flame -> World -> World -doDamagesFL fdm (p, thhit) bt = case thhit of - Left cr -> cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage .++~ dams - Right wl -> cWorld . lWorld . wallDamages %~ IM.insertWith (++) (_wlID wl) dams - where - dams = fdm bt p +doDamagesFL (p, thhit) bt = case thhit of + Left cr -> + cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage + .:~ Flaming 1 + --Right wl -> cWorld . lWorld . wallDamages %~ IM.insertWith (++) (_wlID wl) dams + Right wl -> cWorld . lWorld . wallDamages . ix (_wlID wl) .:~ Flaming 1 {- TODO: add generalised area damage particles/hiteffects. -} updateFlame :: World -> Flame -> (World, Maybe Flame) @@ -112,21 +104,21 @@ flDamageInArea :: (Creature -> Bool) -> (Wall -> Bool) -> Flame -> World -> Worl flDamageInArea crt wlt pt w = damwls damcrs where p = _flPos pt - damcrs = foldl' (flip $ \cr -> fst . hiteff [(p, Left cr)]) w $ IM.filter crt $ w ^. cWorld . lWorld . creatures--_creatures (_cWorld w) + damcrs = foldl' (flip $ \cr -> fst . hiteff [(p, Left cr)]) w $ IM.filter crt $ w ^. cWorld . lWorld . creatures --_creatures (_cWorld w) damwls w' = foldl' (flip $ \wl -> fst . hiteff [(p, Right wl)]) w' . filter wlt $ wlsNearPoint p w' - hiteff = expireAndDamageFL (simpleDamFL FLAMING 1) pt + hiteff = expireAndDamageFL pt flFlicker :: Flame -> World -> World flFlicker pt | _flTimer pt `mod` 7 == 0 = cWorld . lWorld . lights .:~ LSParam (addZ 10 $ _flPos pt) 70 (0.5 *.*.* xyzV4 (_flColor pt)) --- .:~ tlsTimeRadColPos 1 70 (0.5 *.*.* xyzV4 (_flColor pt)) (addZ 10 $ _flPos pt) + -- .:~ tlsTimeRadColPos 1 70 (0.5 *.*.* xyzV4 (_flColor pt)) (addZ 10 $ _flPos pt) | otherwise = id makeFlame :: Point2 -> Point2 -> World -> World diff --git a/src/Dodge/Item/Weapon/Shatter.hs b/src/Dodge/Item/Weapon/Shatter.hs index 621db8aca..d2461b9c2 100644 --- a/src/Dodge/Item/Weapon/Shatter.hs +++ b/src/Dodge/Item/Weapon/Shatter.hs @@ -35,4 +35,4 @@ shatterWall w sp ep p wl = (_wlMaterial wl) (_wlColor wl) p - & damageWall (Damage SHATTERING 1000 sp p ep) wl + & damageWall (Shattering 1000 p (ep - sp)) wl diff --git a/src/Dodge/Laser/Update.hs b/src/Dodge/Laser/Update.hs index 424806420..5a166fe9b 100644 --- a/src/Dodge/Laser/Update.hs +++ b/src/Dodge/Laser/Update.hs @@ -16,7 +16,7 @@ updateLaser w pt = ( case _lpType pt of DamageLaser dam -> damThingHitWith - (\p1 p2 p3 -> Damage LASERING dam p1 p2 p3) + (\p1 p2 p3 -> Lasering dam p2 (p3 - p2)) sp xp thHit diff --git a/src/Dodge/Machine/Update.hs b/src/Dodge/Machine/Update.hs index c8bd981ac..faded929d 100644 --- a/src/Dodge/Machine/Update.hs +++ b/src/Dodge/Machine/Update.hs @@ -56,7 +56,7 @@ updateTurret rotSpeed mc w = where dodamage = cWorld . lWorld . machines . ix mcid - %~ ( (mcDamage .~ [Damage ELECTRICAL (min 2500 $ max 0 (elecDam - 10)) 0 0 0]) + %~ ( (mcDamage .~ [Electrical (min 2500 $ max 0 (elecDam - 10))]) . (mcHP -~ dam) ) elecDamBranch @@ -78,8 +78,8 @@ updateTurret rotSpeed mc w = | otherwise = cWorld . lWorld . machines . ix mcid . mcType . _McTurret . tuFireTime %~ (max 0 . subtract 1) isElectrical :: Damage -> Bool -isElectrical dm = case _dmType dm of - ELECTRICAL -> True +isElectrical dm = case dm of + Electrical{} -> True _ -> False mcUseItem :: Machine -> World -> World @@ -168,19 +168,32 @@ senseDamage threshold dt mc = | x > 0 = x | otherwise = -5 where - f d = d `elem` sensorTypeDamages dt - x = sum . map _dmAmount $ filter (f . _dmType) (_mcDamage mc) + f = sensorTypeDamages dt + x = sum . map _dmAmount $ filter f (_mcDamage mc) ni = fromIntegral (mc ^?! mcType . _McSensor . sensAmount) / fromIntegral threshold updatels = fromMaybe id $ do lsid <- mc ^? mcMounts . ix ObLightSource return $ cWorld . lWorld . lightSources . ix lsid . lsParam . lsCol .~ V3 ni ni ni -sensorTypeDamages :: SensorType -> [DamageType] +sensorTypeDamages :: SensorType -> Damage -> Bool sensorTypeDamages = \case - LaserSensor -> [LASERING] - ElectricSensor -> [ELECTRICAL] - ThermalSensor -> [FLAMING,SPARKING,EXPLOSIVE] - PhysicalSensor -> [PIERCING,BLUNT,CUTTING,CRUSHING,EXPLOSIVE,CONCUSSIVE] + LaserSensor -> \case + Lasering{} -> True + _ -> False + ElectricSensor -> \case + Electrical {} -> True + _ -> False + ThermalSensor -> \case + Flaming {} -> True + Sparking {} -> True + Explosive {} -> True + _ -> False + PhysicalSensor -> \case + Piercing {} -> True + Blunt {} -> True + Crushing {} -> True + Explosive {} -> True + _ -> False --damageUsing :: DamageType -> Damage -> Either Int Int diff --git a/src/Dodge/Material/Damage.hs b/src/Dodge/Material/Damage.hs index 1ec1bff7f..cc807cfcb 100644 --- a/src/Dodge/Material/Damage.hs +++ b/src/Dodge/Material/Damage.hs @@ -18,27 +18,22 @@ defDamageMaterial :: Damage -> Float -> World -> (Int, World) defDamageMaterial dm _ w = (_dmAmount dm, w) damageStone :: Damage -> Float -> World -> (Int, World) -damageStone dm dir = case _dmType dm of - LASERING -> a 0 $ makeSpark NormalSpark outTo (argV $ reflectIn (p -.- sp) v) - PIERCING -> a d $ makeSpark FireSpark outTo (argV $ reflectIn (p -.- sp) v) - BLUNT -> a d id - SHATTERING -> a d id - CRUSHING -> a d id - EXPLOSIVE -> a d id - CUTTING -> a d id - SPARKING -> a 0 id - FLAMING -> a 0 id - ELECTRICAL -> a 0 id - CONCUSSIVE -> a d id - POISONDAM -> a 0 id - ENTERREMENT -> a 0 id +damageStone dm dir = case dm of + Lasering x p t -> a 0 $ makeSpark FireSpark (outTo p t) (argV $ reflectIn t v) + Piercing x p t -> a x $ makeSpark NormalSpark (outTo p t) (argV $ reflectIn t v) + Blunt x p t -> a x $ makeSpark NormalSpark (outTo p t) (argV $ reflectIn t v) + Shattering {} -> a 0 id + Crushing {} -> a 0 id + Explosive {} -> a 0 id + Sparking {} -> a 0 id + Flaming {} -> a 0 id + Electrical {} -> a 0 id + Poison {} -> a 0 id + Enterrement {} -> a 0 id where v = unitVectorAtAngle dir a x f w = (x, f w) - d = _dmAmount dm - sp = _dmFrom dm - p = _dmAt dm - outTo = p +.+ squashNormalizeV (sp -.- p) + outTo x t = x -.- squashNormalizeV t --damageGlass :: Damage -> Float -> World -> (World,Int) --damageGlass dm dir w = w & case _dmType dm of diff --git a/src/Dodge/Prop/Moving.hs b/src/Dodge/Prop/Moving.hs index 1b5781854..b4f8c2b54 100644 --- a/src/Dodge/Prop/Moving.hs +++ b/src/Dodge/Prop/Moving.hs @@ -23,7 +23,8 @@ fallSmallBounceDamage pr w = dodamage' cr | dist (_crPos cr) p < crRad (cr ^. crType) + 5 = cr & crState . csDamage - .:~ Damage CRUSHING (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr) (p -.- v) p (p +.+ v) + .:~ Crushing (floor . (* 10) . max 0 . subtract 5 . abs $ _prVelZ pr) v + --(p -.- v) p (p +.+ v) | otherwise = cr fallSmallBounce :: Prop -> World -> World diff --git a/src/Dodge/Shockwave/Update.hs b/src/Dodge/Shockwave/Update.hs index d6c88d5c7..9d185efbf 100644 --- a/src/Dodge/Shockwave/Update.hs +++ b/src/Dodge/Shockwave/Update.hs @@ -30,7 +30,7 @@ moveShockwave w sw doDams w' = over (cWorld . lWorld . creatures) (IM.map damCr) $ foldl' - (flip $ damageWall (Damage EXPLOSIVE 1000 p p p)) + (flip $ damageWall (Explosive 1000 p)) w' hitBlocks hitBlocks = map snd . overlapCircWalls p rad $ wlsNearCirc p rad w @@ -39,12 +39,7 @@ moveShockwave w sw | _crID cr `elem` is || dist (_crPos cr) p >= rad + crRad (cr ^. crType) = cr | otherwise = cr & crState . csDamage - .:~ Damage - CONCUSSIVE - dam - (cpos -.- v) - cpos - (cpos +.+ v) + .:~ Explosive dam p where cpos = _crPos cr v = normalizeV (cpos -.- p) @@ -67,7 +62,7 @@ moveInverseShockwave w sw | dist (_crPos cr) p >= rad + crRad (cr ^. crType) = cr | otherwise = cr & crState . csDamage - .:~ Damage CONCUSSIVE 1 (cpos +.+ v) cpos (cpos -.- v) + .:~ Explosive 1 p where cpos = _crPos cr v = normalizeV (cpos -.- p) diff --git a/src/Dodge/Spark.hs b/src/Dodge/Spark.hs index 89fdc4300..4e8fcde3c 100644 --- a/src/Dodge/Spark.hs +++ b/src/Dodge/Spark.hs @@ -39,13 +39,13 @@ sparkDam' :: sparkDam' sk sp ep mayEiCrWl = case mayEiCrWl of (hitp, eicrwl) -> damageCrWl (thedam hitp) eicrwl where - thedam hitp = Damage (sparkToDamage sk) 10 sp hitp ep -- NoDamageEffect + thedam hitp = sparkToDamage sk -sparkToDamage :: Spark -> DamageType +sparkToDamage :: Spark -> Damage sparkToDamage sp = case _skType sp of - ElectricSpark ->ELECTRICAL - FireSpark -> FLAMING - NormalSpark -> SPARKING + ElectricSpark -> Electrical 10 + FireSpark -> Flaming 1 + NormalSpark -> Sparking 10 createBarrelSpark :: Point2 -> Float -> World -> World createBarrelSpark pos dir = sparkRandDir 0.1 pos dir diff --git a/src/Dodge/Update.hs b/src/Dodge/Update.hs index ac5ba7185..3ede8aabb 100644 --- a/src/Dodge/Update.hs +++ b/src/Dodge/Update.hs @@ -575,10 +575,7 @@ updateTeslaArc w pt , randWallReflect ld' wl ) | ArcStep lp' ld' _ <- last thearc = (lp', rp ld') - damthings (ArcStep p dir crwl) = damageCrWlID (thedamage p dir) crwl - thedamage p dir = Damage ELECTRICAL 50 (p -.- q) p (p +.+ q) - where - q = 5 *.* unitVectorAtAngle dir + damthings (ArcStep _ _ crwl) = damageCrWlID (Electrical 50) crwl randWallReflect :: RandomGen g => Float -> Wall -> State g Float randWallReflect a wl = randPeaked a1 outa a2 diff --git a/src/Dodge/Update/Cloud.hs b/src/Dodge/Update/Cloud.hs index 6afd2091f..9383cc1ab 100644 --- a/src/Dodge/Update/Cloud.hs +++ b/src/Dodge/Update/Cloud.hs @@ -14,6 +14,6 @@ cloudPoisonDamage c w = w & dodamagesto (filter f $ crsNearPoint clpos w) dodamagesto scrs mcrs = foldl' (flip doDam) mcrs scrs doDam cr = cWorld . lWorld . creatures . ix (_crID cr) . crState . csDamage - .:~ Damage POISONDAM 1 clpos clpos clpos + .:~ Poison 1 f cr = dist3 (addZ 20 $ _crPos cr) (_clPos c) < crRad (cr ^. crType) + _clRad c + 10 clpos = stripZ $ _clPos c diff --git a/src/Dodge/Wall/DamageEffect.hs b/src/Dodge/Wall/DamageEffect.hs index 5b95037d8..9b81e12db 100644 --- a/src/Dodge/Wall/DamageEffect.hs +++ b/src/Dodge/Wall/DamageEffect.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE TupleSections #-} module Dodge.Wall.DamageEffect where import Dodge.Base.Wall @@ -9,7 +10,7 @@ import Geometry import LensHelp damageWallEffect :: Damage -> Wall -> World -> (World, Damage) -damageWallEffect dm wl = case _wlMaterial wl of +damageWallEffect dm wl = (,dm) . case _wlMaterial wl of Stone -> stoneWallDamage dm wl Glass -> glassWallDamage dm wl Dirt -> dirtWallDamage dm wl @@ -21,97 +22,94 @@ damageWallEffect dm wl = case _wlMaterial wl of -- there is quite a lot of duplication here, should be sorted out -stoneWallDamage :: Damage -> Wall -> World -> (World, Damage) -stoneWallDamage dm wl = case _dmType dm of - PIERCING -> a d $ makeSpark NormalSpark outTo (reflDirWall sp p wl) . wlDustAt wl outTo - LASERING -> a 0 $ makeSpark FireSpark outTo (reflDirWall sp p wl) - BLUNT -> a d $ wlDustAt wl outTo - SHATTERING -> a d $ muchWlDustAt wl outTo - CRUSHING -> a d id - EXPLOSIVE -> a d id - CUTTING -> a d id - SPARKING -> a 0 id - FLAMING -> a 0 id - ELECTRICAL -> a 0 id - CONCUSSIVE -> a d id - POISONDAM -> a 0 id - ENTERREMENT -> a 0 id +stoneWallDamage :: Damage -> Wall -> World -> World +stoneWallDamage dm wl = case dm of + Piercing d p t -> a d $ makeSpark NormalSpark (outTo p t) + (reflDirWall p (p+t) wl) . wlDustAt wl (outTo p t) + Lasering d p t -> a 0 $ makeSpark FireSpark (outTo p t) (reflDirWall p (p+t) wl) + Blunt d p t -> a d $ wlDustAt wl (outTo p t) + Shattering d p t -> a d $ muchWlDustAt wl (outTo p t) + Crushing d _ -> a d id + Explosive d _ -> a d id + Sparking {} -> a 0 id + Flaming {} -> a 0 id + Electrical {} -> a 0 id + Poison {} -> a 0 id + Enterrement {} -> a 0 id where - a x f w = (f w, dm & dmAmount .~ x) - d = _dmAmount dm - sp = _dmFrom dm - p = _dmAt dm - outTo = p +.+ squashNormalizeV (sp -.- p) + a x f w = (f w) + outTo x y = x -.- squashNormalizeV y +-- d = _dmAmount dm +-- sp = _dmFrom dm +-- p = _dmAt dm +-- outTo = p +.+ squashNormalizeV (sp -.- p) -glassWallDamage :: Damage -> Wall -> World -> (World, Damage) +glassWallDamage :: Damage -> Wall -> World -> World glassWallDamage dm wl w = - w & case _dmType dm of - LASERING -> a 0 $ makeSpark FireSpark outTo (reflDirWall sp p wl) - PIERCING -> a d $ dosplint . makeSpark NormalSpark outTo (reflDirWall sp p wl) . wlDustAt wl outTo - BLUNT -> a d $ dosplint . wlDustAt wl outTo - SHATTERING -> a d $ dosplint . muchWlDustAt wl outTo - CRUSHING -> a d dosplint - EXPLOSIVE -> a d dosplint - CUTTING -> a d dosplint - SPARKING -> a 0 id - FLAMING -> a 0 id - ELECTRICAL -> a 0 id - CONCUSSIVE -> a 0 dosplint - POISONDAM -> a 0 id - ENTERREMENT -> a 0 id + w & case dm of + Lasering d p t -> a 0 $ makeSpark FireSpark (outTo p t) (reflDirWall p (p+t) wl) + Piercing d p t -> a d $ dosplint . makeSpark NormalSpark (outTo p t) (reflDirWall p (p+t) wl) . wlDustAt wl (outTo p t) + Blunt d p t -> a d $ dosplint . wlDustAt wl (outTo p t) + Shattering d p t -> a d $ dosplint . muchWlDustAt wl (outTo p t) + Crushing {} -> a d dosplint + Explosive {} -> a d dosplint + Sparking {} -> a 0 id + Flaming {} -> a 0 id + Electrical {} -> a 0 id + Poison {} -> a 0 id + Enterrement {} -> a 0 id where mbl = do blid <- wl ^? wlStructure . wsBlock w ^? cWorld . lWorld . blocks . ix blid d :: Int d = max 1 $ maybe 1 (subtract 1 . _blHP) mbl - a :: Int -> (World -> World) -> World -> (World, Damage) - a x f w' = (f w', dm & dmAmount .~ x) + a :: Int -> (World -> World) -> World -> (World) + a x f w' = (f w') dosplint = maybe id splinterBlock mbl - sp = _dmFrom dm - p = _dmAt dm - outTo = p +.+ squashNormalizeV (sp -.- p) +-- sp = _dmFrom dm +-- p = _dmAt dm + --outTo = p +.+ squashNormalizeV (sp -.- p) + outTo p t = p -.- squashNormalizeV t -crystalWallDamage :: Damage -> Wall -> World -> (World, Damage) -crystalWallDamage dm wl = case _dmType dm of - LASERING -> a 0 $ makeSpark FireSpark outTo (reflDirWall sp p wl) - PIERCING -> a 0 $ makeSpark NormalSpark outTo (reflDirWall sp p wl)-- . wlDustAt wl outTo - BLUNT -> a 0 $ wlDustAt wl outTo - SHATTERING -> a d $ muchWlDustAt wl outTo - CRUSHING -> a 0 id - EXPLOSIVE -> a 0 id - CUTTING -> a 0 id - SPARKING -> a 0 id - FLAMING -> a 0 id - ELECTRICAL -> a 0 id - CONCUSSIVE -> a 0 id - POISONDAM -> a 0 id - ENTERREMENT -> a 0 id +crystalWallDamage :: Damage -> Wall -> World -> World +crystalWallDamage dm wl = case dm of + Lasering d p t -> a 0 $ makeSpark FireSpark (outTo p t) (reflDirWall p (p+t) wl) + Piercing d p t -> a 0 $ makeSpark NormalSpark (outTo p t) (reflDirWall p (p+t) wl) . wlDustAt wl (outTo p t) + Blunt d p t -> a 0 $ wlDustAt wl (outTo p t) + Shattering d p t -> a d $ muchWlDustAt wl (outTo p t) + Crushing {} -> a 0 id + Explosive {} -> a 0 id + Sparking {} -> a 0 id + Flaming {} -> a 0 id + Electrical {} -> a 0 id + Poison {} -> a 0 id + Enterrement {} -> a 0 id where - a x f w = (f w, dm & dmAmount .~ x) - d = _dmAmount dm - sp = _dmFrom dm - p = _dmAt dm - outTo = p +.+ squashNormalizeV (sp -.- p) + a x f w = (f w) + --d = _dmAmount dm + --sp = _dmFrom dm + --p = _dmAt dm + --outTo = p +.+ squashNormalizeV (sp -.- p) + outTo p t = p -.- squashNormalizeV t -dirtWallDamage :: Damage -> Wall -> World -> (World, Damage) -dirtWallDamage dm wl = case _dmType dm of - LASERING -> a d $ wlDustAt wl outTo - PIERCING -> a d $ wlDustAt wl outTo - BLUNT -> a d $ wlDustAt wl outTo - SHATTERING -> a d $ muchWlDustAt wl outTo - CRUSHING -> a d $ wlDustAt wl outTo - EXPLOSIVE -> a d $ muchWlDustAt wl outTo - CUTTING -> a d $ muchWlDustAt wl outTo - SPARKING -> a 0 id - FLAMING -> a 0 id - ELECTRICAL -> a 0 id - CONCUSSIVE -> a d id - POISONDAM -> a 0 id - ENTERREMENT -> a 0 id +dirtWallDamage :: Damage -> Wall -> World -> World +dirtWallDamage dm wl = case dm of + Lasering d p t -> a d $ wlDustAt wl (outTo p t) + Piercing d p t -> a d $ wlDustAt wl (outTo p t) + Blunt d p t -> a d $ wlDustAt wl (outTo p t) + Shattering d p t -> a d $ muchWlDustAt wl (outTo p t) + Crushing d _ -> a d id + Explosive d _ -> a d id + Sparking {} -> a 0 id + Flaming {} -> a 0 id + Electrical {} -> a 0 id + Poison {} -> a 0 id + Enterrement {} -> a 0 id where - a x f w = (f w, dm & dmAmount .~ x) - d = _dmAmount dm - sp = _dmFrom dm - p = _dmAt dm - outTo = p +.+ squashNormalizeV (sp -.- p) + a x f w = (f w) + --d = _dmAmount dm + --sp = _dmFrom dm + --p = _dmAt dm + --outTo = p +.+ squashNormalizeV (sp -.- p) + outTo p t = p -.- squashNormalizeV t diff --git a/src/Dodge/WorldEvent/SpawnParticle.hs b/src/Dodge/WorldEvent/SpawnParticle.hs index b85fe6fcc..071d2ecf9 100644 --- a/src/Dodge/WorldEvent/SpawnParticle.hs +++ b/src/Dodge/WorldEvent/SpawnParticle.hs @@ -43,12 +43,9 @@ aStaticBall p = return EnergyBall { _ebVel = 0 - , _ebColor = blue , _ebPos = p - , _ebWidth = 3 , _ebTimer = 20 - , _ebEff = (ELECTRICAL, 10) --- , _ebZ = 20 + , _ebEff = ElectricalBall , _ebRot = 0 } diff --git a/tags b/tags index dcc5aee58..76f923cde 100644 --- a/tags +++ b/tags @@ -470,7 +470,7 @@ Damage src/Dodge/Material/Damage.hs 1;" m Damage src/Dodge/Wall/Damage.hs 4;" m Damage src/Dodge/WorldEvent/Damage.hs 1;" m DamageCircle src/Dodge/DamageCircle.hs 1;" m -DamageEffect src/Dodge/Wall/DamageEffect.hs 1;" m +DamageEffect src/Dodge/Wall/DamageEffect.hs 2;" m DamageLaser src/Dodge/Data/Laser.hs 17;" C DamageSensor src/Dodge/Data/Machine/Sensor.hs 20;" C DamageType src/Dodge/Data/Damage/Type.hs 12;" t @@ -2503,7 +2503,8 @@ _dmPos src/Dodge/Data/Damage.hs 24;" f _dmPos src/Dodge/Data/Damage.hs 27;" f _dmPos src/Dodge/Data/Damage/Type.hs 13;" f _dmVector src/Dodge/Data/Damage.hs 20;" f -_dmVector src/Dodge/Data/Damage.hs 24;" f +_dmVector src/Dodge/Data/Damage.hs 23;" f +_dmVector src/Dodge/Data/Damage.hs 26;" f _dmVector src/Dodge/Data/Damage/Type.hs 13;" f _doActionIfAction src/Dodge/Data/ActionPlan.hs 118;" f _doActionIfCondition src/Dodge/Data/ActionPlan.hs 117;" f @@ -3334,7 +3335,7 @@ aTreeStrut src/Dodge/Tree/GenerateStructure.hs 42;" f accessTerminal src/Dodge/WorldEffect.hs 59;" f activateDetonator src/Dodge/Creature/Impulse/UseItem.hs 84;" f activeTargetCursorPic src/Dodge/Targeting/Draw.hs 31;" f -addArmour src/Dodge/Creature.hs 84;" f +addArmour src/Dodge/Creature.hs 85;" f addBranchAt src/Dodge/Tree/GenerateStructure.hs 18;" f addButtonSlowDoor src/Dodge/Room/LongDoor.hs 96;" f addCrGibs src/Dodge/Prop/Gib.hs 35;" f @@ -3614,7 +3615,7 @@ chaseCritVocalization src/Dodge/Creature/ChaseCrit.hs 37;" f checkCombineSelectionExists src/Dodge/DisplayInventory.hs 100;" f checkConnection src/Dodge/Inventory/Swap.hs 64;" f checkDeath src/Dodge/Creature/State.hs 79;" f -checkEndGame src/Dodge/Update.hs 712;" f +checkEndGame src/Dodge/Update.hs 709;" f checkErrorGL src/Shader/Compile.hs 255;" f checkFBO src/Framebuffer/Check.hs 6;" f checkGLError src/GLHelp.hs 17;" f @@ -3643,7 +3644,7 @@ circle src/Picture/Base.hs 180;" f circleDecoration src/Dodge/Placement/TopDecoration.hs 56;" f circleSolid src/Picture/Base.hs 164;" f circleSolidCol src/Picture/Base.hs 168;" f -clClSpringVel src/Dodge/Update.hs 766;" f +clClSpringVel src/Dodge/Update.hs 763;" f clZoneSize src/Dodge/Zone/Size.hs 3;" f clZoneSize src/Dodge/Zoning/Cloud.hs 21;" f clampPath src/Dodge/Room/Procedural.hs 166;" f @@ -3669,7 +3670,7 @@ closestCreatureID src/Dodge/Debug.hs 116;" f closestPointOnLine src/Geometry/Intersect.hs 251;" f closestPointOnLineParam src/Geometry/Intersect.hs 267;" f closestPointOnSeg src/Geometry/Intersect.hs 282;" f -cloudEffect src/Dodge/Update.hs 733;" f +cloudEffect src/Dodge/Update.hs 730;" f cloudPoisonDamage src/Dodge/Update/Cloud.hs 10;" f clsNearCirc src/Dodge/Zoning/Cloud.hs 18;" f clsNearPoint src/Dodge/Zoning/Cloud.hs 9;" f @@ -3680,7 +3681,6 @@ clusterFunc src/Dodge/Combine/Graph.hs 119;" f cogRaised src/Dodge/Creature/Perception.hs 102;" f colCrWall src/Dodge/WallCreatureCollisions.hs 28;" f colCrsWalls src/Dodge/WallCreatureCollisions.hs 18;" f -collectDamageTypes src/Dodge/Damage.hs 32;" f collectInvItems src/Dodge/Update/Input/InGame.hs 298;" f collideCircWalls src/Dodge/Base/Collide.hs 159;" f collidePoint src/Dodge/Base/Collide.hs 50;" f @@ -3742,7 +3742,7 @@ crAwayFromPost src/Dodge/Creature/Test.hs 81;" f crBlips src/Dodge/RadarSweep.hs 87;" f crCamouflage src/Dodge/Creature/Picture.hs 33;" f crCanSeeCr src/Dodge/Creature/Test.hs 50;" f -crCrSpring src/Dodge/Update.hs 784;" f +crCrSpring src/Dodge/Update.hs 781;" f crCurrentEquipment src/Dodge/Creature/Statistics.hs 57;" f crDexterity src/Dodge/Creature/Statistics.hs 14;" f crDisplayAwareness src/Dodge/Creature/Picture/Awareness.hs 38;" f @@ -3770,7 +3770,7 @@ crRad src/Dodge/Creature/Radius.hs 7;" f crSafeDistFromTarg src/Dodge/Creature/Test.hs 71;" f crSetRoots src/Dodge/Inventory/Location.hs 48;" f crShape src/Dodge/Creature/Shape.hs 8;" f -crSpring src/Dodge/Update.hs 779;" f +crSpring src/Dodge/Update.hs 776;" f crStratConMatches src/Dodge/Creature/Test.hs 76;" f crStrength src/Dodge/Creature/Statistics.hs 24;" f crUpdate src/Dodge/Creature/State.hs 63;" f @@ -3844,13 +3844,13 @@ cylinderPoly src/Shape.hs 86;" f cylinderRoundIndices src/Shader/Poke.hs 389;" f dShadCol src/Dodge/Render/List.hs 215;" f damThingHitWith src/Dodge/WorldEvent/Damage.hs 10;" f -damToExpBarrel src/Dodge/Barreloid.hs 55;" 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 102;" f +damageCircle src/Dodge/EnergyBall.hs 106;" f damageCodeCommand src/Dodge/Terminal.hs 232;" f damageCrCircle src/Dodge/DamageCircle.hs 33;" f -damageCrCircle src/Dodge/EnergyBall.hs 132;" f +damageCrCircle src/Dodge/EnergyBall.hs 135;" f damageCrWl src/Dodge/Damage.hs 23;" f damageCrWlID src/Dodge/Damage.hs 17;" f damageDirection src/Dodge/Damage.hs 27;" f @@ -3861,11 +3861,11 @@ damageStone src/Dodge/Material/Damage.hs 20;" f damageThingHit src/Dodge/Bullet.hs 174;" f damageTypeThreshold src/Dodge/Placement/Instance/Sensor.hs 45;" f damageWall src/Dodge/Wall/Damage.hs 15;" f -damageWallEffect src/Dodge/Wall/DamageEffect.hs 11;" f +damageWallEffect src/Dodge/Wall/DamageEffect.hs 12;" f damageWlCircle src/Dodge/DamageCircle.hs 26;" f -damageWlCircle src/Dodge/EnergyBall.hs 125;" f +damageWlCircle src/Dodge/EnergyBall.hs 128;" f dampField src/Dodge/Magnet.hs 8;" f -damsToExpBarrel src/Dodge/Barreloid.hs 48;" f +damsToExpBarrel src/Dodge/Barreloid.hs 49;" f dark src/Color.hs 108;" f darkenBackground src/Dodge/Render/MenuScreen.hs 52;" f dbArg src/Dodge/Base.hs 165;" f @@ -4001,7 +4001,7 @@ dim src/Color.hs 112;" f dirtColor src/Dodge/Block/Debris.hs 160;" f dirtDebris src/Dodge/Block/Debris.hs 154;" f dirtPoly src/Dodge/Room/RoadBlock.hs 74;" f -dirtWallDamage src/Dodge/Wall/DamageEffect.hs 97;" f +dirtWallDamage src/Dodge/Wall/DamageEffect.hs 96;" f disconnectItemS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 496;" f disconnectTerminal src/Dodge/Terminal.hs 217;" f displayConfig src/Dodge/Menu.hs 213;" f @@ -4039,7 +4039,7 @@ doCrWdAc src/Dodge/CreatureEffect.hs 77;" f doCrWdImp src/Dodge/CreatureEffect.hs 16;" f doCrWdWd src/Dodge/CreatureEffect.hs 20;" f doDamage src/Dodge/Creature/State.hs 138;" f -doDamagesFL src/Dodge/Flame.hs 58;" f +doDamagesFL src/Dodge/Flame.hs 50;" f doDeathToggle src/Dodge/WorldEffect.hs 98;" f doDeathTriggers src/Dodge/WorldEffect.hs 93;" f doDebugTest src/Dodge/Update/Input/DebugTest.hs 22;" f @@ -4154,12 +4154,12 @@ drawDragSelect src/Dodge/Render/Picture.hs 180;" f drawDragSelected src/Dodge/Render/HUD.hs 133;" f drawDragSelecting src/Dodge/Render/HUD.hs 150;" f drawEmptySet src/Dodge/Render/Picture.hs 124;" f -drawEnergyBall src/Dodge/EnergyBall/Draw.hs 10;" f +drawEnergyBall src/Dodge/EnergyBall/Draw.hs 9;" f 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 7;" f -drawFlamelet src/Dodge/EnergyBall/Draw.hs 26;" f +drawFlamelet src/Dodge/EnergyBall/Draw.hs 27;" 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 @@ -4220,7 +4220,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 16;" f +drawStaticBall src/Dodge/EnergyBall/Draw.hs 17;" 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 @@ -4262,9 +4262,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 94;" f -ebFlicker src/Dodge/EnergyBall.hs 87;" f -ebtToDamage src/Dodge/EnergyBall.hs 117;" f +ebColor src/Dodge/EnergyBall.hs 98;" f +ebFlicker src/Dodge/EnergyBall.hs 91;" f +ebtToDamage src/Dodge/EnergyBall.hs 120;" f edgeFormatting src/Dodge/Combine/Graph.hs 131;" f edgeToPic src/Dodge/Debug/Picture.hs 431;" f effectOnEquip src/Dodge/Equipment.hs 32;" f @@ -4313,7 +4313,7 @@ expandPolyByFixed src/Dodge/LevelGen/StaticWalls.hs 97;" f expandPolyCorners src/Dodge/LevelGen/StaticWalls.hs 103;" f expandToSquare src/Dodge/LevelGen/StaticWalls/Deprecated.hs 83;" f expireAndDamage src/Dodge/Bullet.hs 183;" f -expireAndDamageFL src/Dodge/Flame.hs 48;" f +expireAndDamageFL src/Dodge/Flame.hs 41;" f explodeShell src/Dodge/Projectile/Update.hs 245;" f explosionS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 422;" f explosiveBarrel src/Dodge/Creature/Inanimate.hs 29;" f @@ -4327,8 +4327,8 @@ extractRoomPos src/Dodge/RoomPos.hs 6;" f faceEdges src/Polyhedra.hs 65;" f facesToVF src/Polyhedra/Geodesic.hs 69;" f fadeTLS src/Dodge/LightSource/Update.hs 14;" f -fallSmallBounce src/Dodge/Prop/Moving.hs 29;" f -fallSmallBounce' src/Dodge/Prop/Moving.hs 34;" f +fallSmallBounce src/Dodge/Prop/Moving.hs 30;" f +fallSmallBounce' src/Dodge/Prop/Moving.hs 35;" f fallSmallBounceDamage src/Dodge/Prop/Moving.hs 12;" f farWallDistDirection src/Dodge/Update/Camera.hs 233;" f fdiv src/ShortShow.hs 26;" f @@ -4352,8 +4352,8 @@ firstBreather src/Dodge/Room/Breather.hs 9;" f firstWorldLoad appDodge/Main.hs 77;" f fixedCoordPictures src/Dodge/Render/Picture.hs 17;" f fixedSizePicClampArrow src/Dodge/Picture/SizeInvariant.hs 57;" f -flDamageInArea src/Dodge/Flame.hs 110;" f -flFlicker src/Dodge/Flame.hs 124;" f +flDamageInArea src/Dodge/Flame.hs 102;" f +flFlicker src/Dodge/Flame.hs 116;" f flameMuzzles src/Dodge/HeldUse.hs 290;" f flameShield src/Dodge/Item/Equipment.hs 33;" f flameSpitter src/Dodge/Item/Held/SprayGuns.hs 23;" f @@ -4493,7 +4493,7 @@ glassShat3S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 350;" f glassShat4S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 464;" f glassSwitchBack src/Dodge/Room/Room.hs 70;" f glassSwitchBackCrits src/Dodge/Room/Room.hs 99;" f -glassWallDamage src/Dodge/Wall/DamageEffect.hs 46;" f +glassWallDamage src/Dodge/Wall/DamageEffect.hs 47;" f glauncherPic src/Dodge/Item/Draw/SPic.hs 393;" f glushortSize src/Shader/Parameters.hs 25;" f goToPostStrat src/Dodge/Creature/Strategy.hs 10;" f @@ -4601,7 +4601,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 53;" f +incBallAt src/Dodge/EnergyBall.hs 57;" f incidenceToFunction src/Dodge/Graph.hs 26;" f indefiniteExceptions src/StringHelp.hs 29;" f initCrItemLocation src/Dodge/Item/Location/Initialize.hs 41;" f @@ -4679,7 +4679,7 @@ invSetSelectionPos src/Dodge/Inventory.hs 193;" f invShiftPointBy src/Dodge/ShiftPoint.hs 8;" f invSideEff src/Dodge/Creature/State.hs 167;" f invSize src/Dodge/Inventory/CheckSlots.hs 30;" f -inventoryX src/Dodge/Creature.hs 113;" f +inventoryX src/Dodge/Creature.hs 114;" f inverseSelNumPos src/Dodge/SelectionSections.hs 228;" f inverseSelSecYint src/Dodge/SelectionSections.hs 201;" f inverseSelSecYintXPosCheck src/Dodge/SelectionSections.hs 212;" f @@ -4874,7 +4874,7 @@ lockRoomMultiItems src/Dodge/LockAndKey.hs 15;" f lockedStart src/Dodge/Room/RunPast.hs 34;" f logistic src/Dodge/Base.hs 98;" f longBlockedCorridor src/Dodge/Room/RoadBlock.hs 58;" f -longCrit src/Dodge/Creature.hs 70;" f +longCrit src/Dodge/Creature.hs 71;" f longRoom src/Dodge/Room/LongRoom.hs 22;" f longRoomRunPast src/Dodge/Room/LongRoom.hs 48;" f longestCommonPrefix src/Dodge/Debug/Terminal.hs 142;" f @@ -4927,14 +4927,14 @@ makeDoorDebris src/Dodge/Block/Debris.hs 18;" f makeEnumOption src/Dodge/Menu/OptionType.hs 13;" f makeExplosionAt src/Dodge/WorldEvent/Explosion.hs 72;" f makeFlak src/Dodge/Bullet.hs 138;" f -makeFlame src/Dodge/Flame.hs 132;" f +makeFlame src/Dodge/Flame.hs 124;" f makeFlameExplosionAt src/Dodge/WorldEvent/Explosion.hs 55;" f -makeFlamelet src/Dodge/EnergyBall.hs 18;" f +makeFlamelet src/Dodge/EnergyBall.hs 20;" f makeFlamerSmokeAt src/Dodge/WorldEvent/Cloud.hs 68;" f -makeFlashBall src/Dodge/EnergyBall.hs 70;" f +makeFlashBall src/Dodge/EnergyBall.hs 74;" f makeFootstepSound src/Dodge/Creature/State/WalkCycle.hs 32;" f makeFragBullets src/Dodge/Bullet.hs 122;" f -makeGasCloud src/Dodge/WorldEvent/SpawnParticle.hs 80;" f +makeGasCloud src/Dodge/WorldEvent/SpawnParticle.hs 77;" f makeGrid src/Grid.hs 46;" f makeIntInterval src/Dodge/Zoning/Base.hs 34;" f makeMuzzleFlare src/Dodge/HeldUse.hs 649;" f @@ -4971,7 +4971,7 @@ makeTypeCraft src/Dodge/Item/Craftable.hs 18;" f makeTypeCraftNum src/Dodge/Item/Craftable.hs 12;" f mapper src/Dodge/Item/Scope.hs 70;" f maxAmmo src/Dodge/Item/MaxAmmo.hs 6;" f -maxDamageType src/Dodge/Damage.hs 37;" f +maxDamageType src/Dodge/Damage.hs 38;" f maxInvSlots src/Dodge/Inventory/CheckSlots.hs 27;" f maxShowX src/Dodge/Combine/Graph.hs 50;" f maxViewDistance src/Dodge/Viewpoints.hs 26;" f @@ -5040,7 +5040,7 @@ minAndMax src/FoldableHelp.hs 109;" f minCrIXOn src/Dodge/Zoning/Creature.hs 47;" f minOn src/FoldableHelp.hs 35;" f mini1S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 346;" f -miniGunCrit src/Dodge/Creature.hs 63;" f +miniGunCrit src/Dodge/Creature.hs 64;" f miniGunX src/Dodge/Item/Held/Cane.hs 52;" f miniGunXPict src/Dodge/Item/Draw/SPic.hs 365;" f miniGunXPictItem src/Dodge/Item/Draw/SPic.hs 359;" f @@ -5072,7 +5072,7 @@ mouseWorldPos' src/Dodge/Base/Coordinate.hs 48;" f moveBullet src/Dodge/Bullet.hs 192;" f moveCombineSel src/Dodge/Update/Scroll.hs 115;" f moveHammerUp src/Dodge/Hammer.hs 5;" f -moveInverseShockwave src/Dodge/Shockwave/Update.hs 52;" f +moveInverseShockwave src/Dodge/Shockwave/Update.hs 47;" f moveLSThen src/Dodge/Placement/Instance/LightSource.hs 30;" f movePenBullet src/Dodge/Bullet.hs 202;" f moveProjectile src/Dodge/Projectile/Update.hs 221;" f @@ -5088,7 +5088,7 @@ mtTopLabels src/Dodge/Tree/Compose.hs 49;" f mtUnderLabels src/Dodge/Tree/Compose.hs 52;" f muchWlDustAt src/Dodge/Wall/Dust.hs 15;" f muin src/Dodge/RoomLink.hs 132;" f -multGunCrit src/Dodge/Creature.hs 77;" f +multGunCrit src/Dodge/Creature.hs 78;" f multiArrow src/Picture/Composite.hs 11;" f multiLookupTrie src/SimpleTrie.hs 34;" f multiLookupTrieI src/SimpleTrie.hs 43;" f @@ -5097,7 +5097,7 @@ muzFlareAt src/Dodge/HeldUse.hs 677;" f mvButton src/Dodge/Placement/PlaceSpot.hs 176;" f mvCr src/Dodge/Placement/PlaceSpot.hs 186;" f mvFS src/Dodge/Placement/PlaceSpot.hs 189;" f -mvGust src/Dodge/Update.hs 724;" f +mvGust src/Dodge/Update.hs 721;" f mvLS src/Dodge/Placement/PlaceSpot.hs 217;" f mvP src/Dodge/Wall/Move.hs 54;" f mvPP src/Dodge/Placement/PlaceSpot.hs 183;" f @@ -5361,7 +5361,7 @@ powlistUpToN src/Multiset.hs 23;" f powlistUpToN' src/Multiset.hs 12;" f powlistUpToN'' src/Multiset.hs 31;" f ppDraw src/Dodge/Render/ShapePicture.hs 104;" f -ppEvents src/Dodge/Update.hs 691;" f +ppEvents src/Dodge/Update.hs 688;" f ppLevelReset src/Dodge/PressPlate.hs 13;" f preCritStart src/Dodge/Room/Start.hs 82;" f preloadRender src/Preload/Render.hs 30;" f @@ -5465,7 +5465,7 @@ randPeakedParam src/RandomHelp.hs 130;" f randProb src/RandomHelp.hs 68;" f randSpark src/Dodge/Spark.hs 82;" f randWallReflect src/Dodge/Tesla/Arc.hs 57;" f -randWallReflect src/Dodge/Update.hs 583;" f +randWallReflect src/Dodge/Update.hs 580;" f randomChallenges src/Dodge/Room/Start.hs 62;" f randomCompass src/Dodge/Layout.hs 59;" f randomFourCornerRoom src/Dodge/Room/Procedural.hs 266;" f @@ -5823,8 +5823,7 @@ shuffleLinks src/Dodge/Room/Link.hs 30;" f shuffleRoomPos src/Dodge/Layout.hs 78;" f shuffleTail src/RandomHelp.hs 59;" f sigmoid src/Dodge/Base.hs 151;" f -simpleCrSprings src/Dodge/Update.hs 775;" f -simpleDamFL src/Dodge/Flame.hs 41;" f +simpleCrSprings src/Dodge/Update.hs 772;" f simpleTermMessage src/Dodge/Terminal.hs 253;" f sineRaisePitchOneSecS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 522;" f sineRaisePitchTwoSecS src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 364;" f @@ -5890,7 +5889,7 @@ 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 spawnSmokeAtCursor src/Dodge/WorldEvent/Cloud.hs 73;" f -spawnerCrit src/Dodge/Creature.hs 56;" f +spawnerCrit src/Dodge/Creature.hs 57;" f spawnerRoom src/Dodge/Room/Room.hs 360;" f speedLegs src/Dodge/Item/Equipment.hs 90;" f splashMenu src/Dodge/Menu.hs 30;" f @@ -5932,12 +5931,12 @@ 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 306;" f -startCr src/Dodge/Creature.hs 92;" f +stackedInventory src/Dodge/Creature.hs 311;" 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 -startInvList src/Dodge/Creature.hs 107;" f -startInventory src/Dodge/Creature.hs 110;" f +startInvList src/Dodge/Creature.hs 108;" f +startInventory src/Dodge/Creature.hs 111;" f startNewGameInSlot src/Dodge/StartNewGame.hs 15;" f startRoom src/Dodge/Room/Start.hs 52;" f startSeedGame src/Dodge/StartNewGame.hs 20;" f @@ -5950,7 +5949,7 @@ stone3S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 434;" f stone4S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 370;" f stone5S src/Dodge/SoundLogic/ExternallyGeneratedSounds.hs 474;" f stoneDebris src/Dodge/Block/Debris.hs 137;" f -stoneWallDamage src/Dodge/Wall/DamageEffect.hs 24;" f +stoneWallDamage src/Dodge/Wall/DamageEffect.hs 25;" f stopAllSounds src/Sound.hs 125;" f stopBulletAt src/Dodge/Bullet.hs 195;" f stopPushing src/Dodge/Block.hs 107;" f @@ -6023,7 +6022,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 287;" f +testInventory src/Dodge/Creature.hs 292;" f testStringInit src/Dodge/TestString.hs 28;" f text src/Picture/Base.hs 193;" f textGrad src/Picture/Text.hs 5;" f @@ -6212,8 +6211,8 @@ updateArc src/Dodge/Tesla.hs 44;" f updateArc src/Dodge/Tesla/Arc.hs 100;" f updateAttachedItems src/Dodge/Creature/State.hs 266;" f updateBackspaceRegex src/Dodge/Update/Input/InGame.hs 453;" f -updateBarrel src/Dodge/Barreloid.hs 43;" f -updateBarreloid src/Dodge/Barreloid.hs 13;" f +updateBarrel src/Dodge/Barreloid.hs 44;" f +updateBarreloid src/Dodge/Barreloid.hs 14;" f updateBaseWheelEvent src/Dodge/Update/Scroll.hs 29;" f updateBounds src/Dodge/Update/Camera.hs 250;" f updateBulVel src/Dodge/Bullet.hs 53;" f @@ -6221,30 +6220,30 @@ updateBullet src/Dodge/Bullet.hs 21;" f updateBullets src/Dodge/Update.hs 540;" f updateCamera src/Dodge/Update/Camera.hs 29;" f updateCloseObjects src/Dodge/Inventory.hs 116;" f -updateCloud src/Dodge/Update.hs 741;" f -updateClouds src/Dodge/Update.hs 613;" f +updateCloud src/Dodge/Update.hs 738;" f +updateClouds src/Dodge/Update.hs 610;" f updateCombinePositioning src/Dodge/DisplayInventory.hs 37;" f updateCombineSections src/Dodge/DisplayInventory.hs 44;" f updateCreature src/Dodge/Creature/Update.hs 13;" f updateCreatureGroups src/Dodge/Update.hs 512;" f updateCreatureSoundPositions src/Dodge/Update.hs 488;" f updateDebugMessageOffset src/Dodge/Update.hs 95;" f -updateDelayedEvents src/Dodge/Update.hs 804;" f +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 41;" f -updateEnergyBalls src/Dodge/Update.hs 601;" f +updateEnergyBall src/Dodge/EnergyBall.hs 45;" f +updateEnergyBalls src/Dodge/Update.hs 598;" f updateEnterRegex src/Dodge/Update/Input/InGame.hs 480;" f -updateExpBarrel src/Dodge/Barreloid.hs 19;" f +updateExpBarrel src/Dodge/Barreloid.hs 20;" f updateFBOTO src/Framebuffer/Update.hs 97;" f updateFBOTO3 src/Framebuffer/Update.hs 131;" f -updateFlame src/Dodge/Flame.hs 71;" f -updateFlames src/Dodge/Update.hs 598;" f +updateFlame src/Dodge/Flame.hs 63;" f +updateFlames src/Dodge/Update.hs 595;" f updateFloatingCamera src/Dodge/Update/Camera.hs 34;" f updateFunctionKey src/Dodge/Update/Input/InGame.hs 364;" f updateFunctionKeys src/Dodge/Update/Input/InGame.hs 357;" f -updateGusts src/Dodge/Update.hs 721;" f +updateGusts src/Dodge/Update.hs 718;" f updateHeldRootItem src/Dodge/Creature/State.hs 260;" f updateHumanoid src/Dodge/Humanoid.hs 13;" f updateIMl src/Dodge/Update.hs 502;" f @@ -6274,7 +6273,7 @@ updateObjCatMaybes src/Dodge/Update.hs 524;" f updateObjMapMaybe src/Dodge/Update.hs 517;" f updatePastWorlds src/Dodge/Update.hs 422;" f updatePosEvent src/Dodge/PosEvent.hs 10;" f -updatePosEvents src/Dodge/Update.hs 610;" f +updatePosEvents src/Dodge/Update.hs 607;" f updatePreload src/Preload/Update.hs 20;" f updateProjectile src/Dodge/Projectile/Update.hs 27;" f updateProp src/Dodge/Prop/Update.hs 11;" f @@ -6283,7 +6282,7 @@ updateRBList src/Dodge/Inventory/RBList.hs 18;" f updateRadarBlip src/Dodge/RadarBlip.hs 11;" f updateRadarBlips src/Dodge/Update.hs 536;" f updateRadarSweep src/Dodge/RadarSweep.hs 39;" f -updateRadarSweeps src/Dodge/Update.hs 604;" f +updateRadarSweeps src/Dodge/Update.hs 601;" f updateRandNode src/TreeHelp.hs 108;" f updateRenderSplit appDodge/Main.hs 108;" f updateRootItemID src/Dodge/Inventory/Location.hs 35;" f @@ -6292,18 +6291,18 @@ updateScrollTestValue src/Dodge/ScrollValue.hs 6;" f updateSection src/Dodge/DisplayInventory.hs 264;" f updateSectionsPositioning src/Dodge/DisplayInventory.hs 243;" f updateShockwave src/Dodge/Shockwave/Update.hs 13;" f -updateShockwaves src/Dodge/Update.hs 595;" f +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 -updateSparks src/Dodge/Update.hs 607;" f +updateSparks src/Dodge/Update.hs 604;" f updateTempLightSource src/Dodge/LightSource/Update.hs 7;" f updateTeslaArc src/Dodge/Tesla/Arc.hs 23;" f updateTeslaArc src/Dodge/Update.hs 550;" f updateTeslaArcs src/Dodge/Update.hs 547;" f updateTractorBeam src/Dodge/TractorBeam/Update.hs 9;" f -updateTractorBeams src/Dodge/Update.hs 592;" f +updateTractorBeams src/Dodge/Update.hs 589;" f updateTurret src/Dodge/Machine/Update.hs 50;" f updateUniverse src/Dodge/Update.hs 74;" f updateUniverseFirst src/Dodge/Update.hs 85;" f