Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Definition.Ability
Contents
Description
Abilities of items, actors and factions.
Synopsis
- data Skill
- data Skills
- data Flag
- newtype Flags = Flags {}
- data Tactic
- 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
- nameTactic :: Tactic -> Text
- describeTactic :: Tactic -> Text
- tacticSkills :: Tactic -> Skills
- blockOnly :: Skills
- meleeAdjacent :: Skills
- meleeAndRanged :: Skills
- ignoreItems :: Skills
- compactSkills :: EnumMap Skill Int -> EnumMap Skill Int
- scaleSkills :: Int -> EnumMap Skill Int -> EnumMap Skill Int
Documentation
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 |
SkSmell | |
SkShine | |
SkNocto | |
SkHearing | |
SkAggression | |
SkOdor |
Instances
Bounded Skill Source # | |
Enum Skill Source # | |
Defined in Game.LambdaHack.Definition.Ability | |
Eq Skill Source # | |
Ord Skill Source # | |
Show Skill Source # | |
Generic Skill Source # | |
Hashable Skill Source # | |
Binary Skill Source # | |
type Rep Skill Source # | |
Defined in Game.LambdaHack.Definition.Ability type Rep Skill = D1 ('MetaData "Skill" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.9.5.0-4ovYxwv1jih9UUX4cyhTOG" '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)))))) |
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.
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 |
Meleeable | AI and UI flag: consider meleeing with |
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;
this differs from belonging to the |
Unique | at most one copy can ever be generated |
Periodic | at most one of any copies without cooldown (timeout)
activates each turn; the cooldown required after
activation is specified in |
MinorEffects | override: the effects on this item are considered minor and so not causing identification on use, and so this item will identify on pick-up |
Instances
Bounded Flag Source # | |
Enum Flag Source # | |
Defined in Game.LambdaHack.Definition.Ability | |
Eq Flag Source # | |
Ord Flag Source # | |
Show Flag Source # | |
Generic Flag Source # | |
Hashable Flag Source # | |
Binary Flag Source # | |
type Rep Flag Source # | |
Defined in Game.LambdaHack.Definition.Ability type Rep Flag = D1 ('MetaData "Flag" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.9.5.0-4ovYxwv1jih9UUX4cyhTOG" '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 "Meleeable" '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 "Periodic" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MinorEffects" 'PrefixI 'False) (U1 :: Type -> Type))))) |
Tactic of non-leader actors. Apart of determining AI operation,
each tactic implies a skill modifier, that is added to the non-leader skills
defined in fskillsOther
field of Player
.
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 |
Instances
Bounded Tactic Source # | |
Enum Tactic Source # | |
Defined in Game.LambdaHack.Definition.Ability | |
Eq Tactic Source # | |
Ord Tactic Source # | |
Show Tactic Source # | |
Generic Tactic Source # | |
Hashable Tactic Source # | |
Binary Tactic Source # | |
type Rep Tactic Source # | |
Defined in Game.LambdaHack.Definition.Ability type Rep Tactic = D1 ('MetaData "Tactic" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.9.5.0-4ovYxwv1jih9UUX4cyhTOG" '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)))) |
AI and UI hints about the role of the item.
Constructors
Instances
Bounded EqpSlot Source # | |
Enum EqpSlot Source # | |
Eq EqpSlot Source # | |
Ord EqpSlot Source # | |
Defined in Game.LambdaHack.Definition.Ability | |
Show EqpSlot Source # | |
Generic EqpSlot Source # | |
Hashable EqpSlot Source # | |
Binary EqpSlot Source # | |
type Rep EqpSlot Source # | |
Defined in Game.LambdaHack.Definition.Ability type Rep EqpSlot = D1 ('MetaData "EqpSlot" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.9.5.0-4ovYxwv1jih9UUX4cyhTOG" '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)))))) |
zeroSkills :: Skills Source #
nameTactic :: Tactic -> Text Source #
describeTactic :: Tactic -> Text Source #
tacticSkills :: Tactic -> Skills Source #
ignoreItems :: Skills Source #