Allow for random choice between placements in different rooms
This commit is contained in:
@@ -49,7 +49,7 @@ rezBoxesWp = do
|
||||
let aroom = rezInvBox thecol -- & rmConnectsTo .~ S.singleton (OnEdge North)
|
||||
let isnorth = S.member (OnEdge North) . _rlType
|
||||
centralRoom <- shuffleLinks $(roomRectAutoLinks w h) {_rmPmnts = []}
|
||||
& rmLinks %~ (setLinkType InLink isnorth)
|
||||
& rmLinks %~ setLinkType InLink isnorth
|
||||
onwardpassage <- maybeBlockedPassage
|
||||
let n = length $ getLinksOfType (OnEdge North) $ _rmLinks centralRoom
|
||||
let rezrooms = map adddoor
|
||||
@@ -71,8 +71,8 @@ rezBoxesWpCrit = do
|
||||
theweapon <- randBlockBreakWeapon
|
||||
--horedge <- takeOne [OnEdge North,OnEdge South]
|
||||
let centralRoom = (roomRectAutoLinks w h) {_rmPmnts = []}
|
||||
onwardpassage <- fmap
|
||||
(applyToCompRoot (rmConnectsTo .~ S.singleton (OnEdge West))) $ maybeBlockedPassage
|
||||
onwardpassage <-
|
||||
(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
|
||||
@@ -123,7 +123,6 @@ rezBoxes = do
|
||||
, PassDown door
|
||||
]
|
||||
(Node (PassDown centralRoom') (replicate (n-1) dbox ++ [Node (UseAll door) []]))
|
||||
where
|
||||
|
||||
|
||||
rezColor :: RandomGen g => State g LightSource
|
||||
|
||||
Reference in New Issue
Block a user