Spell System Reference - dredmor-com/dungeons-of-dredmor GitHub Wiki

This page aims to explain the details behind the spell system and how to use them when analyzing code or making a mod.

  1. Normal Spells
  2. Buffs
  3. See Also

Normal Spells

<skill>
Name Input Description Example
name string Shows up in-game as the spell's name. name="Obvious Fireball"
type string What the spell targets type="missile"
icon path The icon that appears on the ability bar. icon="skills/spells/fireball32.png"
templateID templateID What template is used for the spell's effect. templateID="30"
anchored boolean Whether the template is anchored to its position or rotates with the player's direction. anchored="1"
downtime value The alternative to spells costing mana. Takes the given amount of turns to recast. downtime="32"
<requirements>
mp value How much mana the spell costs. mp="18"
savvyBonus value Each point of user's Savvy will reduce the Mana cost by this much. savvyBonus="0.15"
mincost value Minimal mana cost of the skill, no matter how much Savvy the user has. mincost="8"
weapon value What weapontype(!) is required to continue this spell. weapon="1"
shield boolean Whether you need a shield to continue the spell. shield="1"
<effect>
type string What the spell will cause on targets. type="damage"
damagetype value Each point of What damagetype this spell will cause. blasting="4"
damagetypeF value Each point of Magic Power will add a given amount of damage to the spell. blastingF="0.2"
primaryScale 0 - 5 What primary stat the damage will scale on. primaryScale="0"
secondaryScale 0 - 24 What secondary stat (0 - 21) or character class (22 - 24) will the damage scale on. secondaryScale="6"
affectscaster boolean If the spell will hurt the player. affectscaster="1"
bleed boolean If the spell will cause bleed on target. bleed="1"
<anim>
sprite path What filename the animation image has (without 0000). sprite="sprites/sfx/flame_buff_loop/flame_buff_loop"
frames values How many frames the filename has (0000 to 9999) frames="6"
firstFrame value At what frame the animation will start (only when not 0). firstFrame="2"
framerate value At what framerate the animation will play (milliseconds). framerate="50"
sfx string What sound effect will play whenever the animation plays. sfx="flame"
centerEffect boolean Whether the animation will always be played in the center of the target's sprite. centerEffect="1"
<description>
text string The text that shows up on mouse-over when the player puts the spell in the ability bar. text="It's a giant fireball. It goes BOOM. Then with the burning. Oh god, the burning. What more do you want?"
monsterText string The text that appears in the text log in the upper left corner (ticker) when a monster uses this spell. monsterText="corrupts your equipment!"
<ai>
hint string If a monster uses this spell, what they should use it as. hint="self"
"self" The monster will use this spell on itself.
"ally" The monster will use this spell on an ally.
"target" The monster will use this spell on YOU!
"mine" The monster will avoid this spellmine.

Buffs

Buffs can be one of many types: Infinite (e.g. stances), timed, brittle or "attacks", manaUpkeep (with time = x), zorkmidUpkeep (also with time = x).

<buff>
Name Input Description Example
usetimer value Determines whether or not this buff runs out based on rounds passed (requires next value; defaults to 1, which can screw you up if you don't forget to override the default.) usetimer="1"
time value The time this buff will stay on your character. time="49"
stacksize value The biggest stack you can get of these buffs. stacksize="3"
brittle value Amount of hits it will take monster to knock this buff out of you. brittle="5"
attacks value Amount of attacks this buff will stay on your character. attacks="6"
self boolean Whether the buff works on your character or not. self="1"
icon path The 64*64 icon, seen left in the hid, when this buff is activated. icon="skills/burning64.png"
smallicon path The 32*32 icon seen in a monster's info text, when this buff is activated on him. smallicon="skills/burning32.png"
allowstacking boolean Whether the buff can be stacked or not. allowstacking="0"
stackable boolean stackable="0"
bad boolean Whether this buff is a bad thing, in other words, if it can be "cured". bad="1"
removable boolean Whether this buff is removable. removable="1"
manaUpkeep value The amount of mana you'll have to pay to keep this buff active every given amount of turns. manaUpkeep="8"
zorkmidUpkeep value The amount of Zorkmids you'll have to pay to keep this buff active every given amount of turns. zorkmidUpkeep="15"
tag string Identifies what kind of buff it is; used with removecurse effects to tell them to only remove debuffs of a particular kind. tag="bankster"
<halo>
name path Path to the file used for the halo animation. name="sprites/sfx/burnD/burnD"
first value First frame in the animation, will need to be 0 to start at animation0000.png first="0"
num value The amount of frames in the animation. num="5"
frameRate value The framerate in ms. frameRate="100"
<sightbuff>
amount value The amount of sight this buff will increase while active. Functionally identical to <secondaryBuff id="18" amount="X">. amount="2"
<invisible>
amount boolean Whether the buff makes you invisible. !!!OPTIONAL!!! amount="1"
<senseWallsFlag>
amount boolean Whether the buff makes it possible to see through walls. !!!OPTIONAL!!! amount="1"
<senseTrapFlag>
amount boolean Whether the buff makes you see traps. !!!OPTIONAL!!! amount="1"
<senseMapFlag>
amount boolean Whether the buff reveals the whole map. !!!OPTIONAL!!! amount="1"
<mute>
amount boolean Whether the buff "mutes" you, impeding spellcasting. !!!OPTIONAL!!! amount="1"
<polymorph>
name monster name What monster to polymorph in with this buff active. name="Batty"
<payback>
secondaryScale id Tells PaybackF stat to multiply itself by a given amount to determine the number of Zorkmids you get when you take damage. Use either secondaryScale or primaryScale, not both. secondaryScale="0"
primaryScale primaryScale="0"
paybackF amount Multiplies itself by the stat identified above and gives you the resulting amount of Zorkmids whenever you take damage. paybackF="0.1"
<zorkmidAbsorption>
zorkmidsPerDamage amount The amount of Zorkmids one has to pay per 1 damage. zorkmidsPerDamage="30"
damageCap amount The maximal amount of damage one has to pay zorkmidsPerDamage for. Damage above the damageCap is not absorbed and not paid for. damageCap="20"
maxRatio amount Specifies a maximum percentage of damage to be absorbed by the ability. In the sample next, it would absorb no more than 50% of the damage taken. maxRatio="0.5"
<description>
text text The description. text="The overcharged blast has overloaded your Baromatic Pulse Device causing you to vent steam."

Note: Any amount of buff tags can be added inside a <buff>.

See Also:

Spell Effects

Spell Types

Templates

⚠️ **GitHub.com Fallback** ⚠️