Crossfire Server, Trunk
spells.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXPLODING_FIREBALL   "exploding_fireball"
 
#define FORCE_CHANGE_ABILITY   2
 
#define FORCE_CONFUSION   1
 
#define FORCE_NAME   "force" /* instead of it being hardcoded */
 
#define FORCE_TRANSFORMED_ITEM   3
 
#define GENERIC_RUNE   "generic_rune"
 
#define GOD_POWER   "god_power"
 
#define HOLY_POSSESSION   "spell_holy_possession"
 
#define LOOSE_MANA   "loose_magic"
 
#define NROFREALSPELLS   1024
 
#define NRSPELLPATHS   20
 
#define PATH_ABJURE   0x00000080 /* 128 */
 
#define PATH_CREATE   0x00000800 /* 2048 */
 
#define PATH_DEATH   0x00040000 /* 262144 */
 
#define PATH_DETONATE   0x00000200 /* 512 */
 
#define PATH_ELEC   0x00000008 /* 8 */
 
#define PATH_FIRE   0x00000002 /* 2 */
 
#define PATH_FROST   0x00000004 /* 4 */
 
#define PATH_INFO   0x00002000 /* 8192 */
 
#define PATH_LIGHT   0x00080000 /* 524288 */
 
#define PATH_MIND   0x00000400 /* 1024 */
 
#define PATH_MISSILE   0x00000010 /* 16 */
 
#define PATH_PROT   0x00000001 /* 1 */
 
#define PATH_RESTORE   0x00000100 /* 256 */
 
#define PATH_SELF   0x00000020 /* 32 */
 
#define PATH_SP_MULT(op, spell)
 
#define PATH_SUMMON   0x00000040 /* 64 */
 
#define PATH_TELE   0x00001000 /* 4096 */
 
#define PATH_TIME_MULT(op, spell)
 
#define PATH_TRANSFER   0x00008000 /* 32768 */
 
#define PATH_TRANSMUTE   0x00004000 /* 16384 */
 
#define PATH_TURNING   0x00010000 /* 65536 */
 
#define PATH_WOUNDING   0x00020000 /* 131072 */
 
#define POT_BALM   4
 
#define POT_DUST   2
 
#define POT_FIGURINE   3
 
#define POT_SPELL   1
 
#define SP_ALCHEMY   30
 
#define SP_ANIMATE_WEAPON   41
 
#define SP_AURA   46
 
#define SP_BLESS   25
 
#define SP_BOLT   4
 
#define SP_BOMB   8
 
#define SP_BULLET   5
 
#define SP_CAUSE_DISEASE   45
 
#define SP_CHANGE_ABILITY   24
 
#define SP_CHANGE_MANA   37
 
#define SP_CHANGE_MAP_LIGHT   43
 
#define SP_CHARGING   28
 
#define SP_CONE   7
 
#define SP_CONSECRATE   40
 
#define SP_CREATE_FOOD   22
 
#define SP_CREATE_MISSILE   39
 
#define SP_CURSE   26
 
#define SP_DESTRUCTION   16
 
#define SP_DETECTION   33
 
#define SP_DIMENSION_DOOR   13
 
#define SP_DISPEL_RUNE   38
 
#define SP_EARTH_TO_DUST   23
 
#define SP_ELEM_SHIELD   50
 
#define SP_EXPLOSION   6
 
#define SP_FAERY_FIRE   44
 
#define SP_HEALING   21
 
#define SP_IDENTIFY   32
 
#define SP_INVISIBLE   19
 
#define SP_ITEM_CURSE_BLESS   49
 
#define SP_LIGHT   42
 
#define SP_MAGIC_MAPPING   14
 
#define SP_MAGIC_MISSILE   11
 
#define SP_MAGIC_WALL   15
 
#define SP_MAKE_MARK   3
 
#define SP_MED_FIREBALL   "spell_medium_fireball"
 
#define SP_MOOD_CHANGE   34
 
#define SP_MOVING_BALL   35
 
#define SP_PERCEIVE_SELF   17
 
#define SP_POLYMORPH   29
 
#define SP_PROBE   20
 
#define SP_RAISE_DEAD   1
 
#define SP_REMOVE_CURSE   31
 
#define SP_RUNE   2
 
#define SP_SMITE   10
 
#define SP_SUMMON_GOLEM   12
 
#define SP_SUMMON_MONSTER   27
 
#define SP_SWARM   36
 
#define SP_TOWN_PORTAL   47
 
#define SP_WONDER   9
 
#define SP_WORD_OF_RECALL   18
 
#define SPELL_GRACE   0x2
 
#define SPELL_HIGHEST   0x3
 
#define SPELL_MANA   0x1
 
#define SPELL_WONDER   "spell_wonder"
 
#define SPLINT   "splint" /* for bombs */
 
#define SWARM_SPELL   "swarm_spell"
 

Variables

const char *const spellpathnames [NRSPELLPATHS]
 

Detailed Description

Spell-related defines: spellpath, subtypes, ...

Definition in file spells.h.

Macro Definition Documentation

◆ EXPLODING_FIREBALL

#define EXPLODING_FIREBALL   "exploding_fireball"

This is used for fumbles - this arch is all set up to do the right just by inserting it

Definition at line 174 of file spells.h.

◆ FORCE_CHANGE_ABILITY

#define FORCE_CHANGE_ABILITY   2

Definition at line 145 of file spells.h.

◆ FORCE_CONFUSION

#define FORCE_CONFUSION   1

Definition at line 144 of file spells.h.

◆ FORCE_NAME

#define FORCE_NAME   "force" /* instead of it being hardcoded */

Definition at line 169 of file spells.h.

◆ FORCE_TRANSFORMED_ITEM

#define FORCE_TRANSFORMED_ITEM   3

Definition at line 146 of file spells.h.

◆ GENERIC_RUNE

#define GENERIC_RUNE   "generic_rune"

Definition at line 167 of file spells.h.

◆ GOD_POWER

#define GOD_POWER   "god_power"

Definition at line 164 of file spells.h.

◆ HOLY_POSSESSION

#define HOLY_POSSESSION   "spell_holy_possession"

Definition at line 168 of file spells.h.

◆ LOOSE_MANA

#define LOOSE_MANA   "loose_magic"

Definition at line 162 of file spells.h.

◆ NROFREALSPELLS

#define NROFREALSPELLS   1024

Number of spells. The only place this is really used is to allocate an array when printing out the spells the player knows.

Definition at line 48 of file spells.h.

◆ NRSPELLPATHS

#define NRSPELLPATHS   20

Number of spell paths.

Definition at line 40 of file spells.h.

◆ PATH_ABJURE

#define PATH_ABJURE   0x00000080 /* 128 */

Definition at line 20 of file spells.h.

◆ PATH_CREATE

#define PATH_CREATE   0x00000800 /* 2048 */

Definition at line 24 of file spells.h.

◆ PATH_DEATH

#define PATH_DEATH   0x00040000 /* 262144 */

Definition at line 31 of file spells.h.

◆ PATH_DETONATE

#define PATH_DETONATE   0x00000200 /* 512 */

Definition at line 22 of file spells.h.

◆ PATH_ELEC

#define PATH_ELEC   0x00000008 /* 8 */

Definition at line 16 of file spells.h.

◆ PATH_FIRE

#define PATH_FIRE   0x00000002 /* 2 */

Definition at line 14 of file spells.h.

◆ PATH_FROST

#define PATH_FROST   0x00000004 /* 4 */

Definition at line 15 of file spells.h.

◆ PATH_INFO

#define PATH_INFO   0x00002000 /* 8192 */

Definition at line 26 of file spells.h.

◆ PATH_LIGHT

#define PATH_LIGHT   0x00080000 /* 524288 */

Definition at line 32 of file spells.h.

◆ PATH_MIND

#define PATH_MIND   0x00000400 /* 1024 */

Definition at line 23 of file spells.h.

◆ PATH_MISSILE

#define PATH_MISSILE   0x00000010 /* 16 */

Definition at line 17 of file spells.h.

◆ PATH_PROT

#define PATH_PROT   0x00000001 /* 1 */

Definition at line 13 of file spells.h.

◆ PATH_RESTORE

#define PATH_RESTORE   0x00000100 /* 256 */

Definition at line 21 of file spells.h.

◆ PATH_SELF

#define PATH_SELF   0x00000020 /* 32 */

Definition at line 18 of file spells.h.

◆ PATH_SP_MULT

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

Multiplier for spell points / grace based on the attenuation.

Definition at line 36 of file spells.h.

◆ PATH_SUMMON

#define PATH_SUMMON   0x00000040 /* 64 */

Definition at line 19 of file spells.h.

◆ PATH_TELE

#define PATH_TELE   0x00001000 /* 4096 */

Definition at line 25 of file spells.h.

◆ PATH_TIME_MULT

#define PATH_TIME_MULT (   op,
  spell 
)
Value:
(((op->path_attuned&spell->path_attuned) ? 0.8 : 1)* \
((op->path_repelled&spell->path_attuned) ? 1.25 : 1))

Multiplier for the casting time based on path attenuation.

Definition at line 152 of file spells.h.

◆ PATH_TRANSFER

#define PATH_TRANSFER   0x00008000 /* 32768 */

Definition at line 28 of file spells.h.

◆ PATH_TRANSMUTE

#define PATH_TRANSMUTE   0x00004000 /* 16384 */

Definition at line 27 of file spells.h.

◆ PATH_TURNING

#define PATH_TURNING   0x00010000 /* 65536 */

Definition at line 29 of file spells.h.

◆ PATH_WOUNDING

#define PATH_WOUNDING   0x00020000 /* 131072 */

Definition at line 30 of file spells.h.

◆ POT_BALM

#define POT_BALM   4

Definition at line 135 of file spells.h.

◆ POT_DUST

#define POT_DUST   2

Definition at line 133 of file spells.h.

◆ POT_FIGURINE

#define POT_FIGURINE   3

Definition at line 134 of file spells.h.

◆ POT_SPELL

#define POT_SPELL   1

Definition at line 132 of file spells.h.

◆ SP_ALCHEMY

#define SP_ALCHEMY   30

Definition at line 104 of file spells.h.

◆ SP_ANIMATE_WEAPON

#define SP_ANIMATE_WEAPON   41

Definition at line 115 of file spells.h.

◆ SP_AURA

#define SP_AURA   46

Definition at line 120 of file spells.h.

◆ SP_BLESS

#define SP_BLESS   25

Definition at line 99 of file spells.h.

◆ SP_BOLT

#define SP_BOLT   4

Definition at line 78 of file spells.h.

◆ SP_BOMB

#define SP_BOMB   8

Definition at line 82 of file spells.h.

◆ SP_BULLET

#define SP_BULLET   5

Definition at line 79 of file spells.h.

◆ SP_CAUSE_DISEASE

#define SP_CAUSE_DISEASE   45

Definition at line 119 of file spells.h.

◆ SP_CHANGE_ABILITY

#define SP_CHANGE_ABILITY   24

Definition at line 98 of file spells.h.

◆ SP_CHANGE_MANA

#define SP_CHANGE_MANA   37

Definition at line 111 of file spells.h.

◆ SP_CHANGE_MAP_LIGHT

#define SP_CHANGE_MAP_LIGHT   43

Definition at line 117 of file spells.h.

◆ SP_CHARGING

#define SP_CHARGING   28

Definition at line 102 of file spells.h.

◆ SP_CONE

#define SP_CONE   7

Definition at line 81 of file spells.h.

◆ SP_CONSECRATE

#define SP_CONSECRATE   40

Definition at line 114 of file spells.h.

◆ SP_CREATE_FOOD

#define SP_CREATE_FOOD   22

Definition at line 96 of file spells.h.

◆ SP_CREATE_MISSILE

#define SP_CREATE_MISSILE   39

Definition at line 113 of file spells.h.

◆ SP_CURSE

#define SP_CURSE   26

Definition at line 100 of file spells.h.

◆ SP_DESTRUCTION

#define SP_DESTRUCTION   16

Definition at line 90 of file spells.h.

◆ SP_DETECTION

#define SP_DETECTION   33

Definition at line 107 of file spells.h.

◆ SP_DIMENSION_DOOR

#define SP_DIMENSION_DOOR   13

Definition at line 87 of file spells.h.

◆ SP_DISPEL_RUNE

#define SP_DISPEL_RUNE   38

Definition at line 112 of file spells.h.

◆ SP_EARTH_TO_DUST

#define SP_EARTH_TO_DUST   23

Definition at line 97 of file spells.h.

◆ SP_ELEM_SHIELD

#define SP_ELEM_SHIELD   50

Definition at line 124 of file spells.h.

◆ SP_EXPLOSION

#define SP_EXPLOSION   6

Definition at line 80 of file spells.h.

◆ SP_FAERY_FIRE

#define SP_FAERY_FIRE   44

Definition at line 118 of file spells.h.

◆ SP_HEALING

#define SP_HEALING   21

Definition at line 95 of file spells.h.

◆ SP_IDENTIFY

#define SP_IDENTIFY   32

Definition at line 106 of file spells.h.

◆ SP_INVISIBLE

#define SP_INVISIBLE   19

Definition at line 93 of file spells.h.

◆ SP_ITEM_CURSE_BLESS

#define SP_ITEM_CURSE_BLESS   49

Definition at line 123 of file spells.h.

◆ SP_LIGHT

#define SP_LIGHT   42

Definition at line 116 of file spells.h.

◆ SP_MAGIC_MAPPING

#define SP_MAGIC_MAPPING   14

Definition at line 88 of file spells.h.

◆ SP_MAGIC_MISSILE

#define SP_MAGIC_MISSILE   11

Definition at line 85 of file spells.h.

◆ SP_MAGIC_WALL

#define SP_MAGIC_WALL   15

Definition at line 89 of file spells.h.

◆ SP_MAKE_MARK

#define SP_MAKE_MARK   3

Definition at line 77 of file spells.h.

◆ SP_MED_FIREBALL

#define SP_MED_FIREBALL   "spell_medium_fireball"

These are some hard coded values that are used within the code for spell failure effects or pieces of spells. Rather then hardcode the names, use defines so it is easier to update if necessary.

Definition at line 161 of file spells.h.

◆ SP_MOOD_CHANGE

#define SP_MOOD_CHANGE   34

Definition at line 108 of file spells.h.

◆ SP_MOVING_BALL

#define SP_MOVING_BALL   35

Definition at line 109 of file spells.h.

◆ SP_PERCEIVE_SELF

#define SP_PERCEIVE_SELF   17

Definition at line 91 of file spells.h.

◆ SP_POLYMORPH

#define SP_POLYMORPH   29

Definition at line 103 of file spells.h.

◆ SP_PROBE

#define SP_PROBE   20

Definition at line 94 of file spells.h.

◆ SP_RAISE_DEAD

#define SP_RAISE_DEAD   1

Definition at line 75 of file spells.h.

◆ SP_REMOVE_CURSE

#define SP_REMOVE_CURSE   31

Definition at line 105 of file spells.h.

◆ SP_RUNE

#define SP_RUNE   2

Definition at line 76 of file spells.h.

◆ SP_SMITE

#define SP_SMITE   10

Definition at line 84 of file spells.h.

◆ SP_SUMMON_GOLEM

#define SP_SUMMON_GOLEM   12

Definition at line 86 of file spells.h.

◆ SP_SUMMON_MONSTER

#define SP_SUMMON_MONSTER   27

Definition at line 101 of file spells.h.

◆ SP_SWARM

#define SP_SWARM   36

Definition at line 110 of file spells.h.

◆ SP_TOWN_PORTAL

#define SP_TOWN_PORTAL   47

Definition at line 121 of file spells.h.

◆ SP_WONDER

#define SP_WONDER   9

Definition at line 83 of file spells.h.

◆ SP_WORD_OF_RECALL

#define SP_WORD_OF_RECALL   18

Definition at line 92 of file spells.h.

◆ SPELL_GRACE

#define SPELL_GRACE   0x2

Definition at line 59 of file spells.h.

◆ SPELL_HIGHEST

#define SPELL_HIGHEST   0x3

Definition at line 60 of file spells.h.

◆ SPELL_MANA

#define SPELL_MANA   0x1

Definition at line 58 of file spells.h.

◆ SPELL_WONDER

#define SPELL_WONDER   "spell_wonder"

Definition at line 163 of file spells.h.

◆ SPLINT

#define SPLINT   "splint" /* for bombs */

Definition at line 165 of file spells.h.

◆ SWARM_SPELL

#define SWARM_SPELL   "swarm_spell"

Definition at line 166 of file spells.h.

Variable Documentation

◆ spellpathnames

const char* const spellpathnames[NRSPELLPATHS]

Perhaps not the best place for this, but needs to be in some file in the common area so that standalone programs, like the random map generator, can be built.

Definition at line 106 of file init.c.

Referenced by describe_spellpath_attenuation(), dragon_ability_gain(), send_spell_paths(), and spellpath_msg().

give.op
op
Definition: give.py:33