Add shrinkability and cursed items

This commit is contained in:
2021-11-18 18:30:22 +00:00
parent 147d6098ab
commit a546d070f0
82 changed files with 273 additions and 233 deletions
+9 -4
View File
@@ -74,15 +74,20 @@ blockedCorridor = do
sequence $ treeFromPost [] $ return $ Right $ set rmPmnts plmnts corridor
dirtPoly :: [Point2] -> PSType
dirtPoly = PutBlock DirtBlock [1] (V4 (150/256) ( 75/256) 0 ( 250/256)) . reverse
dirtPoly = PutBlock DirtBlock [1] dirtWall . reverse
-- | A single corridor with a destructible block blocking it.
blockedCorridor' :: RandomGen g => State g Room
blockedCorridor' = do
r <- state $ randomR (0,pi)
theblocks <- takeOne [ [sPS (V2 20 40) r $ dirtPoly $ reverse $ square 10]
, [ sPS (V2 5 40) r $ dirtPoly $ square 10
, sPS (V2 35 40) (r+0.5) $ dirtPoly $ square 10
theblocks <- takeOne
[ -- [sPS (V2 20 40) r $ dirtPoly $ square 10]
--, [ sPS (V2 5 40) r $ dirtPoly $ square 10
-- , sPS (V2 35 40) (r+0.5) $ dirtPoly $ square 10
-- ]
--,
[ sPS (V2 5 50) r $ dirtPoly $ square 10
, sPS (V2 35 35) (r+0.5) $ dirtPoly $ square 10
]
]
return $ corridor & rmPmnts .~ theblocks