Tweak start rooms

This commit is contained in:
2021-11-26 14:40:32 +00:00
parent 040849a550
commit b0f89db66e
5 changed files with 19 additions and 17 deletions
-2
View File
@@ -46,7 +46,6 @@ generateLevelFromRoomList gr' w
. doPartialPlacements
. doExtendedPlacements
. doIndividualPlacements
-- . flip (mapAccumR doRoomPlacements) (IM.elems rs')
. setFloors
. worldToGenWorld rs'
$ w { _walls = wallsFromRooms rs
@@ -207,7 +206,6 @@ gameRoomsFromRooms = fmap gameRoomFromRoom
gameRoomFromRoom :: Room -> GameRoom
gameRoomFromRoom rm = GameRoom
{ _grViewpoints = map doshift $ _rmViewpoints rm ++ (map fst . foldl' (flip cutWalls) [] $ _rmPolys rm)
-- ++ map fst (_rmLinks rm)
, _grViewpointsEx = concatMap unpos (_rmPos rm)
, _grBound = map doshift $ expandPolyCorners 50 . convexHullSafe . nubBy closePoints
. concat $ _rmBound rm ++ _rmPolys rm
+1 -1
View File
@@ -72,7 +72,7 @@ rezBoxesWpCrit = do
--horedge <- takeOne [OnEdge North,OnEdge South]
let centralRoom = (roomRectAutoLinks w h) {_rmPmnts = []}
onwardpassage <-
(applyToCompRoot (rmConnectsTo .~ S.singleton (OnEdge West))) <$> maybeBlockedPassage
applyToCompRoot (rmConnectsTo .~ S.singleton (OnEdge West)) <$> maybeBlockedPassage
let bottomEdgeTest (V2 _ y,_) = y < 1
aroom = rezInvBox thecol
let n = length $ filter bottomEdgeTest $ map lnkPosDir $ _rmLinks centralRoom
+5 -5
View File
@@ -355,11 +355,11 @@ deadEndRoom = defaultRoom
{- A random Either tree with a weapon and melee monster challenge. -}
weaponRoom :: RandomGen g => State g (SubCompTree Room)
weaponRoom = join $ takeOne
[-- weaponEmptyRoom
weaponUnderCrits
-- weaponBehindPillar
-- weaponBetweenPillars
--, weaponLongCorridor
[ weaponEmptyRoom
, weaponUnderCrits
, weaponBehindPillar
, weaponBetweenPillars
, weaponLongCorridor
]
roomCCrits :: RandomGen g => State g Room
+7 -2
View File
@@ -24,6 +24,7 @@ import Geometry.Data
import Color
--import Shape
import qualified Data.Set as S
import Data.Tree
import Control.Monad.State
import Control.Lens
@@ -57,8 +58,9 @@ runPastRoom i = do
thels <- roomCritLS
--theweapon <- join $ takeOne [randBlockBreakWeapon,return grenade]
theweapon <- randBlockBreakWeapon
cenroom <- changeLinkFrom theedgetest
cenroom <- shuffleLinks $ restrictRMInLinksPD (\(V2 _ y,_) -> y < 1)
$ roomRectAutoLinks 40 h & rmPmnts .~ [plRRpt 0 (PutFlIt theweapon)]
theedge <- takeOne [West,East]
--let cenroom = filterSortOutLinksOn theedgetest ((\(V2 a b) -> (a,b)) . fst)
let linkcor = critRoom {_rmPmnts =
[ spanLS thels (V2 0 65) (V2 40 65)
@@ -76,4 +78,7 @@ runPastRoom i = do
critrooms :: [SubCompTree Room]
critrooms = treeFromPost [PassDown switchdoor] (PassDown critroom) :
replicate (n-2) (treeFromPost [PassDown switchdoor] (PassDown linkcor))
return $ Node (PassDown cenroom) (controom : critrooms ++ [return $ PassDown aswitchroom])
return $ Node (PassDown cenroom)
(map (applyToCompRoot $ rmConnectsTo .~ S.singleton (OnEdge theedge)) (controom : critrooms)
++ [return $ PassDown aswitchroom]
)
+6 -7
View File
@@ -65,15 +65,14 @@ room2 :: RandomGen g => Int -> State g (SubCompTree Room)
room2 = lasCenSensEdge
startRoom :: RandomGen g => Int -> State g (SubCompTree Room)
--startRoom i = join $ takeOne
startRoom _ = join $ takeOne
startRoom i = join $ takeOne
[-- roomMiniIntro
--minigunfakeout
-- rezBoxesWp
rezBoxesThenWeaponRoom
-- , rezBoxThenWeaponRoom
-- rezBoxesWpCrit
-- , runPastStart i
rezBoxesWp
, rezBoxesThenWeaponRoom
, rezBoxThenWeaponRoom
, rezBoxesWpCrit
, runPastStart i
]
runPastStart :: RandomGen g => Int -> State g (SubCompTree Room)