-- | Definitions of place kinds. Every room in the game is an instantiated
-- place kind.
module Content.PlaceKind
  ( -- * Group name patterns
    pattern ROGUE, pattern LABORATORY, pattern ZOO, pattern BRAWL, pattern SHOOTOUT, pattern ARENA, pattern ESCAPE, pattern AMBUSH, pattern BATTLE, pattern NOISE, pattern MINE, pattern EMPTY
  , pattern INDOOR_ESCAPE_DOWN, pattern INDOOR_ESCAPE_UP, pattern OUTDOOR_ESCAPE_DOWN, pattern TINY_STAIRCASE, pattern OPEN_STAIRCASE, pattern CLOSED_STAIRCASE, pattern WALLED_STAIRCASE, pattern GATED_TINY_STAIRCASE, pattern GATED_OPEN_STAIRCASE, pattern GATED_CLOSED_STAIRCASE, pattern OUTDOOR_TINY_STAIRCASE, pattern OUTDOOR_CLOSED_STAIRCASE, pattern OUTDOOR_WALLED_STAIRCASE
  , groupNamesSingleton, groupNames
  , -- * Content
    content
  ) where

import Prelude ()

import Game.LambdaHack.Core.Prelude

import qualified Data.EnumMap.Strict as EM
import qualified Data.Text as T

import Content.TileKind hiding (content, groupNames, groupNamesSingleton)
import Game.LambdaHack.Content.PlaceKind
import Game.LambdaHack.Content.TileKind (TileKind)
import Game.LambdaHack.Definition.Defs
import Game.LambdaHack.Definition.DefsInternal

-- * Group name patterns

groupNamesSingleton :: [GroupName PlaceKind]
groupNamesSingleton :: [GroupName PlaceKind]
groupNamesSingleton = []

-- TODO: if we stick to the current system of generating extra kinds and their
-- group names, let's also add the generated group names to @groupNames@.
groupNames :: [GroupName PlaceKind]
groupNames :: [GroupName PlaceKind]
groupNames =
       [GroupName PlaceKind
ROGUE, GroupName PlaceKind
LABORATORY, GroupName PlaceKind
ZOO, GroupName PlaceKind
BRAWL, GroupName PlaceKind
SHOOTOUT, GroupName PlaceKind
ARENA, GroupName PlaceKind
ESCAPE, GroupName PlaceKind
AMBUSH, GroupName PlaceKind
BATTLE, GroupName PlaceKind
NOISE, GroupName PlaceKind
MINE, GroupName PlaceKind
EMPTY]
    [GroupName PlaceKind]
-> [GroupName PlaceKind] -> [GroupName PlaceKind]
forall a. [a] -> [a] -> [a]
++ [GroupName PlaceKind
INDOOR_ESCAPE_DOWN, GroupName PlaceKind
INDOOR_ESCAPE_UP, GroupName PlaceKind
OUTDOOR_ESCAPE_DOWN, GroupName PlaceKind
TINY_STAIRCASE, GroupName PlaceKind
OPEN_STAIRCASE, GroupName PlaceKind
CLOSED_STAIRCASE, GroupName PlaceKind
WALLED_STAIRCASE]
    [GroupName PlaceKind]
-> [GroupName PlaceKind] -> [GroupName PlaceKind]
forall a. [a] -> [a] -> [a]
++ ([GroupName PlaceKind], [PlaceKind]) -> [GroupName PlaceKind]
forall a b. (a, b) -> a
fst ([GroupName PlaceKind], [PlaceKind])
generatedStairs

pattern ROGUE, LABORATORY, ZOO, BRAWL, SHOOTOUT, ARENA, ESCAPE, AMBUSH, BATTLE, NOISE, MINE, EMPTY :: GroupName PlaceKind

pattern INDOOR_ESCAPE_DOWN, INDOOR_ESCAPE_UP, OUTDOOR_ESCAPE_DOWN, TINY_STAIRCASE, OPEN_STAIRCASE, CLOSED_STAIRCASE, WALLED_STAIRCASE, GATED_TINY_STAIRCASE, GATED_OPEN_STAIRCASE, GATED_CLOSED_STAIRCASE, OUTDOOR_TINY_STAIRCASE, OUTDOOR_CLOSED_STAIRCASE, OUTDOOR_WALLED_STAIRCASE :: GroupName PlaceKind

pattern $bROGUE :: GroupName PlaceKind
$mROGUE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
ROGUE = GroupName "rogue"
pattern $bLABORATORY :: GroupName PlaceKind
$mLABORATORY :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
LABORATORY = GroupName "laboratory"
pattern $bZOO :: GroupName PlaceKind
$mZOO :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
ZOO = GroupName "zoo"
pattern $bBRAWL :: GroupName PlaceKind
$mBRAWL :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
BRAWL = GroupName "brawl"
pattern $bSHOOTOUT :: GroupName PlaceKind
$mSHOOTOUT :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
SHOOTOUT = GroupName "shootout"
pattern $bARENA :: GroupName PlaceKind
$mARENA :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
ARENA = GroupName "arena"
pattern $bESCAPE :: GroupName PlaceKind
$mESCAPE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
ESCAPE = GroupName "escape"
pattern $bAMBUSH :: GroupName PlaceKind
$mAMBUSH :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
AMBUSH = GroupName "ambush"
pattern $bBATTLE :: GroupName PlaceKind
$mBATTLE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
BATTLE = GroupName "battle"
pattern $bNOISE :: GroupName PlaceKind
$mNOISE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
NOISE = GroupName "noise"
pattern $bMINE :: GroupName PlaceKind
$mMINE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
MINE = GroupName "mine"
pattern $bEMPTY :: GroupName PlaceKind
$mEMPTY :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
EMPTY = GroupName "empty"

pattern $bINDOOR_ESCAPE_DOWN :: GroupName PlaceKind
$mINDOOR_ESCAPE_DOWN :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
INDOOR_ESCAPE_DOWN = GroupName "escape down"
pattern $bINDOOR_ESCAPE_UP :: GroupName PlaceKind
$mINDOOR_ESCAPE_UP :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
INDOOR_ESCAPE_UP = GroupName "escape up"
pattern $bOUTDOOR_ESCAPE_DOWN :: GroupName PlaceKind
$mOUTDOOR_ESCAPE_DOWN :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
OUTDOOR_ESCAPE_DOWN = GroupName "outdoor escape route"
pattern $bTINY_STAIRCASE :: GroupName PlaceKind
$mTINY_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
TINY_STAIRCASE = GroupName "tiny staircase"
pattern $bOPEN_STAIRCASE :: GroupName PlaceKind
$mOPEN_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
OPEN_STAIRCASE = GroupName "open staircase"
pattern $bCLOSED_STAIRCASE :: GroupName PlaceKind
$mCLOSED_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
CLOSED_STAIRCASE = GroupName "closed staircase"
pattern $bWALLED_STAIRCASE :: GroupName PlaceKind
$mWALLED_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
WALLED_STAIRCASE = GroupName "walled staircase"

-- This is a rotten compromise, because these are synthesized below,
-- so typos can happen.
pattern $bGATED_TINY_STAIRCASE :: GroupName PlaceKind
$mGATED_TINY_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
GATED_TINY_STAIRCASE = GroupName "gated tiny staircase"
pattern $bGATED_OPEN_STAIRCASE :: GroupName PlaceKind
$mGATED_OPEN_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
GATED_OPEN_STAIRCASE = GroupName "gated open staircase"
pattern $bGATED_CLOSED_STAIRCASE :: GroupName PlaceKind
$mGATED_CLOSED_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
GATED_CLOSED_STAIRCASE = GroupName "gated closed staircase"
pattern $bOUTDOOR_TINY_STAIRCASE :: GroupName PlaceKind
$mOUTDOOR_TINY_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
OUTDOOR_TINY_STAIRCASE = GroupName "outdoor tiny staircase"
pattern $bOUTDOOR_CLOSED_STAIRCASE :: GroupName PlaceKind
$mOUTDOOR_CLOSED_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
OUTDOOR_CLOSED_STAIRCASE = GroupName "outdoor closed staircase"
pattern $bOUTDOOR_WALLED_STAIRCASE :: GroupName PlaceKind
$mOUTDOOR_WALLED_STAIRCASE :: forall r. GroupName PlaceKind -> (Void# -> r) -> (Void# -> r) -> r
OUTDOOR_WALLED_STAIRCASE = GroupName "outdoor walled staircase"

-- * Content

content :: [PlaceKind]
content :: [PlaceKind]
content =
  [PlaceKind
deadEnd, PlaceKind
rect, PlaceKind
rect2, PlaceKind
rect3, PlaceKind
rect4, PlaceKind
rectWindows, PlaceKind
glasshouse, PlaceKind
glasshouse2, PlaceKind
glasshouse3, PlaceKind
pulpit, PlaceKind
ruin, PlaceKind
ruin2, PlaceKind
collapsed, PlaceKind
collapsed2, PlaceKind
collapsed3, PlaceKind
collapsed4, PlaceKind
collapsed5, PlaceKind
collapsed6, PlaceKind
collapsed7, PlaceKind
pillar, PlaceKind
pillar2, PlaceKind
pillar3, PlaceKind
pillar4, PlaceKind
pillar5, PlaceKind
colonnade, PlaceKind
colonnade2, PlaceKind
colonnade3, PlaceKind
colonnade4, PlaceKind
colonnade5, PlaceKind
colonnade6, PlaceKind
lampPost, PlaceKind
lampPost2, PlaceKind
lampPost3, PlaceKind
lampPost4, PlaceKind
treeShade, PlaceKind
fogClump, PlaceKind
fogClump2, PlaceKind
smokeClump, PlaceKind
smokeClump2, PlaceKind
smokeClump3FGround, PlaceKind
bushClump, PlaceKind
bushClump2, PlaceKind
escapeDown, PlaceKind
escapeDown2, PlaceKind
escapeDown3, PlaceKind
escapeDown4, PlaceKind
escapeDown5, PlaceKind
staircase1, PlaceKind
staircase2, PlaceKind
staircase3, PlaceKind
staircase4, PlaceKind
staircase5, PlaceKind
staircase6, PlaceKind
staircase7, PlaceKind
staircase8, PlaceKind
staircase9, PlaceKind
staircase10, PlaceKind
staircase11, PlaceKind
staircase12, PlaceKind
staircase13, PlaceKind
staircase14, PlaceKind
staircase15, PlaceKind
staircase16, PlaceKind
staircase17, PlaceKind
staircase18, PlaceKind
staircase19, PlaceKind
staircase20, PlaceKind
staircase21, PlaceKind
staircase22, PlaceKind
staircase23, PlaceKind
staircase24, PlaceKind
staircase25, PlaceKind
staircase26, PlaceKind
staircase27, PlaceKind
staircase28, PlaceKind
staircase29, PlaceKind
staircase30, PlaceKind
staircase31, PlaceKind
staircase32, PlaceKind
staircase33, PlaceKind
staircase34, PlaceKind
staircase35, PlaceKind
staircase36, PlaceKind
staircase37]
  -- automatically generated
  [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ ([GroupName PlaceKind], [PlaceKind]) -> [PlaceKind]
forall a b. (a, b) -> b
snd ([GroupName PlaceKind], [PlaceKind])
generatedStairs [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ [PlaceKind]
generatedEscapes

deadEnd,    rect, rect2, rect3, rect4, rectWindows, glasshouse, glasshouse2, glasshouse3, pulpit, ruin, ruin2, collapsed, collapsed2, collapsed3, collapsed4, collapsed5, collapsed6, collapsed7, pillar, pillar2, pillar3, pillar4, pillar5, colonnade, colonnade2, colonnade3, colonnade4, colonnade5, colonnade6, lampPost, lampPost2, lampPost3, lampPost4, treeShade, fogClump, fogClump2, smokeClump, smokeClump2, smokeClump3FGround, bushClump, bushClump2, escapeDown, escapeDown2, escapeDown3, escapeDown4, escapeDown5, staircase1, staircase2, staircase3, staircase4, staircase5, staircase6, staircase7, staircase8, staircase9, staircase10, staircase11, staircase12, staircase13, staircase14, staircase15, staircase16, staircase17, staircase18, staircase19, staircase20, staircase21, staircase22, staircase23, staircase24, staircase25, staircase26, staircase27, staircase28, staircase29, staircase30, staircase31, staircase32, staircase33, staircase34, staircase35, staircase36, staircase37 :: PlaceKind

staircase :: PlaceKind  -- template

staircaseBasic :: [PlaceKind]
staircaseBasic :: [PlaceKind]
staircaseBasic = [PlaceKind
staircase1, PlaceKind
staircase2, PlaceKind
staircase3, PlaceKind
staircase4, PlaceKind
staircase5, PlaceKind
staircase6, PlaceKind
staircase7, PlaceKind
staircase8, PlaceKind
staircase9, PlaceKind
staircase10, PlaceKind
staircase11, PlaceKind
staircase12, PlaceKind
staircase13, PlaceKind
staircase14, PlaceKind
staircase15, PlaceKind
staircase16, PlaceKind
staircase17, PlaceKind
staircase18, PlaceKind
staircase19, PlaceKind
staircase20, PlaceKind
staircase21, PlaceKind
staircase22, PlaceKind
staircase23, PlaceKind
staircase24, PlaceKind
staircase25, PlaceKind
staircase26, PlaceKind
staircase27, PlaceKind
staircase28, PlaceKind
staircase29, PlaceKind
staircase30, PlaceKind
staircase31, PlaceKind
staircase32, PlaceKind
staircase33, PlaceKind
staircase34, PlaceKind
staircase35, PlaceKind
staircase36, PlaceKind
staircase37]

generatedStairs :: ([GroupName PlaceKind], [PlaceKind])
generatedStairs :: ([GroupName PlaceKind], [PlaceKind])
generatedStairs =
  let gatedStairs :: [PlaceKind]
gatedStairs = (PlaceKind -> PlaceKind) -> [PlaceKind] -> [PlaceKind]
forall a b. (a -> b) -> [a] -> [b]
map PlaceKind -> PlaceKind
switchStaircaseToGated [PlaceKind]
staircaseBasic
      outdoorStairs :: [PlaceKind]
outdoorStairs = (PlaceKind -> PlaceKind) -> [PlaceKind] -> [PlaceKind]
forall a b. (a -> b) -> [a] -> [b]
map PlaceKind -> PlaceKind
switchStaircaseToOutdoor [PlaceKind]
staircaseBasic
      stairsAll :: [PlaceKind]
stairsAll = [PlaceKind]
staircaseBasic [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ [PlaceKind]
gatedStairs [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ [PlaceKind]
outdoorStairs
      upStairs :: [PlaceKind]
upStairs = (PlaceKind -> PlaceKind) -> [PlaceKind] -> [PlaceKind]
forall a b. (a -> b) -> [a] -> [b]
map PlaceKind -> PlaceKind
switchStaircaseToUp [PlaceKind]
stairsAll
      downStairs :: [PlaceKind]
downStairs = (PlaceKind -> PlaceKind) -> [PlaceKind] -> [PlaceKind]
forall a b. (a -> b) -> [a] -> [b]
map PlaceKind -> PlaceKind
switchStaircaseToDown [PlaceKind]
stairsAll
      genStairs :: [PlaceKind]
genStairs = [PlaceKind]
gatedStairs [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ [PlaceKind]
outdoorStairs [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ [PlaceKind]
upStairs [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ [PlaceKind]
downStairs
  in ( [GroupName PlaceKind] -> [GroupName PlaceKind]
forall a. Eq a => [a] -> [a]
nub ([GroupName PlaceKind] -> [GroupName PlaceKind])
-> [GroupName PlaceKind] -> [GroupName PlaceKind]
forall a b. (a -> b) -> a -> b
$ [GroupName PlaceKind] -> [GroupName PlaceKind]
forall a. Ord a => [a] -> [a]
sort ([GroupName PlaceKind] -> [GroupName PlaceKind])
-> [GroupName PlaceKind] -> [GroupName PlaceKind]
forall a b. (a -> b) -> a -> b
$ (PlaceKind -> [GroupName PlaceKind])
-> [PlaceKind] -> [GroupName PlaceKind]
forall (t :: * -> *) a b. Foldable t => (a -> [b]) -> t a -> [b]
concatMap (((GroupName PlaceKind, Int) -> GroupName PlaceKind)
-> [(GroupName PlaceKind, Int)] -> [GroupName PlaceKind]
forall a b. (a -> b) -> [a] -> [b]
map (GroupName PlaceKind, Int) -> GroupName PlaceKind
forall a b. (a, b) -> a
fst ([(GroupName PlaceKind, Int)] -> [GroupName PlaceKind])
-> (PlaceKind -> [(GroupName PlaceKind, Int)])
-> PlaceKind
-> [GroupName PlaceKind]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PlaceKind -> [(GroupName PlaceKind, Int)]
pfreq) [PlaceKind]
genStairs
     , [PlaceKind]
genStairs )

escapeDownBasic :: [PlaceKind]
escapeDownBasic :: [PlaceKind]
escapeDownBasic =
  [PlaceKind
escapeDown, PlaceKind
escapeDown2, PlaceKind
escapeDown3, PlaceKind
escapeDown4, PlaceKind
escapeDown5]

generatedEscapes :: [PlaceKind]
generatedEscapes :: [PlaceKind]
generatedEscapes =
  let upEscapes :: [PlaceKind]
upEscapes = (PlaceKind -> PlaceKind) -> [PlaceKind] -> [PlaceKind]
forall a b. (a -> b) -> [a] -> [b]
map PlaceKind -> PlaceKind
switchEscapeToUp [PlaceKind]
escapeDownBasic
      outdoorEscapes :: [PlaceKind]
outdoorEscapes = (PlaceKind -> PlaceKind) -> [PlaceKind] -> [PlaceKind]
forall a b. (a -> b) -> [a] -> [b]
map PlaceKind -> PlaceKind
switchEscapeToOutdoorDown [PlaceKind]
escapeDownBasic
  in [PlaceKind]
upEscapes [PlaceKind] -> [PlaceKind] -> [PlaceKind]
forall a. [a] -> [a] -> [a]
++ [PlaceKind]
outdoorEscapes

-- The dots below are @'\x00B7'@, as defined in `TileKind.floorSymbol`.
defaultLegendLit :: EM.EnumMap Char (GroupName TileKind)
defaultLegendLit :: EnumMap Char (GroupName TileKind)
defaultLegendLit = [(Char, GroupName TileKind)] -> EnumMap Char (GroupName TileKind)
forall k a. Enum k => [(k, a)] -> EnumMap k a
EM.fromList
  [ (Char
' ', GroupName TileKind
FILLER_WALL)
  , (Char
'|', GroupName TileKind
S_WALL_LIT)
  , (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_LIT)
  , (Char
'0', GroupName TileKind
S_PILLAR)
  , (Char
'&', GroupName TileKind
S_RUBBLE_PILE)
  , (Char
'<', GroupName TileKind
ESCAPE_UP)
  , (Char
'>', GroupName TileKind
ESCAPE_DOWN)
  , (Char
'·', GroupName TileKind
FLOOR_ACTOR_ITEM_LIT)
  , (Char
'~', GroupName TileKind
S_SHALLOW_WATER_LIT)
  , (Char
'I', GroupName TileKind
SIGNBOARD) ]

defaultLegendDark :: EM.EnumMap Char (GroupName TileKind)
defaultLegendDark :: EnumMap Char (GroupName TileKind)
defaultLegendDark = [(Char, GroupName TileKind)] -> EnumMap Char (GroupName TileKind)
forall k a. Enum k => [(k, a)] -> EnumMap k a
EM.fromList
  [ (Char
' ', GroupName TileKind
FILLER_WALL)
  , (Char
'|', GroupName TileKind
S_WALL_DARK)
  , (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_DARK)
  , (Char
'0', GroupName TileKind
S_PILLAR)
  , (Char
'&', GroupName TileKind
S_RUBBLE_PILE)
  , (Char
'<', GroupName TileKind
ESCAPE_UP)
  , (Char
'>', GroupName TileKind
ESCAPE_DOWN)
  , (Char
'·', GroupName TileKind
FLOOR_ACTOR_ITEM_DARK)
  , (Char
'~', GroupName TileKind
S_SHALLOW_WATER_DARK)
  , (Char
'I', GroupName TileKind
SIGNBOARD) ]

deadEnd :: PlaceKind
deadEnd = PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind  -- needs to have index 0
  { psymbol :: Char
psymbol  = Char
'd'
  , pname :: Text
pname    = Text
"a dead end"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = []
  , prarity :: Rarity
prarity  = []
  , pcover :: Cover
pcover   = Cover
CStretch
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [Text
"·"]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
rect :: PlaceKind
rect = PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind  -- Valid for any nonempty area, hence low frequency.
  { psymbol :: Char
psymbol  = Char
'r'
  , pname :: Text
pname    = Text
"a chamber"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ROGUE, Int
30), (GroupName PlaceKind
LABORATORY, Int
10)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
10), (Double
10, Int
6)]
  , pcover :: Cover
pcover   = Cover
CStretch
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"--"
               , Text
"|·"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
rect2 :: PlaceKind
rect2 = PlaceKind
rect
  { pname :: Text
pname    = Text
"a pen"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ZOO, Int
3)]
  }
rect3 :: PlaceKind
rect3 = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [ (Char
'|', GroupName TileKind
S_WALL_LIT)  -- visible from afar
                          , (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
rect
  { pname :: Text
pname    = Text
"a shed"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
BRAWL, Int
10), (GroupName PlaceKind
SHOOTOUT, Int
1)]
  }
rect4 :: PlaceKind
rect4 = PlaceKind
rect3
  { pname :: Text
pname    = Text
"cabinet"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ARENA, Int
10)]
  }
rectWindows :: PlaceKind
rectWindows = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind
                [ (Char
'=', GroupName TileKind
RECT_WINDOWS_HORIZONTAL_DARK)
                , (Char
'!', GroupName TileKind
RECT_WINDOWS_VERTICAL_DARK) ]
                [ (Char
'=', GroupName TileKind
RECT_WINDOWS_HORIZONTAL_LIT)
                , (Char
'!', GroupName TileKind
RECT_WINDOWS_VERTICAL_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'w'
  , pname :: Text
pname    = Text
"a hut"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ESCAPE, Int
10), (GroupName PlaceKind
AMBUSH, Int
7)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
10), (Double
10, Int
10)]
  , pcover :: Cover
pcover   = Cover
CStretch
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-="
               , Text
"!·"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
glasshouse :: PlaceKind
glasshouse = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind
               [ (Char
'=', GroupName TileKind
GLASSHOUSE_HORIZONTAL_LIT)  -- visible from afar
               , (Char
'!', GroupName TileKind
GLASSHOUSE_VERTICAL_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'g'
  , pname :: Text
pname    = Text
"a glasshouse"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
SHOOTOUT, Int
4)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
10), (Double
10, Int
7)]
  , pcover :: Cover
pcover   = Cover
CStretch
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"=="
               , Text
"!·"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
glasshouse2 :: PlaceKind
glasshouse2 = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind [ (Char
'=', GroupName TileKind
GLASSHOUSE_HORIZONTAL_DARK)
                                 , (Char
'!', GroupName TileKind
GLASSHOUSE_VERTICAL_DARK) ]
                                 [ (Char
'=', GroupName TileKind
GLASSHOUSE_HORIZONTAL_LIT)
                                 , (Char
'!', GroupName TileKind
GLASSHOUSE_VERTICAL_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
glasshouse
  { pname :: Text
pname    = Text
"a glass cage"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ZOO, Int
10)]
  }
glasshouse3 :: PlaceKind
glasshouse3 = PlaceKind
glasshouse
  { pname :: Text
pname    = Text
"a reading room"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ARENA, Int
40)]
  }
pulpit :: PlaceKind
pulpit = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [ (Char
'=', GroupName TileKind
GLASSHOUSE_HORIZONTAL_LIT)
                           , (Char
'!', GroupName TileKind
GLASSHOUSE_VERTICAL_LIT)
                           , (Char
'0', GroupName TileKind
S_PULPIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
           -- except for floor, all will be lit, regardless of night/dark; OK
  { psymbol :: Char
psymbol  = Char
'p'
  , pname :: Text
pname    = Text
"a stand dais"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ARENA, Int
200), (GroupName PlaceKind
ZOO, Int
200)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CMirror
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"==·"
               , Text
"!··"
               , Text
"··0"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
ruin :: PlaceKind
ruin = PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'R'
  , pname :: Text
pname    = Text
"ruins"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
BATTLE, Int
330)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CStretch
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"--"
               , Text
"|X"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
ruin2 :: PlaceKind
ruin2 = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [ (Char
'|', GroupName TileKind
S_WALL_LIT)  -- visible from afar
                          , (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
ruin
  { pname :: Text
pname    = Text
"blasted walls"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
AMBUSH, Int
50)]
  }
collapsed :: PlaceKind
collapsed = PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'c'
  , pname :: Text
pname    = Text
"a collapsed cavern"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
NOISE, Int
1)]
      -- no point taking up space if very little space taken,
      -- but if no other place can be generated, a failsafe is useful
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CStretch
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
collapsed2 :: PlaceKind
collapsed2 = PlaceKind
collapsed
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
NOISE, Int
1000), (GroupName PlaceKind
BATTLE, Int
200)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"X0"
               , Text
"00"
               ]
  }
collapsed3 :: PlaceKind
collapsed3 = PlaceKind
collapsed
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
NOISE, Int
2000), (GroupName PlaceKind
BATTLE, Int
200)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"XX0"
               , Text
"000"
               ]
  }
collapsed4 :: PlaceKind
collapsed4 = PlaceKind
collapsed
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
NOISE, Int
2000), (GroupName PlaceKind
BATTLE, Int
200)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"XXX0"
               , Text
"0000"
               ]
  }
collapsed5 :: PlaceKind
collapsed5 = PlaceKind
collapsed
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
NOISE, Int
3000), (GroupName PlaceKind
BATTLE, Int
500)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"XX0"
               , Text
"X00"
               , Text
"000"
               ]
  }
collapsed6 :: PlaceKind
collapsed6 = PlaceKind
collapsed
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
NOISE, Int
4000), (GroupName PlaceKind
BATTLE, Int
1000)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"XXX0"
               , Text
"X000"
               , Text
"0000"
               ]
  }
collapsed7 :: PlaceKind
collapsed7 = PlaceKind
collapsed
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
NOISE, Int
4000), (GroupName PlaceKind
BATTLE, Int
1000)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"XXX0"
               , Text
"XX00"
               , Text
"0000"
               ]
  }
pillar :: PlaceKind
pillar = PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'p'
  , pname :: Text
pname    = Text
"a hall"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ROGUE, Int
600), (GroupName PlaceKind
LABORATORY, Int
2000)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CStretch
  , pfence :: Fence
pfence   = Fence
FNone
  -- Larger rooms require support pillars.
  , ptopLeft :: [Text]
ptopLeft = [ Text
"----"
               , Text
"|···"
               , Text
"|·0·"
               , Text
"|···"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
pillar2 :: PlaceKind
pillar2 = PlaceKind
pillar
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ROGUE, Int
60), (GroupName PlaceKind
LABORATORY, Int
200)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"----"
               , Text
"|0··"
               , Text
"|···"
               , Text
"|···"
               ]
  }
pillar3 :: PlaceKind
pillar3 = PlaceKind
pillar
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ROGUE, Int
8000), (GroupName PlaceKind
LABORATORY, Int
25000)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----"
               , Text
"|0···"
               , Text
"|····"
               , Text
"|··0·"
               , Text
"|····"
               ]
  }
pillar4 :: PlaceKind
pillar4 = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
'&', GroupName TileKind
CACHE)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
pillar
  { pname :: Text
pname    = Text
"an exquisite hall"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ROGUE, Int
30000), (GroupName PlaceKind
LABORATORY, Int
100000)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----"
               , Text
"|&·0·"
               , Text
"|····"
               , Text
"|0·0·"
               , Text
"|····"
               ]
  }
pillar5 :: PlaceKind
pillar5 = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
'&', GroupName TileKind
CACHE)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
pillar
  { pname :: Text
pname    = Text
"a decorated hall"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ROGUE, Int
30000), (GroupName PlaceKind
LABORATORY, Int
100000)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----"
               , Text
"|&·0·"
               , Text
"|····"
               , Text
"|0···"
               , Text
"|····"
               ]
  }
colonnade :: PlaceKind
colonnade = PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'c'
  , pname :: Text
pname    = Text
"a colonnade"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [ (GroupName PlaceKind
ROGUE, Int
3), (GroupName PlaceKind
ARENA, Int
20), (GroupName PlaceKind
LABORATORY, Int
2)
               , (GroupName PlaceKind
EMPTY, Int
10000), (GroupName PlaceKind
MINE, Int
1000), (GroupName PlaceKind
BRAWL, Int
4)
               , (GroupName PlaceKind
ESCAPE, Int
40), (GroupName PlaceKind
AMBUSH, Int
40) ]
  , prarity :: Rarity
prarity  = [(Double
1, Int
10), (Double
10, Int
10)]
  , pcover :: Cover
pcover   = Cover
CAlternate
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·"
               , Text
"··"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
colonnade2 :: PlaceKind
colonnade2 = PlaceKind
colonnade
  { prarity :: Rarity
prarity  = [(Double
1, Int
15), (Double
10, Int
15)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·"
               , Text
"·0"
               ]
  }
colonnade3 :: PlaceKind
colonnade3 = PlaceKind
colonnade
  { prarity :: Rarity
prarity  = [(Double
1, Int
800), (Double
10, Int
800)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"··0"
               , Text
"·0·"
               , Text
"0··"
               ]
  }
colonnade4 :: PlaceKind
colonnade4 = PlaceKind
colonnade
  { prarity :: Rarity
prarity  = [(Double
1, Int
200), (Double
10, Int
200)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0··"
               , Text
"·0·"
               , Text
"··0"
               ]
  }
colonnade5 :: PlaceKind
colonnade5 = PlaceKind
colonnade
  { prarity :: Rarity
prarity  = [(Double
1, Int
10), (Double
10, Int
10)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0··"
               , Text
"··0"
               ]
  }
colonnade6 :: PlaceKind
colonnade6 = PlaceKind
colonnade
  { prarity :: Rarity
prarity  = [(Double
1, Int
100), (Double
10, Int
100)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·"
               , Text
"··"
               , Text
"·0"
               ]
  }
lampPost :: PlaceKind
lampPost = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [ (Char
'0', GroupName TileKind
S_LAMP_POST)
                             , (Char
'·', GroupName TileKind
S_FLOOR_ACTOR_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'l'
  , pname :: Text
pname    = Text
"a lamp-lit area"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ESCAPE, Int
200), (GroupName PlaceKind
AMBUSH, Int
200), (GroupName PlaceKind
ZOO, Int
100), (GroupName PlaceKind
BATTLE, Int
100)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CVerbatim
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"X·X"
               , Text
"·0·"
               , Text
"X·X"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
lampPost2 :: PlaceKind
lampPost2 = PlaceKind
lampPost
  { ptopLeft :: [Text]
ptopLeft = [ Text
"···"
               , Text
"·0·"
               , Text
"···"
               ]
  }
lampPost3 :: PlaceKind
lampPost3 = PlaceKind
lampPost
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [ (GroupName PlaceKind
ESCAPE, Int
3000), (GroupName PlaceKind
AMBUSH, Int
3000), (GroupName PlaceKind
ZOO, Int
50)
               , (GroupName PlaceKind
BATTLE, Int
110) ]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"XX·XX"
               , Text
"X···X"
               , Text
"··0··"
               , Text
"X···X"
               , Text
"XX·XX"
               ]
  }
lampPost4 :: PlaceKind
lampPost4 = PlaceKind
lampPost
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ESCAPE, Int
3000), (GroupName PlaceKind
AMBUSH, Int
3000), (GroupName PlaceKind
ZOO, Int
50), (GroupName PlaceKind
BATTLE, Int
60)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"X···X"
               , Text
"·····"
               , Text
"··0··"
               , Text
"·····"
               , Text
"X···X"
               ]
  }
treeShade :: PlaceKind
treeShade = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind [ (Char
'0', GroupName TileKind
S_TREE_DARK)
                               , (Char
's', GroupName TileKind
TREE_SHADE_WALKABLE_DARK) ]
                               [ (Char
'0', GroupName TileKind
S_TREE_LIT)
                               , (Char
's', GroupName TileKind
TREE_SHADE_WALKABLE_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$
            [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
'·', GroupName TileKind
S_SHADED_GROUND)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
't'
  , pname :: Text
pname    = Text
"a tree shade"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
BRAWL, Int
1000)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CMirror
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"··s"
               , Text
"s0·"
               , Text
"Xs·"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
fogClump :: PlaceKind
fogClump = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind [(Char
'f', GroupName TileKind
FOG_CLUMP_DARK)]
                              [(Char
'f', GroupName TileKind
FOG_CLUMP_LIT)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$
           [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
';', GroupName TileKind
S_FOG_LIT)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'f'
  , pname :: Text
pname    = Text
"a foggy patch"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
SHOOTOUT, Int
150), (GroupName PlaceKind
EMPTY, Int
15)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CMirror
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"f;"
               , Text
";f"
               , Text
";X"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
fogClump2 :: PlaceKind
fogClump2 = PlaceKind
fogClump
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
SHOOTOUT, Int
500), (GroupName PlaceKind
EMPTY, Int
50)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"X;f"
               , Text
"f;f"
               , Text
";;f"
               , Text
"Xff"
               ]
  }
smokeClump :: PlaceKind
smokeClump = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind [ (Char
'f', GroupName TileKind
SMOKE_CLUMP_DARK)
                                , (Char
'·', GroupName TileKind
S_FLOOR_ACTOR_DARK) ]
                                [ (Char
'f', GroupName TileKind
SMOKE_CLUMP_LIT)
                                , (Char
'·', GroupName TileKind
S_FLOOR_ACTOR_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$
             [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
';', GroupName TileKind
S_SMOKE_LIT)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
's'
  , pname :: Text
pname    = Text
"a smoky patch"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ZOO, Int
50)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CMirror
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"f;"
               , Text
";f"
               , Text
";X"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
smokeClump2 :: PlaceKind
smokeClump2 = PlaceKind
smokeClump
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
ZOO, Int
500)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"X;f"
               , Text
"f;f"
               , Text
";;f"
               , Text
"Xff"
               ]
  }
smokeClump3FGround :: PlaceKind
smokeClump3FGround = PlaceKind
smokeClump
  { pname :: Text
pname    = Text
"a burned out area"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
LABORATORY, Int
150)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CVerbatim
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
";f;"
               , Text
"f·f"
               , Text
"f·f"
               , Text
";f;"
               ]
      -- should not be used in caves with trails, because bushes should
      -- not grow over such artificial trails
  }
bushClump :: PlaceKind
bushClump = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind [(Char
'f', GroupName TileKind
BUSH_CLUMP_DARK)]
                               [(Char
'f', GroupName TileKind
BUSH_CLUMP_LIT)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$
            [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
';', GroupName TileKind
S_BUSH_LIT)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'b'
  , pname :: Text
pname    = Text
"a bushy patch"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
SHOOTOUT, Int
40)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CMirror
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"Xf"  -- one sure exit needed not to block a corner
               , Text
";X"
               , Text
";;"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
      -- should not be used in caves with trails, because bushes can't
      -- grow over such artificial trails
  }
bushClump2 :: PlaceKind
bushClump2 = PlaceKind
bushClump
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
SHOOTOUT, Int
80)]
  , ptopLeft :: [Text]
ptopLeft = [ Text
"Xf"  -- one sure exit needed not to block a corner
               , Text
";X"
               , Text
";X"
               , Text
";;"
               ]
  }
escapeDown :: PlaceKind
escapeDown = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [ (Char
'|', GroupName TileKind
S_WALL_LIT)  -- visible from afar
                               , (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'>'
  , pname :: Text
pname    = Text
"an escape down"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
INDOOR_ESCAPE_DOWN, Int
1)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pcover :: Cover
pcover   = Cover
CVerbatim
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
">"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
escapeDown2 :: PlaceKind
escapeDown2 = PlaceKind
escapeDown
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
INDOOR_ESCAPE_DOWN, Int
1000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0"
               , Text
"·>·"
               , Text
"0·0"
               ]
  }
escapeDown3 :: PlaceKind
escapeDown3 = PlaceKind
escapeDown
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
INDOOR_ESCAPE_DOWN, Int
2000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----"
               , Text
"|0·0|"
               , Text
"|·>·|"
               , Text
"|0·0|"
               , Text
"-----"
               ]
  }
escapeDown4 :: PlaceKind
escapeDown4 = PlaceKind
escapeDown
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
INDOOR_ESCAPE_DOWN, Int
1000)]
  , pcover :: Cover
pcover   = Cover
CMirror
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0··"
               , Text
"·>·"
               , Text
"··0"
               ]
  }
escapeDown5 :: PlaceKind
escapeDown5 = PlaceKind
escapeDown
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
INDOOR_ESCAPE_DOWN, Int
2000)]
  , pcover :: Cover
pcover   = Cover
CMirror
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----"
               , Text
"|0··|"
               , Text
"|·>·|"
               , Text
"|0·0|"
               , Text
"-----"
               ]
  }
staircase :: PlaceKind
staircase = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [ (Char
'<', GroupName TileKind
STAIRCASE_UP)
                              , (Char
'>', GroupName TileKind
STAIRCASE_DOWN)
                              , (Char
'|', GroupName TileKind
S_WALL_LIT)  -- visible from afar
                              , (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_LIT) ] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind :: Char
-> Text
-> [(GroupName PlaceKind, Int)]
-> Rarity
-> Cover
-> Fence
-> [Text]
-> EnumMap Char (GroupName TileKind)
-> EnumMap Char (GroupName TileKind)
-> PlaceKind
PlaceKind
  { psymbol :: Char
psymbol  = Char
'/'
  , pname :: Text
pname    = Text
"a staircase"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
TINY_STAIRCASE, Int
1)]  -- no cover when arriving; low freq
  , prarity :: Rarity
prarity  = [(Double
1, Int
100), (Double
10, Int
100)]
  , pcover :: Cover
pcover   = Cover
CVerbatim
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"<·>"
               ]
  , plegendDark :: EnumMap Char (GroupName TileKind)
plegendDark = EnumMap Char (GroupName TileKind)
defaultLegendDark
  , plegendLit :: EnumMap Char (GroupName TileKind)
plegendLit = EnumMap Char (GroupName TileKind)
defaultLegendLit
  }
staircase1 :: PlaceKind
staircase1 = PlaceKind
staircase
  { prarity :: Rarity
prarity  = [(Double
1, Int
1)]  -- no cover when arriving; so low rarity
  }
staircase2 :: PlaceKind
staircase2 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
TINY_STAIRCASE, Int
3)]
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·<·>·"
               ]
  }
staircase3 :: PlaceKind
staircase3 = PlaceKind
staircase
  { prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  , pfence :: Fence
pfence   = Fence
FFloor
  }
staircase4 :: PlaceKind
staircase4 = PlaceKind
staircase2
  { pfence :: Fence
pfence   = Fence
FFloor
  , prarity :: Rarity
prarity  = [(Double
1, Int
1)]
  }
staircase5 :: PlaceKind
staircase5 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
OPEN_STAIRCASE, Int
200)]  -- no cover, open
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0"
               , Text
"···"
               , Text
"<·>"
               , Text
"···"
               , Text
"0·0"
               ]
  }
staircase6 :: PlaceKind
staircase6 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
OPEN_STAIRCASE, Int
300)]
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0·0"
               , Text
"·····"
               , Text
"·<·>·"
               , Text
"·····"
               , Text
"0·0·0"
               ]
  }
staircase7 :: PlaceKind
staircase7 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
OPEN_STAIRCASE, Int
500)]
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0·0·0"
               , Text
"·······"
               , Text
"0·<·>·0"
               , Text
"·······"
               , Text
"0·0·0·0"
               ]
  }
staircase8 :: PlaceKind
staircase8 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
OPEN_STAIRCASE, Int
2000)]
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·I·0·"
               , Text
"0·····0"
               , Text
"··<·>··"
               , Text
"0·····0"
               , Text
"·0·0·0·"
               ]
  }
staircase9 :: PlaceKind
staircase9 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
OPEN_STAIRCASE, Int
500)]
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·······0"
               , Text
"···<·>···"
               , Text
"0·······0"
               ]
  }
staircase10 :: PlaceKind
staircase10 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
OPEN_STAIRCASE, Int
500)]
  , pfence :: Fence
pfence   = Fence
FGround
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·····0"
               , Text
"··<·>··"
               , Text
"0·····0"
               ]
  }
staircase11 :: PlaceKind
staircase11 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
2000)]  -- weak cover, low freq
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·"
               , Text
"0·0"
               , Text
"···"
               , Text
"<·>"
               , Text
"···"
               , Text
"0·0"
               , Text
"·0·"
               ]
  }
staircase12 :: PlaceKind
staircase12 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
4000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·0·"
               , Text
"0·0·0"
               , Text
"·····"
               , Text
"·<·>·"
               , Text
"·····"
               , Text
"0·0·0"
               , Text
"·0·0·"
               ]
  }
staircase13 :: PlaceKind
staircase13 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
6000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·0·0·"
               , Text
"0·0·0·0"
               , Text
"·······"
               , Text
"0·<·>·0"
               , Text
"·······"
               , Text
"0·0·0·0"
               , Text
"·0·0·0·"
               ]
  }
staircase14 :: PlaceKind
staircase14 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
10000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0·0·0"
               , Text
"·0·0·0·"
               , Text
"0·····0"
               , Text
"··<·>··"
               , Text
"0·····0"
               , Text
"·0·0·0·"
               , Text
"0·0·0·0"
               ]
  }
staircase15 :: PlaceKind
staircase15 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
20000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·0·0·0·"
               , Text
"0·0·0·0·0"
               , Text
"·0·····0·"
               , Text
"0··<·>··0"
               , Text
"·0·····0·"
               , Text
"0·0·0·0·0"
               , Text
"·0·0·0·0·"
               ]
  }
staircase16 :: PlaceKind
staircase16 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
20000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0·0·0·0"
               , Text
"·0·0·0·0·"
               , Text
"0·······0"
               , Text
"·0·<·>·0·"
               , Text
"0·······0"
               , Text
"·0·0·0·0·"
               , Text
"0·0·0·0·0"
               ]
  }
staircase17 :: PlaceKind
staircase17 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
20000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0·0·0·0·0"
               , Text
"·0·0·0·0·0·"
               , Text
"0·0·····0·0"
               , Text
"·0··<·>··0·"
               , Text
"0·0·····0·0"
               , Text
"·0·0·0·0·0·"
               , Text
"0·0·0·0·0·0"
               ]
  }
staircase18 :: PlaceKind
staircase18 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
80000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"··0·0·0·0··"
               , Text
"·0·0·0·0·0·"
               , Text
"0·0·····0·0"
               , Text
"·0··<·>··0·"
               , Text
"0·0·····0·0"
               , Text
"·0·0·0·0·0·"
               , Text
"··0·0·0·0··"
               ]
  }
staircase19 :: PlaceKind
staircase19 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
20000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·0·0·0·0·"
               , Text
"0·0·0·0·0·0"
               , Text
"·0·······0·"
               , Text
"0·0·<·>·0·0"
               , Text
"·0·······0·"
               , Text
"0·0·0·0·0·0"
               , Text
"·0·0·0·0·0·"
               ]
  }
staircase20 :: PlaceKind
staircase20 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
5000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·0·0·0·0·"
               , Text
"0·0·····0·0"
               , Text
"·0··<·>··0·"
               , Text
"0·0·····0·0"
               , Text
"·0·0·I·0·0·"
               ]
  }
staircase21 :: PlaceKind
staircase21 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
5000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0·I·0·0"
               , Text
"·0·····0·"
               , Text
"0··<·>··0"
               , Text
"·0·····0·"
               , Text
"0·0·0·0·0"
               ]
  }
staircase22 :: PlaceKind
staircase22 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
2000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"0·0·····0·0"
               , Text
"·0··<·>··0·"
               , Text
"0·0·····0·0"
               ]
  }
staircase23 :: PlaceKind
staircase23 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
1000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·······0·"
               , Text
"0·0·<·>·0·0"
               , Text
"·0·······0·"
               ]
  }
staircase24 :: PlaceKind
staircase24 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
CLOSED_STAIRCASE, Int
1000)]
  , pfence :: Fence
pfence   = Fence
FFloor
  , ptopLeft :: [Text]
ptopLeft = [ Text
"·0·····0·"
               , Text
"0··<·>··0"
               , Text
"·0·····0·"
               ]
  }
staircase25 :: PlaceKind
staircase25 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
10)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-------"
               , Text
"|·····|"
               , Text
"|·<·>·|"
               , Text
"|·····|"
               , Text
"-------"
               ]
  }
staircase26 :: PlaceKind
staircase26 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
50)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"---------"
               , Text
"|·······|"
               , Text
"|··<·>··|"
               , Text
"|·······|"
               , Text
"---------"
               ]
  }
staircase27 :: PlaceKind
staircase27 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
100)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"---------"
               , Text
"|0·····0|"
               , Text
"|··<·>··|"
               , Text
"|0·····0|"
               , Text
"---------"
               ]
  }
staircase28 :: PlaceKind
staircase28 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
1000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-------"
               , Text
"|·····|"
               , Text
"|·····|"
               , Text
"|·<·>·|"
               , Text
"|·····|"
               , Text
"|·····|"
               , Text
"-------"
               ]
  }
staircase29 :: PlaceKind
staircase29 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
1000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-------"
               , Text
"|0···0|"
               , Text
"|·····|"
               , Text
"|·<·>·|"
               , Text
"|·····|"
               , Text
"|0···0|"
               , Text
"-------"
               ]
  }
staircase30 :: PlaceKind
staircase30 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
1000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-------"
               , Text
"|0·0·0|"
               , Text
"|·····|"
               , Text
"|·<·>·|"
               , Text
"|·····|"
               , Text
"|0·0·0|"
               , Text
"-------"
               ]
  }
staircase31 :: PlaceKind
staircase31 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
2000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"---------"
               , Text
"|·······|"
               , Text
"|·······|"
               , Text
"|··<·>··|"
               , Text
"|·······|"
               , Text
"|·······|"
               , Text
"---------"
               ]
  }
staircase32 :: PlaceKind
staircase32 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
5000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"---------"
               , Text
"|0·····0|"
               , Text
"|·······|"
               , Text
"|··<·>··|"
               , Text
"|·······|"
               , Text
"|0·····0|"
               , Text
"---------"
               ]
  }
staircase33 :: PlaceKind
staircase33 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
5000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"---------"
               , Text
"|0·0·0·0|"
               , Text
"|·······|"
               , Text
"|0·<·>·0|"
               , Text
"|·······|"
               , Text
"|0·0·0·0|"
               , Text
"---------"
               ]
  }
staircase34 :: PlaceKind
staircase34 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
5000)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"---------"
               , Text
"|·0·0·0·|"
               , Text
"|0·····0|"
               , Text
"|··<·>··|"
               , Text
"|0·····0|"
               , Text
"|·0·I·0·|"
               , Text
"---------"
               ]
  }
staircase35 :: PlaceKind
staircase35 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
200)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----------"
               , Text
"|·········|"
               , Text
"|···<·>···|"
               , Text
"|·········|"
               , Text
"-----------"
               ]
  }
staircase36 :: PlaceKind
staircase36 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
500)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----------"
               , Text
"|·0·····0·|"
               , Text
"|0··<·>··0|"
               , Text
"|·0·····0·|"
               , Text
"-----------"
               ]
  }
staircase37 :: PlaceKind
staircase37 = PlaceKind
staircase
  { pfreq :: [(GroupName PlaceKind, Int)]
pfreq    = [(GroupName PlaceKind
WALLED_STAIRCASE, Int
500)]
  , pfence :: Fence
pfence   = Fence
FNone
  , ptopLeft :: [Text]
ptopLeft = [ Text
"-----------"
               , Text
"|0·······0|"
               , Text
"|·0·<·>·0·|"
               , Text
"|0·······0|"
               , Text
"-----------"
               ]
  }

switchStaircaseToUp :: PlaceKind -> PlaceKind
switchStaircaseToUp :: PlaceKind -> PlaceKind
switchStaircaseToUp PlaceKind
s = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind [(Char
'>', GroupName TileKind
STAIR_TERMINAL_DARK)]
                                           [(Char
'>', GroupName TileKind
STAIR_TERMINAL_LIT)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
s
  { psymbol :: Char
psymbol   = Char
'<'
  , pname :: Text
pname     = PlaceKind -> Text
pname PlaceKind
s Text -> Text -> Text
<+> Text
"up"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq     = (Text -> Text)
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall c. (Text -> Text) -> Freqs c -> Freqs c
renameFreqs (Text -> Text -> Text
<+> Text
"up") ([(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)])
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> a -> b
$ PlaceKind -> [(GroupName PlaceKind, Int)]
pfreq PlaceKind
s
  }

switchStaircaseToDown :: PlaceKind -> PlaceKind
switchStaircaseToDown :: PlaceKind -> PlaceKind
switchStaircaseToDown PlaceKind
s = [(Char, GroupName TileKind)]
-> [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
override2PlaceKind [(Char
'<', GroupName TileKind
STAIR_TERMINAL_DARK)]
                                             [(Char
'<', GroupName TileKind
STAIR_TERMINAL_LIT)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
s
  { psymbol :: Char
psymbol   = Char
'>'
  , pname :: Text
pname     = PlaceKind -> Text
pname PlaceKind
s Text -> Text -> Text
<+> Text
"down"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq     = (Text -> Text)
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall c. (Text -> Text) -> Freqs c -> Freqs c
renameFreqs (Text -> Text -> Text
<+> Text
"down") ([(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)])
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> a -> b
$ PlaceKind -> [(GroupName PlaceKind, Int)]
pfreq PlaceKind
s
  }

overrideGated :: [(Char, GroupName TileKind)]
overrideGated :: [(Char, GroupName TileKind)]
overrideGated =
  [ (Char
'<', GroupName TileKind
GATED_STAIRCASE_UP), (Char
'>', GroupName TileKind
GATED_STAIRCASE_DOWN)
  , (Char
'|', GroupName TileKind
S_WALL_LIT), (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_LIT) ]  -- visible from afar

switchStaircaseToGated :: PlaceKind -> PlaceKind
switchStaircaseToGated :: PlaceKind -> PlaceKind
switchStaircaseToGated PlaceKind
s = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char, GroupName TileKind)]
overrideGated (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
s
  { psymbol :: Char
psymbol   = Char
'g'
  , pname :: Text
pname     = [Text] -> Text
T.unwords ([Text] -> Text) -> [Text] -> Text
forall a b. (a -> b) -> a -> b
$ Text
"a gated" Text -> [Text] -> [Text]
forall a. a -> [a] -> [a]
: [Text] -> [Text]
forall a. [a] -> [a]
tail (Text -> [Text]
T.words (PlaceKind -> Text
pname PlaceKind
s))
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq     = (Text -> Text)
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall c. (Text -> Text) -> Freqs c -> Freqs c
renameFreqs (Text
"gated" Text -> Text -> Text
<+>) ([(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)])
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> a -> b
$ PlaceKind -> [(GroupName PlaceKind, Int)]
pfreq PlaceKind
s
  }

overrideOutdoor :: [(Char, GroupName TileKind)]
overrideOutdoor :: [(Char, GroupName TileKind)]
overrideOutdoor =
  [ (Char
'<', GroupName TileKind
STAIRCASE_OUTDOOR_UP), (Char
'>', GroupName TileKind
STAIRCASE_OUTDOOR_DOWN)
  , (Char
'|', GroupName TileKind
S_WALL_LIT), (Char
'-', GroupName TileKind
S_WALL_HORIZONTAL_LIT) ]  -- visible from afar

switchStaircaseToOutdoor :: PlaceKind -> PlaceKind
switchStaircaseToOutdoor :: PlaceKind -> PlaceKind
switchStaircaseToOutdoor PlaceKind
s = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char, GroupName TileKind)]
overrideOutdoor (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
s
  { psymbol :: Char
psymbol   = Char
'o'
  , pname :: Text
pname     = Text
"an outdoor area exit"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq     = (Text -> Text)
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall c. (Text -> Text) -> Freqs c -> Freqs c
renameFreqs (Text
"outdoor" Text -> Text -> Text
<+>) ([(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)])
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> a -> b
$ PlaceKind -> [(GroupName PlaceKind, Int)]
pfreq PlaceKind
s
  }

switchEscapeToUp :: PlaceKind -> PlaceKind
switchEscapeToUp :: PlaceKind -> PlaceKind
switchEscapeToUp PlaceKind
s = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
'>', GroupName TileKind
ESCAPE_UP)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
s
  { psymbol :: Char
psymbol   = Char
'<'
  , pname :: Text
pname     = Text
"an escape up"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq     = ((GroupName PlaceKind, Int) -> (GroupName PlaceKind, Int))
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> [a] -> [b]
map (\(GroupName PlaceKind
_, Int
n) -> (GroupName PlaceKind
INDOOR_ESCAPE_UP, Int
n)) ([(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)])
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> a -> b
$ PlaceKind -> [(GroupName PlaceKind, Int)]
pfreq PlaceKind
s
  }

switchEscapeToOutdoorDown :: PlaceKind -> PlaceKind
switchEscapeToOutdoorDown :: PlaceKind -> PlaceKind
switchEscapeToOutdoorDown PlaceKind
s = [(Char, GroupName TileKind)] -> PlaceKind -> PlaceKind
overridePlaceKind [(Char
'>', GroupName TileKind
ESCAPE_OUTDOOR_DOWN)] (PlaceKind -> PlaceKind) -> PlaceKind -> PlaceKind
forall a b. (a -> b) -> a -> b
$ PlaceKind
s
  { pname :: Text
pname     = Text
"outdoor escape route"
  , pfreq :: [(GroupName PlaceKind, Int)]
pfreq     = ((GroupName PlaceKind, Int) -> (GroupName PlaceKind, Int))
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> [a] -> [b]
map (\(GroupName PlaceKind
_, Int
n) -> (GroupName PlaceKind
OUTDOOR_ESCAPE_DOWN, Int
n)) ([(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)])
-> [(GroupName PlaceKind, Int)] -> [(GroupName PlaceKind, Int)]
forall a b. (a -> b) -> a -> b
$ PlaceKind -> [(GroupName PlaceKind, Int)]
pfreq PlaceKind
s
  }