Safe Haskell | None |
---|---|
Language | Haskell2010 |
The type of kinds of game modes.
Synopsis
- data ModeKind = ModeKind {}
- makeData :: ContentData CaveKind -> ContentData ItemKind -> [ModeKind] -> ContentData ModeKind
- type Caves = IntMap (GroupName CaveKind)
- data Roster = Roster {
- rosterList :: [(Player, [(Int, Dice, GroupName ItemKind)])]
- rosterEnemy :: [(Text, Text)]
- rosterAlly :: [(Text, Text)]
- data Outcome
- type HiCondPoly = [HiSummand]
- type HiSummand = (HiPolynomial, [Outcome])
- type HiPolynomial = [(HiIndeterminant, Double)]
- data HiIndeterminant
- data Player = Player {
- fname :: Text
- fgroups :: [GroupName ItemKind]
- fskillsOther :: Skills
- fcanEscape :: Bool
- fneverEmpty :: Bool
- fhiCondPoly :: HiCondPoly
- fhasGender :: Bool
- ftactic :: Tactic
- fleaderMode :: LeaderMode
- fhasUI :: Bool
- data LeaderMode
- data AutoLeader = AutoLeader {
- autoDungeon :: Bool
- autoLevel :: Bool
- nameOfHorrorFact :: GroupName ItemKind
- validateSingle :: ModeKind -> [Text]
- validateAll :: ContentData CaveKind -> ContentData ItemKind -> [ModeKind] -> ContentData ModeKind -> [Text]
- validateSingleRoster :: Caves -> Roster -> [Text]
- validateSinglePlayer :: Player -> [Text]
- hardwiredModeGroups :: [GroupName ModeKind]
Documentation
Game mode specification.
Instances
Show ModeKind Source # | |
Generic ModeKind Source # | |
NFData ModeKind Source # | |
Defined in Game.LambdaHack.Content.ModeKind | |
type Rep ModeKind Source # | |
Defined in Game.LambdaHack.Content.ModeKind type Rep ModeKind = D1 (MetaData "ModeKind" "Game.LambdaHack.Content.ModeKind" "LambdaHack-0.8.0.0-F0O84Ns8lID9eizm4mHo10" False) (C1 (MetaCons "ModeKind" PrefixI True) ((S1 (MetaSel (Just "msymbol") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Char) :*: (S1 (MetaSel (Just "mname") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "mfreq") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 (Freqs ModeKind)))) :*: (S1 (MetaSel (Just "mroster") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Roster) :*: (S1 (MetaSel (Just "mcaves") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Caves) :*: S1 (MetaSel (Just "mdesc") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Text))))) |
makeData :: ContentData CaveKind -> ContentData ItemKind -> [ModeKind] -> ContentData ModeKind Source #
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 >
.
The specification of players for the game mode.
Roster | |
|
Instances
Show Roster Source # | |
Generic Roster Source # | |
NFData Roster Source # | |
Defined in Game.LambdaHack.Content.ModeKind | |
type Rep Roster Source # | |
Defined in Game.LambdaHack.Content.ModeKind type Rep Roster = D1 (MetaData "Roster" "Game.LambdaHack.Content.ModeKind" "LambdaHack-0.8.0.0-F0O84Ns8lID9eizm4mHo10" False) (C1 (MetaCons "Roster" PrefixI True) (S1 (MetaSel (Just "rosterList") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 [(Player, [(Int, Dice, GroupName ItemKind)])]) :*: (S1 (MetaSel (Just "rosterEnemy") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 [(Text, Text)]) :*: S1 (MetaSel (Just "rosterAlly") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 [(Text, Text)])))) |
Outcome of a game.
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 # | |
Ord Outcome Source # | |
Defined in Game.LambdaHack.Content.ModeKind | |
Show Outcome Source # | |
Generic Outcome Source # | |
Binary Outcome Source # | |
NFData Outcome Source # | |
Defined in Game.LambdaHack.Content.ModeKind | |
type Rep Outcome Source # | |
Defined in Game.LambdaHack.Content.ModeKind type Rep Outcome = D1 (MetaData "Outcome" "Game.LambdaHack.Content.ModeKind" "LambdaHack-0.8.0.0-F0O84Ns8lID9eizm4mHo10" 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.
type HiSummand = (HiPolynomial, [Outcome]) Source #
type HiPolynomial = [(HiIndeterminant, Double)] Source #
data HiIndeterminant Source #
Instances
Properties of a particular player.
Player | |
|
Instances
data LeaderMode Source #
If a faction with LeaderUI
and LeaderAI
has any actor, it has a leader.
LeaderNull | faction can have no leader, is whole under AI control |
LeaderAI AutoLeader | leader under AI control |
LeaderUI AutoLeader | leader under UI control, assumes |
Instances
data AutoLeader Source #
AutoLeader | |
|
Instances
Internal operations
validateSingle :: ModeKind -> [Text] Source #
Catch invalid game mode kind definitions.
validateAll :: ContentData CaveKind -> ContentData ItemKind -> [ModeKind] -> ContentData ModeKind -> [Text] Source #
Validate game mode kinds together.
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.
validateSinglePlayer :: Player -> [Text] Source #