35 lines
1.2 KiB
Haskell
35 lines
1.2 KiB
Haskell
-- | Rooms that can be successfully tackled without having any items.
|
|
module Dodge.Room.NoNeedWeapon (
|
|
centerVaultExplosiveExit,
|
|
) where
|
|
|
|
import Control.Lens
|
|
import Dodge.Creature
|
|
import Dodge.Data.GenWorld
|
|
import Dodge.LevelGen.PlacementHelper
|
|
import Dodge.Room.Procedural
|
|
import Geometry.Data
|
|
import RandomHelp
|
|
|
|
{- |
|
|
A room designed to be /passable/ with no weapons.
|
|
Highlights an issue: when trying to place next door rooms, if the level generation fails it will try a different link.
|
|
So if there are multiple such, we cannot assume that a given link will be chosen.
|
|
To solve this, here we delete unwanted links.
|
|
-}
|
|
centerVaultExplosiveExit ::
|
|
RandomGen g =>
|
|
State g Room
|
|
centerVaultExplosiveExit = do
|
|
cr <- takeOne [miniGunCrit, autoCrit]
|
|
let extraPS =
|
|
[ sPS (V2 0 110) 0 $ PutCrit explosiveBarrel
|
|
, sPS (V2 5 115) 0 $ PutCrit explosiveBarrel
|
|
, sPS (V2 0 120) 0 $ PutCrit explosiveBarrel
|
|
, sPS (V2 0 0) 0 $ PutCrit cr
|
|
]
|
|
centerVaultRoom 120 120 50 <&> rmPmnts %~ (extraPS ++)
|
|
|
|
--r <- centerVaultRoom 120 120 50 <&> rmPmnts %~ (extraPS ++)
|
|
--randomiseLinksBy shuffleTail r <&> rmOutLinks %~ take 2
|