diff --git a/src/Dodge/Block.hs b/src/Dodge/Block.hs index 589d8a57b..619fda84c 100644 --- a/src/Dodge/Block.hs +++ b/src/Dodge/Block.hs @@ -4,6 +4,7 @@ import Dodge.Base.Collide import Dodge.Material import Dodge.Block.Debris import Dodge.Zone +import Dodge.LightSource import Dodge.Wall.Zone import Dodge.WorldEvent.Sound import Dodge.Wall.Delete @@ -87,7 +88,7 @@ destroyMounts mos w = foldr destroyMount w mos destroyMount :: MountedObject -> World -> World destroyMount mo = case mo of - MountedLS lsid -> lightSources . at lsid .~ Nothing + MountedLS lsid -> destroyLS lsid MountedProp prid -> props . at prid .~ Nothing stopPushing :: Maybe Int -> World -> World diff --git a/src/Dodge/Combine/Combinations.hs b/src/Dodge/Combine/Combinations.hs index 6c005721a..51daca6a8 100644 --- a/src/Dodge/Combine/Combinations.hs +++ b/src/Dodge/Combine/Combinations.hs @@ -70,7 +70,7 @@ itemCombinations = , p [o (HELD SPARKGUN),p 2 $ cr PIPE] teslaGun , p [o $ cr TELEPORTMODULE,p 2 $ cr MICROCHIP] blinkGun - , p [o BLINKER, p 2 $ cr MICROCHIP] unsafeBlinkGun + , p [o $ LEFT BLINKER, p 2 $ cr MICROCHIP] unsafeBlinkGun , po [cr MAGNET,cr TIN] magShield diff --git a/src/Dodge/Combine/Data.hs b/src/Dodge/Combine/Data.hs index 2375263b7..9185ea92a 100644 --- a/src/Dodge/Combine/Data.hs +++ b/src/Dodge/Combine/Data.hs @@ -73,19 +73,22 @@ data ItemBaseType | AUTOEFFGUN String -- Weapons | HELD {_ibtHeld :: HeldItemType} + | LEFT {_ibtLeft :: LeftItemType} + | EQUIP {_ibtEquip :: EquipItemType} -- | GRENADE -- | REMOTEBOMB -- Utility items - | BOOSTER - | REWINDER - | BLINKER - | BLINKERUNSAFE - | SHRINKER - | SPAWNER -- Equipment - | CLICKDETECTOR Detector - | AUTODETECTOR Detector - | MAGSHIELD + -- + | KEYCARD Int + -- + | MEDKIT Int + | CRAFT CraftType + -- + deriving (Eq,Ord,Show,Read) + +data EquipItemType + = MAGSHIELD | FLAMESHIELD | FRONTARMOUR | WRISTARMOUR @@ -98,12 +101,15 @@ data ItemBaseType | JUMPLEGS | FLATSHIELD | JETPACK - -- - | KEYCARD Int - -- - | MEDKIT Int - | CRAFT CraftType - -- + | AUTODETECTOR Detector + deriving (Eq,Ord,Show,Read) +data LeftItemType + = BOOSTER + | REWINDER + | BLINKER + | BLINKERUNSAFE + | SHRINKER + | SPAWNER deriving (Eq,Ord,Show,Read) data HeldItemType @@ -163,6 +169,8 @@ data HeldItemType | SHATTERGUN | FORCEFIELDGUN + + | HELDDETECTOR Detector deriving (Eq,Ord,Show,Read) data ItemModuleType diff --git a/src/Dodge/Creature/State.hs b/src/Dodge/Creature/State.hs index 7e8fc922d..fe48ecc14 100644 --- a/src/Dodge/Creature/State.hs +++ b/src/Dodge/Creature/State.hs @@ -184,7 +184,7 @@ movementSideEff cr w _ -> w | otherwise = footstepSideEffect cr w where - hasJetPack = any (\it -> it ^? itType . iyBase == Just JETPACK) $ _crInv cr + hasJetPack = any (\it -> it ^? itType . iyBase == Just (EQUIP JETPACK)) $ _crInv cr oldPos = _crOldPos cr momentum' = 0.97 *.* (_crPos cr -.- _crOldPos cr) momentum'' | magV momentum' > 3 = 3 *.* normalizeV momentum' diff --git a/src/Dodge/Creature/Statistics.hs b/src/Dodge/Creature/Statistics.hs index 1091825a2..35c0e4a14 100644 --- a/src/Dodge/Creature/Statistics.hs +++ b/src/Dodge/Creature/Statistics.hs @@ -21,8 +21,8 @@ strFromEquipment = sum . fmap equipmentStrValue . crCurrentEquipment equipmentStrValue :: Item -> Int equipmentStrValue itm = case _iyBase $ _itType itm of - FRONTARMOUR -> negate 3 - POWERLEGS -> 3 + EQUIP FRONTARMOUR -> negate 3 + EQUIP POWERLEGS -> 3 _ -> 0 crCurrentEquipment :: Creature -> IM.IntMap Item diff --git a/src/Dodge/Creature/Test.hs b/src/Dodge/Creature/Test.hs index 10dc6bb63..7fc0ff833 100644 --- a/src/Dodge/Creature/Test.hs +++ b/src/Dodge/Creature/Test.hs @@ -100,7 +100,7 @@ hasFrontArmour :: Point2 -> Creature -> Bool hasFrontArmour p cr = fromMaybe False $ do invid <- cr ^? crEquipment . ix OnChest ittype <- cr ^? crInv . ix invid . itType . iyBase - return $ FRONTARMOUR == ittype + return $ EQUIP FRONTARMOUR == ittype && p /= _crOldPos cr && angleVV (unitVectorAtAngle (_crDir cr + frontarmdirection)) (p -.- _crOldPos cr) < pi/2 -- even though angleVV can generate NaN, the comparison seems to deal with it diff --git a/src/Dodge/Item.hs b/src/Dodge/Item.hs index a5e98fdc4..2811833dd 100644 --- a/src/Dodge/Item.hs +++ b/src/Dodge/Item.hs @@ -23,18 +23,16 @@ itemFromBase ibt = case ibt of AUTOEFFGUN _ -> undefined -- Weapons HELD ht -> itemFromHeldType ht + LEFT lt -> itemFromLeftType lt + EQUIP et -> itemFromEquipType et --GRENADE --REMOTEBOMB -- Utility items - BOOSTER -> boosterGun - REWINDER -> rewindGun - BLINKER -> blinkGun - BLINKERUNSAFE -> unsafeBlinkGun - SHRINKER -> shrinkGun - SPAWNER -> error "need to datify creatures first" - -- Equipment - CLICKDETECTOR d -> clickDetector d - AUTODETECTOR d -> autoDetector d + CRAFT cr -> makeTypeCraft cr + KEYCARD i -> keyCard i + MEDKIT i -> medkit i +itemFromEquipType :: EquipItemType -> Item +itemFromEquipType et = case et of MAGSHIELD -> magShield FLAMESHIELD -> flameShield FRONTARMOUR -> frontArmour @@ -49,9 +47,16 @@ itemFromBase ibt = case ibt of JUMPLEGS -> jumpLegs FLATSHIELD -> flatShield JETPACK -> jetPack - CRAFT cr -> makeTypeCraft cr - KEYCARD i -> keyCard i - MEDKIT i -> medkit i + AUTODETECTOR d -> autoDetector d +itemFromLeftType :: LeftItemType -> Item +itemFromLeftType lt = case lt of + BOOSTER -> boosterGun + REWINDER -> rewindGun + BLINKER -> blinkGun + BLINKERUNSAFE -> unsafeBlinkGun + SHRINKER -> shrinkGun + SPAWNER -> error "need to datify creatures first" + -- Equipment itemFromHeldType :: HeldItemType -> Item itemFromHeldType ht = case ht of SHATTERGUN -> shatterGun @@ -109,34 +114,17 @@ itemFromHeldType ht = case ht of POISONSPRAYER -> poisonSprayer DRONELAUNCHER -> droneLauncher FORCEFIELDGUN -> forceFieldGun + + HELDDETECTOR d -> clickDetector d baseToFamily :: ItemBaseType -> ItemFamily baseToFamily ibt = case ibt of NOTDEFINED -> undefined EFFGUN _ -> undefined AUTOEFFGUN _ -> undefined HELD _ -> HeldFamily - BOOSTER -> LeftClickFamily - REWINDER -> LeftClickFamily - BLINKER -> LeftClickFamily - BLINKERUNSAFE -> LeftClickFamily - SHRINKER -> LeftClickFamily - SPAWNER -> LeftClickFamily - CLICKDETECTOR _ -> HeldFamily - AUTODETECTOR _ -> LeftClickFamily - MAGSHIELD -> EquipmentFamily - FLAMESHIELD -> EquipmentFamily - FRONTARMOUR -> EquipmentFamily - WRISTARMOUR -> EquipmentFamily - INVISIBILITYEQUIPMENT _ -> EquipmentFamily - BRAINHAT -> EquipmentFamily - HEADLAMP -> EquipmentFamily - HEADLAMP1 -> EquipmentFamily - POWERLEGS -> EquipmentFamily - SPEEDLEGS -> EquipmentFamily - JUMPLEGS -> EquipmentFamily - FLATSHIELD -> EquipmentFamily - JETPACK -> EquipmentFamily - CRAFT _ -> CraftingFamily + LEFT _ -> LeftClickFamily + EQUIP _ -> EquipmentFamily + CRAFT _ -> CraftingFamily KEYCARD _ -> HeldFamily diff --git a/src/Dodge/Item/Draw/SPic.hs b/src/Dodge/Item/Draw/SPic.hs index 430dadc2d..b71eacc95 100644 --- a/src/Dodge/Item/Draw/SPic.hs +++ b/src/Dodge/Item/Draw/SPic.hs @@ -13,19 +13,21 @@ import Data.Maybe itemSPic :: Item -> SPic itemSPic it = modulesSPic it <> case it ^. itType . iyBase of HELD ht -> heldItemSPic ht it + LEFT lt -> leftItemSPic lt it + EQUIP et -> equipItemSPic et it NOTDEFINED -> defSPic EFFGUN _ -> defSPic AUTOEFFGUN _ -> defSPic - BOOSTER -> defSPic - REWINDER -> defSPic - BLINKER -> defSPic - BLINKERUNSAFE -> defSPic - SHRINKER -> defSPic - SPAWNER -> defSPic -- - CLICKDETECTOR dt -> (noPic (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2)) - AUTODETECTOR dt -> (noPic (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2)) +-- + KEYCARD _ -> noShape (setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic) +-- + MEDKIT _ -> defSPic + CRAFT _ -> defSPic + +equipItemSPic :: EquipItemType -> Item -> SPic +equipItemSPic et _ = case et of MAGSHIELD -> defSPic FLAMESHIELD -> defSPic FRONTARMOUR -> (emptySH , setDepth 20 $ pictures @@ -44,12 +46,11 @@ itemSPic it = modulesSPic it <> case it ^. itType . iyBase of JETPACK -> ((,) emptySH $ setDepth 20 $ pictures [color yellow $ polygon $ reverse $ rectNSWE 5 (-5) (-11) (-3) ] ) --- - KEYCARD _ -> noShape (setDepth 0 $ translate (-5) (-5) $ rotate (pi/2.5) keyPic) --- - MEDKIT _ -> defSPic - CRAFT _ -> defSPic - + AUTODETECTOR dt -> (noPic (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2)) +leftItemSPic :: LeftItemType -> Item -> SPic +leftItemSPic lt _ = case lt of + BLINKER -> defSPic + _ -> defSPic heldItemSPic :: HeldItemType -> Item -> SPic heldItemSPic ht it = case ht of FORCEFIELDGUN -> defSPic @@ -98,6 +99,7 @@ heldItemSPic ht it = case ht of POISONSPRAYER -> flamerPic it DRONELAUNCHER -> defSPic SHATTERGUN -> shatterGunSPic + HELDDETECTOR dt -> noPic (colorSH (detectorColor dt) $ upperPrismPoly 3 $ rectWH 2 2) modulesSPic :: Item -> SPic modulesSPic _ = mempty diff --git a/src/Dodge/Item/Equipment.hs b/src/Dodge/Item/Equipment.hs index c1bb4d874..11dfdb661 100644 --- a/src/Dodge/Item/Equipment.hs +++ b/src/Dodge/Item/Equipment.hs @@ -38,7 +38,7 @@ magShield = defaultEquipment } & itUse . eqEq . eqUse .~ useMagShield & itUse . eqEq . eqSite .~ GoesOnWrist - & itType . iyBase .~ MAGSHIELD + & itType . iyBase .~ EQUIP MAGSHIELD useMagShield :: Item -> Creature -> World -> World useMagShield it cr w = w & magnets . at mgid ?~ themagnet where @@ -57,14 +57,14 @@ flameShield :: Item flameShield = defaultEquipment { _itID = Nothing } & itUse . eqEq . eqSite .~ GoesOnChest - & itType . iyBase .~ FLAMESHIELD + & itType . iyBase .~ EQUIP FLAMESHIELD {- | Slows you down, blocks forward projectiles. -} frontArmour :: Item frontArmour = defaultEquipment { _itID = Nothing } & itUse . eqEq . eqSite .~ GoesOnChest - & itType . iyBase .~ FRONTARMOUR + & itType . iyBase .~ EQUIP FRONTARMOUR wristArmour :: Item wristArmour = defaultEquipment @@ -74,7 +74,7 @@ wristArmour = defaultEquipment & itUse . eqEq . eqOnEquip .~ onEquipWristShield & itUse . eqEq . eqUse .~ setWristShieldPos & itUse . eqEq . eqOnRemove .~ onRemoveWristShield - & itType . iyBase .~ WRISTARMOUR + & itType . iyBase .~ EQUIP WRISTARMOUR onEquipWristShield :: Item -> Creature -> World -> World onEquipWristShield itm cr w = w @@ -128,7 +128,7 @@ flatShield = defaultEquipment } , _itInvSize = 3 } - & itType . iyBase .~ FLATSHIELD + & itType . iyBase .~ EQUIP FLATSHIELD shieldWall :: Int -> Wall shieldWall crid = defaultWall @@ -196,7 +196,7 @@ jetPack = defaultEquipment { _itEffect = NoItEffect , _itID = Nothing } & itUse . eqEq . eqSite .~ GoesOnBack - & itType . iyBase .~ JETPACK + & itType . iyBase .~ EQUIP JETPACK brainHat :: Item brainHat = defaultEquipment @@ -204,7 +204,7 @@ brainHat = defaultEquipment , _itID = Nothing } & itUse . eqEq . eqSite .~ GoesOnHead - & itType . iyBase .~ BRAINHAT + & itType . iyBase .~ EQUIP BRAINHAT headLamp1 :: Item headLamp1 = defaultEquipment @@ -213,7 +213,7 @@ headLamp1 = defaultEquipment } & itUse . eqEq . eqUse .~ createHeadLamp & itUse . eqEq . eqSite .~ GoesOnHead - & itType . iyBase .~ HEADLAMP1 + & itType . iyBase .~ EQUIP HEADLAMP1 headLamp :: Item headLamp = defaultEquipment { _itEffect = NoItEffect @@ -221,7 +221,7 @@ headLamp = defaultEquipment } & itUse . eqEq . eqUse .~ createHeadLamp & itUse . eqEq . eqSite .~ GoesOnHead - & itType . iyBase .~ HEADLAMP + & itType . iyBase .~ EQUIP HEADLAMP createHeadLamp :: Item -> Creature -> World -> World @@ -234,13 +234,13 @@ powerLegs = defaultEquipment , _itID = Nothing } & itUse . eqEq . eqSite .~ GoesOnLegs - & itType . iyBase .~ POWERLEGS + & itType . iyBase .~ EQUIP POWERLEGS speedLegs :: Item speedLegs = powerLegs - & itType . iyBase .~ SPEEDLEGS + & itType . iyBase .~ EQUIP SPEEDLEGS jumpLegs :: Item jumpLegs = powerLegs - & itType . iyBase .~ JUMPLEGS + & itType . iyBase .~ EQUIP JUMPLEGS wristInvisibility :: Item wristInvisibility = defaultEquipment @@ -249,7 +249,7 @@ wristInvisibility = defaultEquipment & itUse . eqEq . eqSite .~ GoesOnWrist & itUse . eqEq . eqOnEquip .~ overCID (crCamouflage .~ Invisible) & itUse . eqEq . eqOnRemove .~ overCID (crCamouflage .~ FullyVisible) - & itType . iyBase .~ INVISIBILITYEQUIPMENT GoesOnWrist + & itType . iyBase .~ EQUIP (INVISIBILITYEQUIPMENT GoesOnWrist) overCID :: (Creature -> Creature) -> Item -> Creature -> World -> World overCID f _ cr = creatures . ix (_crID cr) %~ f diff --git a/src/Dodge/Item/Equipment/Booster.hs b/src/Dodge/Item/Equipment/Booster.hs index b3820ffe9..b89420478 100644 --- a/src/Dodge/Item/Equipment/Booster.hs +++ b/src/Dodge/Item/Equipment/Booster.hs @@ -115,7 +115,7 @@ boosterGun = defaultLeftItem , _itUse = luseInstantNoH $ boostSelfL 10 , _itEffect = resetAttachmentID } - & itType . iyBase .~ BOOSTER + & itType . iyBase .~ LEFT BOOSTER resetAttachmentID :: ItEffect resetAttachmentID = ItInvEffect f 0 where diff --git a/src/Dodge/Item/Weapon/Radar.hs b/src/Dodge/Item/Weapon/Radar.hs index 5868b83e9..b02a7f106 100644 --- a/src/Dodge/Item/Weapon/Radar.hs +++ b/src/Dodge/Item/Weapon/Radar.hs @@ -22,7 +22,7 @@ clickDetector dt = defaultWeapon ] & itUse . useAim . aimRange .~ 1 & itUse . useAim . aimZoom .~ defaultItZoom {_itZoomFac = 1} - & itType . iyBase .~ CLICKDETECTOR dt + & itType . iyBase .~ HELD (HELDDETECTOR dt) autoDetector :: Detector -> Item autoDetector dt = defaultEquipment @@ -30,7 +30,7 @@ autoDetector dt = defaultEquipment & itUse . eqEq . eqUse .~ autoEffect (detectorEffect dt) 100 click1S & itUse . eqEq . eqParams .~ EquipCounter 0 & itUse . eqEq . eqViewDist ?~ 350 - & itType . iyBase .~ AUTODETECTOR dt + & itType . iyBase .~ EQUIP (AUTODETECTOR dt) -- , _itEffect = autoRadarEffect detectorEffect :: Detector -> Item -> Creature -> World -> World diff --git a/src/Dodge/Item/Weapon/Spawn.hs b/src/Dodge/Item/Weapon/Spawn.hs index 238f8b23a..904f8008e 100644 --- a/src/Dodge/Item/Weapon/Spawn.hs +++ b/src/Dodge/Item/Weapon/Spawn.hs @@ -22,7 +22,7 @@ spawnGun cr = defaultWeapon [ ammoCheckI , hammerCheckI ] - & itType . iyBase .~ SPAWNER + & itType . iyBase .~ LEFT SPAWNER spawnCrNextTo :: Creature -- ^ Creature to spawn -> Creature -- ^ existing creature that will be spawned next to diff --git a/src/Dodge/Item/Weapon/Utility.hs b/src/Dodge/Item/Weapon/Utility.hs index af9696c6b..37cadc5d9 100644 --- a/src/Dodge/Item/Weapon/Utility.hs +++ b/src/Dodge/Item/Weapon/Utility.hs @@ -33,7 +33,7 @@ rewindGun = defaultLeftItem & lUse .~ useRewindGun & eqEq . eqSite .~ GoesOnChest } - & itType . iyBase .~ REWINDER + & itType . iyBase .~ LEFT REWINDER rewindEffect :: Item -> Creature -> World -> World rewindEffect itm cr w | Just invid == _crLeftInvSel cr = w & rewindWorlds %~ (take maxcharge . (w' : )) @@ -68,7 +68,7 @@ shrinkGun = defaultLeftItem -- , _itFloorPict = shrinkGunPic , _itAttachment = AttachBool True } - & itType . iyBase .~ SHRINKER + & itType . iyBase .~ LEFT SHRINKER shrinkGunPic :: Item -> SPic shrinkGunPic _ = noPic $ colorSH violet $ upperPrismPoly 5 $ square 5 @@ -94,11 +94,11 @@ blinkGun = defaultLeftItem & eqEq . eqSite .~ GoesOnWrist -- , _itFloorPict = const . noPic . colorSH chartreuse $ upperPrismPoly 2 $ square 2 } - & itType . iyBase .~ BLINKER + & itType . iyBase .~ LEFT BLINKER unsafeBlinkGun :: Item unsafeBlinkGun = blinkGun - & itType . iyBase .~ BLINKERUNSAFE + & itType . iyBase .~ LEFT BLINKERUNSAFE & itUse . lUse .~ hammerCheckL (shootL $ const unsafeBlinkAction) & itUse . eqEq . eqViewDist ?~ 400 diff --git a/src/Dodge/LightSource.hs b/src/Dodge/LightSource.hs index 9faa4d9e6..8a8e147f9 100644 --- a/src/Dodge/LightSource.hs +++ b/src/Dodge/LightSource.hs @@ -10,11 +10,16 @@ module Dodge.LightSource , lsPosRad , lsColPosID , makeTlsTimeRadColPos + , destroyLS ) where import Dodge.Data import Geometry.Data +import Geometry.Vector +import Geometry.Vector3D import Dodge.Default.LightSource import LensHelp +import Dodge.WorldEvent.Sound +import Dodge.Material lsPosRad :: Point3 -> Float -> LightSource lsPosRad = lsColPosRad 0.75 @@ -85,3 +90,20 @@ tlsTimeRadColPos t rmax col (V3 x y z) = TLS makeTlsTimeRadColPos :: Int -> Float -> Point3 -> Point3 -> World -> World makeTlsTimeRadColPos i rad (V3 r g b) p = tempLightSources .:~ tlsTimeRadColPos i rad (V3 r g b) p + +destroyLS :: Int -> World -> World +destroyLS lsid w = w + & lightSources . at lsid .~ Nothing + & destroyLSFlashAt p3 + & originsIDsAt [MaterialSound Glass n | n <- [0,1,2]] (destroyMatS Glass) (xyV3 p3) + where + ls = w ^?! lightSources . ix lsid + p3 = _lsPos $ _lsParam ls + +destroyLSFlashAt :: Point3 -> World -> World +destroyLSFlashAt (V3 x' y' z') = tempLightSources .:~ tlsTimeRadFunPos 20 150 intensityFunc (addZ z' p) + where + p = V2 x' y' + intensityFunc x + | x < 10 = 1 / (10 - fromIntegral x) + | otherwise = 1 diff --git a/src/Dodge/LockAndKey.hs b/src/Dodge/LockAndKey.hs index 184139a0b..3e1c1eb5c 100644 --- a/src/Dodge/LockAndKey.hs +++ b/src/Dodge/LockAndKey.hs @@ -19,22 +19,22 @@ bossKeyItems = [(return . cleatOnward <$> bossRoom autoCrit, takeOne [HELD PISTO lockRoomMultiItems :: RandomGen g => [ ( State g (MetaTree Room String) , State g [ItemBaseType] ) ] lockRoomMultiItems = - [ (blinkAcrossChallenge, takeOne [[BLINKERUNSAFE,AUTODETECTOR WALLDETECTOR] - ,[BLINKERUNSAFE,CLICKDETECTOR WALLDETECTOR] + [ (blinkAcrossChallenge, takeOne [[LEFT BLINKERUNSAFE,EQUIP $ AUTODETECTOR WALLDETECTOR] + ,[LEFT BLINKERUNSAFE,HELD $ HELDDETECTOR WALLDETECTOR] ] ) ] lockRoomKeyItems :: RandomGen g => [ (Int -> State g (MetaTree Room String) , State g ItemBaseType ) ] lockRoomKeyItems = - [(lasCenSensEdge, takeOne [HELD LAUNCHER,HELD LASGUN,HELD SPARKGUN,FLATSHIELD,HELD FORCEFIELDGUN] ) + [(lasCenSensEdge, takeOne [HELD LAUNCHER,HELD LASGUN,HELD SPARKGUN,EQUIP FLATSHIELD,HELD FORCEFIELDGUN] ) ,(sensorRoomRunPast ELECTRICAL, takeOne [CRAFT STATICMODULE,HELD SPARKGUN] ) ,(sensorRoomRunPast FLAMING, takeOne [HELD FLAMESPITTER, CRAFT INCENDIARYMODULE] ) ,(sensorRoomRunPast LASERING, return $ HELD LASGUN ) ,(const slowDoorRoomRunPast, return $ HELD (MINIGUNX 3)) - ,(const longRoomRunPast, takeOne [HELD SNIPERRIFLE,FLATSHIELD]) + ,(const longRoomRunPast, takeOne [HELD SNIPERRIFLE,EQUIP FLATSHIELD]) ,(const glassLessonRunPast, takeOne [HELD LASGUN]) - ,(const $ lasTunnelRunPast 400, takeOne [FLATSHIELD,HELD FORCEFIELDGUN]) + ,(const $ lasTunnelRunPast 400, takeOne [EQUIP FLATSHIELD,HELD FORCEFIELDGUN]) ,(keyCardRoomRunPast 0, return (KEYCARD 0)) ] keyCardRunPastRand :: RandomGen g => [ (Int -> State g (MetaTree Room String) , State g ItemBaseType ) ] @@ -63,7 +63,7 @@ itemRooms = [rc $ map makeTypeCraft [LIGHTER,PUMP,CAN] ] ) - , (FLATSHIELD , join $ takeOne + , (EQUIP FLATSHIELD , join $ takeOne [rc $ map makeTypeCraft [PLATE,PLATE] ,rc $ map makeTypeCraft [DRUM,DRUM,PLATE] ] diff --git a/src/Dodge/WorldEvent/Flash.hs b/src/Dodge/WorldEvent/Flash.hs index 2603082e4..3ed5a4a07 100644 --- a/src/Dodge/WorldEvent/Flash.hs +++ b/src/Dodge/WorldEvent/Flash.hs @@ -45,6 +45,7 @@ flareCircleAt col alphax tranv = flares .:~ CircFlare , _flareTran3 = tranv } + explosionFlashAt :: Point2 -> World -> World explosionFlashAt p = tempLightSources .:~ tlsTimeRadFunPos 20 150 intensityFunc (addZ 20 p) where