LambdaHack-0.5.0.0: 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

Instances

data Player a Source #

Properties of a particular player.

Constructors

Player 

Fields

Instances

Eq a => Eq (Player a) Source # 

Methods

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

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

Ord a => Ord (Player a) Source # 

Methods

compare :: Player a -> Player a -> Ordering #

(<) :: Player a -> Player a -> Bool #

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

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

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

max :: Player a -> Player a -> Player a #

min :: Player a -> Player a -> Player a #

Show a => Show (Player a) Source # 

Methods

showsPrec :: Int -> Player a -> ShowS #

show :: Player a -> String #

showList :: [Player a] -> ShowS #

Generic (Player a) Source # 

Associated Types

type Rep (Player a) :: * -> * #

Methods

from :: Player a -> Rep (Player a) x #

to :: Rep (Player a) x -> Player a #

Binary a => Binary (Player a) Source # 

Methods

put :: Player a -> Put #

get :: Get (Player a) #

putList :: [Player a] -> Put #

type Rep (Player a) Source # 
type Rep (Player a) = D1 (MetaData "Player" "Game.LambdaHack.Content.ModeKind" "LambdaHack-0.5.0.0-ACXnG5rBgo11km4N5iGJGN" False) (C1 (MetaCons "Player" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "fname") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Text)) ((:*:) (S1 (MetaSel (Just Symbol "fgroup") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (GroupName ItemKind))) (S1 (MetaSel (Just Symbol "fskillsOther") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Skills)))) ((:*:) (S1 (MetaSel (Just Symbol "fcanEscape") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)) ((:*:) (S1 (MetaSel (Just Symbol "fneverEmpty") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)) (S1 (MetaSel (Just Symbol "fhiCondPoly") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 HiCondPoly))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "fhasNumbers") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)) ((:*:) (S1 (MetaSel (Just Symbol "fhasGender") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)) (S1 (MetaSel (Just Symbol "ftactic") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Tactic)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "fentryLevel") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a)) (S1 (MetaSel (Just Symbol "finitialActors") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a))) ((:*:) (S1 (MetaSel (Just Symbol "fleaderMode") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 LeaderMode)) (S1 (MetaSel (Just Symbol "fhasUI") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Bool)))))))

data ModeKind Source #

Game mode specification.

Constructors

ModeKind 

Fields

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

    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

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.5.0.0-ACXnG5rBgo11km4N5iGJGN" 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))))

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.5.0.0-ACXnG5rBgo11km4N5iGJGN" 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))))

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.