summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/enum.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-21 03:57:31 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-21 03:57:31 +0000
commit8a71071e3d9dd698f31846f2261e5b77ca7085c8 (patch)
tree6aa1c6e81a2d8e4accc556597d9642ac5b2e10f7 /crawl-ref/source/enum.h
parent0e1304a15a7c5fd3a5dbe3b24f4722aeef8578f2 (diff)
downloadcrawl-ref-8a71071e3d9dd698f31846f2261e5b77ca7085c8.tar.gz
crawl-ref-8a71071e3d9dd698f31846f2261e5b77ca7085c8.zip
Change the spell_type enumerations so that SPELL_NO_SPELL is 0 and the first
valid spell (Identify) is 1. This way any bug that causes a spell_type variable to be 0 will be recognized as an invalid spell. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7892 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/enum.h')
-rw-r--r--crawl-ref/source/enum.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 7b1072c2f6..a1b7e7d27d 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2574,27 +2574,27 @@ enum species_type
enum spell_type
{
- SPELL_IDENTIFY, // 0
+ SPELL_NO_SPELL, // 0
+ SPELL_IDENTIFY,
SPELL_TELEPORT_SELF,
SPELL_CAUSE_FEAR,
SPELL_CREATE_NOISE,
- SPELL_REMOVE_CURSE,
- SPELL_MAGIC_DART, // 5
+ SPELL_REMOVE_CURSE, // 5
+ SPELL_MAGIC_DART,
SPELL_FIREBALL,
SPELL_SWAP,
SPELL_APPORTATION,
- SPELL_TWIST,
- SPELL_FAR_STRIKE, // 10
+ SPELL_TWIST, // 10
+ SPELL_FAR_STRIKE,
SPELL_DELAYED_FIREBALL,
SPELL_STRIKING,
SPELL_CONJURE_FLAME,
- SPELL_DIG,
- SPELL_BOLT_OF_FIRE, // 15
+ SPELL_DIG, // 15
+ SPELL_BOLT_OF_FIRE,
SPELL_BOLT_OF_COLD,
SPELL_LIGHTNING_BOLT,
- SPELL_BOLT_OF_MAGMA, // 18
- // 19
- SPELL_POLYMORPH_OTHER = 20, // 20
+ SPELL_BOLT_OF_MAGMA,
+ SPELL_POLYMORPH_OTHER, // 20
SPELL_SLOW,
SPELL_HASTE,
SPELL_PARALYSE,
@@ -2793,8 +2793,7 @@ enum spell_type
SPELL_COLD_BREATH,
SPELL_DRACONIAN_BREATH,
- NUM_SPELLS,
- SPELL_NO_SPELL = 250
+ NUM_SPELLS
};
enum slot_select_mode