summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/goditem.cc7
-rw-r--r--crawl-ref/source/spl-cast.h21
-rw-r--r--crawl-ref/source/spl-data.h10
3 files changed, 19 insertions, 19 deletions
diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc
index 5b31e5efd8..742236b286 100644
--- a/crawl-ref/source/goditem.cc
+++ b/crawl-ref/source/goditem.cc
@@ -277,10 +277,9 @@ bool is_hasty_spell(spell_type spell, god_type god)
{
UNUSED(god);
- return (spell == SPELL_HASTE
- || spell == SPELL_SWIFTNESS
- || spell == SPELL_BERSERKER_RAGE
- || spell == SPELL_HASTE_OTHER);
+ unsigned int flags = get_spell_flags(spell);
+
+ return (flags & SPFLAG_HASTY);
}
// The default suitable() function for is_spellbook_type().
diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h
index 60088d64e8..b5b17a4f02 100644
--- a/crawl-ref/source/spl-cast.h
+++ b/crawl-ref/source/spl-cast.h
@@ -23,18 +23,19 @@ enum spflag_type
SPFLAG_NOT_SELF = 0x00040, // aborts on isMe
SPFLAG_UNHOLY = 0x00080, // counts as "unholy"
SPFLAG_CHAOTIC = 0x00100, // counts as "chaotic"
- SPFLAG_MAPPING = 0x00200, // a mapping spell of some kind
- SPFLAG_ESCAPE = 0x00400, // useful for running away
- SPFLAG_RECOVERY = 0x00800, // healing or recovery spell
- SPFLAG_AREA = 0x01000, // area affect
- SPFLAG_BATTLE = 0x02000, // a non-Conjuration spell that
+ SPFLAG_HASTY = 0x00200, // counts as "hasty"
+ SPFLAG_MAPPING = 0x00400, // a mapping spell of some kind
+ SPFLAG_ESCAPE = 0x00800, // useful for running away
+ SPFLAG_RECOVERY = 0x01000, // healing or recovery spell
+ SPFLAG_AREA = 0x02000, // area affect
+ SPFLAG_BATTLE = 0x04000, // a non-Conjuration spell that
// is still a battle spell
- SPFLAG_CARD = 0x04000, // a card effect spell
- SPFLAG_MONSTER = 0x08000, // monster-only spell
- SPFLAG_INNATE = 0x10000, // an innate spell, even if
+ SPFLAG_CARD = 0x08000, // a card effect spell
+ SPFLAG_MONSTER = 0x10000, // monster-only spell
+ SPFLAG_INNATE = 0x20000, // an innate spell, even if
// use by a priest/wizard
- SPFLAG_NOISY = 0x20000, // makes noise, even if innate
- SPFLAG_TESTING = 0x40000 // a testing/debugging spell
+ SPFLAG_NOISY = 0x40000, // makes noise, even if innate
+ SPFLAG_TESTING = 0x80000 // a testing/debugging spell
};
enum spret_type
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index bc168a3b2b..98db59cb82 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -207,10 +207,10 @@
{
SPELL_HASTE, "Haste",
SPTYP_ENCHANTMENT,
- SPFLAG_DIR_OR_TARGET | SPFLAG_HELPFUL,
+ SPFLAG_DIR_OR_TARGET | SPFLAG_HELPFUL | SPFLAG_HASTY,
6, // lowered to 6 from 8, since it's easily available from various items
// and Swiftness is level 2 (and gives a similar effect). It's also
- // not that much better than Invisibility. -- bwr
+ // not that much better than Invisibility. - bwr
200,
LOS_RADIUS, LOS_RADIUS,
0,
@@ -860,7 +860,7 @@
{
SPELL_BERSERKER_RAGE, "Berserker Rage",
SPTYP_ENCHANTMENT,
- SPFLAG_NONE,
+ SPFLAG_HASTY,
3,
0,
-1, -1,
@@ -1172,7 +1172,7 @@
{
SPELL_SWIFTNESS, "Swiftness",
SPTYP_ENCHANTMENT | SPTYP_AIR,
- SPFLAG_NONE,
+ SPFLAG_HASTY,
2,
200,
-1, -1,
@@ -2384,7 +2384,7 @@
{
SPELL_HASTE_OTHER, "Haste Other",
SPTYP_ENCHANTMENT,
- SPFLAG_DIR_OR_TARGET | SPFLAG_HELPFUL,
+ SPFLAG_DIR_OR_TARGET | SPFLAG_HELPFUL | SPFLAG_HASTY,
6,
200,
LOS_RADIUS, LOS_RADIUS,