Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
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
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.
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
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
.
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 # | |
Binary Tactic Source # | |
Hashable Tactic Source # | |
Defined in Game.LambdaHack.Definition.Ability | |
type Rep Tactic Source # | |
Defined in Game.LambdaHack.Definition.Ability type Rep Tactic = D1 (MetaData "Tactic" "Game.LambdaHack.Definition.Ability" "LambdaHack-0.9.3.1-inplace" 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.
Instances
zeroSkills :: Skills Source #
nameTactic :: Tactic -> Text Source #
describeTactic :: Tactic -> Text Source #
tacticSkills :: Tactic -> Skills Source #
ignoreItems :: Skills Source #