LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Content.ModeKind

Contents

- Internal operations

Description

The type of game modes.

Synopsis

- pattern CAMPAIGN_SCENARIO :: GroupName ModeKind
- pattern INSERT_COIN :: GroupName ModeKind
- data ModeKind = ModeKind {
  - mname :: Text
  - mfreq :: Freqs ModeKind
  - mtutorial :: Bool
  - mattract :: Bool
  - mroster :: Roster
  - mcaves :: Caves
  - mendMsg :: [(Outcome, Text)]
  - mrules :: Text
  - mdesc :: Text
  - mreason :: Text
  - mhint :: Text
  }
- makeData :: ContentData FactionKind -> [ModeKind] -> [GroupName ModeKind] -> [GroupName ModeKind] -> ContentData ModeKind
- type Caves = [([Int], [GroupName CaveKind])]
- type Roster = [(GroupName FactionKind, [(Int, Dice, GroupName ItemKind)])]
- mandatoryGroups :: [GroupName ModeKind]
- validateSingle :: ContentData FactionKind -> ModeKind -> [Text]
- validateAll :: [ModeKind] -> ContentData ModeKind -> [Text]
- validateSingleRoster :: ContentData FactionKind -> Caves -> Roster -> [Text]

# Documentation

pattern CAMPAIGN_SCENARIO :: GroupName ModeKind Source #

pattern INSERT_COIN :: GroupName ModeKind Source #

data ModeKind Source #

Game mode specification.

Constructors

ModeKind |

Fields

- mname :: Text

  short description

- mfreq :: Freqs ModeKind

  frequency within groups

- mtutorial :: Bool

  whether to show tutorial messages, etc.

- mattract :: Bool

  whether this is an attract mode

- mroster :: Roster

  factions taking part in the game

- mcaves :: Caves

  arena of the game

- mendMsg :: [(Outcome, Text)]

  messages displayed at each particular game ends; if message empty, the screen is skipped

- mrules :: Text

  rules note

- mdesc :: Text

  description

- mreason :: Text

  why/when the mode should be played

- mhint :: Text

  hints in case player faces difficulties

#### Instances

Instances details

Show ModeKind Source # |
Instance details Defined in Game.LambdaHack.Content.ModeKind Methods showsPrec :: Int -> ModeKind -> ShowS Source # show :: ModeKind -> String Source # showList :: [ModeKind] -> ShowS Source #

makeData :: ContentData FactionKind -> [ModeKind] -> [GroupName ModeKind] -> [GroupName ModeKind] -> ContentData ModeKind Source #

type Caves = [([Int], [GroupName CaveKind])] Source #

Requested cave groups for particular level intervals.

type Roster = [(GroupName FactionKind, [(Int, Dice, GroupName ItemKind)])] Source #

The specification of factions and of levels, numbers and groups of their initial members.

mandatoryGroups :: [GroupName ModeKind] Source #

# Internal operations

validateSingle :: ContentData FactionKind -> ModeKind -> [Text] Source #

Catch invalid game mode kind definitions.

validateAll :: [ModeKind] -> ContentData ModeKind -> [Text] Source #

Validate game mode kinds together.

validateSingleRoster :: ContentData FactionKind -> Caves -> Roster -> [Text] Source #

Checks, in particular, that there is at least one faction with fneverEmpty or the game would get stuck as soon as the dungeon is devoid of actors.