Add boss room, tweak launchers
This commit is contained in:
@@ -3,15 +3,16 @@ Annotating tree structures with desired properties for rooms.
|
||||
-}
|
||||
module Dodge.Layout.Tree.Annotate
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.RandomHelp
|
||||
import Dodge.Layout.Tree.Polymorphic
|
||||
import Dodge.Layout.Tree.Either
|
||||
import Dodge.Room.Procedural
|
||||
import Dodge.Room.Boss
|
||||
import Dodge.Room.Link
|
||||
import Dodge.Room.Data
|
||||
import Dodge.Room
|
||||
import Dodge.Room.Teleport
|
||||
--import Dodge.Floor
|
||||
|
||||
import Data.Tree
|
||||
import Control.Monad.State
|
||||
@@ -30,6 +31,7 @@ data Annotation g
|
||||
| EndRoom
|
||||
| OrAno [[Annotation g]]
|
||||
| SpecificRoom (State g (Tree (Either Room Room)))
|
||||
| BossAno Creature
|
||||
|
||||
addLock :: RandomGen g => Int -> Tree [Annotation g] -> State g (Tree [Annotation g])
|
||||
addLock i t = do
|
||||
@@ -68,6 +70,7 @@ annoToRoomTree [StartRoom] = do
|
||||
h <- state $ randomR (200,400)
|
||||
fmap (pure . Right) $ randomiseOutLinks (shiftRoomBy ((-20,-20),0) $ roomRectAutoLinks w h)
|
||||
annoToRoomTree (SpecificRoom rt:_) = rt
|
||||
annoToRoomTree (BossAno cr : _) = branchRectWith . fmap (pure . Left) $ bossRoom cr
|
||||
annoToRoomTree _ = do
|
||||
w <- state $ randomR (100,400)
|
||||
h <- state $ randomR (200,400)
|
||||
|
||||
Reference in New Issue
Block a user