Safe Haskell | None |
---|---|
Language | Haskell2010 |
The type of kinds of weapons, treasure, organs, blasts, etc.
Synopsis
- data ItemKind = ItemKind {}
- makeData :: [ItemKind] -> ContentData ItemKind
- data Aspect
- data Effect
- = Burn Dice
- | Explode (GroupName ItemKind)
- | RefillHP Int
- | RefillCalm Int
- | Dominate
- | Impress
- | PutToSleep
- | Yell
- | Summon (GroupName ItemKind) Dice
- | Ascend Bool
- | Escape
- | Paralyze Dice
- | ParalyzeInWater Dice
- | InsertMove Dice
- | Teleport Dice
- | CreateItem CStore (GroupName ItemKind) TimerDice
- | DropItem Int Int CStore (GroupName ItemKind)
- | PolyItem
- | RerollItem
- | DupItem
- | Identify
- | Detect DetectKind Int
- | SendFlying ThrowMod
- | PushActor ThrowMod
- | PullActor ThrowMod
- | DropBestWeapon
- | ActivateInv Char
- | ApplyPerfume
- | OneOf [Effect]
- | OnSmash Effect
- | Composite [Effect]
- | VerbNoLonger Text
- | VerbMsg Text
- data DetectKind
- data TimerDice
- data ThrowMod = ThrowMod {
- throwVelocity :: Int
- throwLinger :: Int
- throwHP :: Int
- boostItemKindList :: StdGen -> [ItemKind] -> [ItemKind]
- forApplyEffect :: Effect -> Bool
- strengthOnSmash :: ItemKind -> [Effect]
- getDropOrgans :: ItemKind -> [GroupName ItemKind]
- getMandatoryHideAsFromKind :: ItemKind -> Maybe (GroupName ItemKind)
- isEffEscape :: Effect -> Bool
- isEffEscapeOrAscend :: Effect -> Bool
- timeoutAspect :: Aspect -> Bool
- onSmashEffect :: Effect -> Bool
- damageUsefulness :: ItemKind -> Double
- verbMsgNoLonger :: Text -> Effect
- verbMsgLess :: Text -> Effect
- toVelocity :: Int -> Aspect
- toLinger :: Int -> Aspect
- timerNone :: TimerDice
- isTimerNone :: TimerDice -> Bool
- foldTimer :: a -> (Dice -> a) -> (Dice -> a) -> TimerDice -> a
- toOrganBad :: GroupName ItemKind -> Dice -> Effect
- toOrganGood :: GroupName ItemKind -> Dice -> Effect
- toOrganNoTimer :: GroupName ItemKind -> Effect
- boostItemKind :: ItemKind -> ItemKind
- validateSingle :: ItemKind -> [Text]
- validateAll :: [ItemKind] -> ContentData ItemKind -> [Text]
- validateDups :: ItemKind -> Aspect -> [Text]
- validateDamage :: Dice -> [Text]
- hardwiredItemGroups :: [GroupName ItemKind]
Documentation
Item properties that are fixed for a given kind of items.
Of these, aspects and effects are jointly called item powers.
Note that this type is mutually recursive with Effect
and Aspect
.
ItemKind | |
|
Instances
Aspects of items. Aspect AddSkill
is additive (starting at 0)
for all items wielded by an actor and it affects the actor.
The others affect only the item in question, not the actor carrying it,
and so are not additive in any sense.
Timeout Dice | specifies the cooldown before an item may be applied again; if a copy of an item is applied manually (not via periodic activation), all effects on a single copy of the item are disabled until the copy recharges for the given time expressed in game turns; all copies recharge concurrently |
AddSkill Skill Dice | bonus to a skill; in content, avoid boosting skills such as SkApply via permanent equipment, to avoid micromanagement through swapping items among party members before each skill use |
SetFlag Flag | item feature |
ELabel Text | extra label of the item; it's not pluralized |
ToThrow ThrowMod | parameters modifying a throw |
HideAs (GroupName ItemKind) | until identified, presents as this unique kind |
EqpSlot EqpSlot | AI and UI flag that leaks item intended use |
Odds Dice [Aspect] [Aspect] | if level-scaled dice roll > 50, pick the former aspects, otherwise the latter |
Instances
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.
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 |
PutToSleep | put actor to sleep, also calming him |
Yell | make the actor yell/yawn, waking him and others up |
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 |
ParalyzeInWater Dice | paralyze for this many game clips due to water |
InsertMove Dice | give actor this many extra tenths of actor move |
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 copies of each kind to drop; for non-organs, beware of not dropping all, or cluttering store with rubbish becomes beneficial |
PolyItem | get a suitable (i.e., numerous enough) non-unique common item stack on the floor and polymorph it to a stack of random common items, with current depth coefficient |
RerollItem | get a suitable (i.e., with any random aspects) single item (even unique) on the floor and change the random bonuses of the items randomly, with maximal depth coefficient |
DupItem | exactly duplicate a single non-unique, non-valuable item on the floor |
Identify | find a suitable (i.e., not identified) item, starting from the floor, and identify it |
Detect DetectKind Int | detect something on the map in the given 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); |
Composite [Effect] | only fire next effect if previous fully activated |
VerbNoLonger Text | a sentence with the actor causing the effect as subject and the given text as verb is emitted when the activation causes item to expire; no spam is emitted if a projectile |
VerbMsg Text | a sentence with the actor causing the effect as subject and the given text as verb is emitted whenever the item is activated; no spam is emitted if a projectile |
Instances
data DetectKind Source #
Instances
Specification of how to randomly roll a timer at item creation to obtain a fixed timer for the item's lifetime.
Instances
Eq TimerDice Source # | |
Show TimerDice Source # | |
Generic TimerDice Source # | |
Binary TimerDice Source # | |
type Rep TimerDice Source # | |
Defined in Game.LambdaHack.Content.ItemKind type Rep TimerDice = D1 (MetaData "TimerDice" "Game.LambdaHack.Content.ItemKind" "LambdaHack-0.9.3.0-inplace" False) (C1 (MetaCons "TimerNone" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "TimerGameTurn" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Dice)) :+: C1 (MetaCons "TimerActorTurn" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Dice)))) |
Parameters modifying a throw of a projectile or flight of pushed actor. Not additive and don't start at 0.
ThrowMod | |
|
Instances
Eq ThrowMod Source # | |
Ord ThrowMod Source # | |
Defined in Game.LambdaHack.Content.ItemKind | |
Show ThrowMod Source # | |
Generic ThrowMod Source # | |
Binary ThrowMod Source # | |
Hashable ThrowMod Source # | |
Defined in Game.LambdaHack.Content.ItemKind | |
type Rep ThrowMod Source # | |
Defined in Game.LambdaHack.Content.ItemKind type Rep ThrowMod = D1 (MetaData "ThrowMod" "Game.LambdaHack.Content.ItemKind" "LambdaHack-0.9.3.0-inplace" False) (C1 (MetaCons "ThrowMod" PrefixI True) (S1 (MetaSel (Just "throwVelocity") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Int) :*: (S1 (MetaSel (Just "throwLinger") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Int) :*: S1 (MetaSel (Just "throwHP") NoSourceUnpackedness NoSourceStrictness DecidedStrict) (Rec0 Int)))) |
forApplyEffect :: Effect -> Bool Source #
Whether the effect has a chance of exhibiting any potentially
noticeable behaviour, except when the item is destroyed.
We assume at least one of OneOf
effects must be noticeable.
strengthOnSmash :: ItemKind -> [Effect] Source #
isEffEscape :: Effect -> Bool Source #
isEffEscapeOrAscend :: Effect -> Bool Source #
timeoutAspect :: Aspect -> Bool Source #
onSmashEffect :: Effect -> Bool Source #
damageUsefulness :: ItemKind -> Double Source #
verbMsgNoLonger :: Text -> Effect Source #
verbMsgLess :: Text -> Effect Source #
toVelocity :: Int -> Aspect Source #
isTimerNone :: TimerDice -> Bool Source #
Internal operations
boostItemKind :: ItemKind -> ItemKind Source #
validateSingle :: ItemKind -> [Text] Source #
Catch invalid item kind definitions.
validateAll :: [ItemKind] -> ContentData ItemKind -> [Text] Source #
Validate all item kinds.
validateDamage :: Dice -> [Text] Source #