Add key card item lock/key system
This commit is contained in:
+14
-8
@@ -7,6 +7,7 @@ import Dodge.RandomHelp
|
||||
import Dodge.Creature
|
||||
import Dodge.Item.Craftable
|
||||
import Dodge.Item.Weapon.BulletGun.Rod
|
||||
import Dodge.Item
|
||||
--import Dodge.Item.Equipment
|
||||
|
||||
import System.Random
|
||||
@@ -14,14 +15,15 @@ import Control.Monad.State
|
||||
|
||||
lockRoomKeyItems :: RandomGen g => [ (Int -> State g (SubCompTree Room) , State g CombineType ) ]
|
||||
lockRoomKeyItems =
|
||||
[(lasCenSensEdge, takeOne [LAUNCHER,LASGUN,SPARKGUN,FLATSHIELD] )
|
||||
,(sensorRoomRunPast Electrical, return SPARKGUN )
|
||||
,(sensorRoomRunPast Flaming, return FLAMESPITTER )
|
||||
,(sensorRoomRunPast Lasering, return LASGUN )
|
||||
,(const slowDoorRoomRunPast, return MINIGUN)
|
||||
,(const longRoomRunPast, takeOne [SNIPERRIFLE,FLATSHIELD])
|
||||
,(const glassLessonRunPast, takeOne [LASGUN])
|
||||
,(const $ lasTunnelRunPast 400, return FLATSHIELD)
|
||||
-- [(lasCenSensEdge, takeOne [LAUNCHER,LASGUN,SPARKGUN,FLATSHIELD] )
|
||||
-- ,(sensorRoomRunPast Electrical, return SPARKGUN )
|
||||
-- ,(sensorRoomRunPast Flaming, return FLAMESPITTER )
|
||||
-- ,(sensorRoomRunPast Lasering, return LASGUN )
|
||||
-- ,(const slowDoorRoomRunPast, return MINIGUN)
|
||||
-- ,(const longRoomRunPast, takeOne [SNIPERRIFLE,FLATSHIELD])
|
||||
-- ,(const glassLessonRunPast, takeOne [LASGUN])
|
||||
-- ,(const $ lasTunnelRunPast 400, return FLATSHIELD)
|
||||
[(keyCardRoomRunPast 0, return (KEYCARD 0))
|
||||
]
|
||||
|
||||
itemRooms :: RandomGen g => [(CombineType, State g (SubCompTree Room))]
|
||||
@@ -56,6 +58,10 @@ itemRooms =
|
||||
[rc [sniperRifle]
|
||||
]
|
||||
)
|
||||
, (KEYCARD 0 , join $ takeOne
|
||||
[rc [keyCard 0]
|
||||
]
|
||||
)
|
||||
]
|
||||
where
|
||||
rc its = do
|
||||
|
||||
Reference in New Issue
Block a user