-- | Definitions of of cave kinds. Every level in the game is an instantiated
-- cave kind.
module Content.CaveKind
  ( -- * Group name patterns
    pattern CAVE_ROGUE, pattern CAVE_ARENA, pattern CAVE_SMOKING, pattern CAVE_LABORATORY, pattern CAVE_NOISE, pattern CAVE_MINE, pattern CAVE_EMPTY, pattern CAVE_SHALLOW_ROGUE, pattern CAVE_OUTERMOST, pattern CAVE_RAID, pattern CAVE_BRAWL, pattern CAVE_SHOOTOUT, pattern CAVE_HUNT, pattern CAVE_ESCAPE, pattern CAVE_ZOO, pattern CAVE_AMBUSH, pattern CAVE_BATTLE, pattern CAVE_SAFARI_1, pattern CAVE_SAFARI_2, pattern CAVE_SAFARI_3
  , groupNamesSingleton, groupNames
  , -- * Content
    content
  ) where

import Prelude ()

import Game.LambdaHack.Core.Prelude

import Data.Ratio

import           Content.ItemKind hiding
  (content, groupNames, groupNamesSingleton)
import           Content.ItemKindActor
import           Content.PlaceKind hiding
  (content, groupNames, groupNamesSingleton)
import           Content.TileKind hiding
  (content, groupNames, groupNamesSingleton)
import           Game.LambdaHack.Content.CaveKind
import qualified Game.LambdaHack.Content.ItemKind as IK
import           Game.LambdaHack.Content.TileKind
import           Game.LambdaHack.Core.Dice
import           Game.LambdaHack.Definition.Defs
import           Game.LambdaHack.Definition.DefsInternal

-- * Group name patterns

groupNamesSingleton :: [GroupName CaveKind]
groupNamesSingleton :: [GroupName CaveKind]
groupNamesSingleton = []

groupNames :: [GroupName CaveKind]
groupNames :: [GroupName CaveKind]
groupNames =
       [GroupName CaveKind
CAVE_ROGUE, GroupName CaveKind
CAVE_ARENA, GroupName CaveKind
CAVE_SMOKING, GroupName CaveKind
CAVE_LABORATORY, GroupName CaveKind
CAVE_NOISE, GroupName CaveKind
CAVE_MINE, GroupName CaveKind
CAVE_EMPTY, GroupName CaveKind
CAVE_SHALLOW_ROGUE, GroupName CaveKind
CAVE_OUTERMOST, GroupName CaveKind
CAVE_RAID, GroupName CaveKind
CAVE_BRAWL, GroupName CaveKind
CAVE_SHOOTOUT, GroupName CaveKind
CAVE_HUNT, GroupName CaveKind
CAVE_ESCAPE, GroupName CaveKind
CAVE_ZOO, GroupName CaveKind
CAVE_AMBUSH, GroupName CaveKind
CAVE_BATTLE, GroupName CaveKind
CAVE_SAFARI_1, GroupName CaveKind
CAVE_SAFARI_2, GroupName CaveKind
CAVE_SAFARI_3]

pattern CAVE_ROGUE, CAVE_ARENA, CAVE_SMOKING, CAVE_LABORATORY, CAVE_NOISE, CAVE_MINE, CAVE_EMPTY, CAVE_SHALLOW_ROGUE, CAVE_OUTERMOST, CAVE_RAID, CAVE_BRAWL, CAVE_SHOOTOUT, CAVE_HUNT, CAVE_ESCAPE, CAVE_ZOO, CAVE_AMBUSH, CAVE_BATTLE, CAVE_SAFARI_1, CAVE_SAFARI_2, CAVE_SAFARI_3 :: GroupName CaveKind

pattern $bCAVE_ROGUE :: GroupName CaveKind
$mCAVE_ROGUE :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_ROGUE = GroupName "caveRogue"
pattern $bCAVE_ARENA :: GroupName CaveKind
$mCAVE_ARENA :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_ARENA = GroupName "caveArena"
pattern $bCAVE_SMOKING :: GroupName CaveKind
$mCAVE_SMOKING :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_SMOKING = GroupName "caveSmoking"
pattern $bCAVE_LABORATORY :: GroupName CaveKind
$mCAVE_LABORATORY :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_LABORATORY = GroupName "caveLaboratory"
pattern $bCAVE_NOISE :: GroupName CaveKind
$mCAVE_NOISE :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_NOISE = GroupName "caveNoise"
pattern $bCAVE_MINE :: GroupName CaveKind
$mCAVE_MINE :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_MINE = GroupName "caveMine"
pattern $bCAVE_EMPTY :: GroupName CaveKind
$mCAVE_EMPTY :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_EMPTY = GroupName "caveEmpty"
pattern $bCAVE_SHALLOW_ROGUE :: GroupName CaveKind
$mCAVE_SHALLOW_ROGUE :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_SHALLOW_ROGUE = GroupName "caveShallowRogue"
pattern $bCAVE_OUTERMOST :: GroupName CaveKind
$mCAVE_OUTERMOST :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_OUTERMOST = GroupName "caveOutermost"
pattern $bCAVE_RAID :: GroupName CaveKind
$mCAVE_RAID :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_RAID = GroupName "caveRaid"
pattern $bCAVE_BRAWL :: GroupName CaveKind
$mCAVE_BRAWL :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_BRAWL = GroupName "caveBrawl"
pattern $bCAVE_SHOOTOUT :: GroupName CaveKind
$mCAVE_SHOOTOUT :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_SHOOTOUT = GroupName "caveShootout"
pattern $bCAVE_HUNT :: GroupName CaveKind
$mCAVE_HUNT :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_HUNT = GroupName "caveHunt"
pattern $bCAVE_ESCAPE :: GroupName CaveKind
$mCAVE_ESCAPE :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_ESCAPE = GroupName "caveEscape"
pattern $bCAVE_ZOO :: GroupName CaveKind
$mCAVE_ZOO :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_ZOO = GroupName "caveZoo"
pattern $bCAVE_AMBUSH :: GroupName CaveKind
$mCAVE_AMBUSH :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_AMBUSH = GroupName "caveAmbush"
pattern $bCAVE_BATTLE :: GroupName CaveKind
$mCAVE_BATTLE :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_BATTLE = GroupName "caveBattle"
pattern $bCAVE_SAFARI_1 :: GroupName CaveKind
$mCAVE_SAFARI_1 :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_SAFARI_1 = GroupName "caveSafari1"
pattern $bCAVE_SAFARI_2 :: GroupName CaveKind
$mCAVE_SAFARI_2 :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_SAFARI_2 = GroupName "caveSafari2"
pattern $bCAVE_SAFARI_3 :: GroupName CaveKind
$mCAVE_SAFARI_3 :: forall r. GroupName CaveKind -> (Void# -> r) -> (Void# -> r) -> r
CAVE_SAFARI_3 = GroupName "caveSafari3"

-- * Content

content :: [CaveKind]
content :: [CaveKind]
content =
  [CaveKind
rogue, CaveKind
arena, CaveKind
smoking, CaveKind
laboratory, CaveKind
noise, CaveKind
mine, CaveKind
empty, CaveKind
outermost, CaveKind
shallowRogue, CaveKind
raid, CaveKind
brawl, CaveKind
shootout, CaveKind
hunt, CaveKind
escape, CaveKind
zoo, CaveKind
ambush, CaveKind
battle, CaveKind
safari1, CaveKind
safari2, CaveKind
safari3]

rogue,    arena, smoking, laboratory, noise, mine, empty, outermost, shallowRogue, raid, brawl, shootout, hunt, escape, zoo, ambush, battle, safari1, safari2, safari3 :: CaveKind

-- * Underground caves; most of mediocre height and size

rogue :: CaveKind
rogue = CaveKind :: Char
-> Text
-> Freqs CaveKind
-> X
-> X
-> DiceXY
-> DiceXY
-> DiceXY
-> Dice
-> Dice
-> Rational
-> Rational
-> Rational
-> Rational
-> X
-> X
-> Freqs ItemKind
-> Dice
-> Freqs ItemKind
-> Freqs PlaceKind
-> Bool
-> Bool
-> GroupName TileKind
-> GroupName TileKind
-> GroupName TileKind
-> GroupName TileKind
-> GroupName TileKind
-> GroupName TileKind
-> GroupName TileKind
-> GroupName TileKind
-> GroupName TileKind
-> Bool
-> X
-> Dice
-> Freqs PlaceKind
-> Freqs PlaceKind
-> Freqs PlaceKind
-> [X]
-> Text
-> CaveKind
CaveKind
  { csymbol :: Char
csymbol       = Char
'R'
  , cname :: Text
cname         = Text
"A maze of twisty passages"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
DEFAULT_RANDOM, X
100), (GroupName CaveKind
CAVE_ROGUE, X
1)]
  , cXminSize :: X
cXminSize     = X
80
  , cYminSize :: X
cYminSize     = X
21
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
2 X -> X -> Dice
`d` X
4 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
10) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY (X
2 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
4) Dice
5
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
16 Dice
40
  , cdarkOdds :: Dice
cdarkOdds     = X
1 X -> X -> Dice
`d` X
54 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ X
1 X -> X -> Dice
`dL` X
20
      -- most rooms lit, to compensate for dark corridors
  , cnightOdds :: Dice
cnightOdds    = Dice
51  -- always night
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
2
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
6
  , cdoorChance :: Rational
cdoorChance   = Integer
3Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
4
  , copenChance :: Rational
copenChance   = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
5
  , chidden :: X
chidden       = X
7
  , cactorCoeff :: X
cactorCoeff   = X
65  -- the maze requires time to explore
  , cactorFreq :: Freqs ItemKind
cactorFreq    = [(GroupName ItemKind
MONSTER, X
60), (GroupName ItemKind
ANIMAL, X
40)]
  , citemNum :: Dice
citemNum      = X
6 X -> X -> Dice
`d` X
5 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
10 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
- X
10 X -> X -> Dice
`dL` X
1
      -- deep down quality over quantity; generally quite random,
      -- for interesting replays at the cost of unreliable balance
  , citemFreq :: Freqs ItemKind
citemFreq     = [(GroupName ItemKind
IK.COMMON_ITEM, X
40), (GroupName ItemKind
IK.TREASURE, X
60)]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
ROGUE, X
1)]
  , cpassable :: Bool
cpassable     = Bool
False
  , labyrinth :: Bool
labyrinth     = Bool
False
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
FILLER_WALL
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
FLOOR_CORRIDOR_DARK
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
FLOOR_CORRIDOR_LIT
  , cwallTile :: GroupName TileKind
cwallTile     = GroupName TileKind
FILLER_WALL
  , ccornerTile :: GroupName TileKind
ccornerTile   = GroupName TileKind
FILLER_WALL
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
S_BASIC_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
S_BASIC_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
S_BASIC_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
S_BASIC_OUTER_FENCE
  , cfenceApart :: Bool
cfenceApart   = Bool
False
  , cminStairDist :: X
cminStairDist = X
20
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
1 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ X
1 X -> X -> Dice
`d` X
2
  , cescapeFreq :: Freqs PlaceKind
cescapeFreq   = []
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
WALLED_STAIRCASE, X
50), (GroupName PlaceKind
OPEN_STAIRCASE, X
50)
                    , (GroupName PlaceKind
TINY_STAIRCASE, X
1) ]
  , cstairAllowed :: Freqs PlaceKind
cstairAllowed = []
  , cskip :: [X]
cskip         = []
  , cdesc :: Text
cdesc         = Text
"Winding tunnels stretch into the dark."
  }  -- no lit corridors cave alternative, since both lit # and . look bad here
arena :: CaveKind
arena = CaveKind
rogue
  { csymbol :: Char
csymbol       = Char
'A'
  , cname :: Text
cname         = Text
"Dusty underground library"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
DEFAULT_RANDOM, X
60), (GroupName CaveKind
CAVE_ARENA, X
1)]
  , cXminSize :: X
cXminSize     = X
50
  , cYminSize :: X
cYminSize     = X
21
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
3 X -> X -> Dice
`d` X
3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
17) (X
1 X -> X -> Dice
`d` X
3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
4)
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY (X
2 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
4) Dice
6
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
16 Dice
12
  , cdarkOdds :: Dice
cdarkOdds     = Dice
49 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ X
1 X -> X -> Dice
`d` X
10  -- almost all rooms dark (1 in 10 lit)
  -- Light is not too deadly, because not many obstructions and so
  -- foes visible from far away and few foes have ranged combat
  -- at shallow depth.
  , cnightOdds :: Dice
cnightOdds    = Dice
0  -- always day
  , cauxConnects :: Rational
cauxConnects  = Rational
1
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
8
  , chidden :: X
chidden       = X
0
  , cactorCoeff :: X
cactorCoeff   = X
75  -- small open level, don't rush the player
  , cactorFreq :: Freqs ItemKind
cactorFreq    = [(GroupName ItemKind
MONSTER, X
30), (GroupName ItemKind
ANIMAL, X
70)]
  , citemNum :: Dice
citemNum      = X
4 X -> X -> Dice
`d` X
5  -- few rooms
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
20), (GroupName ItemKind
IK.TREASURE, X
40)
                    , (GroupName ItemKind
IK.ANY_SCROLL, X
40) ]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
ARENA, X
1)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
ARENA_SET_LIT
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
TRAIL_LIT  -- let trails give off light
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
TRAIL_LIT  -- may be rolled different than the above
  , cminStairDist :: X
cminStairDist = X
15
  , cmaxStairsNum :: Dice
cmaxStairsNum = X
1 X -> X -> Dice
`d` X
2
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
WALLED_STAIRCASE, X
20), (GroupName PlaceKind
CLOSED_STAIRCASE, X
80)
                    , (GroupName PlaceKind
TINY_STAIRCASE, X
1) ]
  , cdesc :: Text
cdesc         = Text
"The shelves groan with dusty books and tattered scrolls."
  }
smoking :: CaveKind
smoking = CaveKind
arena
  { cname :: Text
cname         = Text
"Smoking rooms"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_SMOKING, X
1)]
  , cdarkOdds :: Dice
cdarkOdds     = Dice
41 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ X
1 X -> X -> Dice
`d` X
10  -- almost all rooms lit (1 in 10 dark)
  -- Trails provide enough light for fun stealth.
  , cnightOdds :: Dice
cnightOdds    = Dice
51  -- always night
  , citemNum :: Dice
citemNum      = X
6 X -> X -> Dice
`d` X
5  -- rare, so make it exciting
  , citemFreq :: Freqs ItemKind
citemFreq     = [(GroupName ItemKind
IK.COMMON_ITEM, X
20), (GroupName ItemKind
IK.TREASURE, X
40), (GroupName ItemKind
IK.ANY_GLASS, X
40)]
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
ARENA_SET_DARK
  , cdesc :: Text
cdesc         = Text
"Velvet couches exude the strong smell of tobacco."
  }
laboratory :: CaveKind
laboratory = CaveKind
rogue
  { csymbol :: Char
csymbol       = Char
'L'
  , cname :: Text
cname         = Text
"Burnt laboratory"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_LABORATORY, X
1)]
  , cXminSize :: X
cXminSize     = X
60
  , cYminSize :: X
cYminSize     = X
21
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
1 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
5) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
7 Dice
5
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
10 Dice
40
  , cnightOdds :: Dice
cnightOdds    = Dice
0  -- always day so that the corridor smoke is lit
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
5
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , cdoorChance :: Rational
cdoorChance   = Rational
1
  , copenChance :: Rational
copenChance   = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
2
  , cactorFreq :: Freqs ItemKind
cactorFreq    = [(GroupName ItemKind
MONSTER, X
30), (GroupName ItemKind
ANIMAL, X
70)]
  , citemNum :: Dice
citemNum      = X
6 X -> X -> Dice
`d` X
5  -- reward difficulty
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
20), (GroupName ItemKind
IK.TREASURE, X
40)
                    , (GroupName ItemKind
IK.EXPLOSIVE, X
40) ]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
LABORATORY, X
1)]
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
LAB_TRAIL_LIT  -- let lab smoke give off light always
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
LAB_TRAIL_LIT
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
2
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
WALLED_STAIRCASE, X
50), (GroupName PlaceKind
OPEN_STAIRCASE, X
50)
                    , (GroupName PlaceKind
TINY_STAIRCASE, X
1) ]
  , cdesc :: Text
cdesc         = Text
"Shattered glassware and the sharp scent of spilt chemicals show that something terrible happened here."
  }
noise :: CaveKind
noise = CaveKind
rogue
  { csymbol :: Char
csymbol       = Char
'N'
  , cname :: Text
cname         = Text
"Leaky burrowed sediment"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
DEFAULT_RANDOM, X
30), (GroupName CaveKind
CAVE_NOISE, X
1)]
  , cXminSize :: X
cXminSize     = X
50
  , cYminSize :: X
cYminSize     = X
21
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
3 X -> X -> Dice
`d` X
5 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
12) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
8 Dice
5
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
20 Dice
20
  , cdarkOdds :: Dice
cdarkOdds     = Dice
51
  -- Light is deadly, because nowhere to hide and pillars enable spawning
  -- very close to heroes.
  , cnightOdds :: Dice
cnightOdds    = Dice
0  -- harder variant, but looks cheerful
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
100
  , cdoorChance :: Rational
cdoorChance   = Rational
1  -- to avoid lit quasi-door tiles
  , chidden :: X
chidden       = X
0
  , cactorCoeff :: X
cactorCoeff   = X
80  -- the maze requires time to explore; also, small
  , cactorFreq :: Freqs ItemKind
cactorFreq    = [(GroupName ItemKind
MONSTER, X
80), (GroupName ItemKind
ANIMAL, X
20)]
  , citemNum :: Dice
citemNum      = X
6 X -> X -> Dice
`d` X
5  -- an incentive to explore the labyrinth
  , cpassable :: Bool
cpassable     = Bool
True
  , labyrinth :: Bool
labyrinth     = Bool
True
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
NOISE, X
1)]
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
NOISE_SET_LIT
  , cfenceApart :: Bool
cfenceApart   = Bool
True  -- ensures no cut-off parts from collapsed
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
DAMP_FLOOR_DARK
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
DAMP_FLOOR_LIT
  , cminStairDist :: X
cminStairDist = X
15
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
CLOSED_STAIRCASE, X
50), (GroupName PlaceKind
OPEN_STAIRCASE, X
50)
                    , (GroupName PlaceKind
TINY_STAIRCASE, X
1) ]
  , cdesc :: Text
cdesc         = Text
"Soon, these passages will be swallowed up by the mud."
  }
mine :: CaveKind
mine = CaveKind
noise
  { cname :: Text
cname         = Text
"Frozen derelict mine"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_MINE, X
1)]
  , cnightOdds :: Dice
cnightOdds    = Dice
51  -- easier variant, but looks sinister
  , citemNum :: Dice
citemNum      = X
10 X -> X -> Dice
`d` X
4  -- an incentive to explore the final labyrinth
  , citemFreq :: Freqs ItemKind
citemFreq     = [(GroupName ItemKind
IK.COMMON_ITEM, X
20), (GroupName ItemKind
GEM, X
20)]
                      -- can't be "valuable" or template items generated
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
NOISE, X
1), (GroupName PlaceKind
MINE, X
99)]
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
POWER_SET_DARK
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
GATED_CLOSED_STAIRCASE, X
50)
                    , (GroupName PlaceKind
GATED_OPEN_STAIRCASE, X
50)
                    , (GroupName PlaceKind
GATED_TINY_STAIRCASE, X
1) ]
  , cdesc :: Text
cdesc         = Text
"Pillars of shining ice create a frozen labyrinth."
  }
empty :: CaveKind
empty = CaveKind
rogue
  { csymbol :: Char
csymbol       = Char
'E'
  , cname :: Text
cname         = Text
"Tall cavern"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_EMPTY, X
1)]
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
2 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
11) (X
1 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
8)
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
13 Dice
11
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
37 Dice
31  -- favour large rooms
  , cdarkOdds :: Dice
cdarkOdds     = X
1 X -> X -> Dice
`d` X
100 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ X
1 X -> X -> Dice
`dL` X
100
  , cnightOdds :: Dice
cnightOdds    = Dice
0  -- always day
  , cauxConnects :: Rational
cauxConnects  = Integer
3Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
2
  , cmaxVoid :: Rational
cmaxVoid      = Rational
0  -- too few rooms to have void and fog common anyway
  , cdoorChance :: Rational
cdoorChance   = Rational
0
  , copenChance :: Rational
copenChance   = Rational
0
  , chidden :: X
chidden       = X
0
  , cactorCoeff :: X
cactorCoeff   = X
7
  , cactorFreq :: Freqs ItemKind
cactorFreq    = [(GroupName ItemKind
ANIMAL, X
10), (GroupName ItemKind
IMMOBILE_ANIMAL, X
90)]
      -- The healing geysers on lvl 3 act like HP resets. Needed to avoid
      -- cascading failure, if the particular starting conditions were
      -- very hard. Items are not reset, even if they are bad, which provides
      -- enough of a continuity. Gyesers on lvl 3 are not OP and can't be
      -- abused, because they spawn less and less often and also HP doesn't
      -- effectively accumulate over max.
  , citemNum :: Dice
citemNum      = X
4 X -> X -> Dice
`d` X
5  -- few rooms and geysers are the boon
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
EMPTY, X
1)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
EMPTY_SET_LIT
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
FLOOR_ARENA_DARK
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
FLOOR_ARENA_LIT
  , cminStairDist :: X
cminStairDist = X
30
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
1
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
WALLED_STAIRCASE, X
20), (GroupName PlaceKind
CLOSED_STAIRCASE, X
80)
                    , (GroupName PlaceKind
TINY_STAIRCASE, X
1) ]
  , cdesc :: Text
cdesc         = Text
"Swirls of warm fog fill the air, the hiss of geysers sounding all around."
  }
outermost :: CaveKind
outermost = CaveKind
shallowRogue
  { csymbol :: Char
csymbol       = Char
'B'
  , cname :: Text
cname         = Text
"Cave entrance"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_OUTERMOST, X
100)]
  , cXminSize :: X
cXminSize     = X
40
  , cYminSize :: X
cYminSize     = X
21
  , cdarkOdds :: Dice
cdarkOdds     = Dice
0  -- all rooms lit, for a gentle start
  , cactorCoeff :: X
cactorCoeff   = X
80  -- already animals start there; also, pity on the noob
  , cactorFreq :: Freqs ItemKind
cactorFreq    = ((GroupName ItemKind, X) -> Bool)
-> Freqs ItemKind -> Freqs ItemKind
forall a. (a -> Bool) -> [a] -> [a]
filter ((GroupName ItemKind -> GroupName ItemKind -> Bool
forall a. Eq a => a -> a -> Bool
/= GroupName ItemKind
MONSTER) (GroupName ItemKind -> Bool)
-> ((GroupName ItemKind, X) -> GroupName ItemKind)
-> (GroupName ItemKind, X)
-> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (GroupName ItemKind, X) -> GroupName ItemKind
forall a b. (a, b) -> a
fst) (Freqs ItemKind -> Freqs ItemKind)
-> Freqs ItemKind -> Freqs ItemKind
forall a b. (a -> b) -> a -> b
$ CaveKind -> Freqs ItemKind
cactorFreq CaveKind
rogue
  , citemNum :: Dice
citemNum      = X
6 X -> X -> Dice
`d` X
5  -- lure them in with loot
  , citemFreq :: Freqs ItemKind
citemFreq     = ((GroupName ItemKind, X) -> Bool)
-> Freqs ItemKind -> Freqs ItemKind
forall a. (a -> Bool) -> [a] -> [a]
filter ((GroupName ItemKind -> GroupName ItemKind -> Bool
forall a. Eq a => a -> a -> Bool
/= GroupName ItemKind
IK.TREASURE) (GroupName ItemKind -> Bool)
-> ((GroupName ItemKind, X) -> GroupName ItemKind)
-> (GroupName ItemKind, X)
-> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (GroupName ItemKind, X) -> GroupName ItemKind
forall a b. (a, b) -> a
fst) (Freqs ItemKind -> Freqs ItemKind)
-> Freqs ItemKind -> Freqs ItemKind
forall a b. (a -> b) -> a -> b
$ CaveKind -> Freqs ItemKind
citemFreq CaveKind
rogue
  , cminStairDist :: X
cminStairDist = X
10
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
1
  , cescapeFreq :: Freqs PlaceKind
cescapeFreq   = [(GroupName PlaceKind
INDOOR_ESCAPE_UP, X
1)]
  , cdesc :: Text
cdesc         = Text
"This close to the surface, the sunlight still illuminates the dungeon."
  }
shallowRogue :: CaveKind
shallowRogue = CaveKind
rogue
  { cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_SHALLOW_ROGUE, X
100)]
  , cXminSize :: X
cXminSize     = X
60
  , cYminSize :: X
cYminSize     = X
21
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
1  -- ensure heroes meet initial monsters and their loot
  , cdesc :: Text
cdesc         = Text
"The snorts and grunts of savage beasts can be clearly heard."
  }

-- * Overground "caves"; no story-wise limits wrt height and size

raid :: CaveKind
raid = CaveKind
rogue
  { csymbol :: Char
csymbol       = Char
'T'
  , cname :: Text
cname         = Text
"Typing den"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_RAID, X
1)]
  , cXminSize :: X
cXminSize     = X
50
  , cYminSize :: X
cYminSize     = X
21
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
2 X -> X -> Dice
`d` X
4 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
6) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY (X
2 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
4) Dice
5
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
16 Dice
20
  , cdarkOdds :: Dice
cdarkOdds     = Dice
0  -- all rooms lit, for a gentle start
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , cactorCoeff :: X
cactorCoeff   = X
250  -- deep level with no kit, so slow spawning
  , cactorFreq :: Freqs ItemKind
cactorFreq    = [(GroupName ItemKind
ANIMAL, X
100)]
  , citemNum :: Dice
citemNum      = X
6 X -> X -> Dice
`d` X
6  -- just one level, hard enemies, treasure
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
100), (GroupName ItemKind
IK.S_CURRENCY, X
500)
                    , (GroupName ItemKind
STARTING_WEAPON, X
100) ]
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cescapeFreq :: Freqs PlaceKind
cescapeFreq   = [(GroupName PlaceKind
INDOOR_ESCAPE_UP, X
1)]
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cstairAllowed :: Freqs PlaceKind
cstairAllowed = []
  , cdesc :: Text
cdesc         = Text
""
  }
brawl :: CaveKind
brawl = CaveKind
rogue  -- many random solid tiles, to break LOS, since it's a day
               -- and this scenario is not focused on ranged combat;
               -- also, sanctuaries against missiles in shadow under trees
  { csymbol :: Char
csymbol       = Char
'b'
  , cname :: Text
cname         = Text
"Sunny woodland"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_BRAWL, X
1)]
  , cXminSize :: X
cXminSize     = X
60
  , cYminSize :: X
cYminSize     = X
21
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
2 X -> X -> Dice
`d` X
5 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
5) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
3 Dice
3
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
7 Dice
5
  , cdarkOdds :: Dice
cdarkOdds     = Dice
51
  , cnightOdds :: Dice
cnightOdds    = Dice
0
  , cdoorChance :: Rational
cdoorChance   = Rational
1
  , copenChance :: Rational
copenChance   = Rational
0
  , chidden :: X
chidden       = X
0
  , cactorFreq :: Freqs ItemKind
cactorFreq    = []
  , citemNum :: Dice
citemNum      = X
4 X -> X -> Dice
`d` X
6
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
50), (GroupName ItemKind
STARTING_WEAPON, X
100)
                    , (GroupName ItemKind
STARTING_ARMOR, X
100) ]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
BRAWL, X
1)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
BRAWL_SET_LIT
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
DIRT_LIT
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
DIRT_LIT
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cdesc :: Text
cdesc         = Text
"Sunlight falls through the trees and dapples on the ground."
  }
shootout :: CaveKind
shootout = CaveKind
rogue  -- a scenario with strong missiles;
                  -- few solid tiles, but only translucent tiles or walkable
                  -- opaque tiles, to make scouting and sniping more interesting
                  -- and to avoid obstructing view too much, since this
                  -- scenario is about ranged combat at long range
  { csymbol :: Char
csymbol       = Char
'S'
  , cname :: Text
cname         = Text
"Misty meadow"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_SHOOTOUT, X
1)]
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
1 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
6) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
3 Dice
3
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
4 Dice
4
  , cdarkOdds :: Dice
cdarkOdds     = Dice
51
  , cnightOdds :: Dice
cnightOdds    = Dice
0
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , cdoorChance :: Rational
cdoorChance   = Rational
1
  , copenChance :: Rational
copenChance   = Rational
0
  , chidden :: X
chidden       = X
0
  , cactorFreq :: Freqs ItemKind
cactorFreq    = []
  , citemNum :: Dice
citemNum      = X
5 X -> X -> Dice
`d` X
16
                      -- less items in inventory, more to be picked up,
                      -- to reward explorer and aggressor and punish camper
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
30)
                    , (GroupName ItemKind
ANY_ARROW, X
400), (GroupName ItemKind
HARPOON, X
300), (GroupName ItemKind
IK.EXPLOSIVE, X
50) ]
                      -- Many consumable buffs are needed in symmetric maps
                      -- so that aggressor prepares them in advance and camper
                      -- needs to waste initial turns to buff for the defence.
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
SHOOTOUT, X
1)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
SHOOTOUT_SET_LIT
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
DIRT_LIT
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
DIRT_LIT
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cdesc :: Text
cdesc         = Text
""
  }
hunt :: CaveKind
hunt = CaveKind
rogue  -- a scenario with strong missiles for ranged and shade for melee
  { csymbol :: Char
csymbol       = Char
'H'
  , cname :: Text
cname         = Text
"Noon swamp"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_HUNT, X
1)]
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
1 X -> X -> Dice
`d` X
2 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
6) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
3 Dice
3
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
4 Dice
4
  , cdarkOdds :: Dice
cdarkOdds     = Dice
51
  , cnightOdds :: Dice
cnightOdds    = Dice
0
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , cdoorChance :: Rational
cdoorChance   = Rational
1
  , copenChance :: Rational
copenChance   = Rational
0
  , chidden :: X
chidden       = X
0
  , cactorFreq :: Freqs ItemKind
cactorFreq    = []
  , citemNum :: Dice
citemNum      = X
5 X -> X -> Dice
`d` X
10
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
30)
                    , (GroupName ItemKind
ANY_ARROW, X
400), (GroupName ItemKind
HARPOON, X
300), (GroupName ItemKind
IK.EXPLOSIVE, X
50) ]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
BRAWL, X
50), (GroupName PlaceKind
SHOOTOUT, X
100)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
SHOOTOUT_SET_LIT
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
DIRT_LIT
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
DIRT_LIT
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cdesc :: Text
cdesc         = Text
""
  }
escape :: CaveKind
escape = CaveKind
rogue  -- a scenario with weak missiles, because heroes don't depend
                -- on them; dark, so solid obstacles are to hide from missiles,
                -- not view; obstacles are not lit, to frustrate the AI;
                -- lots of small lights to cross, to have some risks
  { csymbol :: Char
csymbol       = Char
'E'
  , cname :: Text
cname         = Text
"Metropolitan park at dusk"  -- "night" didn't fit
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_ESCAPE, X
1)]
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
1 X -> X -> Dice
`d` X
3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
7) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
5 Dice
3
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
9 Dice
9  -- bias towards larger lamp areas
  , cdarkOdds :: Dice
cdarkOdds     = Dice
51  -- rooms always dark so that fence not visible from afar
  , cnightOdds :: Dice
cnightOdds    = Dice
51  -- always night
  , cauxConnects :: Rational
cauxConnects  = Rational
2  -- many lit trails, so easy to aim
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
100
  , chidden :: X
chidden       = X
0
  , cactorFreq :: Freqs ItemKind
cactorFreq    = []
  , citemNum :: Dice
citemNum      = X
6 X -> X -> Dice
`d` X
8
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
30), (GroupName ItemKind
GEM, X
500)
                    , (GroupName ItemKind
WEAK_ARROW, X
500), (GroupName ItemKind
HARPOON, X
400)
                    , (GroupName ItemKind
IK.EXPLOSIVE, X
100) ]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
ESCAPE, X
1)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
ESCAPE_SET_DARK  -- unlike in ambush, tiles not burning yet
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
SAFE_TRAIL_LIT  -- let trails give off light
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
SAFE_TRAIL_LIT
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cescapeFreq :: Freqs PlaceKind
cescapeFreq   = [(GroupName PlaceKind
OUTDOOR_ESCAPE_DOWN, X
1)]
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cskip :: [X]
cskip         = [X
0]  -- don't start heroes nor opponents on escape
  , cdesc :: Text
cdesc         = Text
""
  }
zoo :: CaveKind
zoo = CaveKind
rogue  -- few lights and many solids, to help the less numerous heroes
  { csymbol :: Char
csymbol       = Char
'Z'
  , cname :: Text
cname         = Text
"Menagerie in flames"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_ZOO, X
1)]
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
1 X -> X -> Dice
`d` X
3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
7) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
4 Dice
4
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
12 Dice
5
  , cdarkOdds :: Dice
cdarkOdds     = Dice
51  -- rooms always dark so that fence not visible from afar
  , cnightOdds :: Dice
cnightOdds    = Dice
51  -- always night
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
4
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
20
  , cdoorChance :: Rational
cdoorChance   = Integer
7Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , copenChance :: Rational
copenChance   = Integer
9Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , chidden :: X
chidden       = X
0
  , cactorFreq :: Freqs ItemKind
cactorFreq    = []
  , citemNum :: Dice
citemNum      = X
7 X -> X -> Dice
`d` X
8
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
100), (GroupName ItemKind
LIGHT_ATTENUATOR, X
1000)
                    , (GroupName ItemKind
STARTING_WEAPON, X
1000) ]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
ZOO, X
1)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
ZOO_SET_DARK
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
SAFE_TRAIL_LIT  -- let trails give off light
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
SAFE_TRAIL_LIT
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cdesc :: Text
cdesc         = Text
""
  }
ambush :: CaveKind
ambush = CaveKind
rogue  -- a scenario with strong missiles;
                -- dark, so solid obstacles are to hide from missiles,
                -- not view, and they are all lit, because stopped missiles
                -- are frustrating, while a few LOS-only obstacles are not lit;
                -- few small lights to cross, giving a chance to snipe;
                -- crucial difference wrt shootout and hunt is that trajectories
                -- of missiles are usually not seen, so enemy can't be guessed;
                -- camping doesn't pay off, because enemies can sneak and only
                -- active scouting, throwing flares and shooting discovers them
  { csymbol :: Char
csymbol       = Char
'M'
  , cname :: Text
cname         = Text
"Burning metropolitan park"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_AMBUSH, X
1)]
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
1 X -> X -> Dice
`d` X
4 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
7) Dice
6
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
5 Dice
3
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
9 Dice
9  -- bias towards larger lamp areas
  , cdarkOdds :: Dice
cdarkOdds     = Dice
51  -- rooms always dark so that fence not visible from afar
  , cnightOdds :: Dice
cnightOdds    = Dice
51  -- always night
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10  -- few lit trails, so hard to aim
  , chidden :: X
chidden       = X
0
  , cactorFreq :: Freqs ItemKind
cactorFreq    = []
  , citemNum :: Dice
citemNum      = X
5 X -> X -> Dice
`d` X
8
  , citemFreq :: Freqs ItemKind
citemFreq     = [ (GroupName ItemKind
IK.COMMON_ITEM, X
30)
                    , (GroupName ItemKind
ANY_ARROW, X
400), (GroupName ItemKind
HARPOON, X
300), (GroupName ItemKind
IK.EXPLOSIVE, X
50) ]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
AMBUSH, X
1)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
AMBUSH_SET_DARK
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
TRAIL_LIT  -- let trails give off light
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
TRAIL_LIT
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cdesc :: Text
cdesc         = Text
""
  }

-- * Other caves; testing, Easter egg, future work

battle :: CaveKind
battle = CaveKind
rogue  -- few lights and many solids, to help the less numerous heroes
  { csymbol :: Char
csymbol       = Char
'B'
  , cname :: Text
cname         = Text
"Old battle ground"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_BATTLE, X
1)]
  , ccellSize :: DiceXY
ccellSize     = Dice -> Dice -> DiceXY
DiceXY (X
5 X -> X -> Dice
`d` X
3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ Dice
11) Dice
5  -- cfenceApart results in 2 rows
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
4 Dice
4
  , cmaxPlaceSize :: DiceXY
cmaxPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
9 Dice
7
  , cdarkOdds :: Dice
cdarkOdds     = Dice
0
  , cnightOdds :: Dice
cnightOdds    = Dice
51  -- always night
  , cauxConnects :: Rational
cauxConnects  = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
4
  , cmaxVoid :: Rational
cmaxVoid      = Integer
1Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
20
  , cdoorChance :: Rational
cdoorChance   = Integer
2Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , copenChance :: Rational
copenChance   = Integer
9Integer -> Integer -> Rational
forall a. Integral a => a -> a -> Ratio a
%Integer
10
  , chidden :: X
chidden       = X
0
  , cactorFreq :: Freqs ItemKind
cactorFreq    = []
  , citemNum :: Dice
citemNum      = X
5 X -> X -> Dice
`d` X
8
  , citemFreq :: Freqs ItemKind
citemFreq     = [(GroupName ItemKind
IK.COMMON_ITEM, X
100), (GroupName ItemKind
LIGHT_ATTENUATOR, X
200)]
  , cplaceFreq :: Freqs PlaceKind
cplaceFreq    = [(GroupName PlaceKind
BATTLE, X
50), (GroupName PlaceKind
ROGUE, X
50)]
  , cpassable :: Bool
cpassable     = Bool
True
  , cdefTile :: GroupName TileKind
cdefTile      = GroupName TileKind
BATTLE_SET_DARK
  , cdarkCorTile :: GroupName TileKind
cdarkCorTile  = GroupName TileKind
SAFE_TRAIL_LIT  -- let trails give off light
  , clitCorTile :: GroupName TileKind
clitCorTile   = GroupName TileKind
SAFE_TRAIL_LIT
  , cfenceTileN :: GroupName TileKind
cfenceTileN   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileE :: GroupName TileKind
cfenceTileE   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileS :: GroupName TileKind
cfenceTileS   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceTileW :: GroupName TileKind
cfenceTileW   = GroupName TileKind
OUTDOOR_OUTER_FENCE
  , cfenceApart :: Bool
cfenceApart   = Bool
True  -- ensures no cut-off parts from collapsed
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
0
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = []
  , cdesc :: Text
cdesc         = Text
""
  }
safari1 :: CaveKind
safari1 = CaveKind
brawl
  { cname :: Text
cname         = Text
"Hunam habitat"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_SAFARI_1, X
1)]
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
5 Dice
3
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
1
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
OUTDOOR_WALLED_STAIRCASE, X
20)
                    , (GroupName PlaceKind
OUTDOOR_CLOSED_STAIRCASE, X
80)
                    , (GroupName PlaceKind
OUTDOOR_TINY_STAIRCASE, X
1) ]
  , cskip :: [X]
cskip         = [X
0]
  , cdesc :: Text
cdesc         = Text
"\"Act 1. Hunams scavenge in a forest in their usual disgusting way.\""
  }
safari2 :: CaveKind
safari2 = CaveKind
escape  -- lamps instead of trees, but ok, it's only a simulation
  { cname :: Text
cname         = Text
"Deep into the jungle"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_SAFARI_2, X
1)]
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
1
  , cescapeFreq :: Freqs PlaceKind
cescapeFreq   = []
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
OUTDOOR_WALLED_STAIRCASE, X
20)
                    , (GroupName PlaceKind
OUTDOOR_CLOSED_STAIRCASE, X
80)
                    , (GroupName PlaceKind
OUTDOOR_TINY_STAIRCASE, X
1) ]
  , cskip :: [X]
cskip         = [X
0]
  , cdesc :: Text
cdesc         = Text
"\"Act 2. In the dark pure heart of the jungle noble animals roam freely.\""
  }
safari3 :: CaveKind
safari3 = CaveKind
zoo  -- glass rooms, but ok, it's only a simulation
  { cname :: Text
cname         = Text
"Jungle in flames"
  , cfreq :: Freqs CaveKind
cfreq         = [(GroupName CaveKind
CAVE_SAFARI_3, X
1)]
  , cminPlaceSize :: DiceXY
cminPlaceSize = Dice -> Dice -> DiceXY
DiceXY Dice
5 Dice
4
  , cescapeFreq :: Freqs PlaceKind
cescapeFreq   = [(GroupName PlaceKind
OUTDOOR_ESCAPE_DOWN, X
1)]
  , cmaxStairsNum :: Dice
cmaxStairsNum = Dice
1
  , cstairFreq :: Freqs PlaceKind
cstairFreq    = [ (GroupName PlaceKind
OUTDOOR_WALLED_STAIRCASE, X
20)
                    , (GroupName PlaceKind
OUTDOOR_CLOSED_STAIRCASE, X
80)
                    , (GroupName PlaceKind
OUTDOOR_TINY_STAIRCASE, X
1) ]
  , cdesc :: Text
cdesc         = Text
"\"Act 3. Jealous hunams set jungle on fire and flee.\""
  }