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

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Content.ModeKind

Contents

Description

The type of kinds of game modes.

Synopsis

Documentation

data ModeKind Source #

Game mode specification.

Constructors

ModeKind 

Fields

type Caves = IntMap (GroupName CaveKind) 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

Instances

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

Instances

Bounded Outcome Source # 
Enum Outcome Source # 
Eq Outcome Source # 

Methods

(==) :: Outcome -> Outcome -> Bool #

(/=) :: Outcome -> Outcome -> Bool #

Ord Outcome Source # 
Show Outcome Source # 
Generic Outcome Source # 

Associated Types

type Rep Outcome :: * -> * #

Methods

from :: Outcome -> Rep Outcome x #

to :: Rep Outcome x -> Outcome #

Binary Outcome Source # 

Methods

put :: Outcome -> Put #

get :: Get Outcome #

putList :: [Outcome] -> Put #

type Rep Outcome Source # 
type Rep Outcome = D1 * (MetaData "Outcome" "Game.LambdaHack.Content.ModeKind" "LambdaHack-0.7.0.0-3XPyz9bw1i28qJIoWU6CaM" False) ((:+:) * ((:+:) * (C1 * (MetaCons "Killed" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Defeated" PrefixI False) (U1 *)) (C1 * (MetaCons "Camping" PrefixI False) (U1 *)))) ((:+:) * (C1 * (MetaCons "Conquer" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Escape" PrefixI False) (U1 *)) (C1 * (MetaCons "Restart" PrefixI False) (U1 *)))))

type HiCondPoly = [HiSummand] Source #

Conditional polynomial representing score calculation for this player.

data HiIndeterminant Source #

Instances

Eq HiIndeterminant Source # 
Ord HiIndeterminant Source # 
Show HiIndeterminant Source # 
Generic HiIndeterminant Source # 
Binary HiIndeterminant Source # 
type Rep HiIndeterminant Source # 
type Rep HiIndeterminant = D1 * (MetaData "HiIndeterminant" "Game.LambdaHack.Content.ModeKind" "LambdaHack-0.7.0.0-3XPyz9bw1i28qJIoWU6CaM" False) ((:+:) * ((:+:) * (C1 * (MetaCons "HiConst" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "HiLoot" PrefixI False) (U1 *)) (C1 * (MetaCons "HiBlitz" PrefixI False) (U1 *)))) ((:+:) * (C1 * (MetaCons "HiSurvival" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "HiKill" PrefixI False) (U1 *)) (C1 * (MetaCons "HiLoss" PrefixI False) (U1 *)))))

data Player Source #

Properties of a particular player.

Constructors

Player 

Fields

Instances

Eq Player Source # 

Methods

(==) :: Player -> Player -> Bool #

(/=) :: Player -> Player -> Bool #

Show Player Source # 
Generic Player Source # 

Associated Types

type Rep Player :: * -> * #

Methods

from :: Player -> Rep Player x #

to :: Rep Player x -> Player #

Binary Player Source # 

Methods

put :: Player -> Put #

get :: Get Player #

putList :: [Player] -> Put #

type Rep Player Source # 

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 to leaders from other levels (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

    client is discouraged from leader switching (e.g., because non-leader actors have the same skills as leader); 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 expected to do more, because it's advantageous for that kind of a faction

validateSingleModeKind :: ModeKind -> [Text] Source #

Catch invalid game mode kind definitions.

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

Validate game mode kinds together.

Internal operations

validateSingleRoster :: 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.