Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Definition.Ability
Contents
Description
Abilities of items, actors and factions.
Synopsis
- data Skill
- data Skills
- data Flag
- data ActivationFlag
- newtype Flags = Flags {}
- data Doctrine
- 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
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
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 |
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 |
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 |
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
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 |
ActivationTrigger | |
ActivationOnSmash | |
ActivationOnCombine | |
ActivationEmbed | |
ActivationConsume |
Instances
Eq ActivationFlag Source # | |
Defined in Game.LambdaHack.Definition.Ability Methods (==) :: ActivationFlag -> ActivationFlag -> Bool # (/=) :: ActivationFlag -> ActivationFlag -> Bool # | |
Show ActivationFlag Source # | |
Defined in Game.LambdaHack.Definition.Ability Methods showsPrec :: Int -> ActivationFlag -> ShowS # show :: ActivationFlag -> String # showList :: [ActivationFlag] -> ShowS # |
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 |
Instances
AI and UI hints about the role of the item.
Constructors
Instances
zeroSkills :: Skills Source #
nameDoctrine :: Doctrine -> Text Source #
describeDoctrine :: Doctrine -> Text Source #
doctrineSkills :: Doctrine -> Skills Source #
ignoreItems :: Skills Source #