LambdaHack-0.4.99.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone

Game.LambdaHack.Content.ModeKind

Description

The type of kinds of game modes.

Synopsis

Documentation

type Caves = IntMap (GroupName, Maybe Bool)Source

Requested cave groups for particular levels. The second component is the Escape feature on the level. True means it's represented by @False@, by @.

data Roster Source

The specification of players for the game mode.

Constructors

Roster 

Fields

rosterList :: ![Player]

players in the particular team

rosterEnemy :: ![(Text, Text)]

the initial enmity matrix

rosterAlly :: ![(Text, Text)]

the initial aliance matrix

Instances

data Player Source

Properties of a particular player.

Constructors

Player 

Fields

fname :: !Text

name of the player

fgroup :: !GroupName

name of the monster group to control

fskillsOther :: !Skills

skills of the other actors

fcanEscape :: !Bool

the player can escape the dungeon

fneverEmpty :: !Bool

the faction declared killed if no actors

fhasNumbers :: !Bool

whether actors have numbers, not symbols

fhasGender :: !Bool

whether actors have gender

ftactic :: !Tactic

members behave according to this tactic

fentryLevel :: !Int

level where the initial members start

finitialActors :: !Int

number of initial members

fleaderMode :: !LeaderMode

the mode of switching the leader

fhasUI :: !Bool

does the faction have a UI client (for control or passive observation)

data ModeKind Source

Game mode specification.

Constructors

ModeKind 

Fields

msymbol :: !Char

a symbol (matches the keypress, if any)

mname :: !Text

short description

mfreq :: !Freqs

frequency within groups

mroster :: !Roster

players taking part in the game

mcaves :: !Caves

arena of the game

mdesc :: !Text

description

Instances

data Tactic Source

Constructors

TBlock

always only wait, even if enemy in melee range

TFollow

always follow leader's target or his position if no target

TExplore

if enemy nearby, attack, if no items, etc., explore unknown

TRoam

if enemy nearby, attack, if no items, etc., roam randomly

TPatrol

find an open and uncrowded area, patrol it according to sight radius and fallback temporarily to TRoam when enemy is seen by the faction and is within the actor's sight radius TODO (currently the same as TExplore; should it chase targets too (TRoam) and only switch to TPatrol when none?)

data LeaderMode Source

If a faction with LeaderUI and LeaderAI has any actor, it has a leader.

Constructors

LeaderNull

faction can have no leader, is whole under AI control

LeaderAI AutoLeader

leader under AI control

LeaderUI AutoLeader

leader under UI control, assumes fhasUI

data AutoLeader Source

Constructors

AutoLeader 

Fields

autoDungeon :: !Bool

leader change between levels only automatic

autoLevel :: !Bool

leader change within a level only automatic (for UI, currently no leader change here)

validateSingleModeKind :: ModeKind -> [Text]Source

Catch invalid game mode kind definitions.

validateAllModeKind :: [ModeKind] -> [Text]Source

Validate all game mode kinds. Currently always valid.