-- | Terrain tile definitions.
module Content.TileKind
  ( content
  ) where

import Prelude ()

import Game.LambdaHack.Core.Prelude

import qualified Data.Text as T

import Game.LambdaHack.Content.TileKind
import Game.LambdaHack.Definition.Color
import Game.LambdaHack.Definition.Defs

content :: [TileKind]
content :: [TileKind]
content =
  [TileKind
unknown, TileKind
unknownOuterFence, TileKind
basicOuterFence, TileKind
bedrock, TileKind
wall, TileKind
wallSuspect, TileKind
wallObscured, TileKind
wallH, TileKind
wallSuspectH, TileKind
wallObscuredDefacedH, TileKind
wallObscuredFrescoedH, TileKind
pillar, TileKind
pillarCache, TileKind
lampPost, TileKind
signboardUnread, TileKind
signboardRead, TileKind
tree, TileKind
treeBurnt, TileKind
treeBurning, TileKind
rubble, TileKind
rubbleSpice, TileKind
doorTrapped, TileKind
doorClosed, TileKind
doorTrappedH, TileKind
doorClosedH, TileKind
stairsUp, TileKind
stairsTrappedUp, TileKind
stairsOutdoorUp, TileKind
stairsGatedUp, TileKind
stairsDown, TileKind
stairsTrappedDown, TileKind
stairsOutdoorDown, TileKind
stairsGatedDown, TileKind
escapeUp, TileKind
escapeDown, TileKind
escapeOutdoorDown, TileKind
wallGlass, TileKind
wallGlassSpice, TileKind
wallGlassH, TileKind
wallGlassHSpice, TileKind
pillarIce, TileKind
pulpit, TileKind
bush, TileKind
bushBurnt, TileKind
bushBurning, TileKind
fog, TileKind
fogDark, TileKind
smoke, TileKind
smokeDark, TileKind
doorOpen, TileKind
doorOpenH, TileKind
floorCorridor, TileKind
floorArena, TileKind
floorDamp, TileKind
floorDirt, TileKind
floorDirtSpice, TileKind
floorActor, TileKind
floorActorItem, TileKind
floorAshes, TileKind
shallowWater, TileKind
shallowWaterSpice, TileKind
floorRed, TileKind
floorBlue, TileKind
floorGreen, TileKind
floorBrown, TileKind
floorArenaShade, TileKind
outdoorFence ]
  [TileKind] -> [TileKind] -> [TileKind]
forall a. [a] -> [a] -> [a]
++ (TileKind -> TileKind) -> [TileKind] -> [TileKind]
forall a b. (a -> b) -> [a] -> [b]
map TileKind -> TileKind
makeDark [TileKind]
ldarkable
  [TileKind] -> [TileKind] -> [TileKind]
forall a. [a] -> [a] -> [a]
++ (TileKind -> TileKind) -> [TileKind] -> [TileKind]
forall a b. (a -> b) -> [a] -> [b]
map TileKind -> TileKind
makeDarkColor [TileKind]
ldarkColorable

unknown,    unknownOuterFence, basicOuterFence, bedrock, wall, wallSuspect, wallObscured, wallH, wallSuspectH, wallObscuredDefacedH, wallObscuredFrescoedH, pillar, pillarCache, lampPost, signboardUnread, signboardRead, tree, treeBurnt, treeBurning, rubble, rubbleSpice, doorTrapped, doorClosed, doorTrappedH, doorClosedH, stairsUp, stairsTrappedUp, stairsOutdoorUp, stairsGatedUp, stairsDown, stairsTrappedDown, stairsOutdoorDown, stairsGatedDown, escapeUp, escapeDown, escapeOutdoorDown, wallGlass, wallGlassSpice, wallGlassH, wallGlassHSpice, pillarIce, pulpit, bush, bushBurnt, bushBurning, fog, fogDark, smoke, smokeDark, doorOpen, doorOpenH, floorCorridor, floorArena, floorDamp, floorDirt, floorDirtSpice, floorActor, floorActorItem, floorAshes, shallowWater, shallowWaterSpice, floorRed, floorBlue, floorGreen, floorBrown, floorArenaShade, outdoorFence :: TileKind

ldarkable :: [TileKind]
ldarkable :: [TileKind]
ldarkable = [TileKind
wall, TileKind
wallSuspect, TileKind
wallObscured, TileKind
wallH, TileKind
wallSuspectH, TileKind
wallObscuredDefacedH, TileKind
wallObscuredFrescoedH, TileKind
doorTrapped, TileKind
doorClosed, TileKind
doorTrappedH, TileKind
doorClosedH, TileKind
wallGlass, TileKind
wallGlassSpice, TileKind
wallGlassH, TileKind
wallGlassHSpice, TileKind
doorOpen, TileKind
doorOpenH, TileKind
floorCorridor, TileKind
shallowWater, TileKind
shallowWaterSpice]

ldarkColorable :: [TileKind]
ldarkColorable :: [TileKind]
ldarkColorable = [TileKind
tree, TileKind
bush, TileKind
floorArena, TileKind
floorDamp, TileKind
floorDirt, TileKind
floorDirtSpice, TileKind
floorActor, TileKind
floorActorItem]

-- Symbols to be used (the Nethack visual tradition imposes inconsistency):
--         LOS    noLOS
-- Walk    .|-#~  :;
-- noWalk  %^-|   -| O&<>+
--
-- can be opened ^&+
-- can be closed |-
-- some noWalk can be changed without opening, regardless of symbol
-- not used yet:
-- : (curtain, etc., not flowing, but solid and static)
-- `' (not visible enough when immobile)

-- Note that for AI hints and UI comfort, most multiple-use @Embed@ tiles
-- should have a variant, which after first use transforms into a different
-- colour tile without @ChangeTo@ and similar (which then AI no longer touches).
-- If a tile is supposed to be repeatedly activated by AI (e.g., cache),
-- it should keep @ChangeTo@ for the whole time.

-- * Main tiles, in other games modified and some removed

-- ** Not walkable

-- *** Not clear

unknown :: TileKind
unknown = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind  -- needs to have index 0 and alter 1; no other with 1
  { tsymbol :: Char
tsymbol  = ' '
  , tname :: Text
tname    = "unknown space"
  , tfreq :: Freqs TileKind
tfreq    = [("unknown space", 1)]
  , tcolor :: Color
tcolor   = Color
defFG
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 1
  , tfeature :: [Feature]
tfeature = [Feature
Dark]
  }
unknownOuterFence :: TileKind
unknownOuterFence = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = ' '
  , tname :: Text
tname    = "unknown space"
  , tfreq :: Freqs TileKind
tfreq    = [("unknown outer fence", 1)]
  , tcolor :: Color
tcolor   = Color
defFG
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = Word8
forall a. Bounded a => a
maxBound  -- impenetrable
  , tfeature :: [Feature]
tfeature = [Feature
Dark]
  }
basicOuterFence :: TileKind
basicOuterFence = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = ' '
  , tname :: Text
tname    = "impenetrable bedrock"
  , tfreq :: Freqs TileKind
tfreq    = [("basic outer fence", 1)]
  , tcolor :: Color
tcolor   = Color
defFG
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = Word8
forall a. Bounded a => a
maxBound  -- impenetrable
  , tfeature :: [Feature]
tfeature = [Feature
Dark]
  }
bedrock :: TileKind
bedrock = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = ' '
  , tname :: Text
tname    = "bedrock"
  , tfreq :: Freqs TileKind
tfreq    = [("fillerWall", 1), ("legendLit", 100), ("legendDark", 100)]
  , tcolor :: Color
tcolor   = Color
defFG
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 100
  , tfeature :: [Feature]
tfeature = [Feature
Dark]
      -- Bedrock being dark is bad for AI (forces it to backtrack to explore
      -- bedrock at corridor turns) and induces human micromanagement
      -- if there can be corridors joined diagonally (humans have to check
      -- with the xhair if the dark space is bedrock or unexplored).
      -- Lit bedrock would be even worse for humans, because it's harder
      -- to guess which tiles are unknown and which can be explored bedrock.
      -- The setup of Allure is ideal, with lit bedrock that is easily
      -- distinguished from an unknown tile. However, LH follows the NetHack,
      -- not the Angband, visual tradition, so we can't improve the situation,
      -- unless we turn to subtle shades of black or non-ASCII glyphs,
      -- but that is yet different aesthetics.
  }
wall :: TileKind
wall = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '|'
  , tname :: Text
tname    = "granite wall"
  , tfreq :: Freqs TileKind
tfreq    = [ ("legendLit", 100), ("wall Lit", 100)
               , ("rectWindowsOver_!_Lit", 80) ]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 100
  , tfeature :: [Feature]
tfeature = [GroupName TileKind -> Feature
BuildAs "suspect vertical wall Lit"]
  }
wallSuspect :: TileKind
wallSuspect = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind  -- only on client
  { tsymbol :: Char
tsymbol  = '|'
  , tname :: Text
tname    = "suspect uneven wall"
  , tfreq :: Freqs TileKind
tfreq    = [("suspect vertical wall Lit", 1)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 2
  , tfeature :: [Feature]
tfeature = [ GroupName TileKind -> Feature
RevealAs "trapped vertical door Lit"
               , GroupName TileKind -> Feature
ObscureAs "obscured vertical wall Lit"
               ]
  }
wallObscured :: TileKind
wallObscured = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '|'
  , tname :: Text
tname    = "scratched wall"
  , tfreq :: Freqs TileKind
tfreq    = [("obscured vertical wall Lit", 1)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "scratch on wall"
               , GroupName TileKind -> Feature
HideAs "suspect vertical wall Lit"
               ]
  }
wallH :: TileKind
wallH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '-'
  , tname :: Text
tname    = "sandstone wall"
  , tfreq :: Freqs TileKind
tfreq    = [ ("legendLit", 100), ("wallH Lit", 100)
               , ("rectWindowsOver_=_Lit", 80) ]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 100
  , tfeature :: [Feature]
tfeature = [GroupName TileKind -> Feature
BuildAs "suspect horizontal wall Lit"]
  }
wallSuspectH :: TileKind
wallSuspectH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind  -- only on client
  { tsymbol :: Char
tsymbol  = '-'
  , tname :: Text
tname    = "suspect painted wall"
  , tfreq :: Freqs TileKind
tfreq    = [("suspect horizontal wall Lit", 1)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 2
  , tfeature :: [Feature]
tfeature = [ GroupName TileKind -> Feature
RevealAs "trapped horizontal door Lit"
               , GroupName TileKind -> Feature
ObscureAs "obscured horizontal wall Lit"
               ]
  }
wallObscuredDefacedH :: TileKind
wallObscuredDefacedH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '-'
  , tname :: Text
tname    = "defaced wall"
  , tfreq :: Freqs TileKind
tfreq    = [("obscured horizontal wall Lit", 90)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "obscene pictogram"
               , GroupName TileKind -> Feature
HideAs "suspect horizontal wall Lit"
               ]
  }
wallObscuredFrescoedH :: TileKind
wallObscuredFrescoedH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '-'
  , tname :: Text
tname    = "frescoed wall"
  , tfreq :: Freqs TileKind
tfreq    = [("obscured horizontal wall Lit", 10)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "subtle fresco"
               , GroupName TileKind -> Feature
HideAs "suspect horizontal wall Lit"
               ]  -- a bit beneficial, but AI would loop if allowed to trigger
                  -- so no @ConsideredByAI@
  }
pillar :: TileKind
pillar = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '0'
  , tname :: Text
tname    = "rock"
  , tfreq :: Freqs TileKind
tfreq    = [ ("cachable", 70)
               , ("stair terminal Lit", 100), ("stair terminal Dark", 100)
               , ("legendLit", 100), ("legendDark", 100)
               , ("emptySetLit", 20), ("noiseSetLit", 700)
               , ("powerSetDark", 700)
               , ("battleSetDark", 200), ("brawlSetLit", 50)
               , ("shootoutSetLit", 10), ("zooSetDark", 10) ]
  , tcolor :: Color
tcolor   = Color
BrCyan  -- not BrWhite, to tell from heroes
  , tcolor2 :: Color
tcolor2  = Color
Cyan
  , talter :: Word8
talter   = 100
  , tfeature :: [Feature]
tfeature = []
  }
pillarCache :: TileKind
pillarCache = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '0'
  , tname :: Text
tname    = "smoothed rock"
  , tfreq :: Freqs TileKind
tfreq    = [("cachable", 30), ("cache", 1), ("stair terminal Dark", 4)]
                 -- treasure only in dark staircases
  , tcolor :: Color
tcolor   = Color
BrBlue
  , tcolor2 :: Color
tcolor2  = Color
Blue
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "treasure cache", GroupName ItemKind -> Feature
Embed "treasure cache trap"
               , GroupName TileKind -> Feature
ChangeTo "cachable", Feature
ConsideredByAI ]
      -- Not explorable, but prominently placed, so hard to miss.
      -- Very beneficial, so AI eager to trigger, unless wary of traps.
  }
lampPost :: TileKind
lampPost = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '0'
  , tname :: Text
tname    = "lamp post"
  , tfreq :: Freqs TileKind
tfreq    = [("lampPostOver_0", 1)]
  , tcolor :: Color
tcolor   = Color
BrYellow
  , tcolor2 :: Color
tcolor2  = Color
Brown
  , talter :: Word8
talter   = 100
  , tfeature :: [Feature]
tfeature = []
  }
signboardUnread :: TileKind
signboardUnread = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind  -- client only, indicates never used by this faction
  { tsymbol :: Char
tsymbol  = '0'
  , tname :: Text
tname    = "signboard"
  , tfreq :: Freqs TileKind
tfreq    = [("signboard unread", 1)]
  , tcolor :: Color
tcolor   = Color
BrCyan
  , tcolor2 :: Color
tcolor2  = Color
Cyan
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = [ Feature
ConsideredByAI  -- changes after use, so safe for AI
               , GroupName TileKind -> Feature
RevealAs "signboard"  -- to display as hidden
               ]
  }
signboardRead :: TileKind
signboardRead = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '0'
  , tname :: Text
tname    = "signboard"
  , tfreq :: Freqs TileKind
tfreq    = [("signboard", 1), ("escapeSetDark", 1)]
  , tcolor :: Color
tcolor   = Color
BrCyan
  , tcolor2 :: Color
tcolor2  = Color
Cyan
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = [GroupName ItemKind -> Feature
Embed "signboard", GroupName TileKind -> Feature
HideAs "signboard unread"]
  }
tree :: TileKind
tree = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '0'
  , tname :: Text
tname    = "tree"
  , tfreq :: Freqs TileKind
tfreq    = [ ("brawlSetLit", 140), ("shootoutSetLit", 10)
               , ("escapeSetLit", 35), ("ambushSetLit", 3)
               , ("treeShadeOver_0_Lit", 1) ]
  , tcolor :: Color
tcolor   = Color
BrGreen
  , tcolor2 :: Color
tcolor2  = Color
Green
  , talter :: Word8
talter   = 50
  , tfeature :: [Feature]
tfeature = []
  }
treeBurnt :: TileKind
treeBurnt = TileKind
tree
  { tname :: Text
tname    = "burnt tree"
  , tfreq :: Freqs TileKind
tfreq    = [ ("ambushSetDark", 3), ("zooSetDark", 7), ("battleSetDark", 50)
               , ("tree with fire", 30) ]
  , tcolor :: Color
tcolor   = Color
BrBlack
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , tfeature :: [Feature]
tfeature = Feature
Dark Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
tree
  }
treeBurning :: TileKind
treeBurning = TileKind
tree
  { tname :: Text
tname    = "burning tree"
  , tfreq :: Freqs TileKind
tfreq    = [ ("ambushSetDark", 15), ("zooSetDark", 70)
               , ("tree with fire", 70) ]
  , tcolor :: Color
tcolor   = Color
BrRed
  , tcolor2 :: Color
tcolor2  = Color
Red
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = GroupName ItemKind -> Feature
Embed "big fire" Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: GroupName TileKind -> Feature
ChangeTo "tree with fire" Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
tree
      -- TODO: dousing off the tree will have more sense when it periodically
      -- explodes, hitting and lighting up the team and so betraying it
  }
rubble :: TileKind
rubble = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '&'
  , tname :: Text
tname    = "rubble pile"
  , tfreq :: Freqs TileKind
tfreq    = [ ("rubble", 1), ("legendLit", 1), ("legendDark", 1)
               , ("stair terminal Lit", 4), ("stair terminal Dark", 4)
               , ("emptySetLit", 10), ("emptySetDark", 10)
               , ("noiseSetLit", 50), ("powerSetDark", 50)
               , ("zooSetDark", 100), ("ambushSetDark", 10) ]
  , tcolor :: Color
tcolor   = Color
BrYellow
  , tcolor2 :: Color
tcolor2  = Color
Brown
  , talter :: Word8
talter   = 4  -- boss can dig through
  , tfeature :: [Feature]
tfeature = [GroupName TileKind -> Feature
OpenTo "floorAshesLit", GroupName ItemKind -> Feature
Embed "rubble"]
      -- It's not explorable, due to not being walkable nor clear and due
      -- to being a door (@OpenTo@), which is kind of OK, because getting
      -- the item is risky and, e.g., AI doesn't attempt it.
      -- Also, AI doesn't go out of its way to clear the way for heroes.
  }
rubbleSpice :: TileKind
rubbleSpice = TileKind
rubble
  { tfreq :: Freqs TileKind
tfreq    = [("smokeClumpOver_f_Lit", 1), ("smokeClumpOver_f_Dark", 1)]
  , tfeature :: [Feature]
tfeature = Feature
Spice Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
rubble
  }
doorTrapped :: TileKind
doorTrapped = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '+'
  , tname :: Text
tname    = "trapped door"
  , tfreq :: Freqs TileKind
tfreq    = [("trapped vertical door Lit", 1)]
  , tcolor :: Color
tcolor   = Color
BrRed
  , tcolor2 :: Color
tcolor2  = Color
Red
  , talter :: Word8
talter   = 2
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "doorway trap"
               , GroupName TileKind -> Feature
OpenTo "open vertical door Lit"
               , GroupName TileKind -> Feature
HideAs "suspect vertical wall Lit"
               ]
  }
doorClosed :: TileKind
doorClosed = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '+'
  , tname :: Text
tname    = "closed door"
  , tfreq :: Freqs TileKind
tfreq    = [("closed vertical door Lit", 1)]
  , tcolor :: Color
tcolor   = Color
Brown
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , talter :: Word8
talter   = 2
  , tfeature :: [Feature]
tfeature = [GroupName TileKind -> Feature
OpenTo "open vertical door Lit"]  -- never hidden
  }
doorTrappedH :: TileKind
doorTrappedH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '+'
  , tname :: Text
tname    = "trapped door"
  , tfreq :: Freqs TileKind
tfreq    = [("trapped horizontal door Lit", 1)]
  , tcolor :: Color
tcolor   = Color
BrRed
  , tcolor2 :: Color
tcolor2  = Color
Red
  , talter :: Word8
talter   = 2
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "doorway trap"
               , GroupName TileKind -> Feature
OpenTo "open horizontal door Lit"
               , GroupName TileKind -> Feature
HideAs "suspect horizontal wall Lit"
               ]
  }
doorClosedH :: TileKind
doorClosedH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '+'
  , tname :: Text
tname    = "closed door"
  , tfreq :: Freqs TileKind
tfreq    = [("closed horizontal door Lit", 1)]
  , tcolor :: Color
tcolor   = Color
Brown
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , talter :: Word8
talter   = 2
  , tfeature :: [Feature]
tfeature = [GroupName TileKind -> Feature
OpenTo "open horizontal door Lit"]  -- never hidden
  }
stairsUp :: TileKind
stairsUp = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '<'
  , tname :: Text
tname    = "staircase up"
  , tfreq :: Freqs TileKind
tfreq    = [("staircase up", 9), ("ordinary staircase up", 1)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = Word8
talterForStairs
  , tfeature :: [Feature]
tfeature = [GroupName ItemKind -> Feature
Embed "staircase up", Feature
ConsideredByAI]
  }
stairsTrappedUp :: TileKind
stairsTrappedUp = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '<'
  , tname :: Text
tname    = "windy staircase up"
  , tfreq :: Freqs TileKind
tfreq    = [("staircase up", 1)]
  , tcolor :: Color
tcolor   = Color
BrRed
  , tcolor2 :: Color
tcolor2  = Color
Red
  , talter :: Word8
talter   = Word8
talterForStairs
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "staircase up", GroupName ItemKind -> Feature
Embed "staircase trap up"
               , Feature
ConsideredByAI, GroupName TileKind -> Feature
ChangeTo "ordinary staircase up" ]
                 -- AI uses despite the trap; exploration more important
  }
stairsOutdoorUp :: TileKind
stairsOutdoorUp = TileKind
stairsUp
  { tname :: Text
tname    = "signpost pointing backward"
  , tfreq :: Freqs TileKind
tfreq    = [("staircase outdoor up", 1)]
  }
stairsGatedUp :: TileKind
stairsGatedUp = TileKind
stairsUp
  { tname :: Text
tname    = "gated staircase up"
  , tfreq :: Freqs TileKind
tfreq    = [("gated staircase up", 1)]
  , talter :: Word8
talter   = Word8
talterForStairs Word8 -> Word8 -> Word8
forall a. Num a => a -> a -> a
+ 2  -- animals and bosses can't use
  }
stairsDown :: TileKind
stairsDown = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '>'
  , tname :: Text
tname    = "staircase down"
  , tfreq :: Freqs TileKind
tfreq    = [("staircase down", 9), ("ordinary staircase down", 1)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = Word8
talterForStairs
  , tfeature :: [Feature]
tfeature = [GroupName ItemKind -> Feature
Embed "staircase down", Feature
ConsideredByAI]
  }
stairsTrappedDown :: TileKind
stairsTrappedDown = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '>'
  , tname :: Text
tname    = "crooked staircase down"
  , tfreq :: Freqs TileKind
tfreq    = [("staircase down", 1)]
  , tcolor :: Color
tcolor   = Color
BrRed
  , tcolor2 :: Color
tcolor2  = Color
Red
  , talter :: Word8
talter   = Word8
talterForStairs
  , tfeature :: [Feature]
tfeature = [ GroupName ItemKind -> Feature
Embed "staircase down", GroupName ItemKind -> Feature
Embed "staircase trap down"
               , Feature
ConsideredByAI, GroupName TileKind -> Feature
ChangeTo "ordinary staircase down" ]
  }
stairsOutdoorDown :: TileKind
stairsOutdoorDown = TileKind
stairsDown
  { tname :: Text
tname    = "signpost pointing forward"
  , tfreq :: Freqs TileKind
tfreq    = [("staircase outdoor down", 1)]
  }
stairsGatedDown :: TileKind
stairsGatedDown = TileKind
stairsDown
  { tname :: Text
tname    = "gated staircase down"
  , tfreq :: Freqs TileKind
tfreq    = [("gated staircase down", 1)]
  , talter :: Word8
talter   = Word8
talterForStairs Word8 -> Word8 -> Word8
forall a. Num a => a -> a -> a
+ 2  -- animals and bosses can't use
  }
escapeUp :: TileKind
escapeUp = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '<'
  , tname :: Text
tname    = "exit hatch up"
  , tfreq :: Freqs TileKind
tfreq    = [("legendLit", 1), ("legendDark", 1), ("escape up", 1)]
  , tcolor :: Color
tcolor   = Color
BrYellow
  , tcolor2 :: Color
tcolor2  = Color
BrYellow
  , talter :: Word8
talter   = 0  -- anybody can escape (or guard escape)
  , tfeature :: [Feature]
tfeature = [GroupName ItemKind -> Feature
Embed "escape", Feature
ConsideredByAI]
  }
escapeDown :: TileKind
escapeDown = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '>'
  , tname :: Text
tname    = "exit trapdoor down"
  , tfreq :: Freqs TileKind
tfreq    = [("legendLit", 1), ("legendDark", 1), ("escape down", 1)]
  , tcolor :: Color
tcolor   = Color
BrYellow
  , tcolor2 :: Color
tcolor2  = Color
BrYellow
  , talter :: Word8
talter   = 0  -- anybody can escape (or guard escape)
  , tfeature :: [Feature]
tfeature = [GroupName ItemKind -> Feature
Embed "escape", Feature
ConsideredByAI]
  }
escapeOutdoorDown :: TileKind
escapeOutdoorDown = TileKind
escapeDown
  { tname :: Text
tname    = "exit back to town"
  , tfreq :: Freqs TileKind
tfreq    = [("escape outdoor down", 1)]
  }

-- *** Clear

wallGlass :: TileKind
wallGlass = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '|'
  , tname :: Text
tname    = "polished crystal wall"
  , tfreq :: Freqs TileKind
tfreq    = [("glasshouseOver_!_Lit", 1)]
  , tcolor :: Color
tcolor   = Color
BrBlue
  , tcolor2 :: Color
tcolor2  = Color
Blue
  , talter :: Word8
talter   = 10
  , tfeature :: [Feature]
tfeature = [GroupName TileKind -> Feature
BuildAs "closed vertical door Lit", Feature
Clear]
  }
wallGlassSpice :: TileKind
wallGlassSpice = TileKind
wallGlass
  { tfreq :: Freqs TileKind
tfreq    = [("rectWindowsOver_!_Lit", 20)]
  , tfeature :: [Feature]
tfeature = Feature
Spice Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
wallGlass
  }
wallGlassH :: TileKind
wallGlassH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '-'
  , tname :: Text
tname    = "polished crystal wall"
  , tfreq :: Freqs TileKind
tfreq    = [("glasshouseOver_=_Lit", 1)]
  , tcolor :: Color
tcolor   = Color
BrBlue
  , tcolor2 :: Color
tcolor2  = Color
Blue
  , talter :: Word8
talter   = 10
  , tfeature :: [Feature]
tfeature = [GroupName TileKind -> Feature
BuildAs "closed horizontal door Lit", Feature
Clear]
  }
wallGlassHSpice :: TileKind
wallGlassHSpice = TileKind
wallGlassH
  { tfreq :: Freqs TileKind
tfreq    = [("rectWindowsOver_=_Lit", 20)]
  , tfeature :: [Feature]
tfeature = Feature
Spice Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
wallGlassH
  }
pillarIce :: TileKind
pillarIce = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '^'
  , tname :: Text
tname    = "icy outcrop"
  , tfreq :: Freqs TileKind
tfreq    = [("powerSetDark", 300)]
  , tcolor :: Color
tcolor   = Color
BrBlue
  , tcolor2 :: Color
tcolor2  = Color
Blue
  , talter :: Word8
talter   = 4  -- boss can dig through
  , tfeature :: [Feature]
tfeature = [Feature
Clear, GroupName ItemKind -> Feature
Embed "frost", GroupName TileKind -> Feature
OpenTo "shallow water Lit"]
      -- Is door, due to @OpenTo@, so is not explorable, but it's OK, because
      -- it doesn't generate items nor clues. This saves on the need to
      -- get each ice pillar into sight range when exploring level.
  }
pulpit :: TileKind
pulpit = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '%'
  , tname :: Text
tname    = "pulpit"
  , tfreq :: Freqs TileKind
tfreq    = [("pulpit", 1)]
  , tcolor :: Color
tcolor   = Color
BrYellow
  , tcolor2 :: Color
tcolor2  = Color
Brown
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = [Feature
Clear, GroupName ItemKind -> Feature
Embed "pulpit"]
                 -- mixed blessing, so AI ignores, saved for player fun
  }
bush :: TileKind
bush = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '%'
  , tname :: Text
tname    = "bush"
  , tfreq :: Freqs TileKind
tfreq    = [ ("bush Lit", 1), ("shootoutSetLit", 30), ("escapeSetLit", 40)
               , ("ambushSetLit", 3), ("bushClumpOver_f_Lit", 1) ]
  , tcolor :: Color
tcolor   = Color
BrGreen
  , tcolor2 :: Color
tcolor2  = Color
Green
  , talter :: Word8
talter   = 10
  , tfeature :: [Feature]
tfeature = [Feature
Clear]
  }
bushBurnt :: TileKind
bushBurnt = TileKind
bush
  { tname :: Text
tname    = "burnt bush"
  , tfreq :: Freqs TileKind
tfreq    = [ ("battleSetDark", 30), ("zooSetDark", 30), ("ambushSetDark", 3)
               , ("bush with fire", 70) ]
  , tcolor :: Color
tcolor   = Color
BrBlack
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , tfeature :: [Feature]
tfeature = Feature
Dark Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
bush
  }
bushBurning :: TileKind
bushBurning = TileKind
bush
  { tname :: Text
tname    = "burning bush"
  , tfreq :: Freqs TileKind
tfreq    = [ ("ambushSetDark", 15), ("zooSetDark", 300)
               , ("bush with fire", 30) ]
  , tcolor :: Color
tcolor   = Color
BrRed
  , tcolor2 :: Color
tcolor2  = Color
Red
  , talter :: Word8
talter   = 5
  , tfeature :: [Feature]
tfeature = GroupName ItemKind -> Feature
Embed "small fire" Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: GroupName TileKind -> Feature
ChangeTo "bush with fire" Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
bush
  }

-- ** Walkable

-- *** Not clear

fog :: TileKind
fog = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = ';'
  , tname :: Text
tname    = "faint fog"
  , tfreq :: Freqs TileKind
tfreq    = [ ("fog Lit", 1), ("emptySetLit", 50), ("noiseSetLit", 100)
               , ("shootoutSetLit", 20)
               , ("fogClumpOver_f_Lit", 60), ("fogClumpOver_f_Dark", 60) ]
      -- lit fog is OK for shootout, because LOS is mutual, as opposed
      -- to dark fog, and so camper has little advantage, especially
      -- on big maps, where he doesn't know on which side of fog patch to hide
  , tcolor :: Color
tcolor   = Color
BrCyan
  , tcolor2 :: Color
tcolor2  = Color
Cyan
  , talter :: Word8
talter   = 0
  , tfeature :: [Feature]
tfeature = [Feature
Walkable, Feature
NoItem, Feature
OftenActor]
  }
fogDark :: TileKind
fogDark = TileKind
fog
  { tname :: Text
tname    = "thick fog"
  , tfreq :: Freqs TileKind
tfreq    = [ ("emptySetDark", 50), ("powerSetDark", 100)
               , ("escapeSetDark", 50) ]
  , tfeature :: [Feature]
tfeature = Feature
Dark Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
fog
  }
smoke :: TileKind
smoke = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = ';'
  , tname :: Text
tname    = "billowing smoke"
  , tfreq :: Freqs TileKind
tfreq    = [ ("smoke Lit", 1), ("labTrailLit", 1), ("stair terminal Lit", 4)
               , ("smokeClumpOver_f_Lit", 3), ("smokeClumpOver_f_Dark", 3) ]
  , tcolor :: Color
tcolor   = Color
Brown
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , talter :: Word8
talter   = 0
  , tfeature :: [Feature]
tfeature = [Feature
Walkable, Feature
NoItem]  -- not dark, embers
  }
smokeDark :: TileKind
smokeDark = TileKind
smoke
  { tname :: Text
tname    = "lingering smoke"
  , tfreq :: Freqs TileKind
tfreq    = [ ("stair terminal Dark", 4), ("ambushSetDark", 40)
               , ("zooSetDark", 20), ("battleSetDark", 5) ]
  , tfeature :: [Feature]
tfeature = Feature
Dark Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
smoke
  }

-- *** Clear

doorOpen :: TileKind
doorOpen = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '-'
  , tname :: Text
tname    = "open door"
  , tfreq :: Freqs TileKind
tfreq    = [("open vertical door Lit", 1)]
  , tcolor :: Color
tcolor   = Color
Brown
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , talter :: Word8
talter   = 4
  , tfeature :: [Feature]
tfeature = [ Feature
Walkable, Feature
Clear, Feature
NoItem, Feature
NoActor
               , GroupName TileKind -> Feature
CloseTo "closed vertical door Lit"
               ]
  }
doorOpenH :: TileKind
doorOpenH = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '|'
  , tname :: Text
tname    = "open door"
  , tfreq :: Freqs TileKind
tfreq    = [("open horizontal door Lit", 1)]
  , tcolor :: Color
tcolor   = Color
Brown
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , talter :: Word8
talter   = 4
  , tfeature :: [Feature]
tfeature = [ Feature
Walkable, Feature
Clear, Feature
NoItem, Feature
NoActor
               , GroupName TileKind -> Feature
CloseTo "closed horizontal door Lit"
               ]
  }
floorCorridor :: TileKind
floorCorridor = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '#'
  , tname :: Text
tname    = "corridor"
  , tfreq :: Freqs TileKind
tfreq    = [("floorCorridorLit", 1)]
  , tcolor :: Color
tcolor   = Color
BrWhite
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = 0
  , tfeature :: [Feature]
tfeature = [Feature
Walkable, Feature
Clear]
  }
floorArena :: TileKind
floorArena = TileKind
floorCorridor
  { tsymbol :: Char
tsymbol  = Char
floorSymbol
  , tname :: Text
tname    = "stone floor"
  , tfreq :: Freqs TileKind
tfreq    = [ ("floorArenaLit", 1), ("arenaSetLit", 1), ("emptySetLit", 900)
               , ("zooSetLit", 600) ]
  }
floorDamp :: TileKind
floorDamp = TileKind
floorArena
  { tname :: Text
tname    = "damp stone floor"
  , tfreq :: Freqs TileKind
tfreq    = [ ("noiseSetLit", 600), ("powerSetLit", 600)
               , ("damp floor Lit", 1), ("stair terminal Lit", 20) ]
  }
floorDirt :: TileKind
floorDirt = TileKind
floorArena
  { tname :: Text
tname    = "dirt"
  , tfreq :: Freqs TileKind
tfreq    = [ ("shootoutSetLit", 1000), ("escapeSetLit", 1000)
               , ("ambushSetLit", 1000), ("battleSetLit", 1000)
               , ("brawlSetLit", 1000), ("dirt Lit", 1) ]
  }
floorDirtSpice :: TileKind
floorDirtSpice = TileKind
floorDirt
  { tfreq :: Freqs TileKind
tfreq    = [("treeShadeOver_s_Lit", 1), ("bushClumpOver_f_Lit", 1)]
  , tfeature :: [Feature]
tfeature = Feature
Spice Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
floorDirt
  }
floorActor :: TileKind
floorActor = TileKind
floorArena
  { tfreq :: Freqs TileKind
tfreq    = [("floorActorLit", 1)]
  , tfeature :: [Feature]
tfeature = Feature
OftenActor Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
floorArena
  }
floorActorItem :: TileKind
floorActorItem = TileKind
floorActor
  { tfreq :: Freqs TileKind
tfreq    = [("legendLit", 100)]
  , tfeature :: [Feature]
tfeature = Feature
VeryOftenItem Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
floorActor
  }
floorAshes :: TileKind
floorAshes = TileKind
floorActor
  { tfreq :: Freqs TileKind
tfreq    = [ ("smokeClumpOver_f_Lit", 2), ("smokeClumpOver_f_Dark", 2)
               , ("floorAshesLit", 1), ("floorAshesDark", 1) ]
  , tname :: Text
tname    = "dirt and ash pile"
  , tcolor :: Color
tcolor   = Color
Brown
  , tcolor2 :: Color
tcolor2  = Color
Brown
  }
shallowWater :: TileKind
shallowWater = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = '~'
  , tname :: Text
tname    = "water puddle"
  , tfreq :: Freqs TileKind
tfreq    = [ ("shallow water Lit", 1), ("legendLit", 100)
               , ("emptySetLit", 5), ("noiseSetLit", 20)
               , ("powerSetLit", 20), ("shootoutSetLit", 5) ]
  , tcolor :: Color
tcolor   = Color
BrCyan
  , tcolor2 :: Color
tcolor2  = Color
Cyan
  , talter :: Word8
talter   = 0
  , tfeature :: [Feature]
tfeature = GroupName ItemKind -> Feature
Embed "shallow water" Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
floorActor
  }
shallowWaterSpice :: TileKind
shallowWaterSpice = TileKind
shallowWater
  { tfreq :: Freqs TileKind
tfreq    = [("fogClumpOver_f_Lit", 40)]
  , tfeature :: [Feature]
tfeature = Feature
Spice Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
shallowWater
  }
floorRed :: TileKind
floorRed = TileKind
floorCorridor
  { tsymbol :: Char
tsymbol  = Char
floorSymbol
  , tname :: Text
tname    = "brick pavement"
  , tfreq :: Freqs TileKind
tfreq    = [("trailLit", 70), ("safeTrailLit", 70)]
  , tcolor :: Color
tcolor   = Color
BrRed
  , tcolor2 :: Color
tcolor2  = Color
Red
  , tfeature :: [Feature]
tfeature = [GroupName ItemKind -> Feature
Embed "straight path", Feature
Trail, Feature
Walkable, Feature
Clear]
  }
floorBlue :: TileKind
floorBlue = TileKind
floorRed
  { tname :: Text
tname    = "frozen trail"
  , tfreq :: Freqs TileKind
tfreq    = [("trailLit", 100)]
  , tcolor :: Color
tcolor   = Color
BrBlue
  , tcolor2 :: Color
tcolor2  = Color
Blue
  , tfeature :: [Feature]
tfeature = [GroupName ItemKind -> Feature
Embed "frozen ground", Feature
Trail, Feature
Walkable, Feature
Clear]
  }
floorGreen :: TileKind
floorGreen = TileKind
floorRed
  { tname :: Text
tname    = "mossy stone path"
  , tfreq :: Freqs TileKind
tfreq    = [("trailLit", 70), ("safeTrailLit", 70)]
  , tcolor :: Color
tcolor   = Color
BrGreen
  , tcolor2 :: Color
tcolor2  = Color
Green
  }
floorBrown :: TileKind
floorBrown = TileKind
floorRed
  { tname :: Text
tname    = "rotting mahogany deck"
  , tfreq :: Freqs TileKind
tfreq    = [("trailLit", 50), ("safeTrailLit", 50)]
  , tcolor :: Color
tcolor   = Color
BrMagenta
  , tcolor2 :: Color
tcolor2  = Color
Magenta
  }
floorArenaShade :: TileKind
floorArenaShade = TileKind
floorActor
  { tname :: Text
tname    = "shaded ground"
  , tfreq :: Freqs TileKind
tfreq    = [("shaded ground", 1), ("treeShadeOver_s_Lit", 2)]
  , tcolor2 :: Color
tcolor2  = Color
BrBlack
  , tfeature :: [Feature]
tfeature = Feature
Dark Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: Feature
NoItem Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: TileKind -> [Feature]
tfeature TileKind
floorActor
  }

outdoorFence :: TileKind
outdoorFence = $WTileKind :: Char
-> Text
-> Freqs TileKind
-> Color
-> Color
-> Word8
-> [Feature]
-> TileKind
TileKind
  { tsymbol :: Char
tsymbol  = ' '
  , tname :: Text
tname    = "event horizon"
  , tfreq :: Freqs TileKind
tfreq    = [("outdoor outer fence", 1)]
  , tcolor :: Color
tcolor   = Color
defFG
  , tcolor2 :: Color
tcolor2  = Color
defFG
  , talter :: Word8
talter   = Word8
forall a. Bounded a => a
maxBound  -- impenetrable
  , tfeature :: [Feature]
tfeature = [Feature
Dark]
  }

makeDark :: TileKind -> TileKind
makeDark :: TileKind -> TileKind
makeDark k :: TileKind
k = let darkText :: GroupName TileKind -> GroupName TileKind
                 darkText :: GroupName TileKind -> GroupName TileKind
darkText t :: GroupName TileKind
t = GroupName TileKind
-> (Text -> GroupName TileKind) -> Maybe Text -> GroupName TileKind
forall b a. b -> (a -> b) -> Maybe a -> b
maybe GroupName TileKind
t (Text -> GroupName TileKind
forall a. Text -> GroupName a
toGroupName (Text -> GroupName TileKind)
-> (Text -> Text) -> Text -> GroupName TileKind
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (Text -> Text -> Text
forall a. Semigroup a => a -> a -> a
<> "Dark"))
                              (Maybe Text -> GroupName TileKind)
-> Maybe Text -> GroupName TileKind
forall a b. (a -> b) -> a -> b
$ Text -> Text -> Maybe Text
T.stripSuffix "Lit" (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Text
forall a. GroupName a -> Text
fromGroupName GroupName TileKind
t
                 darkFrequency :: Freqs TileKind
darkFrequency = ((GroupName TileKind, Int) -> (GroupName TileKind, Int))
-> Freqs TileKind -> Freqs TileKind
forall a b. (a -> b) -> [a] -> [b]
map ((GroupName TileKind -> GroupName TileKind)
-> (GroupName TileKind, Int) -> (GroupName TileKind, Int)
forall (a :: * -> * -> *) b c d.
Arrow a =>
a b c -> a (b, d) (c, d)
first GroupName TileKind -> GroupName TileKind
darkText) (Freqs TileKind -> Freqs TileKind)
-> Freqs TileKind -> Freqs TileKind
forall a b. (a -> b) -> a -> b
$ TileKind -> Freqs TileKind
tfreq TileKind
k
                 darkFeat :: Feature -> Maybe Feature
darkFeat (OpenTo t :: GroupName TileKind
t) = Feature -> Maybe Feature
forall a. a -> Maybe a
Just (Feature -> Maybe Feature) -> Feature -> Maybe Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Feature
OpenTo (GroupName TileKind -> Feature) -> GroupName TileKind -> Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> GroupName TileKind
darkText GroupName TileKind
t
                 darkFeat (CloseTo t :: GroupName TileKind
t) = Feature -> Maybe Feature
forall a. a -> Maybe a
Just (Feature -> Maybe Feature) -> Feature -> Maybe Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Feature
CloseTo (GroupName TileKind -> Feature) -> GroupName TileKind -> Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> GroupName TileKind
darkText GroupName TileKind
t
                 darkFeat (ChangeTo t :: GroupName TileKind
t) = Feature -> Maybe Feature
forall a. a -> Maybe a
Just (Feature -> Maybe Feature) -> Feature -> Maybe Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Feature
ChangeTo (GroupName TileKind -> Feature) -> GroupName TileKind -> Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> GroupName TileKind
darkText GroupName TileKind
t
                 darkFeat (HideAs t :: GroupName TileKind
t) = Feature -> Maybe Feature
forall a. a -> Maybe a
Just (Feature -> Maybe Feature) -> Feature -> Maybe Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Feature
HideAs (GroupName TileKind -> Feature) -> GroupName TileKind -> Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> GroupName TileKind
darkText GroupName TileKind
t
                 darkFeat (BuildAs t :: GroupName TileKind
t) = Feature -> Maybe Feature
forall a. a -> Maybe a
Just (Feature -> Maybe Feature) -> Feature -> Maybe Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Feature
BuildAs (GroupName TileKind -> Feature) -> GroupName TileKind -> Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> GroupName TileKind
darkText GroupName TileKind
t
                 darkFeat (RevealAs t :: GroupName TileKind
t) = Feature -> Maybe Feature
forall a. a -> Maybe a
Just (Feature -> Maybe Feature) -> Feature -> Maybe Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Feature
RevealAs (GroupName TileKind -> Feature) -> GroupName TileKind -> Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> GroupName TileKind
darkText GroupName TileKind
t
                 darkFeat (ObscureAs t :: GroupName TileKind
t) = Feature -> Maybe Feature
forall a. a -> Maybe a
Just (Feature -> Maybe Feature) -> Feature -> Maybe Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> Feature
ObscureAs (GroupName TileKind -> Feature) -> GroupName TileKind -> Feature
forall a b. (a -> b) -> a -> b
$ GroupName TileKind -> GroupName TileKind
darkText GroupName TileKind
t
                 darkFeat VeryOftenItem = Feature -> Maybe Feature
forall a. a -> Maybe a
Just Feature
OftenItem
                 darkFeat OftenItem = Maybe Feature
forall a. Maybe a
Nothing  -- items not common in the dark
                 darkFeat feat :: Feature
feat = Feature -> Maybe Feature
forall a. a -> Maybe a
Just Feature
feat
             in TileKind
k { tfreq :: Freqs TileKind
tfreq    = Freqs TileKind
darkFrequency
                  , tfeature :: [Feature]
tfeature = Feature
Dark Feature -> [Feature] -> [Feature]
forall a. a -> [a] -> [a]
: (Feature -> Maybe Feature) -> [Feature] -> [Feature]
forall a b. (a -> Maybe b) -> [a] -> [b]
mapMaybe Feature -> Maybe Feature
darkFeat (TileKind -> [Feature]
tfeature TileKind
k)
                  }

makeDarkColor :: TileKind -> TileKind
makeDarkColor :: TileKind -> TileKind
makeDarkColor k :: TileKind
k = (TileKind -> TileKind
makeDark TileKind
k) {tcolor2 :: Color
tcolor2 = Color
BrBlack}