LambdaHack-0.5.0.0: A game engine library for roguelike dungeon crawlers

Safe HaskellNone
LanguageHaskell2010

Game.LambdaHack.Content.ItemKind

Description

The type of kinds of weapons, treasure, organs, blasts and actors.

Synopsis

Documentation

data ItemKind Source

Item properties that are fixed for a given kind of items.

Constructors

ItemKind 

Fields

isymbol :: !Char

map symbol

iname :: !Text

generic name

ifreq :: !(Freqs ItemKind)

frequency within groups

iflavour :: ![Flavour]

possible flavours

icount :: !Dice

created in that quantity

irarity :: !Rarity

rarity on given depths

iverbHit :: !Part

the verb for applying and melee

iweight :: !Int

weight in grams

iaspects :: ![Aspect Dice]

keep the aspect continuously

ieffects :: ![Effect]

cause the effect when triggered

ifeature :: ![Feature]

public properties

idesc :: !Text

description

ikit :: ![(GroupName ItemKind, CStore)]

accompanying organs and items

Instances

data Effect Source

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.

Constructors

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

DropItem CGround x True means stomp on items

PolyItem 
Identify 
SendFlying !ThrowMod 
PushActor !ThrowMod 
PullActor !ThrowMod 
DropBestWeapon 
ActivateInv !Char

symbol ' ' means all

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

data Aspect a Source

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.

Constructors

Unique

at most one copy can ever be generated

Periodic

in equipment, apply as often as Timeout permits

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

Instances

Functor Aspect 
Foldable Aspect 
Traversable Aspect 
Eq a => Eq (Aspect a) 
Ord a => Ord (Aspect a) 
Read a => Read (Aspect a) 
Show a => Show (Aspect a) 
Generic (Aspect a) 
Binary a => Binary (Aspect a) 
Hashable a => Hashable (Aspect a) 
type Rep (Aspect a) 

data ThrowMod Source

Parameters modifying a throw. Not additive and don't start at 0.

Constructors

ThrowMod 

Fields

throwVelocity :: !Int

fly with this percentage of base throw speed

throwLinger :: !Int

fly for this percentage of 2 turns

data Feature Source

Features of item. Affect only the item in question, not the actor, and so not additive in any sense.

Constructors

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)

validateSingleItemKind :: ItemKind -> [Text] Source

Catch invalid item kind definitions.

validateAllItemKind :: [ItemKind] -> [Text] Source

Validate all item kinds.