summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-04 06:38:17 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-04 06:38:17 +0000
commitcc0f9b2965e5298577253965c8819636985ac2db (patch)
treef586194693a2b6e0ff63411ddd6b136d137e9032 /crawl-ref/source/spl-cast.h
parentfccc5c8dd647216dc3ad7faff107a8ffc77acfb8 (diff)
downloadcrawl-ref-cc0f9b2965e5298577253965c8819636985ac2db.tar.gz
crawl-ref-cc0f9b2965e5298577253965c8819636985ac2db.zip
Savefile compatibility breakage from keeping track of which spells have been
seen. Implemented fixed-level randart spell books, which is all randart spellbooks as of now. All my attempts at sorting the spell list so that spells with the same schools group together have utterly failed. Got rid of the hackish "non-monster origin is stored in item.orig_monnum as (-origin - 2)" logic, replaced with the slightly less hackish "-origin". Added the two enumerations IT_SRC_START and IT_SRC_SHOP to do it. Also, origin_is_god_gift() and origin_is_acquirement() can retrieve the god/source of the item so that you don't have to do the negation and typecasting yourself. Added some new spell flags: * SPFLAG_BATTLE for non-conjuration spells which are still combat/battle related (branding spells and single school attack spells like "Pain"), * SPFLAG_CARD for spells which are card-type effects which don't show up in ordinary spellbooks (Tomb of Doroklohe and (I assume) Disintigrate) * SPFLAG_TESTING for spells which are only used for testing (Debugging Ray) * SPFLAG_DEVEL for spells that are still under development (Crush, Disrupt, and Detect Magic). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7742 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.h')
-rw-r--r--crawl-ref/source/spl-cast.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h
index 8023305048..eaee3478a0 100644
--- a/crawl-ref/source/spl-cast.h
+++ b/crawl-ref/source/spl-cast.h
@@ -14,21 +14,26 @@
enum spflag_type
{
- SPFLAG_NONE = 0x0000,
- SPFLAG_DIR_OR_TARGET = 0x0001, // use DIR_NONE targeting
- SPFLAG_TARGET = 0x0002, // use DIR_TARGET targeting
- SPFLAG_GRID = 0x0004, // use DIR_GRID targeting
- SPFLAG_DIR = 0x0008, // use DIR_DIR targeting
- SPFLAG_TARGETING_MASK = 0x000f, // used to test for targeting
- SPFLAG_HELPFUL = 0x0010, // TARG_FRIENDS used
- SPFLAG_NEUTRAL = 0x0020, // TARG_ANY used
- SPFLAG_NOT_SELF = 0x0040, // aborts on isMe
- SPFLAG_UNHOLY = 0x0080, // counts at "unholy"
- SPFLAG_MAPPING = 0x0100, // a mapping spell of some kind
- SPFLAG_ESCAPE = 0x0200, // useful for running away
- SPFLAG_RECOVERY = 0x0400, // healing or recovery spell
- SPFLAG_AREA = 0x0800, // area affect
- SPFLAG_MONSTER = 0x1000 // monster-only spell
+ SPFLAG_NONE = 0x00000,
+ SPFLAG_DIR_OR_TARGET = 0x00001, // use DIR_NONE targeting
+ SPFLAG_TARGET = 0x00002, // use DIR_TARGET targeting
+ SPFLAG_GRID = 0x00004, // use DIR_GRID targeting
+ SPFLAG_DIR = 0x00008, // use DIR_DIR targeting
+ SPFLAG_TARGETING_MASK = 0x0000f, // used to test for targeting
+ SPFLAG_HELPFUL = 0x00010, // TARG_FRIENDS used
+ SPFLAG_NEUTRAL = 0x00020, // TARG_ANY used
+ SPFLAG_NOT_SELF = 0x00040, // aborts on isMe
+ SPFLAG_UNHOLY = 0x00080, // counts at "unholy"
+ SPFLAG_MAPPING = 0x00100, // a mapping spell of some kind
+ SPFLAG_ESCAPE = 0x00200, // useful for running away
+ SPFLAG_RECOVERY = 0x00400, // healing or recovery spell
+ SPFLAG_AREA = 0x00800, // area affect
+ SPFLAG_BATTLE = 0x01000, // a non-Conjuration spell that
+ // is still a battle spell
+ SPFLAG_CARD = 0x02000, // a card effect spell
+ SPFLAG_MONSTER = 0x04000, // monster-only spell
+ SPFLAG_TESTING = 0x08000, // a testing/debugging spell
+ SPFLAG_DEVEL = 0x10000 // a spell under development
};
enum spret_type