LambdaHack-0.11.0.1: A game engine library for tactical squad ASCII roguelike dungeon crawlers

Safe Haskell | None
Language | Haskell2010

Game.LambdaHack.Definition.Ability

Contents

- Internal operations

Description

Abilities of items, actors and factions.

Synopsis

- data Skill
  - = SkMove
  - | SkMelee
  - | SkDisplace
  - | SkAlter
  - | SkWait
  - | SkMoveItem
  - | SkProject
  - | SkApply
  - | SkSwimming
  - | SkFlying
  - | SkHurtMelee
  - | SkArmorMelee
  - | SkArmorRanged
  - | SkMaxHP
  - | SkMaxCalm
  - | SkSpeed
  - | SkSight
  - | SkSmell
  - | SkShine
  - | SkNocto
  - | SkHearing
  - | SkAggression
  - | SkOdor
  - | SkDeflectRanged
  - | SkDeflectMelee
- data Skills
- data Flag
  - = Fragile
  - | Lobable
  - | Durable
  - | Equipable
  - | Benign
  - | Precious
  - | Blast
  - | Condition
  - | Unique
  - | MetaGame
  - | MinorEffects
  - | MinorAspects
  - | Meleeable
  - | Periodic
  - | UnderRanged
  - | UnderMelee
- data ActivationFlag
  - = ActivationMeleeable
  - | ActivationPeriodic
  - | ActivationUnderRanged
  - | ActivationUnderMelee
  - | ActivationProjectile
  - | ActivationTrigger
  - | ActivationOnSmash
  - | ActivationOnCombine
  - | ActivationEmbed
  - | ActivationConsume
- newtype Flags = Flags {
  - flags :: EnumSet Flag
  }
- data Doctrine
  - = TExplore
  - | TFollow
  - | TFollowNoItems
  - | TMeleeAndRanged
  - | TMeleeAdjacent
  - | TBlock
  - | TRoam
  - | TPatrol
- data EqpSlot
  - = EqpSlotMove
  - | EqpSlotMelee
  - | EqpSlotDisplace
  - | EqpSlotAlter
  - | EqpSlotWait
  - | EqpSlotMoveItem
  - | EqpSlotProject
  - | EqpSlotApply
  - | EqpSlotSwimming
  - | EqpSlotFlying
  - | EqpSlotHurtMelee
  - | EqpSlotArmorMelee
  - | EqpSlotArmorRanged
  - | EqpSlotMaxHP
  - | EqpSlotSpeed
  - | EqpSlotSight
  - | EqpSlotShine
  - | EqpSlotMiscBonus
  - | EqpSlotWeaponFast
  - | EqpSlotWeaponBig
- getSk :: Skill -> Skills -> Int
- addSk :: Skill -> Int -> Skills -> Skills
- checkFl :: Flag -> Flags -> Bool
- skillsToList :: Skills -> [(Skill, Int)]
- zeroSkills :: Skills
- addSkills :: Skills -> Skills -> Skills
- sumScaledSkills :: [(Skills, Int)] -> Skills
- nameDoctrine :: Doctrine -> Text
- describeDoctrine :: Doctrine -> Text
- doctrineSkills :: Doctrine -> Skills
- blockOnly :: Skills
- meleeAdjacent :: Skills
- meleeAndRanged :: Skills
- ignoreItems :: Skills
- scaleSkills :: (Skills, Int) -> Skills

# Documentation

data Skill Source #

Actor and faction skills. They are a subset of actor aspects. See `skillDesc` for documentation.

Constructors

SkMove |
SkMelee |
SkDisplace |
SkAlter |
SkWait |
SkMoveItem |
SkProject |
SkApply |
SkSwimming |
SkFlying |
SkHurtMelee |
SkArmorMelee |
SkArmorRanged |
SkMaxHP |
SkMaxCalm |
SkSpeed |
SkSight | FOV radius, where 1 means a single tile FOV area
SkSmell |
SkShine |
SkNocto |
SkHearing |
SkAggression |
SkOdor |
SkDeflectRanged | intended to reflect how many items granting complete invulnerability are among organs and equipment; this is not strength of deflection nor duration, etc.
SkDeflectMelee | see above

#### Instances

Instances details

Binary Skill Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods put :: Skill -> Put Source # get :: Get Skill Source # putList :: [Skill] -> Put Source #
Bounded Skill Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods minBound :: Skill Source # maxBound :: Skill Source #
Enum Skill Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods succ :: Skill -> Skill Source # pred :: Skill -> Skill Source # toEnum :: Int -> Skill Source # fromEnum :: Skill -> Int Source # enumFrom :: Skill -> [Skill] Source # enumFromThen :: Skill -> Skill -> [Skill] Source # enumFromTo :: Skill -> Skill -> [Skill] Source # enumFromThenTo :: Skill -> Skill -> Skill -> [Skill] Source #
Generic Skill Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

Associated Types

type Rep Skill |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep Skill = D1 ('MetaData "Skill" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((((C1 ('MetaCons "SkMove" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkMelee" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkDisplace" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SkAlter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkWait" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkMoveItem" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SkProject" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkApply" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkSwimming" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SkFlying" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkHurtMelee" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkArmorMelee" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "SkArmorRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkMaxHP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkMaxCalm" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SkSpeed" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkSight" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkSmell" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SkShine" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkNocto" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkHearing" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SkAggression" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkOdor" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SkDeflectRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkDeflectMelee" 'PrefixI 'False) (U1 :: Type -> Type))))))

Methods

from :: Skill -> Rep Skill x Source #

to :: Rep Skill x -> Skill Source #

Show Skill Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> Skill -> ShowS Source # show :: Skill -> String Source # showList :: [Skill] -> ShowS Source #
Eq Skill Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods (==) :: Skill -> Skill -> Bool Source # (/=) :: Skill -> Skill -> Bool Source #
Hashable Skill Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods hashWithSalt :: Int -> Skill -> Int Source # hash :: Skill -> Int Source #
type Rep Skill Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep Skill = D1 ('MetaData "Skill" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((((C1 ('MetaCons "SkMove" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkMelee" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkDisplace" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SkAlter" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkWait" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkMoveItem" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SkProject" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkApply" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkSwimming" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SkFlying" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkHurtMelee" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkArmorMelee" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "SkArmorRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkMaxHP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkMaxCalm" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "SkSpeed" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkSight" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkSmell" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "SkShine" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "SkNocto" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkHearing" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "SkAggression" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkOdor" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SkDeflectRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "SkDeflectMelee" 'PrefixI 'False) (U1 :: Type -> Type))))))

data Skills Source #

Strength of particular skills. This is cumulative from actor organs and equipment and so pertain to an actor as well as to items.

This representation is sparse, so better than a record when there are more item kinds (with few skills) than actors (with many skills), especially if the number of skills grows as the engine is developed. It's also easier to code and maintain.

The tree is by construction sparse, so the derived equality is semantical.

#### Instances

Instances details

Binary Skills Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods put :: Skills -> Put Source # get :: Get Skills Source # putList :: [Skills] -> Put Source #
Show Skills Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> Skills -> ShowS Source # show :: Skills -> String Source # showList :: [Skills] -> ShowS Source #
Eq Skills Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods (==) :: Skills -> Skills -> Bool Source # (/=) :: Skills -> Skills -> Bool Source #
Ord Skills Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods compare :: Skills -> Skills -> Ordering Source # (<) :: Skills -> Skills -> Bool Source # (<=) :: Skills -> Skills -> Bool Source # (>) :: Skills -> Skills -> Bool Source # (>=) :: Skills -> Skills -> Bool Source # max :: Skills -> Skills -> Skills Source # min :: Skills -> Skills -> Skills Source #
Hashable Skills Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods hashWithSalt :: Int -> Skills -> Int Source # hash :: Skills -> Int Source #

data Flag Source #

Item flag aspects.

Constructors

Fragile | as a projectile, break at target tile, even if no hit; also, at each periodic activation a copy is destroyed and all other copies require full cooldown (timeout)
Lobable | drop at target tile, even if no hit
Durable | don't break even when hitting or applying
Equipable | AI and UI flag: consider equipping (may or may not have `EqpSlot`, e.g., if the benefit is periodic)
Benign | AI and UI flag: the item is not meant to harm
Precious | AI and UI flag: don't risk identifying by use; also, can't throw or apply if not calm enough; also may be used for UI flavour or AI hints
Blast | the item is an explosion blast particle
Condition | item is a condition (buff or de-buff) of an actor and is displayed as such, not activated at death; this differs from belonging to the `CONDITION` group, which doesn't guarantee any behaviour or display, but governs removal by items that drop `CONDITION`
Unique | at most one copy can ever be generated
MetaGame | once identified, the item is known until savefile deleted
MinorEffects | override: the effects on this item are considered minor and so possibly not causing identification on use, and so this item will identify on pick-up
MinorAspects | override: don't show question marks by weapons in HUD even when unidentified item with this flag equipped
Meleeable | meleeing with the item is permitted and so the item activates when meleed with

Periodic

at most one of any copies without cooldown (timeout) activates each turn; the cooldown required after activation is specified in `Timeout` (or is zero); the initial cooldown can also be specified as `TimerDice` in `CreateItem` effect; uniquely, this activation never destroys a copy, unless item is fragile; all this happens only for items in equipment or organs; kinetic damage is not applied

UnderRanged | activates when non-projectile actor with this item as equipment or organ is under ranged attack; kinetic damage is not applied
UnderMelee | activates when non-projectile actor with this item as equipment or organ is under melee attack; kinetic damage is not applied

#### Instances

Instances details

Binary Flag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods put :: Flag -> Put Source # get :: Get Flag Source # putList :: [Flag] -> Put Source #
Bounded Flag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods minBound :: Flag Source # maxBound :: Flag Source #
Enum Flag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods succ :: Flag -> Flag Source # pred :: Flag -> Flag Source # toEnum :: Int -> Flag Source # fromEnum :: Flag -> Int Source # enumFrom :: Flag -> [Flag] Source # enumFromThen :: Flag -> Flag -> [Flag] Source # enumFromTo :: Flag -> Flag -> [Flag] Source # enumFromThenTo :: Flag -> Flag -> Flag -> [Flag] Source #
Generic Flag Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

Associated Types

type Rep Flag |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep Flag = D1 ('MetaData "Flag" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((((C1 ('MetaCons "Fragile" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lobable" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Durable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Equipable" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Benign" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Precious" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Blast" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Condition" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Unique" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MetaGame" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MinorEffects" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MinorAspects" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Meleeable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Periodic" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnderRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnderMelee" 'PrefixI 'False) (U1 :: Type -> Type)))))

Methods

from :: Flag -> Rep Flag x Source #

to :: Rep Flag x -> Flag Source #

Show Flag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> Flag -> ShowS Source # show :: Flag -> String Source # showList :: [Flag] -> ShowS Source #
Eq Flag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods (==) :: Flag -> Flag -> Bool Source # (/=) :: Flag -> Flag -> Bool Source #
Hashable Flag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods hashWithSalt :: Int -> Flag -> Int Source # hash :: Flag -> Int Source #
type Rep Flag Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep Flag = D1 ('MetaData "Flag" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((((C1 ('MetaCons "Fragile" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Lobable" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Durable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Equipable" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Benign" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Precious" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Blast" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Condition" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Unique" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MetaGame" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MinorEffects" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MinorAspects" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Meleeable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Periodic" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnderRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnderMelee" 'PrefixI 'False) (U1 :: Type -> Type)))))

data ActivationFlag Source #

These flags correspond to the last cases of `Flag` and addtionally to all the universal circumstances of item activation, under which every item activates (even if vacuusly).

Constructors

ActivationMeleeable |
ActivationPeriodic |
ActivationUnderRanged |
ActivationUnderMelee |
ActivationProjectile | From here on, all items affected regardless of their `Flag` content.
ActivationTrigger |
ActivationOnSmash |
ActivationOnCombine |
ActivationEmbed |
ActivationConsume |

#### Instances

Instances details

Show ActivationFlag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> ActivationFlag -> ShowS Source # show :: ActivationFlag -> String Source # showList :: [ActivationFlag] -> ShowS Source #
Eq ActivationFlag Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods (==) :: ActivationFlag -> ActivationFlag -> Bool Source # (/=) :: ActivationFlag -> ActivationFlag -> Bool Source #

newtype Flags Source #

Constructors

Flags |

Fields

- flags :: EnumSet Flag

#### Instances

Instances details

Binary Flags Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods put :: Flags -> Put Source # get :: Get Flags Source # putList :: [Flags] -> Put Source #
Show Flags Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> Flags -> ShowS Source # show :: Flags -> String Source # showList :: [Flags] -> ShowS Source #
Eq Flags Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods (==) :: Flags -> Flags -> Bool Source # (/=) :: Flags -> Flags -> Bool Source #
Ord Flags Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods compare :: Flags -> Flags -> Ordering Source # (<) :: Flags -> Flags -> Bool Source # (<=) :: Flags -> Flags -> Bool Source # (>) :: Flags -> Flags -> Bool Source # (>=) :: Flags -> Flags -> Bool Source # max :: Flags -> Flags -> Flags Source # min :: Flags -> Flags -> Flags Source #
Hashable Flags Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods hashWithSalt :: Int -> Flags -> Int Source # hash :: Flags -> Int Source #

data Doctrine Source #

Doctrine of non-leader actors. Apart of determining AI operation, each doctrine implies a skill modifier, that is added to the non-leader skills defined in `fskillsOther` field of `FactionKind`.

Constructors

TExplore | if enemy nearby, attack, if no items, etc., explore unknown
TFollow | always follow leader's target or his position if no target
TFollowNoItems | follow but don't do any item management nor use
TMeleeAndRanged | only melee and do ranged combat
TMeleeAdjacent | only melee (or wait)
TBlock | always only wait, even if enemy in melee range
TRoam | if enemy nearby, attack, if no items, etc., roam randomly
TPatrol | find an open and uncrowded area, patrol it according to sight radius and fallback temporarily to `TRoam` when enemy is seen by the faction and is within the actor's sight radius

#### Instances

Instances details

Binary Doctrine Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods put :: Doctrine -> Put Source # get :: Get Doctrine Source # putList :: [Doctrine] -> Put Source #
Bounded Doctrine Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods minBound :: Doctrine Source # maxBound :: Doctrine Source #
Enum Doctrine Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

Methods

succ :: Doctrine -> Doctrine Source #

pred :: Doctrine -> Doctrine Source #

toEnum :: Int -> Doctrine Source #

fromEnum :: Doctrine -> Int Source #

enumFrom :: Doctrine -> [Doctrine] Source #

enumFromThen :: Doctrine -> Doctrine -> [Doctrine] Source #

enumFromTo :: Doctrine -> Doctrine -> [Doctrine] Source #

enumFromThenTo :: Doctrine -> Doctrine -> Doctrine -> [Doctrine] Source #

Generic Doctrine Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

Associated Types

type Rep Doctrine |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep Doctrine = D1 ('MetaData "Doctrine" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) (((C1 ('MetaCons "TExplore" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TFollow" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TFollowNoItems" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TMeleeAndRanged" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TMeleeAdjacent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TBlock" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TRoam" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TPatrol" 'PrefixI 'False) (U1 :: Type -> Type))))

Methods

from :: Doctrine -> Rep Doctrine x Source #

to :: Rep Doctrine x -> Doctrine Source #

Show Doctrine Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> Doctrine -> ShowS Source # show :: Doctrine -> String Source # showList :: [Doctrine] -> ShowS Source #
Eq Doctrine Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods (==) :: Doctrine -> Doctrine -> Bool Source # (/=) :: Doctrine -> Doctrine -> Bool Source #
Hashable Doctrine Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods hashWithSalt :: Int -> Doctrine -> Int Source # hash :: Doctrine -> Int Source #
type Rep Doctrine Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep Doctrine = D1 ('MetaData "Doctrine" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) (((C1 ('MetaCons "TExplore" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TFollow" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TFollowNoItems" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TMeleeAndRanged" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TMeleeAdjacent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TBlock" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TRoam" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TPatrol" 'PrefixI 'False) (U1 :: Type -> Type))))

data EqpSlot Source #

AI and UI hints about the role of the item.

Constructors

EqpSlotMove |
EqpSlotMelee |
EqpSlotDisplace |
EqpSlotAlter |
EqpSlotWait |
EqpSlotMoveItem |
EqpSlotProject |
EqpSlotApply |
EqpSlotSwimming |
EqpSlotFlying |
EqpSlotHurtMelee |
EqpSlotArmorMelee |
EqpSlotArmorRanged |
EqpSlotMaxHP |
EqpSlotSpeed |
EqpSlotSight |
EqpSlotShine |
EqpSlotMiscBonus |
EqpSlotWeaponFast |
EqpSlotWeaponBig |

#### Instances

Instances details

Binary EqpSlot Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods put :: EqpSlot -> Put Source # get :: Get EqpSlot Source # putList :: [EqpSlot] -> Put Source #
Bounded EqpSlot Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods minBound :: EqpSlot Source # maxBound :: EqpSlot Source #
Enum EqpSlot Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

Methods

succ :: EqpSlot -> EqpSlot Source #

pred :: EqpSlot -> EqpSlot Source #

toEnum :: Int -> EqpSlot Source #

fromEnum :: EqpSlot -> Int Source #

enumFrom :: EqpSlot -> [EqpSlot] Source #

enumFromThen :: EqpSlot -> EqpSlot -> [EqpSlot] Source #

enumFromTo :: EqpSlot -> EqpSlot -> [EqpSlot] Source #

enumFromThenTo :: EqpSlot -> EqpSlot -> EqpSlot -> [EqpSlot] Source #

Generic EqpSlot Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

Associated Types

type Rep EqpSlot |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep EqpSlot = D1 ('MetaData "EqpSlot" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((((C1 ('MetaCons "EqpSlotMove" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotMelee" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotDisplace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotAlter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotWait" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "EqpSlotMoveItem" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotProject" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotApply" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotSwimming" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotFlying" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "EqpSlotHurtMelee" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotArmorMelee" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotArmorRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotMaxHP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotSpeed" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "EqpSlotSight" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotShine" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotMiscBonus" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotWeaponFast" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotWeaponBig" 'PrefixI 'False) (U1 :: Type -> Type))))))

Methods

from :: EqpSlot -> Rep EqpSlot x Source #

to :: Rep EqpSlot x -> EqpSlot Source #

Show EqpSlot Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> EqpSlot -> ShowS Source # show :: EqpSlot -> String Source # showList :: [EqpSlot] -> ShowS Source #
Eq EqpSlot Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods (==) :: EqpSlot -> EqpSlot -> Bool Source # (/=) :: EqpSlot -> EqpSlot -> Bool Source #
Ord EqpSlot Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods compare :: EqpSlot -> EqpSlot -> Ordering Source # (<) :: EqpSlot -> EqpSlot -> Bool Source # (<=) :: EqpSlot -> EqpSlot -> Bool Source # (>) :: EqpSlot -> EqpSlot -> Bool Source # (>=) :: EqpSlot -> EqpSlot -> Bool Source # max :: EqpSlot -> EqpSlot -> EqpSlot Source # min :: EqpSlot -> EqpSlot -> EqpSlot Source #
Hashable EqpSlot Source # |
Instance details Defined in Game.LambdaHack.Definition.Ability Methods hashWithSalt :: Int -> EqpSlot -> Int Source # hash :: EqpSlot -> Int Source #
type Rep EqpSlot Source # |

Instance details

Defined in Game.LambdaHack.Definition.Ability

type Rep EqpSlot = D1 ('MetaData "EqpSlot" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.11.0.1-BLuOaw8nuizISmzkanqI8h" 'False) ((((C1 ('MetaCons "EqpSlotMove" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotMelee" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotDisplace" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotAlter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotWait" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "EqpSlotMoveItem" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotProject" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotApply" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotSwimming" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotFlying" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "EqpSlotHurtMelee" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotArmorMelee" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotArmorRanged" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotMaxHP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotSpeed" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "EqpSlotSight" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotShine" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "EqpSlotMiscBonus" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EqpSlotWeaponFast" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EqpSlotWeaponBig" 'PrefixI 'False) (U1 :: Type -> Type))))))

getSk :: Skill -> Skills -> Int Source #

addSk :: Skill -> Int -> Skills -> Skills Source #

checkFl :: Flag -> Flags -> Bool Source #

skillsToList :: Skills -> [(Skill, Int)] Source #

zeroSkills :: Skills Source #

addSkills :: Skills -> Skills -> Skills Source #

sumScaledSkills :: [(Skills, Int)] -> Skills Source #

nameDoctrine :: Doctrine -> Text Source #

describeDoctrine :: Doctrine -> Text Source #

doctrineSkills :: Doctrine -> Skills Source #

blockOnly :: Skills Source #

meleeAdjacent :: Skills Source #

meleeAndRanged :: Skills Source #

ignoreItems :: Skills Source #

# Internal operations

scaleSkills :: (Skills, Int) -> Skills Source #