Move towards better annotations when generating layouts

This commit is contained in:
2022-05-20 11:14:11 +01:00
parent 887dd547d9
commit 1739d648fe
6 changed files with 52 additions and 29 deletions
+8 -7
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE TupleSections #-}
module Dodge.Room.Room where
import Data.Tile
import Dodge.Data
@@ -200,7 +201,7 @@ weaponUnderCrits i = do
let plmnts =
[--sPS (V2 20 0) 0 $ RandPS randFirstWeapon
sPS (V2 20 0) (negate $ pi/2) randC1
,sPS (V2 20 20) (negate $ pi/2) randC1
,sPS (V2 20 20) ( pi/2) randC1
]
addwpat p = rmPmnts .:~ PickOnePlacement i (sPS p 0 $ RandPS randFirstWeapon)
let continuationRoom = treeFromTrunk
@@ -288,13 +289,13 @@ deadEndRoom = defaultRoom
where
lnks = [(V2 0 30 ,0) ]
{- A random Either tree with a weapon and melee monster challenge. -}
weaponRoom :: RandomGen g => Int -> State g (SubCompTree Room)
weaponRoom :: RandomGen g => Int -> State g (SubCompTree Room, String)
weaponRoom i = join $ takeOne
[ weaponEmptyRoom
, weaponUnderCrits i
, weaponBehindPillar
, weaponBetweenPillars
, weaponLongCorridor
[ weaponEmptyRoom <&> (, "weaponEmptyRoom")
, weaponUnderCrits i<&> (, "weaponUnderCrits")
, weaponBehindPillar<&> (, "weaponBehindPillar")
, weaponBetweenPillars<&> (, "weaponBetweenPillars")
, weaponLongCorridor<&> (, "weaponLongCorridor")
]
roomCCrits :: RandomGen g => State g Room