Safe Haskell | None |
---|---|
Language | Haskell2010 |
The type of kinds of weapons, treasure, organs, blasts, etc.
- 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
- | Composite [Effect]
- data TimerDice
- data Aspect
- 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
- boostItemKindList :: StdGen -> [ItemKind] -> [ItemKind]
- 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]
- boostItemKind :: ItemKind -> ItemKind
- validateDups :: ItemKind -> Feature -> [Text]
- validateDamage :: [(Int, Dice)] -> [Text]
- hardwiredItemGroups :: [GroupName ItemKind]
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.
ELabel Text | secret (learned as effect) name of the item |
EqpSlot EqpSlot | AI and UI flag that leaks item properties |
Burn Dice | burn with this damage |
Explode (GroupName ItemKind) | explode producing this group of blasts |
RefillHP Int | modify HP of the actor by this amount |
RefillCalm Int | modify Calm of the actor by this amount |
Dominate | change actor's allegiance |
Impress | make actor susceptible to domination |
Summon (GroupName ItemKind) Dice | summon the given number of actors of this group |
Ascend Bool | ascend to another level of the dungeon |
Escape | escape from the dungeon |
Paralyze Dice | paralyze for this many game clips |
InsertMove Dice | give free time to actor of this many game turns |
Teleport Dice | teleport actor across rougly this distance |
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) | make the actor drop items of the given group from the given store; the first integer says how many item kinds to drop, the second, how many copie of each kind to drop |
PolyItem | find a suitable (i.e., numerous enough) item, starting from the floor, and polymorph it randomly |
Identify | find a suitable (i.e., not identified) item, starting from the floor, and identify it |
Detect Int | detect all on the map in the given radius |
DetectActor Int | detect actors on the map in the given radius |
DetectItem Int | detect items on the map in the given radius |
DetectExit Int | detect exits on the map in the given radius |
DetectHidden Int | detect hidden tiles on the map in the radius |
SendFlying ThrowMod | send an actor flying (push or pull, depending) |
PushActor ThrowMod | push an actor |
PullActor ThrowMod | pull an actor |
DropBestWeapon | make the actor drop its best weapon |
ActivateInv Char | activate all items with this symbol in inventory; space character means all symbols |
ApplyPerfume | remove all smell on the level |
OneOf [Effect] | trigger one of the effects with equal probability |
OnSmash Effect | trigger the effect when item smashed (not when 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 equipment, triggered as often as |
Composite [Effect] | only fire next effect if previous was triggered |
Specification of how to randomly roll a timer at item creation to obtain a fixed timer for the item's lifetime.
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 when pushed or pulled) |
AddSight Dice | FOV radius, where 1 means a single tile FOV |
AddSmell Dice | smell radius |
AddShine Dice | shine radius |
AddNocto Dice | noctovision radius |
AddAggression Dice | aggression, e.g., when 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. Publicly visible. 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 |
AI and UI hints about the role of the item.
forApplyEffect :: Effect -> Bool Source #
Whether the effect has a chance of exhibiting any potentially noticeable behaviour.
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.
Internal operations
boostItemKind :: ItemKind -> ItemKind Source #