Cleanup
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user