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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Content.ModeKind

Description

The type of kinds of game modes.

Synopsis

Documentation

type Caves = IntMap (GroupName CaveKind, 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 Dice]

players in the particular team

rosterEnemy :: ![(Text, Text)]

the initial enmity matrix

rosterAlly :: ![(Text, Text)]

the initial aliance matrix

Instances

data Player a Source

Properties of a particular player.

Constructors

Player 

Fields

fname :: !Text

name of the player

fgroup :: !(GroupName ItemKind)

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

fhiCondPoly :: !HiCondPoly

score polynomial for the player

fhasNumbers :: !Bool

whether actors have numbers, not symbols

fhasGender :: !Bool

whether actors have gender

ftactic :: !Tactic

members behave according to this tactic

fentryLevel :: !a

level where the initial members start

finitialActors :: !a

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)

Instances

Eq a => Eq (Player a) 
Ord a => Ord (Player a) 
Show a => Show (Player a) 
Generic (Player a) 
Binary a => Binary (Player a) 
type Rep (Player a) 

data ModeKind Source

Game mode specification.

Constructors

ModeKind 

Fields

msymbol :: !Char

a symbol (matches the keypress, if any)

mname :: !Text

short description

mfreq :: !(Freqs ModeKind)

frequency within groups

mroster :: !Roster

players taking part in the game

mcaves :: !Caves

arena of the game

mdesc :: !Text

description

Instances

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 switching between levels is automatically done by the server and client is not permitted to change leaders (the frequency of leader level switching done by the server is controlled by RuleKind.rleadLevelClips); if the flag is False, server still does a subset of the automatic switching, e.g., when the old leader dies and no other actor of the faction resides on his level, but the client (particularly UI) is expected to do changes as well

autoLevel :: !Bool

leader switching within a level is automatically done by the server and client is not permitted to change leaders (server is guaranteed to switch leader within a level very rarely, e.g., when the old leader dies); if the flag is False, server still does a subset of the automatic switching, but the client is permitted to do more

data Outcome Source

Outcome of a game.

Constructors

Killed

the faction was eliminated

Defeated

the faction lost the game in another way

Camping

game is supended

Conquer

the player won by eliminating all rivals

Escape

the player escaped the dungeon alive

Restart

game is restarted

type HiCondPoly = [HiSummand] Source

Conditional polynomial representing score calculation for this player.

validateSingleModeKind :: ModeKind -> [Text] Source

Catch invalid game mode kind definitions.

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

Validate all game mode kinds. Currently always valid.