Start to migrate all old level generation to MetaTrees

This commit is contained in:
2022-06-12 19:31:57 +01:00
parent 617765d5d4
commit dbba78ef05
9 changed files with 57 additions and 93 deletions
+3 -3
View File
@@ -38,7 +38,7 @@ import Data.List (intersperse)
initialAnoTree :: Annotation
initialAnoTree = OnwardList
$ intersperse (SpecificRoom $ (tToBTree . pure) <$> shuffleLinks (cleatOnward corridor))
$ intersperse (SpecificRoom $ tToBTree . pure <$> shuffleLinks (cleatOnward corridor))
[ IntAnno $ SpecificRoom . startRoom
-- , (SpecificRoom . return . tToBTree $ treePost [corridor,corridor,cleatOnward corridor])
, IntAnno $ PassthroughLockKeyLists
@@ -50,7 +50,7 @@ initialAnoTree = OnwardList
[ spNoID anyUnusedSpot (PutCrit invisibleChaseCrit)
, spNoID anyUnusedSpot (PutCrit armourChaseCrit)
]
-- , [AnoApplyInt 100 healthTest]
, IntAnno $ SpecificRoom . fmap tToBTree . healthTest
, SpecificRoom (tanksRoom [] [] >>= rToOnward "empty tanksRoom" . pure . cleatOnward)
, IntAnno $ PassthroughLockKeyLists lockRoomKeyItems itemRooms
, SpecificRoom randomChallenges
@@ -101,4 +101,4 @@ initialAnoTree = OnwardList
{- | A test level tree. -}
initialRoomTree :: State (StdGen,Int) (MetaTree Room)
initialRoomTree = annoToRoomTree' initialAnoTree
initialRoomTree = annoToRoomTree initialAnoTree