Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Factions taking part in the game, e.g., a hero faction, a monster faction and an animal faction.
Synopsis
- type FactionDict = EnumMap FactionId Faction
- data Faction = Faction {}
- data Diplomacy
- data Status = Status {}
- data Challenge = Challenge {}
- tshowDiplomacy :: Diplomacy -> Text
- tshowChallenge :: Challenge -> Text
- gleader :: Faction -> Maybe ActorId
- isHorrorFact :: Faction -> Bool
- noRunWithMulti :: Faction -> Bool
- bannedPointmanSwitchBetweenLevels :: Faction -> Bool
- isFoe :: FactionId -> Faction -> FactionId -> Bool
- isFriend :: FactionId -> Faction -> FactionId -> Bool
- difficultyBound :: Int
- difficultyDefault :: Int
- difficultyCoeff :: Int -> Int
- defaultChallenge :: Challenge
- possibleActorFactions :: [GroupName ItemKind] -> ItemKind -> FactionDict -> Frequency (FactionId, Faction)
- ppContainer :: FactionDict -> Container -> Text
- type Dipl = EnumMap FactionId Diplomacy
Documentation
type FactionDict = EnumMap FactionId Faction Source #
All factions in the game, indexed by faction identifier.
The faction datatype.
Faction | |
|
Instances
Diplomacy states. Higher overwrite lower in case of asymmetric content.
Instances
Enum Diplomacy Source # | |
Defined in Game.LambdaHack.Common.Faction succ :: Diplomacy -> Diplomacy # pred :: Diplomacy -> Diplomacy # fromEnum :: Diplomacy -> Int # enumFrom :: Diplomacy -> [Diplomacy] # enumFromThen :: Diplomacy -> Diplomacy -> [Diplomacy] # enumFromTo :: Diplomacy -> Diplomacy -> [Diplomacy] # enumFromThenTo :: Diplomacy -> Diplomacy -> Diplomacy -> [Diplomacy] # | |
Generic Diplomacy Source # | |
Show Diplomacy Source # | |
Binary Diplomacy Source # | |
Eq Diplomacy Source # | |
Ord Diplomacy Source # | |
Defined in Game.LambdaHack.Common.Faction | |
type Rep Diplomacy Source # | |
Defined in Game.LambdaHack.Common.Faction type Rep Diplomacy = D1 ('MetaData "Diplomacy" "Game.LambdaHack.Common.Faction" "LambdaHack-0.11.0.1-inplace" 'False) ((C1 ('MetaCons "Unknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Neutral" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Alliance" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "War" 'PrefixI 'False) (U1 :: Type -> Type))) |
Current game status.
Instances
Generic Status Source # | |
Show Status Source # | |
Binary Status Source # | |
Eq Status Source # | |
Ord Status Source # | |
type Rep Status Source # | |
Defined in Game.LambdaHack.Common.Faction type Rep Status = D1 ('MetaData "Status" "Game.LambdaHack.Common.Faction" "LambdaHack-0.11.0.1-inplace" 'False) (C1 ('MetaCons "Status" 'PrefixI 'True) (S1 ('MetaSel ('Just "stOutcome") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Outcome) :*: (S1 ('MetaSel ('Just "stDepth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "stNewGame") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (GroupName ModeKind)))))) |
The difficulty level influencess HP of either the human player or the AI. The challenges restrict some abilities of the human player only.
Instances
Generic Challenge Source # | |
Show Challenge Source # | |
Binary Challenge Source # | |
Eq Challenge Source # | |
Ord Challenge Source # | |
Defined in Game.LambdaHack.Common.Faction | |
type Rep Challenge Source # | |
Defined in Game.LambdaHack.Common.Faction type Rep Challenge = D1 ('MetaData "Challenge" "Game.LambdaHack.Common.Faction" "LambdaHack-0.11.0.1-inplace" 'False) (C1 ('MetaCons "Challenge" 'PrefixI 'True) ((S1 ('MetaSel ('Just "cdiff") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "cfish") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "cgoods") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "cwolf") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "ckeeper") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))))) |
tshowDiplomacy :: Diplomacy -> Text Source #
tshowChallenge :: Challenge -> Text Source #
isHorrorFact :: Faction -> Bool Source #
Tell whether the faction consists of summoned horrors only.
Horror player is special, for summoned actors that don't belong to any of the main players of a given game. E.g., animals summoned during a skirmish game between two hero factions land in the horror faction. In every game, either all factions for which summoning items exist should be present or a horror player should be added to host them.
noRunWithMulti :: Faction -> Bool Source #
isFoe :: FactionId -> Faction -> FactionId -> Bool Source #
Check if factions are at war. Assumes symmetry.
isFriend :: FactionId -> Faction -> FactionId -> Bool Source #
Check if factions are allied or are the same faction. Assumes symmetry.
difficultyCoeff :: Int -> Int Source #
possibleActorFactions :: [GroupName ItemKind] -> ItemKind -> FactionDict -> Frequency (FactionId, Faction) Source #
ppContainer :: FactionDict -> Container -> Text Source #