-- | Definitions of items embedded in map tiles.
module Content.ItemKindEmbed
  ( -- * Group name patterns
    pattern SCRATCH_ON_WALL, pattern OBSCENE_PICTOGRAM, pattern SUBTLE_FRESCO, pattern TREASURE_CACHE, pattern TREASURE_CACHE_TRAP, pattern SIGNAGE, pattern SMALL_FIRE, pattern BIG_FIRE, pattern FROST, pattern RUBBLE, pattern DOORWAY_TRAP_UNKNOWN, pattern DOORWAY_TRAP, pattern STAIRS_UP, pattern STAIRS_DOWN, pattern ESCAPE, pattern STAIRS_TRAP_UP, pattern STAIRS_TRAP_DOWN, pattern LECTERN, pattern SHALLOW_WATER, pattern STRAIGHT_PATH, pattern FROZEN_GROUND
  , pattern S_SANDSTONE_ROCK
  , embedsGNSingleton, embedsGN
  , -- * Content
    embeds
  ) where

import Prelude ()

import Game.LambdaHack.Core.Prelude

import Content.ItemKindActor
import Content.ItemKindBlast
import Content.ItemKindTemporary
import Game.LambdaHack.Content.ItemKind
import Game.LambdaHack.Core.Dice
import Game.LambdaHack.Definition.Ability
import Game.LambdaHack.Definition.Color
import Game.LambdaHack.Definition.Defs
import Game.LambdaHack.Definition.Flavour

-- * Group name patterns

embedsGNSingleton :: [GroupName ItemKind]
embedsGNSingleton :: [GroupName ItemKind]
embedsGNSingleton = [GroupName ItemKind
S_SANDSTONE_ROCK]

pattern S_SANDSTONE_ROCK :: GroupName ItemKind

embedsGN :: [GroupName ItemKind]
embedsGN :: [GroupName ItemKind]
embedsGN =
       [GroupName ItemKind
SCRATCH_ON_WALL, GroupName ItemKind
OBSCENE_PICTOGRAM, GroupName ItemKind
SUBTLE_FRESCO, GroupName ItemKind
TREASURE_CACHE, GroupName ItemKind
TREASURE_CACHE_TRAP, GroupName ItemKind
SIGNAGE, GroupName ItemKind
SMALL_FIRE, GroupName ItemKind
BIG_FIRE, GroupName ItemKind
FROST, GroupName ItemKind
RUBBLE, GroupName ItemKind
DOORWAY_TRAP_UNKNOWN, GroupName ItemKind
DOORWAY_TRAP, GroupName ItemKind
STAIRS_UP, GroupName ItemKind
STAIRS_DOWN, GroupName ItemKind
ESCAPE, GroupName ItemKind
STAIRS_TRAP_UP, GroupName ItemKind
STAIRS_TRAP_DOWN, GroupName ItemKind
LECTERN, GroupName ItemKind
SHALLOW_WATER, GroupName ItemKind
STRAIGHT_PATH, GroupName ItemKind
FROZEN_GROUND]

pattern SCRATCH_ON_WALL, OBSCENE_PICTOGRAM, SUBTLE_FRESCO, TREASURE_CACHE, TREASURE_CACHE_TRAP, SIGNAGE, SMALL_FIRE, BIG_FIRE, FROST, RUBBLE, DOORWAY_TRAP_UNKNOWN, DOORWAY_TRAP, STAIRS_UP, STAIRS_DOWN, ESCAPE, STAIRS_TRAP_UP, STAIRS_TRAP_DOWN, LECTERN, SHALLOW_WATER, STRAIGHT_PATH, FROZEN_GROUND :: GroupName ItemKind

pattern $bSCRATCH_ON_WALL :: GroupName ItemKind
$mSCRATCH_ON_WALL :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
SCRATCH_ON_WALL = GroupName "scratch on wall"
pattern $bOBSCENE_PICTOGRAM :: GroupName ItemKind
$mOBSCENE_PICTOGRAM :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
OBSCENE_PICTOGRAM = GroupName "obscene pictogram"
pattern $bSUBTLE_FRESCO :: GroupName ItemKind
$mSUBTLE_FRESCO :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
SUBTLE_FRESCO = GroupName "subtle fresco"
pattern $bTREASURE_CACHE :: GroupName ItemKind
$mTREASURE_CACHE :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
TREASURE_CACHE = GroupName "treasure cache"
pattern $bTREASURE_CACHE_TRAP :: GroupName ItemKind
$mTREASURE_CACHE_TRAP :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
TREASURE_CACHE_TRAP = GroupName "treasure cache trap"
pattern $bSIGNAGE :: GroupName ItemKind
$mSIGNAGE :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
SIGNAGE = GroupName "signage"
pattern $bSMALL_FIRE :: GroupName ItemKind
$mSMALL_FIRE :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
SMALL_FIRE = GroupName "small fire"
pattern $bBIG_FIRE :: GroupName ItemKind
$mBIG_FIRE :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
BIG_FIRE = GroupName "big fire"
pattern $bFROST :: GroupName ItemKind
$mFROST :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
FROST = GroupName "frozen mass"
pattern $bRUBBLE :: GroupName ItemKind
$mRUBBLE :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
RUBBLE = GroupName "rubble"
pattern $bDOORWAY_TRAP_UNKNOWN :: GroupName ItemKind
$mDOORWAY_TRAP_UNKNOWN :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
DOORWAY_TRAP_UNKNOWN = GroupName "doorway trap unknown"
pattern $bDOORWAY_TRAP :: GroupName ItemKind
$mDOORWAY_TRAP :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
DOORWAY_TRAP = GroupName "doorway trap"
pattern $bSTAIRS_UP :: GroupName ItemKind
$mSTAIRS_UP :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
STAIRS_UP = GroupName "stairs up"
pattern $bSTAIRS_DOWN :: GroupName ItemKind
$mSTAIRS_DOWN :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
STAIRS_DOWN = GroupName "stairs down"
pattern $bESCAPE :: GroupName ItemKind
$mESCAPE :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
ESCAPE = GroupName "escape"
pattern $bSTAIRS_TRAP_UP :: GroupName ItemKind
$mSTAIRS_TRAP_UP :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
STAIRS_TRAP_UP = GroupName "stairs trap up"
pattern $bSTAIRS_TRAP_DOWN :: GroupName ItemKind
$mSTAIRS_TRAP_DOWN :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
STAIRS_TRAP_DOWN = GroupName "stairs trap down"
pattern $bLECTERN :: GroupName ItemKind
$mLECTERN :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
LECTERN = GroupName "lectern"
pattern $bSHALLOW_WATER :: GroupName ItemKind
$mSHALLOW_WATER :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
SHALLOW_WATER = GroupName "shallow water"
pattern $bSTRAIGHT_PATH :: GroupName ItemKind
$mSTRAIGHT_PATH :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
STRAIGHT_PATH = GroupName "straight path"
pattern $bFROZEN_GROUND :: GroupName ItemKind
$mFROZEN_GROUND :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
FROZEN_GROUND = GroupName "frozen ground"

pattern $bS_SANDSTONE_ROCK :: GroupName ItemKind
$mS_SANDSTONE_ROCK :: forall r. GroupName ItemKind -> (Void# -> r) -> (Void# -> r) -> r
S_SANDSTONE_ROCK = GroupName "sandstone rock"

-- * Content

embeds :: [ItemKind]
embeds :: [ItemKind]
embeds =
  [ItemKind
scratchOnWall, ItemKind
obscenePictogram, ItemKind
subtleFresco, ItemKind
treasureCache, ItemKind
treasureCacheTrap, ItemKind
signageExit, ItemKind
signageEmbed, ItemKind
signageMerchandise, ItemKind
fireSmall, ItemKind
fireBig, ItemKind
frost, ItemKind
rubble, ItemKind
doorwayTrapTemplate, ItemKind
doorwayTrap1, ItemKind
doorwayTrap2, ItemKind
doorwayTrap3, ItemKind
stairsUp, ItemKind
stairsDown, ItemKind
escape, ItemKind
stairsTrapUp, ItemKind
stairsTrapDown, ItemKind
lectern, ItemKind
shallowWater, ItemKind
straightPath, ItemKind
frozenGround]

scratchOnWall,    obscenePictogram, subtleFresco, treasureCache, treasureCacheTrap, signageExit, signageEmbed, signageMerchandise, fireSmall, fireBig, frost, rubble, doorwayTrapTemplate, doorwayTrap1, doorwayTrap2, doorwayTrap3, stairsUp, stairsDown, escape, stairsTrapUp, stairsTrapDown, lectern, shallowWater, straightPath, frozenGround :: ItemKind

-- * Embedded items

-- Make sure very few walls are substantially useful, e.g., caches,
-- and none that are secret. Otherwise the player will spend a lot of time
-- bumping walls, which is boring compared to fights or dialogues
-- and ever worse, the player will bump all secret walls, wasting time
-- and foregoing the fun of guessing how to find entrance to a disjoint part
-- of the level by bumping the least number of secret walls.
scratchOnWall :: ItemKind
scratchOnWall = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '?'
  , iname :: Text
iname    = "claw mark"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
SCRATCH_ON_WALL, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrBlack]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "scratch"
  , iweight :: Int
iweight  = 1000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [ Text -> Text -> Effect
VerbMsg "start making sense of the scratches" "."
               , DetectKind -> Int -> Effect
Detect DetectKind
DetectHidden 3 ]
  , idesc :: Text
idesc    = "A seemingly random series of scratches, carved deep into the wall."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
obscenePictogram :: ItemKind
obscenePictogram = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '*'
  , iname :: Text
iname    = "obscene pictogram"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
OBSCENE_PICTOGRAM, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrMagenta]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "infuriate"
  , iweight :: Int
iweight  = 1000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Dice -> Aspect
Timeout 7, Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [ Text -> Text -> Effect
VerbMsg "enter destructive rage at the sight of an obscene pictogram" "."
               , Int -> Effect
RefillCalm (-20)
               , [Effect] -> Effect
OneOf [ GroupName ItemKind -> Dice -> Effect
toOrganGood GroupName ItemKind
S_STRENGTHENED (3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ 1 Int -> Int -> Dice
`d` 2)
                       , Maybe Int -> CStore -> GroupName ItemKind -> TimerDice -> Effect
CreateItem Maybe Int
forall a. Maybe a
Nothing CStore
CGround GroupName ItemKind
S_SANDSTONE_ROCK TimerDice
timerNone ]
               ]
  , idesc :: Text
idesc    = "It's not even anatomically possible."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
subtleFresco :: ItemKind
subtleFresco = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '*'
  , iname :: Text
iname    = "subtle fresco"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
SUBTLE_FRESCO, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrGreen]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "sooth"
  , iweight :: Int
iweight  = 1000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Dice -> Aspect
Timeout 7, Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [ Text -> Text -> Effect
VerbMsg "feel refreshed by the subtle fresco" "."
               , GroupName ItemKind -> Dice -> Effect
toOrganGood GroupName ItemKind
S_FAR_SIGHTED (3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ 1 Int -> Int -> Dice
`d` 2)
               , GroupName ItemKind -> Dice -> Effect
toOrganGood GroupName ItemKind
S_KEEN_SMELLING (3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ 1 Int -> Int -> Dice
`d` 2) ]
                 -- hearing gets a boost through bracing, so no need here
  , idesc :: Text
idesc    = "Expensive yet tasteful."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
treasureCache :: ItemKind
treasureCache = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = 'o'
  , iname :: Text
iname    = "treasure cache"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
TREASURE_CACHE, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrBlue]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "crash"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [Maybe Int -> CStore -> GroupName ItemKind -> TimerDice -> Effect
CreateItem Maybe Int
forall a. Maybe a
Nothing CStore
CGround GroupName ItemKind
COMMON_ITEM TimerDice
timerNone]
  , idesc :: Text
idesc    = "Glittering treasure, just waiting to be taken."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
reliefMsg :: Effect
reliefMsg :: Effect
reliefMsg = Text -> Text -> Effect
VerbMsg "sigh with relief when nothing explodes in your face!" ""
treasureCacheTrap :: ItemKind
treasureCacheTrap = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '^'
  , iname :: Text
iname    = "cache trap"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
TREASURE_CACHE_TRAP, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
Red]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "taint"
  , iweight :: Int
iweight  = 1000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = []  -- not Durable, springs at most once
  , ieffects :: [Effect]
ieffects = [[Effect] -> Effect
OneOf [ GroupName ItemKind -> Dice -> Effect
toOrganBad GroupName ItemKind
S_BLIND (10 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ 1 Int -> Int -> Dice
`d` 10)
                      , Int -> Effect
RefillCalm (-99)
                      , GroupName ItemKind -> Effect
Explode GroupName ItemKind
S_FOCUSED_CONCUSSION
                      , Effect
reliefMsg, Effect
reliefMsg ]]
  , idesc :: Text
idesc    = "It's a trap!"
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
signageExit :: ItemKind
signageExit = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '?'
  , iname :: Text
iname    = "inscription"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
SIGNAGE, 50)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrMagenta]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "whack"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [DetectKind -> Int -> Effect
Detect DetectKind
DetectExit 100]
  , idesc :: Text
idesc    = "Crude big arrows hastily carved by unknown hands."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
signageEmbed :: ItemKind
signageEmbed = ItemKind
signageExit
  { iname :: Text
iname    = "notice"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
SIGNAGE, 50)]
  , ieffects :: [Effect]
ieffects = [DetectKind -> Int -> Effect
Detect DetectKind
DetectEmbed 12]
  , idesc :: Text
idesc    = "The battered poster is untitled and unsigned."
  }
signageMerchandise :: ItemKind
signageMerchandise = ItemKind
signageExit
  { iname :: Text
iname    = "treasure map"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
SIGNAGE, 50)]
  , ieffects :: [Effect]
ieffects = [DetectKind -> Int -> Effect
Detect DetectKind
DetectLoot 20]
  , idesc :: Text
idesc    = "In equal parts cryptic and promising."
  }
fireSmall :: ItemKind
fireSmall = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = 'o'
  , iname :: Text
iname    = "small fire"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
SMALL_FIRE, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrRed]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "burn"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [Dice -> Effect
Burn 1, GroupName ItemKind -> Effect
Explode GroupName ItemKind
S_SINGLE_SPARK]
  , idesc :: Text
idesc    = "A few small logs, burning brightly."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
fireBig :: ItemKind
fireBig = ItemKind
fireSmall
  { isymbol :: Char
isymbol  = '0'
  , iname :: Text
iname    = "big fire"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
BIG_FIRE, 1)]
  , ieffects :: [Effect]
ieffects = [ Dice -> Effect
Burn 2
               , Maybe Int -> CStore -> GroupName ItemKind -> TimerDice -> Effect
CreateItem Maybe Int
forall a. Maybe a
Nothing CStore
CGround GroupName ItemKind
S_WOODEN_TORCH TimerDice
timerNone
               , GroupName ItemKind -> Effect
Explode GroupName ItemKind
S_SPARK ]
  , idesc :: Text
idesc    = "Glowing with light and warmth."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
frost :: ItemKind
frost = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '^'
  , iname :: Text
iname    = "frost"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
FROST, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrBlue]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "burn"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [ Dice -> Effect
Burn 1  -- sensory ambiguity between hot and cold
               , Int -> Effect
RefillCalm 20  -- cold reason
               , ThrowMod -> Effect
PushActor (Int -> Int -> Int -> ThrowMod
ThrowMod 400 10 1) ]  -- slippery ice
  , idesc :: Text
idesc    = "Intricate patterns of shining ice."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
rubble :: ItemKind
rubble = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '&'
  , iname :: Text
iname    = "rubble"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
RUBBLE, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrYellow]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "bury"
  , iweight :: Int
iweight  = 100000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [[Effect] -> Effect
OneOf [ GroupName ItemKind -> Effect
Explode GroupName ItemKind
S_FOCUSED_GLASS_HAIL
                      , GroupName ItemKind -> Dice -> Effect
Summon GroupName ItemKind
MOBILE_ANIMAL (Dice -> Effect) -> Dice -> Effect
forall a b. (a -> b) -> a -> b
$ 1 Int -> Int -> Dice
`dL` 2
                      , GroupName ItemKind -> Effect
toOrganNoTimer GroupName ItemKind
S_POISONED
                      , Maybe Int -> CStore -> GroupName ItemKind -> TimerDice -> Effect
CreateItem Maybe Int
forall a. Maybe a
Nothing CStore
CGround GroupName ItemKind
ANY_ARROW TimerDice
timerNone
                      , Maybe Int -> CStore -> GroupName ItemKind -> TimerDice -> Effect
CreateItem Maybe Int
forall a. Maybe a
Nothing CStore
CGround GroupName ItemKind
STARTING_WEAPON TimerDice
timerNone
                      , Effect
reliefMsg, Effect
reliefMsg, Effect
reliefMsg
                      , Effect
reliefMsg, Effect
reliefMsg, Effect
reliefMsg ]]
  , idesc :: Text
idesc    = "Broken chunks of rock and glass."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
doorwayTrapTemplate :: ItemKind
doorwayTrapTemplate = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '+'
  , iname :: Text
iname    = "doorway trap"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
DOORWAY_TRAP_UNKNOWN, 1), (GroupName ItemKind
DOORWAY_TRAP, 0)]
      -- the void group needed to pick the item for tile triggering
      -- even when not yet identified
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color]
brightCol
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "cripple"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [GroupName ItemKind -> Aspect
PresentAs GroupName ItemKind
DOORWAY_TRAP_UNKNOWN]
      -- not Durable, springs at most once
  , ieffects :: [Effect]
ieffects = []
  , idesc :: Text
idesc    = "Just turn the handle..."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
doorwayTrap1 :: ItemKind
doorwayTrap1 = ItemKind
doorwayTrapTemplate
  { ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
DOORWAY_TRAP, 50)]
  , ieffects :: [Effect]
ieffects = [GroupName ItemKind -> Dice -> Effect
toOrganBad GroupName ItemKind
S_BLIND (Dice -> Effect) -> Dice -> Effect
forall a b. (a -> b) -> a -> b
$ (1 Int -> Int -> Dice
`dL` 4) Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
* 5]
  -- , idesc    = ""
  }
doorwayTrap2 :: ItemKind
doorwayTrap2 = ItemKind
doorwayTrapTemplate
  { ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
DOORWAY_TRAP, 25)]
  , ieffects :: [Effect]
ieffects = [GroupName ItemKind -> Dice -> Effect
toOrganBad GroupName ItemKind
S_SLOWED (Dice -> Effect) -> Dice -> Effect
forall a b. (a -> b) -> a -> b
$ (1 Int -> Int -> Dice
`dL` 4) Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
* 10]
  -- , idesc    = ""
  }
doorwayTrap3 :: ItemKind
doorwayTrap3 = ItemKind
doorwayTrapTemplate
  { ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
DOORWAY_TRAP, 25)]
  , ieffects :: [Effect]
ieffects = [GroupName ItemKind -> Dice -> Effect
toOrganBad GroupName ItemKind
S_WEAKENED (Dice -> Effect) -> Dice -> Effect
forall a b. (a -> b) -> a -> b
$ (1 Int -> Int -> Dice
`dL` 4) Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
* 10 ]
  -- , idesc    = ""
  }
stairsUp :: ItemKind
stairsUp = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '<'
  , iname :: Text
iname    = "flight"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
STAIRS_UP, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrWhite]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "crash"  -- the verb is only used when the item hits,
                        -- not when it's applied otherwise, e.g., from tile
  , iweight :: Int
iweight  = 100000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Text -> Aspect
ELabel "of steps", Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [Bool -> Effect
Ascend Bool
True]
  , idesc :: Text
idesc    = "Stairs that rise towards escape."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
stairsDown :: ItemKind
stairsDown = ItemKind
stairsUp
  { isymbol :: Char
isymbol  = '>'
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
STAIRS_DOWN, 1)]
  , ieffects :: [Effect]
ieffects = [Bool -> Effect
Ascend Bool
False]
  , idesc :: Text
idesc    = ""
  }
escape :: ItemKind
escape = ItemKind
stairsUp
  { isymbol :: Char
isymbol  = 'E'
  , iname :: Text
iname    = "way"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
ESCAPE, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
BrYellow]
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [Effect
Escape]
  , idesc :: Text
idesc    = "May this nightmare have an end?"
                 -- generic escape, so the text should be too;
                 -- for moon outdoors, spaceship, everywhere
  }
stairsTrapUp :: ItemKind
stairsTrapUp = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '^'
  , iname :: Text
iname    = "staircase trap"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
STAIRS_TRAP_UP, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipPlain [Color
Red]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "buffet"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = []  -- not Durable, springs at most once
  , ieffects :: [Effect]
ieffects = [ Text -> Text -> Effect
VerbMsgFail "be caught in an updraft" "."
               , Dice -> Effect
Teleport (Dice -> Effect) -> Dice -> Effect
forall a b. (a -> b) -> a -> b
$ 3 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ 1 Int -> Int -> Dice
`dL` 10 ]
  , idesc :: Text
idesc    = "A hidden spring, to help the unwary soar."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
-- Needs to be separate from stairsTrapUp, to make sure the item is
-- registered after up stairs (not only after down stairs)
-- so that effects are invoked in the proper order and, e.g., teleport works.
stairsTrapDown :: ItemKind
stairsTrapDown = ItemKind
stairsTrapUp
  { ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
STAIRS_TRAP_DOWN, 1)]
  , iverbHit :: Text
iverbHit = "open up under"
  , ieffects :: [Effect]
ieffects = [ Text -> Text -> Effect
VerbMsgFail "tumble down the stairwell" "."
               , GroupName ItemKind -> Dice -> Effect
toOrganGood GroupName ItemKind
S_DRUNK (20 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ 1 Int -> Int -> Dice
`d` 5) ]
  , idesc :: Text
idesc    = "A treacherous slab, to teach those who are too proud."
  }
lectern :: ItemKind
lectern = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '?'
  , iname :: Text
iname    = "lectern"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
LECTERN, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipFancy [Color
BrYellow]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "ask"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = []  -- not Durable, springs at most once
  , ieffects :: [Effect]
ieffects = [ [Effect] -> Effect
OneOf [ Maybe Int -> CStore -> GroupName ItemKind -> TimerDice -> Effect
CreateItem Maybe Int
forall a. Maybe a
Nothing CStore
CGround GroupName ItemKind
ANY_SCROLL TimerDice
timerNone
                       , DetectKind -> Int -> Effect
Detect DetectKind
DetectAll 20
                       , GroupName ItemKind -> Dice -> Effect
toOrganBad GroupName ItemKind
S_DEFENSELESS (Dice -> Effect) -> Dice -> Effect
forall a b. (a -> b) -> a -> b
$ (1 Int -> Int -> Dice
`dL` 6) Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
* 10
                       , GroupName ItemKind -> Dice -> Effect
toOrganGood GroupName ItemKind
S_DRUNK (20 Dice -> Dice -> Dice
forall a. Num a => a -> a -> a
+ 1 Int -> Int -> Dice
`d` 5) ]
               , GroupName ItemKind -> Effect
Explode GroupName ItemKind
S_DEFENSELESSNESS_RUNOUT ]
  , idesc :: Text
idesc    = "A dark wood stand, where strange priests once preached."
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
shallowWater :: ItemKind
shallowWater = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '~'
  , iname :: Text
iname    = "shallow water"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
SHALLOW_WATER, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipFancy [Color
BrCyan]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "impede"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [Dice -> Effect
ParalyzeInWater 2]
  , idesc :: Text
idesc    = ""
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
straightPath :: ItemKind
straightPath = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '.'
  , iname :: Text
iname    = "straight path"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
STRAIGHT_PATH, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipFancy [Color
BrRed]
  , icount :: Dice
icount   = 1
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "propel"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Flag -> Aspect
SetFlag Flag
Durable]
  , ieffects :: [Effect]
ieffects = [Dice -> Effect
InsertMove 2]
  , idesc :: Text
idesc    = ""
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }
frozenGround :: ItemKind
frozenGround = $WItemKind :: Char
-> Text
-> Freqs ItemKind
-> [Flavour]
-> Dice
-> Rarity
-> Text
-> Int
-> Dice
-> [Aspect]
-> [Effect]
-> [(GroupName ItemKind, CStore)]
-> Text
-> ItemKind
ItemKind
  { isymbol :: Char
isymbol  = '.'
  , iname :: Text
iname    = "shade"
  , ifreq :: Freqs ItemKind
ifreq    = [(GroupName ItemKind
FROZEN_GROUND, 1)]
  , iflavour :: [Flavour]
iflavour = [Color] -> [Flavour]
zipFancy [Color
BrBlue]
  , icount :: Dice
icount   = 10  -- very thick ice and refreezes, but not too large and boring
  , irarity :: Rarity
irarity  = [(1, 1)]
  , iverbHit :: Text
iverbHit = "betray"
  , iweight :: Int
iweight  = 10000
  , idamage :: Dice
idamage  = 0
  , iaspects :: [Aspect]
iaspects = [Text -> Aspect
ELabel "of ice"]
                 -- no Durable or some items would be impossible to pick up
  , ieffects :: [Effect]
ieffects = [ThrowMod -> Effect
PushActor (Int -> Int -> Int -> ThrowMod
ThrowMod 400 10 1)]
                  -- the high speed represents gliding rather than flying
                  -- and so no need to lift actor's weight off the ground;
                  -- low linger comes from abrupt halt over normal surface
  , idesc :: Text
idesc    = ""
  , ikit :: [(GroupName ItemKind, CStore)]
ikit     = []
  }