Tweak starting rooms
This commit is contained in:
+33
-27
@@ -121,9 +121,13 @@ door = Room
|
||||
]
|
||||
roomPillars :: Room
|
||||
roomPillars = over rmLinks init $ set rmPS plmnts $ roomRect' 240 240 2 2
|
||||
where plmnts = g 180 150 90 60
|
||||
f a x b y = putBlockRect a x b y
|
||||
g a b c d = f a b a b ++ f a b c d ++ f c d a b ++ f c d c d
|
||||
where
|
||||
plmnts = PS (120,120) 0 putLamp
|
||||
: PS (10,10) 0 putLamp
|
||||
: PS (230,230) 0 putLamp
|
||||
: g 180 150 90 60
|
||||
f a x b y = putBlockRect a x b y
|
||||
g a b c d = f a b a b ++ f a b c d ++ f c d a b ++ f c d c d
|
||||
|
||||
|
||||
putBlockRect a x b y = [ blockLine (a,b) (a,y)
|
||||
@@ -269,8 +273,8 @@ roomMiniIntro = fmap (g . expandTreeBy f) $ sequence $ treePost
|
||||
roomCenterPillar :: RandomGen g => State g Room
|
||||
roomCenterPillar = changeLinkTo ((\p -> dist p (120,0) < 10) . fst)
|
||||
$ set rmPS plmnts $ roomRect' 240 240 2 2
|
||||
where plmnts = [ blockLine (110,110) (110,130)
|
||||
, blockLine (130,110) (130,130)
|
||||
where plmnts = [ blockLine (115,115) (115,125)
|
||||
, blockLine (125,115) (125,125)
|
||||
, PS (40,120) 0 putLamp
|
||||
, PS (200,120) 0 putLamp
|
||||
]
|
||||
@@ -336,21 +340,23 @@ weaponEmptyRoom = do
|
||||
$ set rmPS plmnts $ roomRect' w h 2 2)
|
||||
|
||||
|
||||
--weaponUnderCrits :: RandomGen g => State g (Tree (Either Room Room))
|
||||
--weaponUnderCrits = do
|
||||
-- let plmnts = [PS (0,0) 0 $ RandPS randFirstWeapon
|
||||
-- ,PS (-5,0) (0-pi/2) $ randC1
|
||||
-- ,PS (5,20) (0-pi/2) $ randC1
|
||||
-- ]
|
||||
-- let continuationRoom = treeTrunk [Left corridorN,Left corridorN]
|
||||
-- (connectRoom (set rmPS plmnts $ corridorN))
|
||||
-- deadEndRoom <- takeOne [roomSquare,roomPillars,roomVs,roomCenterPillar]
|
||||
-- junctionRoom <- takeOne [Left corridorE,Left corridorW]
|
||||
-- return $ treeTrunk [Left corridorN,Left corridorN]
|
||||
-- $ Node junctionRoom
|
||||
-- [continuationRoom
|
||||
-- ,deadRoom deadEndRoom
|
||||
-- ]
|
||||
weaponUnderCrits :: RandomGen g => State g (Tree (Either Room Room))
|
||||
weaponUnderCrits = do
|
||||
let plmnts = [PS (20,0) 0 $ RandPS randFirstWeapon
|
||||
,PS (20,0) (0-pi/2) $ randC1
|
||||
,PS (20,20) (0-pi/2) $ randC1
|
||||
]
|
||||
let continuationRoom = treeTrunk [Left corridorN,Left corridorN]
|
||||
(connectRoom (set rmPS plmnts $ corridorN))
|
||||
rcp' <- roomCenterPillar
|
||||
let rcp = over rmPS ( PS (120,80) 0 putLamp : ) rcp'
|
||||
deadEndRoom <- takeOne [roomPillars,rcp]
|
||||
junctionRoom <- takeOne [Left tEast,Left tWest]
|
||||
return $ treeTrunk [Left corridorN,Left corridorN]
|
||||
$ Node junctionRoom
|
||||
[continuationRoom
|
||||
,deadRoom deadEndRoom
|
||||
]
|
||||
|
||||
|
||||
weaponBehindPillar :: RandomGen g => State g (Tree (Either Room Room))
|
||||
@@ -394,8 +400,8 @@ weaponLongCorridor :: RandomGen g => State g (Tree (Either Room Room))
|
||||
weaponLongCorridor = do
|
||||
root <- takeOne $ [tEast, tWest]
|
||||
connectingRoom <- takeOne
|
||||
[--tEast & rmPS .~ [PS (-40,60) 0 $ putLamp]
|
||||
tWest & rmPS .~ [PS (40,60) 0 $ putLamp]
|
||||
[tEast & rmPS .~ [PS (-40,60) 0 $ putLamp]
|
||||
,tWest & rmPS .~ [PS ( 40,60) 0 $ putLamp]
|
||||
]
|
||||
i1 <- state $ randomR (2,5)
|
||||
i2 <- state $ randomR (2,5)
|
||||
@@ -427,11 +433,11 @@ deadEndRoom = Room
|
||||
|
||||
weaponRoom :: RandomGen g => State g (Tree (Either Room Room))
|
||||
weaponRoom = do
|
||||
x <- takeOne --[weaponEmptyRoom
|
||||
--, weaponUnderCrits
|
||||
--, weaponBehindPillar
|
||||
--, weaponBetweenPillars
|
||||
[ weaponLongCorridor
|
||||
x <- takeOne [ weaponEmptyRoom
|
||||
, weaponUnderCrits
|
||||
, weaponBehindPillar
|
||||
, weaponBetweenPillars
|
||||
, weaponLongCorridor
|
||||
]
|
||||
x
|
||||
|
||||
|
||||
Reference in New Issue
Block a user