Tweak longRoom
This commit is contained in:
@@ -68,10 +68,6 @@ anoToRoomTree anos = case anos of
|
||||
a <- takeOne as
|
||||
anoToRoomTree a
|
||||
[Corridor] -> pure . UseAll <$> shuffleLinks corridor
|
||||
[FirstWeapon] -> do
|
||||
branchWP <- branchRectWith weaponRoom
|
||||
blockedC <- longBlockedCorridor 3
|
||||
join $ takeOne $ return (passUntilUseAll branchWP [blockedC]) : replicate 5 weaponRoom
|
||||
(SpecificRoom rt:_) -> rt
|
||||
(BossAno cr : _) -> do
|
||||
br <- bossRoom cr
|
||||
|
||||
@@ -12,7 +12,6 @@ data Annotation g
|
||||
| Key Int
|
||||
| Corridor
|
||||
| AirlockAno
|
||||
| FirstWeapon
|
||||
| OrAno [[Annotation g]]
|
||||
| SpecificRoom (State g (SubCompTree Room))
|
||||
| BossAno Creature
|
||||
|
||||
@@ -128,7 +128,7 @@ mntLSCond :: (Point2 -> Point3 -> Shape)
|
||||
-> PlacementSpot
|
||||
-> Placement
|
||||
mntLSCond shp ps = -- updatePSToLevel 1 (const $ PSLnk shift (const id) Nothing) $
|
||||
mntLS shp 0 (V3 0 (-20) 96)
|
||||
mntLS shp 0 (V3 0 (-20) 95)
|
||||
& plSpot .~ ps
|
||||
-- note that this perhaps pushes the vshape light out too far
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import Dodge.Tree
|
||||
import Dodge.Default.Wall
|
||||
import Dodge.LevelGen.Data
|
||||
import Dodge.Placement.Instance
|
||||
--import Dodge.Room.Link
|
||||
import Dodge.Room.Link
|
||||
import Dodge.Room.Door
|
||||
import Dodge.Room.Corridor
|
||||
import Dodge.Room.Procedural
|
||||
@@ -32,7 +32,6 @@ longRoom :: RandomGen g => State g Room
|
||||
longRoom = do
|
||||
h <- state $ randomR (1500,1500)
|
||||
let w = 75
|
||||
let cond x = (sndV2 . fst) x < h - 40
|
||||
let wlsNSEWs wln wls listew = [sps0 $ PutWall (rectNSWE wln wls wallw walle) defaultCrystalWall
|
||||
| (wallw,walle) <- listew ]
|
||||
let ws = wlsNSEWs (h-35) (h-135) [(-10,10) , (15,35) , (40,60) , (65,85)]
|
||||
@@ -40,9 +39,11 @@ longRoom = do
|
||||
brlN <- state $ randomR (0,5)
|
||||
brlOffsets <- replicateM brlN $ randInRect (w-20) 900
|
||||
let brls = [ sPS (p +.+ V2 10 200) 0 $ PutCrit explosiveBarrel | p <- brlOffsets ]
|
||||
let rm = roomRect w (h+70) 1 1 & rmPolys .++~ [rectNSWE h (h-165) (-45) (w+45)]
|
||||
rm <- shuffleLinks $ roomRect w (h+70) 1 1 & rmPolys .++~ [rectNSWE h (h-165) (-45) (w+45)]
|
||||
& rmFloor .~ InheritFloor
|
||||
return $ restrictInLinks cond $ rm & rmPmnts .~ ws ++ brls ++ wsDefense ++
|
||||
return $ restrictInLinks (\x -> (sndV2 . fst) x < 40)
|
||||
$ restrictOutLinks (\x -> (sndV2 . fst) x > h * 0.75)
|
||||
$ rm & rmPmnts .~ ws ++ brls ++ wsDefense ++
|
||||
[sPS (V2 crx (h-25)) 0 $ PutCrit longCrit
|
||||
| crx <- [12.5,37.5,62.5] ] ++
|
||||
[sPS (V2 25 lampy ) 0 putLamp | lampy <- [20,h-10] ]
|
||||
|
||||
@@ -293,13 +293,13 @@ deadEndRoom = defaultRoom
|
||||
where
|
||||
lnks = [(V2 0 30 ,0) ]
|
||||
{- A random Either tree with a weapon and melee monster challenge. -}
|
||||
weaponRoom :: RandomGen g => State g (SubCompTree Room)
|
||||
weaponRoom = join $ takeOne
|
||||
-- [ weaponEmptyRoom
|
||||
[ weaponUnderCrits 0
|
||||
-- , weaponBehindPillar
|
||||
-- , weaponBetweenPillars
|
||||
-- , weaponLongCorridor
|
||||
weaponRoom :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
weaponRoom i = join $ takeOne
|
||||
[ weaponEmptyRoom
|
||||
, weaponUnderCrits i
|
||||
, weaponBehindPillar
|
||||
, weaponBetweenPillars
|
||||
, weaponLongCorridor
|
||||
]
|
||||
|
||||
roomCCrits :: RandomGen g => State g Room
|
||||
|
||||
+12
-13
@@ -50,13 +50,12 @@ powerFakeout = do
|
||||
|
||||
startRoom :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
startRoom i = join $ uncurry takeOneWeighted $ unzip
|
||||
-- [ (,) (0.5::Float) $ chainUses <$> sequence [powerFakeout,weaponRoom]
|
||||
-- , (,) one rezBoxesWp
|
||||
-- , (,) one rezBoxesThenWeaponRoom
|
||||
[ (,) one rezBoxThenWeaponRoom
|
||||
-- , (,) one rezBoxesWpCrit
|
||||
-- , (,) 1 $ runPastStart i
|
||||
-- , (,) 1 $ startCrafts >>= roomsContaining [] >>= rezBoxThenRooms
|
||||
[ (,) (0.5::Float) $ chainUses <$> sequence [powerFakeout,weaponRoom i]
|
||||
, (,) one rezBoxesWp
|
||||
, (,) one (rezBoxThenWeaponRoom i)
|
||||
, (,) one rezBoxesWpCrit
|
||||
, (,) 1 $ runPastStart i
|
||||
, (,) 1 $ startCrafts >>= roomsContaining [] >>= rezBoxThenRooms
|
||||
]
|
||||
where
|
||||
one = 1::Float
|
||||
@@ -78,16 +77,16 @@ rezBoxStart = do
|
||||
ls <- rezColor
|
||||
return $ treeFromPost [PassDown $ rezBox ls] (UseAll door)
|
||||
|
||||
rezBoxesThenWeaponRoom :: RandomGen g => State g (SubCompTree Room)
|
||||
rezBoxesThenWeaponRoom = do
|
||||
rezBoxesThenWeaponRoom :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
rezBoxesThenWeaponRoom i = do
|
||||
rboxes <- rezBoxes
|
||||
wroom <- weaponRoom
|
||||
wroom <- weaponRoom i
|
||||
return $ rboxes `passUntilUseAll` [wroom]
|
||||
|
||||
rezBoxThenWeaponRoom :: RandomGen g => State g (SubCompTree Room)
|
||||
rezBoxThenWeaponRoom = do
|
||||
rezBoxThenWeaponRoom :: RandomGen g => Int -> State g (SubCompTree Room)
|
||||
rezBoxThenWeaponRoom i = do
|
||||
rcol <- rezColor
|
||||
treeFromTrunk [PassDown $ rezBox rcol,PassDown door] <$> weaponRoom
|
||||
treeFromTrunk [PassDown $ rezBox rcol,PassDown door] <$> weaponRoom i
|
||||
|
||||
rezBoxThenRoom :: RandomGen g => Room -> State g (SubCompTree Room)
|
||||
rezBoxThenRoom r = do
|
||||
|
||||
Reference in New Issue
Block a user