Redo tree composition

This commit is contained in:
2022-06-10 00:08:32 +01:00
parent 3edc7a0a58
commit 5532c25d3c
13 changed files with 114 additions and 52 deletions
+9 -7
View File
@@ -4,6 +4,7 @@
module Dodge.Floor
( initialRoomTree
) where
import Dodge.UseAll
--import Geometry.Data
--import Dodge.Data
import Dodge.LockAndKey
@@ -39,17 +40,18 @@ initialAnoTree = padSucWithDoors $ treeFromPost
[[AnoApplyInt 0 startRoom]
, [PassthroughLockKeyLists 2 keyCardRunPastRand itemRooms]
, [SpecificRoom $ warningRooms 7]
, [SpecificRoom $ return (return . useAll $ roomRectAutoLinks 400 400
& rmPmnts .++~ [spNoID anyUnusedSpot (PutCrit invisibleChaseCrit)
, [SpecificRoom $ return ( toOnward "chaseCrit+armourChaseCrit rectRoom"
, return . useAll $ roomRectAutoLinks 400 400
& rmPmnts .++~ [spNoID anyUnusedSpot (PutCrit invisibleChaseCrit)
, spNoID anyUnusedSpot (PutCrit armourChaseCrit)
]
, TreeSubLabelling "chaseCrit+armourChaseCrit rectRoom" Nothing)
)
]
-- , [AnoApplyInt 100 healthTest]
, [PassthroughLockKeyLists 23
[(sensorRoomRunPast ELECTRICAL, takeOne [STATICMODULE,SPARKGUN] )] itemRooms]
, [SpecificRoom ((return . useAll <$> tanksRoom [] [])
<&> (, TreeSubLabelling "empty tanksRoom" Nothing))]
<&> (toOnward "empty tanksRoom",))]
, [PassthroughLockKeyLists 222 lockRoomKeyItems itemRooms]
, [SpecificRoom randomChallenges]
, [AnoApplyInt 1 lasSensorTurretTest]
@@ -94,11 +96,11 @@ initialAnoTree = padSucWithDoors $ treeFromPost
-- ,[TreasureAno [addArmour autoCrit,addArmour autoCrit] [launcher]]
-- ,[Corridor]
,[SpecificRoom $ (pure . useAll <$> randomFourCornerRoom [])
<&>(,TreeSubLabelling "randomFourCornerRoom" Nothing )]
<&>(toOnward "randomFourCornerRoom" , )]
]
[SpecificRoom $ fmap (pure . useAll) (telRoomLev 1)
<&> (,TreeSubLabelling "telRoomLev" Nothing)]
<&> (toOnward "telRoomLev" ,)]
{- | A test level tree. -}
initialRoomTree :: State StdGen (Tree (Room -> Maybe (String,Room), Tree Room))
initialRoomTree :: State StdGen (Tree (Room -> Maybe ([String],Room), Tree Room))
initialRoomTree = mapM anoToRoomTree initialAnoTree