Safe Haskell | None |
---|---|
Language | Haskell2010 |
The type of kinds of weapons, treasure, organs, blasts and actors.
- data ItemKind = ItemKind {}
- data Effect
- = ELabel !Text
- | EqpSlot !EqpSlot
- | Burn !Dice
- | Explode !(GroupName ItemKind)
- | RefillHP !Int
- | RefillCalm !Int
- | Dominate
- | Impress
- | Summon !(GroupName ItemKind) !Dice
- | Ascend !Bool
- | Escape
- | Paralyze !Dice
- | InsertMove !Dice
- | Teleport !Dice
- | CreateItem !CStore !(GroupName ItemKind) !TimerDice
- | DropItem !Int !Int !CStore !(GroupName ItemKind)
- | PolyItem
- | Identify
- | Detect !Int
- | DetectActor !Int
- | DetectItem !Int
- | DetectExit !Int
- | DetectHidden !Int
- | SendFlying !ThrowMod
- | PushActor !ThrowMod
- | PullActor !ThrowMod
- | DropBestWeapon
- | ActivateInv !Char
- | ApplyPerfume
- | OneOf ![Effect]
- | OnSmash !Effect
- | Recharging !Effect
- | Temporary !Text
- | Unique
- | Periodic
- data TimerDice
- data Aspect
- = Timeout !Dice
- | AddHurtMelee !Dice
- | AddArmorMelee !Dice
- | AddArmorRanged !Dice
- | AddMaxHP !Dice
- | AddMaxCalm !Dice
- | AddSpeed !Dice
- | AddSight !Dice
- | AddSmell !Dice
- | AddShine !Dice
- | AddNocto !Dice
- | AddAggression !Dice
- | AddAbility !Ability !Dice
- data ThrowMod = ThrowMod {
- throwVelocity :: !Int
- throwLinger :: !Int
- data Feature
- data EqpSlot
- = EqpSlotMiscBonus
- | EqpSlotAddHurtMelee
- | EqpSlotAddArmorMelee
- | EqpSlotAddArmorRanged
- | EqpSlotAddMaxHP
- | EqpSlotAddSpeed
- | EqpSlotAddSight
- | EqpSlotLightSource
- | EqpSlotWeapon
- | EqpSlotMiscAbility
- | EqpSlotAbMove
- | EqpSlotAbMelee
- | EqpSlotAbDisplace
- | EqpSlotAbAlter
- | EqpSlotAbProject
- | EqpSlotAbApply
- | EqpSlotAddMaxCalm
- | EqpSlotAddSmell
- | EqpSlotAddNocto
- | EqpSlotAddAggression
- | EqpSlotAbWait
- | EqpSlotAbMoveItem
- forApplyEffect :: Effect -> Bool
- forIdEffect :: Effect -> Bool
- toDmg :: Dice -> [(Int, Dice)]
- toVelocity :: Int -> Feature
- toLinger :: Int -> Feature
- toOrganGameTurn :: GroupName ItemKind -> Dice -> Effect
- toOrganActorTurn :: GroupName ItemKind -> Dice -> Effect
- toOrganNone :: GroupName ItemKind -> Effect
- validateSingleItemKind :: ItemKind -> [Text]
- validateAllItemKind :: [ItemKind] -> [Text]
Documentation
Item properties that are fixed for a given kind of items.
ItemKind | |
|
Effects of items. Can be invoked by the item wielder to affect another actor or the wielder himself. Many occurences in the same item are possible. Constructors are sorted vs increasing impact/danger.
ELabel !Text | secret (learned as effect) label of the item |
EqpSlot !EqpSlot | AI and UI flag that leaks item properties |
Burn !Dice | |
Explode !(GroupName ItemKind) | explode, producing this group of blasts |
RefillHP !Int | |
RefillCalm !Int | |
Dominate | |
Impress | |
Summon !(GroupName ItemKind) !Dice | |
Ascend !Bool | |
Escape | |
Paralyze !Dice | expressed in game clips |
InsertMove !Dice | expressed in game turns |
Teleport !Dice | |
CreateItem !CStore !(GroupName ItemKind) !TimerDice | create an item of the group and insert into the store with the given random timer |
DropItem !Int !Int !CStore !(GroupName ItemKind) | |
PolyItem | |
Identify | |
Detect !Int | |
DetectActor !Int | |
DetectItem !Int | |
DetectExit !Int | |
DetectHidden !Int | |
SendFlying !ThrowMod | |
PushActor !ThrowMod | |
PullActor !ThrowMod | |
DropBestWeapon | |
ActivateInv !Char | symbol |
ApplyPerfume | |
OneOf ![Effect] | |
OnSmash !Effect | trigger if item smashed (not applied nor meleed) |
Recharging !Effect | this effect inactive until timeout passes |
Temporary !Text | the item is temporary, vanishes at even void Periodic activation, unless Durable and not Fragile, and shows message with this verb at last copy activation or at each activation unless Durable and Fragile |
Unique | at most one copy can ever be generated |
Periodic | in eqp, triggered as often as |
Aspects of items. Those that are named Add*
are additive
(starting at 0) for all items wielded by an actor and they affect the actor.
Timeout !Dice | some effects disabled until item recharges; expressed in game turns |
AddHurtMelee !Dice | percentage damage bonus in melee |
AddArmorMelee !Dice | percentage armor bonus against melee |
AddArmorRanged !Dice | percentage armor bonus against ranged |
AddMaxHP !Dice | maximal hp |
AddMaxCalm !Dice | maximal calm |
AddSpeed !Dice | speed in m/10s (not of a projectile!) |
AddSight !Dice | FOV radius, where 1 means a single tile |
AddSmell !Dice | smell radius, where 1 means a single tile |
AddShine !Dice | shine radius, where 1 means a single tile |
AddNocto !Dice | noctovision radius, where 1 is single tile |
AddAggression !Dice | aggression, especially closing in for melee |
AddAbility !Ability !Dice | bonus to an ability |
Parameters modifying a throw of a projectile or flight of pushed actor. Not additive and don't start at 0.
ThrowMod | |
|
Features of item. Affect only the item in question, not the actor, and so not additive in any sense.
Fragile | drop and break at target tile, even if no hit |
Lobable | drop at target tile, even if no hit |
Durable | don't break even when hitting or applying |
ToThrow !ThrowMod | parameters modifying a throw |
Identified | the item starts identified |
Applicable | AI and UI flag: consider applying |
Equipable | AI and UI flag: consider equipping (independent of
^ |
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; |
Tactic !Tactic | overrides actor's tactic |
forApplyEffect :: Effect -> Bool Source #
forIdEffect :: Effect -> Bool Source #
toVelocity :: Int -> Feature Source #
validateSingleItemKind :: ItemKind -> [Text] Source #
Catch invalid item kind definitions.
validateAllItemKind :: [ItemKind] -> [Text] Source #
Validate all item kinds.