Safe Haskell | None |
---|---|
Language | Haskell2010 |
The type of kinds of weapons, treasure, organs, blasts and actors.
- data ItemKind = ItemKind {}
- data Effect
- = NoEffect !Text
- | Hurt !Dice
- | Burn !Dice
- | Explode !(GroupName ItemKind)
- | RefillHP !Int
- | OverfillHP !Int
- | RefillCalm !Int
- | OverfillCalm !Int
- | Dominate
- | Impress
- | CallFriend !Dice
- | Summon !(Freqs ItemKind) !Dice
- | Ascend !Int
- | Escape !Int
- | Paralyze !Dice
- | InsertMove !Dice
- | Teleport !Dice
- | CreateItem !CStore !(GroupName ItemKind) !TimerDice
- | DropItem !CStore !(GroupName ItemKind) !Bool
- | PolyItem
- | Identify
- | SendFlying !ThrowMod
- | PushActor !ThrowMod
- | PullActor !ThrowMod
- | DropBestWeapon
- | ActivateInv !Char
- | ApplyPerfume
- | OneOf ![Effect]
- | OnSmash !Effect
- | Recharging !Effect
- | Temporary !Text
- data TimerDice
- data Aspect a
- = Unique
- | Periodic
- | Timeout !a
- | AddHurtMelee !a
- | AddHurtRanged !a
- | AddArmorMelee !a
- | AddArmorRanged !a
- | AddMaxHP !a
- | AddMaxCalm !a
- | AddSpeed !a
- | AddSkills !Skills
- | AddSight !a
- | AddSmell !a
- | AddLight !a
- data ThrowMod = ThrowMod {
- throwVelocity :: !Int
- throwLinger :: !Int
- data Feature
- data EqpSlot
- slotName :: EqpSlot -> Text
- 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.
NoEffect !Text | |
Hurt !Dice | |
Burn !Dice | |
Explode !(GroupName ItemKind) | explode, producing this group of blasts |
RefillHP !Int | |
OverfillHP !Int | |
RefillCalm !Int | |
OverfillCalm !Int | |
Dominate | |
Impress | |
CallFriend !Dice | |
Summon !(Freqs ItemKind) !Dice | |
Ascend !Int | |
Escape !Int | the Int says if can be placed on last level, etc. |
Paralyze !Dice | |
InsertMove !Dice | |
Teleport !Dice | |
CreateItem !CStore !(GroupName ItemKind) !TimerDice | create an item of the group and insert into the store with the given random timer |
DropItem !CStore !(GroupName ItemKind) !Bool |
|
PolyItem | |
Identify | |
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 |
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.
Unique | at most one copy can ever be generated |
Periodic | in equipment, apply as often as |
Timeout !a | some effects will be disabled until item recharges |
AddHurtMelee !a | percentage damage bonus in melee |
AddHurtRanged !a | percentage damage bonus in ranged |
AddArmorMelee !a | percentage armor bonus against melee |
AddArmorRanged !a | percentage armor bonus against ranged |
AddMaxHP !a | maximal hp |
AddMaxCalm !a | maximal calm |
AddSpeed !a | speed in m/10s |
AddSkills !Skills | skills in particular abilities |
AddSight !a | FOV radius, where 1 means a single tile |
AddSmell !a | smell radius, where 1 means a single tile |
AddLight !a | light radius, where 1 means a single tile |
Parameters modifying a throw. 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 |
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 |
EqpSlot !EqpSlot !Text | AI and UI flag: goes to inventory |
Precious | can't throw or apply if not calm enough; AI and UI flag: don't risk identifying by use |
Tactic !Tactic | overrides actor's tactic (TODO) |
toVelocity :: Int -> Feature Source
toOrganNone :: GroupName ItemKind -> Effect Source
validateSingleItemKind :: ItemKind -> [Text] Source
Catch invalid item kind definitions.
validateAllItemKind :: [ItemKind] -> [Text] Source
Validate all item kinds.