Safe Haskell | None |
---|---|
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 {}
- gleader :: Faction -> Maybe ActorId
- isHorrorFact :: Faction -> Bool
- noRunWithMulti :: Faction -> Bool
- isAIFact :: Faction -> Bool
- autoDungeonLevel :: Faction -> (Bool, Bool)
- automatePlayer :: Bool -> Player -> Player
- isFoe :: FactionId -> Faction -> FactionId -> Bool
- isFriend :: FactionId -> Faction -> FactionId -> Bool
- difficultyBound :: Int
- difficultyDefault :: Int
- difficultyCoeff :: Int -> Int
- difficultyInverse :: Int -> Int
- defaultChallenge :: Challenge
- possibleActorFactions :: ItemKind -> FactionDict -> [(FactionId, Faction)]
- 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] # | |
Eq Diplomacy Source # | |
Ord Diplomacy Source # | |
Defined in Game.LambdaHack.Common.Faction | |
Show Diplomacy Source # | |
Generic Diplomacy Source # | |
Binary Diplomacy Source # | |
type Rep Diplomacy Source # | |
Defined in Game.LambdaHack.Common.Faction type Rep Diplomacy = D1 (MetaData "Diplomacy" "Game.LambdaHack.Common.Faction" "LambdaHack-0.9.5.0-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
Eq Status Source # | |
Ord Status Source # | |
Show Status Source # | |
Generic Status Source # | |
Binary Status Source # | |
type Rep Status Source # | |
Defined in Game.LambdaHack.Common.Faction type Rep Status = D1 (MetaData "Status" "Game.LambdaHack.Common.Faction" "LambdaHack-0.9.5.0-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)))))) |
Instances
Eq Challenge Source # | |
Ord Challenge Source # | |
Defined in Game.LambdaHack.Common.Faction | |
Show Challenge Source # | |
Generic Challenge Source # | |
Binary Challenge Source # | |
type Rep Challenge Source # | |
Defined in Game.LambdaHack.Common.Faction type Rep Challenge = D1 (MetaData "Challenge" "Game.LambdaHack.Common.Faction" "LambdaHack-0.9.5.0-inplace" False) (C1 (MetaCons "Challenge" PrefixI True) (S1 (MetaSel (Just "cdiff") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Int) :*: (S1 (MetaSel (Just "cwolf") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Bool) :*: S1 (MetaSel (Just "cfish") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Bool)))) |
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 #
difficultyInverse :: Int -> Int Source #
possibleActorFactions :: ItemKind -> FactionDict -> [(FactionId, Faction)] Source #