This commit is contained in:
2022-06-19 22:26:34 +01:00
parent 8d81104f5f
commit e838f270f2
2 changed files with 6 additions and 14 deletions
+2 -2
View File
@@ -24,12 +24,12 @@ roomsContaining crs its = tToBTree str <$> roomsContaining' crs its
roomsContaining' :: RandomGen g => [Creature] -> [Item] -> State g (Tree Room)
roomsContaining' crs its = do
endroom <- join $ takeOne
[ roomPillarsSquare <&> rmPmnts .++~ crsItmsUnused crs its
[ roomPillarsSquare <&> rmPmnts ++.~ crsItmsUnused crs its
, randomFourCornerRoomCrsIts crs its
, tanksRoom crs its
, tanksPipesRoom <&> rmPmnts ++.~ crsItmsUnused crs its
, roomPillarsContaining crs its
, roomPillarsPassage <&> rmPmnts .++~ crsItmsUnused crs its
, roomPillarsPassage <&> rmPmnts ++.~ crsItmsUnused crs its
]
return (pure $ cleatOnward endroom)
+4 -12
View File
@@ -15,7 +15,6 @@ import Dodge.Data
import Dodge.PlacementSpot
import Dodge.RoomLink
import Dodge.Default.Room
import Dodge.Item.Weapon
import Dodge.Creature
import Dodge.Room.Pillar
import Dodge.Room.Girder
@@ -24,6 +23,7 @@ import Dodge.LevelGen.Data
import RandomHelp
import Dodge.Tree
import Dodge.Placement.Instance
import Dodge.Placement.Random
--import Dodge.LevelGen.Data
import Dodge.Room.Procedural
import Dodge.Room.Corridor
@@ -130,21 +130,13 @@ roomCenterPillar = do
, mntLightLnkCond (resetPLUse $ rprBool $ \rp _ -> isOutLnk rp)
]
{- Probabilites of the type of the first floor weapon. -}
randFirstWeapon :: State StdGen Item
randFirstWeapon = takeOne $
replicate 10 pistol
++ replicate 5 (bangStick 4)
++ replicate 5 (bangCaneX 3)
++ replicate 5 bangCone
++ [lasGun]
weaponEmptyRoom :: RandomGen g => State g (Tree Room)
weaponEmptyRoom :: State StdGen (Tree Room)
weaponEmptyRoom = do
w <- state $ randomR (220,300)
h <- state $ randomR (220,300)
wp <- randFirstWeapon
let plmnts =
[sPS (V2 (w/2) (h-40)) 0 $ RandPS $ fmap PutFlIt randFirstWeapon
[sPS (V2 (w/2) (h-40)) 0 $ PutFlIt wp
,sPS (V2 20 20) (pi/2) randC1
,sPS (V2 (w-20) 20) (pi/2) randC1
,mntLightLnkCond useUnusedLnk