include/spells.h File Reference

Go to the source code of this file.

Data Structures

struct  spell_struct

Defines

#define PATH_PROT   0x00000001
#define PATH_FIRE   0x00000002
#define PATH_FROST   0x00000004
#define PATH_ELEC   0x00000008
#define PATH_MISSILE   0x00000010
#define PATH_SELF   0x00000020
#define PATH_SUMMON   0x00000040
#define PATH_ABJURE   0x00000080
#define PATH_RESTORE   0x00000100
#define PATH_DETONATE   0x00000200
#define PATH_MIND   0x00000400
#define PATH_CREATE   0x00000800
#define PATH_TELE   0x00001000
#define PATH_INFO   0x00002000
#define PATH_TRANSMUTE   0x00004000
#define PATH_TRANSFER   0x00008000
#define PATH_TURNING   0x00010000
#define PATH_WOUNDING   0x00020000
#define PATH_DEATH   0x00040000
#define PATH_LIGHT   0x00080000
#define SPELL_USE_CAST   0x01
#define SPELL_USE_BALM   0x02
#define SPELL_USE_DUST   0x04
#define SPELL_USE_SCROLL   0x08
#define SPELL_USE_HORN   0x10
#define SPELL_USE_WAND   0x20
#define SPELL_USE_ROD   0x40
#define SPELL_USE_POTION   0x80
#define SPELL_USE_BOOK   0x100
#define SPELL_TYPE_WIZARD   1
#define SPELL_TYPE_PRIEST   2
#define SPELL_TYPE_NROF   2
#define SPELL_DESC_TOWN   0x01
#define SPELL_DESC_DIRECTION   0x02
#define SPELL_DESC_SELF   0x04
#define SPELL_DESC_FRIENDLY   0x08
#define SPELL_DESC_ENEMY   0x10
#define SP_NO_SPELL   -1
#define PATH_SP_MULT(op, spell)   (((op->path_attuned & spell->path) ? 0.8 : 1) * ((op->path_repelled & spell->path) ? 1.25 : 1))
#define PATH_DMG_MULT(op, spell)   (((op->path_attuned & spell->path) ? 1.25 : 1) * ((op->path_repelled & spell->path) ? 0.7 : 1))
#define TRANSFORM_WEALTH_SACRIFICE   0.80f
#define SPELL_MISS_ROLL_MIN   20
#define SPELL_MISS_ROLL_MAX   35

Typedefs

typedef struct spell_struct spell

Enumerations

enum  spellnrs {
  SP_FIRESTORM, SP_ICESTORM, SP_MINOR_HEAL, SP_CURE_POISON,
  SP_CURE_DISEASE, SP_STRENGTH, SP_IDENTIFY, SP_ASTEROID,
  SP_FROST_NOVA, SP_REMOVE_CURSE, SP_REMOVE_DAMNATION, SP_CAUSE_LIGHT,
  SP_CONFUSION, SP_BULLET, SP_UNUSED1, SP_REMOVE_DEPLETION,
  SP_PROBE, SP_TOWN_PORTAL, SP_CREATE_FOOD, SP_WOR,
  SP_CHARGING, SP_GREATER_HEAL, SP_RESTORATION, SP_PROT_COLD,
  SP_PROT_FIRE, SP_PROT_ELEC, SP_PROT_POISON, SP_CONSECRATE,
  SP_FINGER_DEATH, SP_CAUSE_COLD, SP_CAUSE_FLU, SP_CAUSE_LEPROSY,
  SP_CAUSE_SMALLPOX, SP_CAUSE_PNEUMONIC_PLAGUE, SP_METEOR, SP_METEOR_SWARM,
  SP_POISON_FOG, SP_BULLET_SWARM, SP_BULLET_STORM, SP_DESTRUCTION,
  SP_BOMB, SP_CURE_CONFUSION, SP_TRANSFORM_WEALTH, SP_MAGIC_MISSILE,
  SP_RAIN_HEAL, SP_PARTY_HEAL, SP_FROSTBOLT, SP_FIREBOLT,
  SP_LIGHTNING, SP_FORKED_LIGHTNING, SP_NEGABOLT
}
enum  SpellTypeFrom {
  spellNormal, spellWand, spellRod, spellHorn,
  spellScroll, spellPotion, spellNPC
}

Variables

int cleric_chance []
spell spells [NROFREALSPELLS]
char * spellpathnames [NRSPELLPATHS]
archetypespellarch [NROFREALSPELLS]

Detailed Description

Spells header file.

Definition in file spells.h.


Define Documentation

#define PATH_SP_MULT ( op,
spell   )     (((op->path_attuned & spell->path) ? 0.8 : 1) * ((op->path_repelled & spell->path) ? 1.25 : 1))

Multiplier for spell points / grace based on the attenuation.

Definition at line 292 of file spells.h.

#define SP_NO_SPELL   -1

Marks no spell.

Definition at line 222 of file spells.h.

#define SPELL_MISS_ROLL_MAX   35

Maximum number for rolls in spell_attack_missed().

Definition at line 317 of file spells.h.

#define SPELL_MISS_ROLL_MIN   20

Minimum number for rolls in spell_attack_missed().

Definition at line 315 of file spells.h.

#define SPELL_TYPE_NROF   2

Number of different spell types, should be have value of the highest spell type.

Definition at line 120 of file spells.h.

#define TRANSFORM_WEALTH_SACRIFICE   0.80f

20% sacrifice of money when casting the 'transform wealth' spell.

Definition at line 312 of file spells.h.


Typedef Documentation

typedef struct spell_struct spell

Spell structure.


Enumeration Type Documentation

enum spellnrs

The spell numbers.

When adding new spells, don't insert into the middle of the list - add to the end of the list.

Some archetypes and treasures require the spell numbers to be as they are.

Definition at line 234 of file spells.h.

How is the spell being cast.

Definition at line 299 of file spells.h.


Variable Documentation

Probability of messing up a divine spell. Based on wisdom.

Definition at line 140 of file living.c.

archetype* spellarch[NROFREALSPELLS]

Array of pointers to archetypes used by the spells for quick access.

Definition at line 35 of file spell_util.c.

char* spellpathnames[NRSPELLPATHS]

Spell paths

Definition at line 446 of file spellist.h.

spell spells[NROFREALSPELLS]

Array of all the spells.

Definition at line 34 of file spellist.h.


Generated by  doxygen 1.6.2