summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/chardump.cc1
-rw-r--r--crawl-ref/source/exercise.cc3
-rw-r--r--crawl-ref/source/goditem.cc42
-rw-r--r--crawl-ref/source/goditem.h4
-rw-r--r--crawl-ref/source/mon-util.cc2
-rw-r--r--crawl-ref/source/monster.cc12
-rw-r--r--crawl-ref/source/monster.h1
-rw-r--r--crawl-ref/source/religion.cc2
-rw-r--r--crawl-ref/source/spl-cast.cc12
-rw-r--r--crawl-ref/source/spl-data.h22
-rw-r--r--crawl-ref/source/spl-miscast.cc5
-rw-r--r--crawl-ref/source/spl-util.cc8
-rw-r--r--crawl-ref/source/spl-util.h7
-rw-r--r--crawl-ref/source/wiz-mon.cc6
14 files changed, 18 insertions, 109 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 239c7cffa0..c30a97ee16 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -898,7 +898,6 @@ static void _sdump_spells(dump_params &par)
// this can be tossed as soon as I reorder the enum to the traditional order {dlb}
const int spell_type_index[] =
{
- SPTYP_HOLY,
SPTYP_POISON,
SPTYP_FIRE,
SPTYP_ICE,
diff --git a/crawl-ref/source/exercise.cc b/crawl-ref/source/exercise.cc
index 5ded6319f3..08bc8f20e4 100644
--- a/crawl-ref/source/exercise.cc
+++ b/crawl-ref/source/exercise.cc
@@ -194,9 +194,6 @@ static void _exercise_spell(spell_type spell, bool success)
unsigned int disciplines = get_spell_disciplines(spell);
- //jmf: evil evil evil -- exclude HOLY bit
- disciplines &= (~SPTYP_HOLY);
-
int skillcount = count_bits(disciplines);
if (!success)
diff --git a/crawl-ref/source/goditem.cc b/crawl-ref/source/goditem.cc
index f1c08101e1..b18d030c24 100644
--- a/crawl-ref/source/goditem.cc
+++ b/crawl-ref/source/goditem.cc
@@ -43,12 +43,6 @@ bool is_holy_item(const item_def& item)
case OBJ_SCROLLS:
retval = (item.sub_type == SCR_HOLY_WORD);
break;
- case OBJ_BOOKS:
- retval = is_holy_spellbook(item);
- break;
- case OBJ_STAVES:
- retval = is_holy_rod(item);
- break;
default:
break;
}
@@ -401,25 +395,11 @@ bool is_poisoned_item(const item_def& item)
return (false);
}
-bool is_holy_discipline(int discipline)
-{
- return (discipline & SPTYP_HOLY);
-}
-
bool is_evil_discipline(int discipline)
{
return (discipline & SPTYP_NECROMANCY);
}
-bool is_holy_spell(spell_type spell, god_type god)
-{
- UNUSED(god);
-
- unsigned int disciplines = get_spell_disciplines(spell);
-
- return (is_holy_discipline(disciplines));
-}
-
bool is_unholy_spell(spell_type spell, god_type god)
{
UNUSED(god);
@@ -516,11 +496,6 @@ bool is_spellbook_type(const item_def& item, bool book_or_rod,
return (total_liked >= (total / 2) + 1);
}
-bool is_holy_spellbook(const item_def& item)
-{
- return (is_spellbook_type(item, false, is_holy_spell));
-}
-
bool is_unholy_spellbook(const item_def& item)
{
return (is_spellbook_type(item, false, is_unholy_spell));
@@ -556,11 +531,6 @@ bool god_hates_spellbook(const item_def& item)
return (is_spellbook_type(item, false, god_hates_spell));
}
-bool is_holy_rod(const item_def& item)
-{
- return (is_spellbook_type(item, true, is_holy_spell));
-}
-
bool is_unholy_rod(const item_def& item)
{
return (is_spellbook_type(item, true, is_unholy_spell));
@@ -719,11 +689,6 @@ bool god_dislikes_spell_type(spell_type spell, god_type god)
return (true);
}
- // Holy spells are probably too useful for Xom to find them
- // interesting.
- if (is_holy_spell(spell))
- return (true);
-
// Things are more fun for Xom the less the player knows in
// advance.
if (disciplines & SPTYP_DIVINATION)
@@ -759,13 +724,6 @@ bool god_dislikes_spell_discipline(int discipline, god_type god)
case GOD_SHINING_ONE:
return (discipline & SPTYP_POISON);
- case GOD_YREDELEMNUL:
- return (is_holy_discipline(discipline));
-
- case GOD_XOM:
- return (is_holy_discipline(discipline)
- || (discipline & SPTYP_DIVINATION));
-
case GOD_ELYVILON:
return (discipline & (SPTYP_CONJURATION | SPTYP_SUMMONING));
diff --git a/crawl-ref/source/goditem.h b/crawl-ref/source/goditem.h
index 0b2814794b..895b5b87a4 100644
--- a/crawl-ref/source/goditem.h
+++ b/crawl-ref/source/goditem.h
@@ -17,9 +17,7 @@ bool is_chaotic_item(const item_def& item);
bool is_potentially_hasty_item(const item_def& item);
bool is_hasty_item(const item_def& item);
bool is_poisoned_item(const item_def& item);
-bool is_holy_discipline(int discipline);
bool is_evil_discipline(int discipline);
-bool is_holy_spell(spell_type spell, god_type god = GOD_NO_GOD);
bool is_unholy_spell(spell_type spell, god_type god = GOD_NO_GOD);
bool is_corpse_violating_spell(spell_type spell, god_type = GOD_NO_GOD);
bool is_evil_spell(spell_type spell, god_type god = GOD_NO_GOD);
@@ -31,7 +29,6 @@ bool is_spellbook_type(const item_def& item, bool book_or_rod,
bool (*suitable)(spell_type spell, god_type god) =
is_any_spell,
god_type god = you.religion);
-bool is_holy_spellbook(const item_def& item);
bool is_unholy_spellbook(const item_def& item);
bool is_evil_spellbook(const item_def& item);
bool is_unclean_spellbook(const item_def& item);
@@ -39,7 +36,6 @@ bool is_chaotic_spellbook(const item_def& item);
bool is_hasty_spellbook(const item_def& item);
bool is_corpse_violating_spellbook(const item_def & item);
bool god_hates_spellbook(const item_def& item);
-bool is_holy_rod(const item_def& item);
bool is_unholy_rod(const item_def& item);
bool is_evil_rod(const item_def& item);
bool is_unclean_rod(const item_def& item);
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index d6fe243e56..923160f259 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -1785,8 +1785,6 @@ monster_type random_draconian_monster_species()
// spellbooks a given monster can get here should produce the same
// return values in the following:
//
-// is_holy_spell()
-//
// (is_unholy_spell() || is_evil_spell())
//
// (is_unclean_spell() || is_chaotic_spell())
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index d9adf83a49..d60c6f78c6 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2812,15 +2812,6 @@ bool monster::has_spell(spell_type spell) const
return (false);
}
-bool monster::has_holy_spell() const
-{
- for (int i = 0; i < NUM_MONSTER_SPELL_SLOTS; ++i)
- if (is_holy_spell(spells[i]))
- return (true);
-
- return (false);
-}
-
bool monster::has_unholy_spell() const
{
for (int i = 0; i < NUM_MONSTER_SPELL_SLOTS; ++i)
@@ -3145,9 +3136,6 @@ bool monster::is_holy(bool check_spells) const
if (is_priest() && is_good_god(god) && check_spells)
return (true);
- if (has_holy_spell() && (check_spells || !is_actual_spellcaster()))
- return (true);
-
return (false);
}
diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h
index 06c2b0a031..c3deac3f03 100644
--- a/crawl-ref/source/monster.h
+++ b/crawl-ref/source/monster.h
@@ -373,7 +373,6 @@ public:
bool has_spells() const;
bool has_spell(spell_type spell) const;
- bool has_holy_spell() const;
bool has_unholy_spell() const;
bool has_evil_spell() const;
bool has_unclean_spell() const;
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index ed3d96e4eb..2effd0c268 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3751,7 +3751,7 @@ bool god_hates_spell(spell_type spell, god_type god)
}
break;
case GOD_YREDELEMNUL:
- if (is_holy_spell(spell) || spell == SPELL_STATUE_FORM)
+ if (spell == SPELL_STATUE_FORM)
return (true);
break;
case GOD_FEDHAS:
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 8da259ec29..e06881b3d8 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -394,9 +394,6 @@ int calc_spell_power(spell_type spell, bool apply_intel, bool fail_rate_check,
unsigned int disciplines = get_spell_disciplines(spell);
- //jmf: evil evil evil -- exclude HOLY bit
- disciplines &= (~SPTYP_HOLY);
-
int skillcount = count_bits(disciplines);
if (skillcount)
{
@@ -768,9 +765,6 @@ static void _spellcasting_side_effects(spell_type spell, int pow, god_type god)
{
// If you are casting while a god is acting, then don't do conducts.
// (Presumably Xom is forcing you to cast a spell.)
- if (is_holy_spell(spell) && !crawl_state.is_god_acting())
- did_god_conduct(DID_HOLY, 10 + spell_difficulty(spell));
-
if (is_unholy_spell(spell) && !crawl_state.is_god_acting())
did_god_conduct(DID_UNHOLY, 10 + spell_difficulty(spell));
@@ -844,12 +838,6 @@ bool is_prevented_teleport(spell_type spell)
bool spell_is_uncastable(spell_type spell, std::string &msg)
{
- if (you.undead_or_demonic() && is_holy_spell(spell))
- {
- msg = "You can't use this type of magic!";
- return (true);
- }
-
// Normally undead can't memorise these spells, so this check is
// to catch those in Lich form. As such, we allow the Lich form
// to be extended here. - bwr
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index a6cf229c8a..b1bf27e5fe 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -2040,7 +2040,7 @@ struct spell_desc
{
SPELL_MINOR_HEALING, "Minor Healing",
- SPTYP_NONE, // was SPTYP_HOLY
+ SPTYP_NONE,
SPFLAG_RECOVERY | SPFLAG_HELPFUL | SPFLAG_MONSTER,
2,
0,
@@ -2053,7 +2053,7 @@ struct spell_desc
{
SPELL_MAJOR_HEALING, "Major Healing",
- SPTYP_NONE, // was SPTYP_HOLY
+ SPTYP_NONE,
SPFLAG_RECOVERY | SPFLAG_HELPFUL | SPFLAG_MONSTER,
6,
0,
@@ -2731,7 +2731,7 @@ struct spell_desc
{
SPELL_RESURRECT, "Resurrection",
- SPTYP_HOLY,
+ SPTYP_NONE,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF | SPFLAG_HELPFUL,
6,
200,
@@ -2744,7 +2744,7 @@ struct spell_desc
{
SPELL_HOLY_LIGHT, "Holy Light",
- SPTYP_CONJURATION | SPTYP_HOLY,
+ SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET,
6,
200,
@@ -2757,7 +2757,7 @@ struct spell_desc
{
SPELL_SUMMON_HOLIES, "Summon Holies",
- SPTYP_SUMMONING | SPTYP_HOLY,
+ SPTYP_SUMMONING,
SPFLAG_MONSTER,
5,
0,
@@ -2770,7 +2770,7 @@ struct spell_desc
{
SPELL_SUMMON_GREATER_HOLY, "Summon Greater Holy",
- SPTYP_SUMMONING | SPTYP_HOLY,
+ SPTYP_SUMMONING,
SPFLAG_MONSTER,
9,
0,
@@ -2783,7 +2783,7 @@ struct spell_desc
{
SPELL_HOLY_WORD, "Holy Word",
- SPTYP_HOLY,
+ SPTYP_NONE,
SPFLAG_AREA,
6,
0,
@@ -2809,7 +2809,7 @@ struct spell_desc
{
SPELL_SACRIFICE, "Sacrifice",
- SPTYP_HOLY,
+ SPTYP_NONE,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF | SPFLAG_HELPFUL,
6,
200,
@@ -2822,7 +2822,7 @@ struct spell_desc
{
SPELL_HOLY_FLAMES, "Holy Flames",
- SPTYP_HOLY,
+ SPTYP_NONE,
SPFLAG_TARGET | SPFLAG_NOT_SELF | SPFLAG_BATTLE,
7,
200,
@@ -2835,7 +2835,7 @@ struct spell_desc
{
SPELL_HOLY_BREATH, "Holy Breath",
- SPTYP_CONJURATION | SPTYP_HOLY,
+ SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET | SPFLAG_AREA,
5,
200,
@@ -3004,7 +3004,7 @@ struct spell_desc
{
SPELL_SILVER_BLAST, "Silver Blast",
- SPTYP_CONJURATION | SPTYP_HOLY,
+ SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET,
5,
200,
diff --git a/crawl-ref/source/spl-miscast.cc b/crawl-ref/source/spl-miscast.cc
index 73c1556f3f..8aaa5e2699 100644
--- a/crawl-ref/source/spl-miscast.cc
+++ b/crawl-ref/source/spl-miscast.cc
@@ -61,7 +61,6 @@ MiscastEffect::MiscastEffect(actor* _target, int _source, spell_type _spell,
ASSERT(is_valid_spell(_spell));
unsigned int schools = get_spell_disciplines(_spell);
ASSERT(schools != SPTYP_NONE);
- ASSERT(!(schools & SPTYP_HOLY));
UNUSED(schools);
init();
@@ -82,7 +81,7 @@ MiscastEffect::MiscastEffect(actor* _target, int _source,
{
ASSERT(!_cause.empty());
ASSERT(count_bits(_school) == 1);
- ASSERT(_school < SPTYP_HOLY || _school == SPTYP_RANDOM);
+ ASSERT(_school <= SPTYP_LAST_SCHOOL || _school == SPTYP_RANDOM);
ASSERT(level >= 0 && level <= 3);
init();
@@ -103,7 +102,7 @@ MiscastEffect::MiscastEffect(actor* _target, int _source,
{
ASSERT(!_cause.empty());
ASSERT(count_bits(_school) == 1);
- ASSERT(_school < SPTYP_HOLY || _school == SPTYP_RANDOM);
+ ASSERT(_school <= SPTYP_LAST_SCHOOL || _school == SPTYP_RANDOM);
init();
do_miscast();
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index 65b1b577e0..68013d92aa 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -529,8 +529,7 @@ bool disciplines_conflict(unsigned int disc1, unsigned int disc2)
const unsigned int combined = disc1 | disc2;
return ((combined & SPTYP_EARTH) && (combined & SPTYP_AIR)
- || (combined & SPTYP_FIRE) && (combined & SPTYP_ICE)
- || (combined & SPTYP_HOLY) && (combined & SPTYP_NECROMANCY));
+ || (combined & SPTYP_FIRE) && (combined & SPTYP_ICE));
}
const char *spell_title(spell_type spell)
@@ -824,8 +823,6 @@ const char* spelltype_short_name(int which_spelltype)
return ("Trmt");
case SPTYP_NECROMANCY:
return ("Necr");
- case SPTYP_HOLY:
- return ("Holy");
case SPTYP_SUMMONING:
return ("Summ");
case SPTYP_DIVINATION:
@@ -863,8 +860,6 @@ const char* spelltype_long_name(int which_spelltype)
return ("Transmutation");
case SPTYP_NECROMANCY:
return ("Necromancy");
- case SPTYP_HOLY:
- return ("Holy");
case SPTYP_SUMMONING:
return ("Summoning");
case SPTYP_DIVINATION:
@@ -902,7 +897,6 @@ skill_type spell_type2skill(unsigned int spelltype)
case SPTYP_AIR: return (SK_AIR_MAGIC);
default:
- case SPTYP_HOLY:
case SPTYP_DIVINATION:
dprf("spell_type2skill: called with spelltype %u", spelltype);
return (SK_NONE);
diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h
index 664dc18dde..4107785a67 100644
--- a/crawl-ref/source/spl-util.h
+++ b/crawl-ref/source/spl-util.h
@@ -26,10 +26,9 @@ enum spschool_flag_type
SPTYP_POISON = 1<<10,
SPTYP_EARTH = 1<<11,
SPTYP_AIR = 1<<12,
- SPTYP_HOLY = 1<<13,
- SPTYP_LAST_EXPONENT = 13, //jmf: ``NUM_SPELL_TYPES'' kinda useless
- NUM_SPELL_TYPES = 15,
- SPTYP_RANDOM = 1<<14,
+ SPTYP_LAST_EXPONENT = 12,
+ SPTYP_LAST_SCHOOL = 1<<SPTYP_LAST_EXPONENT,
+ SPTYP_RANDOM = 1<<(SPTYP_LAST_EXPONENT + 1),
};
struct bolt;
diff --git a/crawl-ref/source/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc
index 87de30cd1f..9d4d3c460d 100644
--- a/crawl-ref/source/wiz-mon.cc
+++ b/crawl-ref/source/wiz-mon.cc
@@ -1362,12 +1362,6 @@ void debug_miscast(int target_index)
}
}
- if (is_holy_spell(spell))
- {
- mpr("Can't miscast holy spells.");
- return;
- }
-
if (spell != SPELL_NO_SPELL)
mprf("Miscasting spell %s.", spell_title(spell));
else