summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/acr.cc2
-rw-r--r--crawl-ref/source/beam.cc45
-rw-r--r--crawl-ref/source/beam.h2
-rw-r--r--crawl-ref/source/chardump.cc6
-rw-r--r--crawl-ref/source/clua.cc2
-rw-r--r--crawl-ref/source/command.cc5
-rw-r--r--crawl-ref/source/dat/vaults.des43
-rw-r--r--crawl-ref/source/debug.cc11
-rw-r--r--crawl-ref/source/delay.cc2
-rw-r--r--crawl-ref/source/describe.cc11
-rw-r--r--crawl-ref/source/describe.h2
-rw-r--r--crawl-ref/source/dungeon.cc11
-rw-r--r--crawl-ref/source/effects.cc8
-rw-r--r--crawl-ref/source/enum.h111
-rw-r--r--crawl-ref/source/externs.h8
-rw-r--r--crawl-ref/source/ghost.cc126
-rw-r--r--crawl-ref/source/hiscores.cc1
-rw-r--r--crawl-ref/source/it_use3.cc5
-rw-r--r--crawl-ref/source/item_use.cc5
-rw-r--r--crawl-ref/source/misc.cc7
-rw-r--r--crawl-ref/source/mon-data.h20
-rw-r--r--crawl-ref/source/mon-spll.h1150
-rw-r--r--crawl-ref/source/mon-util.cc361
-rw-r--r--crawl-ref/source/mon-util.h18
-rw-r--r--crawl-ref/source/monstuff.cc410
-rw-r--r--crawl-ref/source/mstuff2.cc375
-rw-r--r--crawl-ref/source/mstuff2.h4
-rw-r--r--crawl-ref/source/newgame.cc2
-rw-r--r--crawl-ref/source/notes.cc8
-rw-r--r--crawl-ref/source/spells3.cc2
-rw-r--r--crawl-ref/source/spl-book.cc147
-rw-r--r--crawl-ref/source/spl-book.h2
-rw-r--r--crawl-ref/source/spl-cast.cc18
-rw-r--r--crawl-ref/source/spl-cast.h6
-rw-r--r--crawl-ref/source/spl-data.h878
-rw-r--r--crawl-ref/source/spl-util.cc62
-rw-r--r--crawl-ref/source/spl-util.h44
-rw-r--r--crawl-ref/source/tags.cc5
38 files changed, 2090 insertions, 1835 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index d083f087c8..8fb022ddc6 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2839,7 +2839,7 @@ static bool initialise(void)
init_properties();
init_monsters(mcolour); // this needs to be way up top {dlb}
- init_playerspells(); // this needs to be way up top {dlb}
+ init_spell_descs(); // this needs to be way up top {dlb}
// init item array:
for (i = 0; i < MAX_ITEMS; i++)
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc
index 3c5297f4e1..a2beb9d7be 100644
--- a/crawl-ref/source/beam.cc
+++ b/crawl-ref/source/beam.cc
@@ -45,6 +45,7 @@
#include "monstuff.h"
#include "mon-util.h"
#include "mstuff2.h"
+#include "mutation.h"
#include "ouch.h"
#include "player.h"
#include "religion.h"
@@ -1522,7 +1523,8 @@ int mons_adjust_flavoured( struct monsters *monster, struct bolt &pbolt,
{
if (monster->type == MONS_ICE_BEAST
|| monster->type == MONS_SIMULACRUM_SMALL
- || monster->type == MONS_SIMULACRUM_LARGE)
+ || monster->type == MONS_SIMULACRUM_LARGE
+ || monster->type == MONS_ICE_STATUE)
{
if (doFlavouredEffects)
simple_monster_message(monster, " melts!");
@@ -1732,7 +1734,8 @@ int mons_adjust_flavoured( struct monsters *monster, struct bolt &pbolt,
{
if (monster->type == MONS_ICE_BEAST
|| monster->type == MONS_SIMULACRUM_SMALL
- || monster->type == MONS_SIMULACRUM_LARGE)
+ || monster->type == MONS_SIMULACRUM_LARGE
+ || monster->type == MONS_ICE_STATUE)
{
if (doFlavouredEffects)
simple_monster_message(monster, " melts!");
@@ -1768,7 +1771,8 @@ int mons_adjust_flavoured( struct monsters *monster, struct bolt &pbolt,
{
if (monster->type == MONS_ICE_BEAST
|| monster->type == MONS_SIMULACRUM_SMALL
- || monster->type == MONS_SIMULACRUM_LARGE)
+ || monster->type == MONS_SIMULACRUM_LARGE
+ || monster->type == MONS_ICE_STATUE)
{
if (doFlavouredEffects)
simple_monster_message(monster, " melts!");
@@ -2125,7 +2129,7 @@ void sticky_flame_monster( int mn, kill_category who, int levels )
* into account, as well as the monster's intelligence.
*
*/
-void fire_tracer(struct monsters *monster, struct bolt &pbolt)
+void fire_tracer(const monsters *monster, struct bolt &pbolt)
{
// don't fiddle with any input parameters other than tracer stuff!
pbolt.is_tracer = true;
@@ -2282,6 +2286,13 @@ static void beam_explodes(struct bolt &beam, int x, int y)
return;
}
+ if (beam.name == "freezing blast")
+ {
+ big_cloud( CLOUD_COLD, whose_kill(beam), x, y,
+ random_range(10, 15), 9 );
+ return;
+ }
+
// special cases - orbs & blasts of cold
if (beam.name == "orb of electricity"
|| beam.name == "metal orb"
@@ -3056,6 +3067,7 @@ static int affect_player( struct bolt &beam )
if (beam.flavour != BEAM_HASTE
&& beam.flavour != BEAM_INVISIBILITY
&& beam.flavour != BEAM_HEALING
+ && beam.flavour != BEAM_POLYMORPH
&& ((beam.flavour != BEAM_TELEPORT && beam.flavour != BEAM_BANISH)
|| !beam.aimed_at_feet)
&& you_resist_magic( beam.ench_power ))
@@ -3069,6 +3081,22 @@ static int affect_player( struct bolt &beam )
// these colors are misapplied - see mons_ench_f2() {dlb}
switch (beam.flavour)
{
+ case BEAM_POLYMORPH:
+ if (MON_KILL(beam.thrower))
+ {
+ mpr("Strange energies course through your body.");
+ if (one_chance_in(5))
+ mutate(100);
+ else
+ give_bad_mutation();
+ }
+ else
+ {
+ mpr("This is polymorph other only!");
+ }
+ beam.obvious_effect = true;
+ break;
+
case BEAM_SLOW:
potion_effect( POT_SLOWING, beam.ench_power );
beam.obvious_effect = true;
@@ -3109,12 +3137,7 @@ static int affect_player( struct bolt &beam )
break;
case BEAM_BLINK:
- random_blink(0);
- beam.obvious_effect = true;
- break;
-
- case BEAM_POLYMORPH:
- mpr("This is polymorph other only!");
+ random_blink(false);
beam.obvious_effect = true;
break;
@@ -4042,7 +4065,7 @@ static void explosion1(struct bolt &pbolt)
}
- if (!pbolt.is_tracer)
+ if (!pbolt.is_tracer && *seeMsg && *hearMsg)
{
// check for see/hear/no msg
if (see_grid(x,y) || (x == you.x_pos && y == you.y_pos))
diff --git a/crawl-ref/source/beam.h b/crawl-ref/source/beam.h
index 87930575de..42848c9465 100644
--- a/crawl-ref/source/beam.h
+++ b/crawl-ref/source/beam.h
@@ -84,7 +84,7 @@ void place_cloud(unsigned char cl_type, unsigned char ctarget_x, unsigned char c
/* ***********************************************************************
* called from: monstuff
* *********************************************************************** */
-void fire_tracer( struct monsters *monster, struct bolt &pbolt );
+void fire_tracer( const monsters *monster, struct bolt &pbolt );
bool check_line_of_sight( int sx, int sy, int tx, int ty );
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index 3319e307ad..f7deb16869 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -861,7 +861,7 @@ static void sdump_spells(const std::string &, std::string & text)
for (int j = 0; j < 52; j++)
{
const char letter = index_to_letter( j );
- const int spell = get_spell_by_letter( letter );
+ const spell_type spell = get_spell_by_letter( letter );
if (spell != SPELL_NO_SPELL)
{
@@ -1051,7 +1051,9 @@ void resists_screen()
void whereis_record(const char *status)
{
const std::string file_name =
- morgue_directory() + you.your_name + std::string(".where");
+ morgue_directory()
+ + strip_filename_unsafe_chars(you.your_name)
+ + std::string(".where");
if (FILE *handle = fopen(file_name.c_str(), "w"))
{
diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc
index ac7c749c41..402ab80531 100644
--- a/crawl-ref/source/clua.cc
+++ b/crawl-ref/source/clua.cc
@@ -704,7 +704,7 @@ static int l_you_spells(lua_State *ls)
int index = 0;
for (int i = 0; i < 52; ++i)
{
- const int spell = get_spell_by_letter( index_to_letter(i) );
+ const spell_type spell = get_spell_by_letter( index_to_letter(i) );
if (spell == SPELL_NO_SPELL)
continue;
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 7ef2c502dd..6efd53eb59 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -231,7 +231,7 @@ static void adjust_spells(void)
}
index_1 = letter_to_index( input_1 );
- int spell = get_spell_by_letter( input_1 );
+ spell_type spell = get_spell_by_letter( input_1 );
if (spell == SPELL_NO_SPELL)
{
@@ -241,8 +241,7 @@ static void adjust_spells(void)
}
// print out targeted spell:
- snprintf( info, INFO_SIZE, "%c - %s", input_1, spell_title( spell ) );
- mpr(info);
+ mprf( "%c - %s", input_1, spell_title( spell ) );
mpr( "Adjust to which letter?", MSGCH_PROMPT );
diff --git a/crawl-ref/source/dat/vaults.des b/crawl-ref/source/dat/vaults.des
index f9e60b91f6..99469fa464 100644
--- a/crawl-ref/source/dat/vaults.des
+++ b/crawl-ref/source/dat/vaults.des
@@ -6063,6 +6063,7 @@ ENDMAP
# Lava pond
NAME: minivault_15
+MONS: silver statue / ice statue
MAP
............
@@ -6070,7 +6071,7 @@ MAP
....lll.....
...vvlvv....
..lv|*|vl...
-..ll*S*ll...
+..ll*1*ll...
..lv|*|vl...
...vvlvv....
....lll.....
@@ -6082,6 +6083,8 @@ ENDMAP
###################################
NAME: minivault_16
+SHUFFLE: SFH1
+MONS: ice statue
MAP
............
@@ -6100,44 +6103,6 @@ ENDMAP
###################################
-NAME: minivault_17
-
-MAP
-............
-............
-............
-............
-............
-.....F......
-............
-............
-............
-............
-............
-............
-ENDMAP
-
-###################################
-
-NAME: minivault_18
-
-MAP
-............
-............
-............
-............
-............
-.....H......
-............
-............
-............
-............
-............
-............
-ENDMAP
-
-###################################
-
NAME: minivault_19
MAP
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 34e4f13530..419ac7e4df 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -300,7 +300,7 @@ void cast_spec_spell(void)
if (spell == -1)
canned_msg( MSG_OK );
else
- your_spells( spell, 0, false );
+ your_spells( static_cast<spell_type>(spell), 0, false );
}
#endif
@@ -313,20 +313,21 @@ void cast_spec_spell(void)
#ifdef WIZARD
void cast_spec_spell_name(void)
{
- int i = 0;
char specs[80];
char spname[80];
mpr( "Cast which spell by name? ", MSGCH_PROMPT );
get_input_line( specs, sizeof( specs ) );
- for (i = 0; i < NUM_SPELLS; i++)
+ for (int i = 0; i < NUM_SPELLS; i++)
{
- strncpy( spname, spell_title(i), sizeof( spname ) );
+ strncpy( spname,
+ spell_title(static_cast<spell_type>(i)),
+ sizeof( spname ) );
if (strstr( strlwr(spname), strlwr(specs) ) != NULL)
{
- your_spells(i, 0, false);
+ your_spells(static_cast<spell_type>(i), 0, false);
return;
}
}
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index a9335e2e72..c20494879e 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -491,7 +491,7 @@ static void finish_delay(const delay_queue_item &delay)
case DELAY_MEMORISE:
mpr( "You finish memorising." );
- add_spell_to_memory( delay.parm1 );
+ add_spell_to_memory( static_cast<spell_type>( delay.parm1 ) );
break;
case DELAY_PASSWALL:
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 0140545dd3..aea61f9d6a 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -3393,7 +3393,7 @@ void describe_item( const item_def &item )
// Describes (most) every spell in the game.
//
//---------------------------------------------------------------
-void describe_spell(int spelled)
+void describe_spell(spell_type spelled)
{
std::string description;
@@ -3487,7 +3487,7 @@ void describe_spell(int spelled)
description += "speeds the actions of a creature. ";
break;
- case SPELL_PARALYZE:
+ case SPELL_PARALYSE:
description += "prevents a creature from moving. ";
break;
@@ -6235,6 +6235,11 @@ void describe_monsters(int class_described, unsigned char which_mons)
"glow with an otherworldly radiance.";
break;
+ case MONS_ICE_STATUE:
+ description += "An imposing statue carved in glistening ice. "
+ "Freezing vapours swirl about it.";
+ break;
+
case MONS_MURRAY:
description += "A demonic skull rolling along the dungeon floor.";
break;
@@ -6258,7 +6263,7 @@ void describe_monsters(int class_described, unsigned char which_mons)
for (int i = 0; i < 6; i++)
{
- if (hspell_pass[i] != MS_NO_SPELL)
+ if (hspell_pass[i] != SPELL_NO_SPELL)
{
if (!found_spell)
{
diff --git a/crawl-ref/source/describe.h b/crawl-ref/source/describe.h
index 97ad8848f3..70949ae6b4 100644
--- a/crawl-ref/source/describe.h
+++ b/crawl-ref/source/describe.h
@@ -56,7 +56,7 @@ void describe_monsters(int class_described, unsigned char which_mons);
/* ***********************************************************************
* called from: item_use
* *********************************************************************** */
-void describe_spell(int spelled);
+void describe_spell(spell_type spelled);
// last updated 13oct2003 {darshan}
/* ***********************************************************************
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index a1aa225703..c7a780606e 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -6519,12 +6519,13 @@ static int newwave_weapon_colour(const item_def &item)
int item_colour = BLACK;
// fixed artefacts get predefined colours
- char *itname = (char*) item_name( item, DESC_PLAIN );
- char *item_runed = strstr( strlwr(itname), strlwr((char*) "runed") );
- char *heav_runed = strstr( strlwr(itname), strlwr((char*) "heavily") );
+ std::string itname = item_name( item, DESC_PLAIN );
+ lowercase(itname);
+
+ const bool item_runed = itname.find(" runed ") != std::string::npos;
+ const bool heav_runed = itname.find(" heavily ") != std::string::npos;
- if ( is_random_artefact(item) &&
- (item_runed == NULL || heav_runed != NULL) )
+ if ( is_random_artefact(item) && (!item_runed || heav_runed) )
return exciting_colour();
if (is_range_weapon( item ))
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 85f6fec71c..8ad6f87067 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -300,14 +300,6 @@ void direct_effect(struct bolt &pbolt)
else
mpr("Something tries to feed on your intellect!");
break;
-
- case DMNBM_MUTATION:
- mpr("Strange energies course through your body.");
- if (one_chance_in(5))
- mutate(100);
- else
- give_bad_mutation();
- break;
}
// apply damage and handle death, where appropriate {dlb}
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index c012005e80..937a2a6b62 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2239,6 +2239,7 @@ enum monster_type // (int) menv[].type
// Statuary
MONS_ORANGE_STATUE,
MONS_SILVER_STATUE,
+ MONS_ICE_STATUE,
NUM_MONSTERS, // used for polymorph
RANDOM_MONSTER = 1000, // used to distinguish between a random monster and using program bugs for error trapping {dlb}
@@ -2403,89 +2404,6 @@ enum mon_itemuse_type
MONUSE_MAGIC_ITEMS
};
-// XXX: someday merge these into SPELL_
-// If changing this list, keep mon-util.cc spell names in sync.
-enum mon_spell_type
-{
- MS_MMISSILE, // 0
- MS_FLAME,
- MS_FROST,
- MS_PARALYSIS,
- MS_SLOW,
- MS_HASTE, // 5
- MS_CONFUSE, // 6 - do not deprecate!!! 13jan2000 {dlb}
- MS_VENOM_BOLT,
- MS_FIRE_BOLT,
- MS_COLD_BOLT,
- MS_LIGHTNING_BOLT, // 10
- MS_INVIS,
- MS_FIREBALL,
- MS_HEAL,
- MS_TELEPORT,
- MS_TELEPORT_OTHER, // 15
- MS_BLINK,
- MS_CRYSTAL_SPEAR,
- MS_DIG,
- MS_NEGATIVE_BOLT,
- MS_HELLFIRE_BURST, // 20
- MS_VAMPIRE_SUMMON,
- MS_ORB_ENERGY,
- MS_BRAIN_FEED,
- MS_LEVEL_SUMMON,
- MS_FAKE_RAKSHASA_SUMMON, // 25
- MS_STEAM_BALL,
- MS_SUMMON_DEMON,
- MS_ANIMATE_DEAD,
- MS_PAIN,
- MS_SMITE, // 30
- MS_STICKY_FLAME,
- MS_POISON_BLAST,
- MS_SUMMON_DEMON_LESSER,
- MS_SUMMON_UFETUBUS,
- MS_PURPLE_BLAST, // 35
- MS_SUMMON_BEAST, // MS_GERYON was not descriptive - renamed 13jan2000 {dlb}
- MS_ENERGY_BOLT,
- MS_STING,
- MS_IRON_BOLT,
- MS_STONE_ARROW, // 40
- MS_POISON_SPLASH,
- MS_SUMMON_UNDEAD,
- MS_MUTATION, // 43
- MS_CANTRIP,
- MS_DISINTEGRATE, // 45
- MS_MARSH_GAS,
- MS_QUICKSILVER_BOLT,
- MS_TORMENT,
- MS_HELLFIRE,
- MS_METAL_SPLINTERS, // 50
- MS_SUMMON_DEMON_GREATER, // [foo]_1 was confusing - renamed 13jan2000 {dlb}
- MS_BANISHMENT,
- MS_CONTROLLED_BLINK,
- MS_CONTROL_UNDEAD,
- MS_MIASMA, // 55
- MS_SUMMON_DRAKES,
- MS_BLINK_OTHER,
- MS_DISPEL_UNDEAD,
- MS_HELLFROST,
- MS_POISON_ARROW, // 60
- MS_SUMMON_SMALL_MAMMALS,
- MS_SUMMON_MUSHROOMS,
- MS_ICE_BOLT,
- MS_MAGMA,
- MS_SHOCK,
-
- MS_BERSERK_RAGE,
- MS_MIGHT,
- MS_MAKHLEB_MINOR_DESTRUCTION,
- MS_MAKHLEB_MAJOR_DESTRUCTION,
-
- // XXX: before adding more monster versions of player spells we should
- // consider merging the two lists into one and just having monsters
- // fail to implement the ones that are impractical.
- NUM_MONSTER_SPELLS,
- MS_NO_SPELL = 100
-};
-
// XXX: These still need to be applied in mon-data.h
enum mon_spellbook_type
{
@@ -2585,6 +2503,7 @@ enum mon_spellbook_type
MST_DRAC_SHIFTER,
MST_CURSE_TOE,
MST_RUPERT,
+ MST_ICE_STATUE,
NUM_MSTYPES,
MST_NO_SPELLS = 250
};
@@ -3277,7 +3196,7 @@ enum spell_type
SPELL_POLYMORPH_OTHER = 20, // 20
SPELL_SLOW,
SPELL_HASTE,
- SPELL_PARALYZE,
+ SPELL_PARALYSE,
SPELL_CONFUSE,
SPELL_INVISIBILITY, // 25
SPELL_THROW_FLAME,
@@ -3444,9 +3363,29 @@ enum spell_type
SPELL_SIMULACRUM,
SPELL_CONJURE_BALL_LIGHTNING,
SPELL_CHAIN_LIGHTNING,
- SPELL_EXCRUCIATING_WOUNDS, // 204 (be wary of 209/210, see below)
+ SPELL_EXCRUCIATING_WOUNDS,
+
+ // Mostly monster-only spells after this point:
+ SPELL_HELLFIRE_BURST, // 205
+ SPELL_VAMPIRE_SUMMON,
+ SPELL_BRAIN_FEED,
+ SPELL_FAKE_RAKSHASA_SUMMON,
+ SPELL_STEAM_BALL,
+ SPELL_SUMMON_UFETUBUS, // 210
+ SPELL_SUMMON_BEAST,
+ SPELL_ENERGY_BOLT,
+ SPELL_POISON_SPLASH,
+ SPELL_SUMMON_UNDEAD,
+ SPELL_CANTRIP, // 215
+ SPELL_QUICKSILVER_BOLT,
+ SPELL_METAL_SPLINTERS,
+ SPELL_MIASMA,
+ SPELL_SUMMON_DRAKES,
+ SPELL_BLINK_OTHER, // 220
+ SPELL_SUMMON_MUSHROOMS,
+
NUM_SPELLS,
- SPELL_NO_SPELL = 210 // 210 - added 22jan2000 {dlb}
+ SPELL_NO_SPELL = 250 // 255 - added 22jan2000 {dlb}
};
enum spflag_type
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index d1fe6e9107..df541c675f 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -599,7 +599,7 @@ public:
int burden;
burden_state_type burden_state;
- FixedVector<unsigned char, 25> spells;
+ FixedVector<spell_type, 25> spells;
char spell_no;
unsigned char char_direction; //
@@ -811,13 +811,13 @@ public:
extern player you;
-class monster_spells : public FixedVector<int, NUM_MONSTER_SPELL_SLOTS>
+class monster_spells : public FixedVector<spell_type, NUM_MONSTER_SPELL_SLOTS>
{
public:
monster_spells()
- : FixedVector<int, NUM_MONSTER_SPELL_SLOTS>(MS_NO_SPELL)
+ : FixedVector<spell_type, NUM_MONSTER_SPELL_SLOTS>(SPELL_NO_SPELL)
{ }
- void clear() { init(MS_NO_SPELL); }
+ void clear() { init(SPELL_NO_SPELL); }
};
struct mon_attack_def
diff --git a/crawl-ref/source/ghost.cc b/crawl-ref/source/ghost.cc
index 5e4044dde7..4328e2855d 100644
--- a/crawl-ref/source/ghost.cc
+++ b/crawl-ref/source/ghost.cc
@@ -57,8 +57,8 @@ static int search_order_third[] = {
/* 0 */
SPELL_SYMBOL_OF_TORMENT,
SPELL_SUMMON_GREATER_DEMON,
- SPELL_SUMMON_WRAITHS,
SPELL_SUMMON_HORRIBLE_THINGS,
+ SPELL_SUMMON_WRAITHS,
SPELL_SUMMON_DEMON,
SPELL_DEMONIC_HORDE,
SPELL_HASTE,
@@ -81,7 +81,7 @@ static int search_order_misc[] = {
/* 0 */
SPELL_AGONY,
SPELL_BANISHMENT,
- SPELL_PARALYZE,
+ SPELL_PARALYSE,
SPELL_CONFUSE,
SPELL_SLOW,
SPELL_POLYMORPH_OTHER,
@@ -221,39 +221,39 @@ void ghost_demon::init_random_demon()
/* give demon a chance for some monster-only spells: */
/* and demon-summoning should be fairly common: */
if (one_chance_in(25))
- values[GVAL_SPELL_1] = MS_HELLFIRE_BURST;
+ values[GVAL_SPELL_1] = SPELL_HELLFIRE_BURST;
if (one_chance_in(25))
- values[GVAL_SPELL_1] = MS_METAL_SPLINTERS;
+ values[GVAL_SPELL_1] = SPELL_METAL_SPLINTERS;
if (one_chance_in(25))
- values[GVAL_SPELL_1] = MS_ENERGY_BOLT; /* eye of devas */
+ values[GVAL_SPELL_1] = SPELL_ENERGY_BOLT; /* eye of devas */
if (one_chance_in(25))
- values[GVAL_SPELL_2] = MS_STEAM_BALL;
+ values[GVAL_SPELL_2] = SPELL_STEAM_BALL;
if (one_chance_in(25))
- values[GVAL_SPELL_2] = MS_PURPLE_BLAST;
+ values[GVAL_SPELL_2] = SPELL_ISKENDERUNS_MYSTIC_BLAST;
if (one_chance_in(25))
- values[GVAL_SPELL_2] = MS_HELLFIRE;
+ values[GVAL_SPELL_2] = SPELL_HELLFIRE;
if (one_chance_in(25))
- values[GVAL_SPELL_3] = MS_SMITE;
+ values[GVAL_SPELL_3] = SPELL_SMITING;
if (one_chance_in(25))
- values[GVAL_SPELL_3] = MS_HELLFIRE_BURST;
+ values[GVAL_SPELL_3] = SPELL_HELLFIRE_BURST;
if (one_chance_in(12))
- values[GVAL_SPELL_3] = MS_SUMMON_DEMON_GREATER;
+ values[GVAL_SPELL_3] = SPELL_SUMMON_GREATER_DEMON;
if (one_chance_in(12))
- values[GVAL_SPELL_3] = MS_SUMMON_DEMON;
+ values[GVAL_SPELL_3] = SPELL_SUMMON_DEMON;
if (one_chance_in(20))
- values[GVAL_SPELL_4] = MS_SUMMON_DEMON_GREATER;
+ values[GVAL_SPELL_4] = SPELL_SUMMON_GREATER_DEMON;
if (one_chance_in(20))
- values[GVAL_SPELL_4] = MS_SUMMON_DEMON;
+ values[GVAL_SPELL_4] = SPELL_SUMMON_DEMON;
/* at least they can summon demons */
if (values[GVAL_SPELL_4] == SPELL_NO_SPELL)
- values[GVAL_SPELL_4] = MS_SUMMON_DEMON;
+ values[GVAL_SPELL_4] = SPELL_SUMMON_DEMON;
if (one_chance_in(15))
- values[GVAL_SPELL_5] = MS_DIG;
+ values[GVAL_SPELL_5] = SPELL_DIG;
}
}
@@ -429,103 +429,19 @@ int ghost_demon::translate_spell(int spel) const
{
switch (spel)
{
- case SPELL_TELEPORT_SELF:
- return (MS_TELEPORT);
- case SPELL_ICE_BOLT:
- return (MS_ICE_BOLT);
- case SPELL_SHOCK:
- return (MS_SHOCK);
- case SPELL_BOLT_OF_MAGMA:
- return (MS_MAGMA);
- case SPELL_MAGIC_DART:
- return (MS_MMISSILE);
- case SPELL_FIREBALL:
- case SPELL_DELAYED_FIREBALL:
- return (MS_FIREBALL);
- case SPELL_DIG:
- return (MS_DIG);
- case SPELL_BOLT_OF_FIRE:
- return (MS_FIRE_BOLT);
- case SPELL_BOLT_OF_COLD:
- return (MS_COLD_BOLT);
- case SPELL_LIGHTNING_BOLT:
- return (MS_LIGHTNING_BOLT);
- case SPELL_POLYMORPH_OTHER:
- return (MS_MUTATION);
- case SPELL_SLOW:
- return (MS_SLOW);
- case SPELL_HASTE:
- return (MS_HASTE);
- case SPELL_PARALYZE:
- return (MS_PARALYSIS);
- case SPELL_CONFUSE:
- return (MS_CONFUSE);
- case SPELL_INVISIBILITY:
- return (MS_INVIS);
- case SPELL_THROW_FLAME:
- return (MS_FLAME);
- case SPELL_THROW_FROST:
- return (MS_FROST);
case SPELL_CONTROLLED_BLINK:
- return (MS_BLINK); /* approximate */
-/* case FREEZING_CLOUD: return ; no freezing/mephitic cloud yet
- case MEPHITIC_CLOUD: return ; */
- case SPELL_VENOM_BOLT:
- return (MS_VENOM_BOLT);
- case SPELL_POISON_ARROW:
- return (MS_POISON_ARROW);
- case SPELL_TELEPORT_OTHER:
- return (MS_TELEPORT_OTHER);
- case SPELL_SUMMON_SMALL_MAMMAL:
- return (MS_SUMMON_SMALL_MAMMALS);
- case SPELL_BOLT_OF_DRAINING:
- return (MS_NEGATIVE_BOLT);
- case SPELL_LEHUDIBS_CRYSTAL_SPEAR:
- return (MS_CRYSTAL_SPEAR);
- case SPELL_BLINK:
- return (MS_BLINK);
- case SPELL_ISKENDERUNS_MYSTIC_BLAST:
- return (MS_ORB_ENERGY);
- case SPELL_SUMMON_HORRIBLE_THINGS:
- return (MS_LEVEL_SUMMON); /* approximate */
- case SPELL_SHADOW_CREATURES:
- return (MS_LEVEL_SUMMON); /* approximate */
- case SPELL_ANIMATE_DEAD:
- return (MS_ANIMATE_DEAD);
- case SPELL_PAIN:
- return (MS_PAIN);
- case SPELL_SUMMON_WRAITHS:
- return (MS_SUMMON_UNDEAD); /* approximate */
- case SPELL_STICKY_FLAME:
- return (MS_STICKY_FLAME);
- case SPELL_CALL_IMP:
- return (MS_SUMMON_DEMON_LESSER);
- case SPELL_BANISHMENT:
- return (MS_BANISHMENT);
- case SPELL_STING:
- return (MS_STING);
- case SPELL_SUMMON_DEMON:
- return (MS_SUMMON_DEMON);
+ return (SPELL_BLINK); /* approximate */
case SPELL_DEMONIC_HORDE:
- return (MS_SUMMON_DEMON_LESSER);
- case SPELL_SUMMON_GREATER_DEMON:
- return (MS_SUMMON_DEMON_GREATER);
- case SPELL_BOLT_OF_IRON:
- return (MS_IRON_BOLT);
- case SPELL_STONE_ARROW:
- return (MS_STONE_ARROW);
- case SPELL_DISINTEGRATE:
- return (MS_DISINTEGRATE);
+ return (SPELL_CALL_IMP);
case SPELL_AGONY:
- /* Too powerful to give ghosts Torment for Agony? Nah. */
- return (MS_TORMENT);
case SPELL_SYMBOL_OF_TORMENT:
- return (MS_TORMENT);
+ /* Too powerful to give ghosts Torment for Agony? Nah. */
+ return (SPELL_SYMBOL_OF_TORMENT);
default:
break;
}
- return (MS_NO_SPELL);
+ return (spel);
}
std::vector<ghost_demon> ghost_demon::find_ghosts()
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 0ed1d06dc4..34e78b0f31 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -2082,6 +2082,7 @@ std::string xlog_status_line()
{
const scorefile_entry se(0, 0, KILL_MISC, NULL);
se.set_base_xlog_fields();
+ se.fields->add_field("time", "%s", make_date_string(time(NULL)).c_str());
return (se.fields->xlog_line());
}
#endif // DGL_WHEREIS
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc
index 5d93ce8aeb..b01eeb419f 100644
--- a/crawl-ref/source/it_use3.cc
+++ b/crawl-ref/source/it_use3.cc
@@ -432,7 +432,8 @@ bool evoke_wielded( void )
spell_casted = SPELL_HELLFIRE; // 12 in 240
power = you.skills[SK_EVOCATIONS] * 8;
- your_spells( spell_casted, power, false );
+ your_spells( static_cast<spell_type>(spell_casted),
+ power, false );
did_work = true;
break;
@@ -840,7 +841,7 @@ void tome_of_power(char sc_read_2)
int powc = 5 + you.skills[SK_EVOCATIONS]
+ roll_dice( 5, you.skills[SK_EVOCATIONS] );
- int spell_casted = 0;
+ spell_type spell_casted = SPELL_NO_SPELL;
struct bolt beam;
strcpy(info, "The book opens to a page covered in ");
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 986fc0c907..e7afb32037 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -3157,7 +3157,7 @@ static bool enchant_armour( void )
static void handle_read_book( int item_slot )
{
- int spell, spell_index, nthing;
+ int spell, spell_index;
if (you.inv[item_slot].sub_type == BOOK_DESTRUCTION)
{
@@ -3189,7 +3189,8 @@ static void handle_read_book( int item_slot )
spell_index = letter_to_index( spell );
- nthing = which_spell_in_book(you.inv[item_slot].sub_type, spell_index);
+ spell_type nthing =
+ which_spell_in_book(you.inv[item_slot].sub_type, spell_index);
if (nthing == SPELL_NO_SPELL)
{
mesclr( true );
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index 9fb999beee..5c53d6501e 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -796,6 +796,13 @@ void down_stairs( bool remove_stairs, int old_level, int force_stair )
}
#endif
+ // [ds] Descending into the Labyrinth increments your_level. Going
+ // downstairs from a labyrinth implies that you've been banished (or been
+ // sent to Pandemonium somehow). Decrementing your_level here is needed
+ // to fix this buggy sequence: D:n -> Labyrinth -> Abyss -> D:(n+1).
+ if (you.level_type == LEVEL_LABYRINTH)
+ you.your_level--;
+
if (stair_find == DNGN_ENTER_ZOT)
{
int num_runes = 0;
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index 90c1ac9695..a0167974b9 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -1774,7 +1774,7 @@
{
MONS_SPINY_WORM, 'w', DARKGREY, "spiny worm",
M_NO_FLAGS,
- MR_VUL_POISON,
+ MR_VUL_POISON | MR_RES_ACID,
1300, 13, MONS_WORM, MONS_SPINY_WORM, MH_NATURAL, -3,
{ {AT_STING, AF_ACID, 32}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
{ 12, 3, 5, 0 },
@@ -3651,7 +3651,7 @@
{
MONS_YELLOW_DRACONIAN, 'd', YELLOW, "yellow draconian",
M_HUMANOID | M_COLD_BLOOD | M_SPECIAL_ABILITY,
- MR_NO_FLAGS,
+ MR_RES_ACID,
900, 10, MONS_DRACONIAN, MONS_YELLOW_DRACONIAN, MH_NATURAL, -2,
{ {AT_HIT, AF_PLAIN, 20}, {AT_HIT, AF_PLAIN, 0}, {AT_HIT, AF_PLAIN, 0} },
{ 14, 5, 4, 0 },
@@ -4374,7 +4374,7 @@
MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC,
0, 10, MONS_CLAY_GOLEM, MONS_ORANGE_STATUE, MH_NONLIVING, MAG_IMMUNE,
{ {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
- { 12, 0, 0, 160 },
+ { 10, 0, 0, 160 },
30, 1, 6, 7, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_HIGH,
MONUSE_NOTHING, SIZE_LARGE
}
@@ -4386,13 +4386,25 @@
MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC,
0, 10, MONS_CLAY_GOLEM, MONS_SILVER_STATUE, MH_NONLIVING, MAG_IMMUNE,
{ {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
- { 12, 0, 0, 150 },
+ { 6, 0, 0, 150 },
30, 1, 10, 7, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_HIGH,
MONUSE_NOTHING, SIZE_LARGE
}
,
{
+ MONS_ICE_STATUE, '8', LIGHTBLUE, "ice statue",
+ M_SPELLCASTER,
+ MR_RES_POISON | MR_VUL_FIRE | MR_RES_COLD | MR_RES_ELEC,
+ 0, 10, MONS_CLAY_GOLEM, MONS_ICE_STATUE, MH_NONLIVING, MAG_IMMUNE,
+ { {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0}, {AT_NONE, AF_PLAIN, 0} },
+ { 8, 0, 0, 140 },
+ 12, 1, 10, 7, MST_ICE_STATUE, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_HIGH,
+ MONUSE_NOTHING, SIZE_LARGE
+}
+,
+
+{
MONS_MURRAY, 'z', LIGHTRED, "Murray",
M_SPELLCASTER | M_SEE_INVIS | M_EVIL | M_SPEAKS | M_UNIQUE,
MR_RES_ELEC | MR_RES_POISON | MR_RES_HELLFIRE | MR_RES_COLD,
diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h
index 4131fb405e..48ab9448f4 100644
--- a/crawl-ref/source/mon-spll.h
+++ b/crawl-ref/source/mon-spll.h
@@ -20,7 +20,7 @@
enchantment,
self-enchantment, // 50% tried after others fail
misc(1) spell,
- misc(2) spell, // MS_DIG must be here to work!
+ misc(2) spell, // SPELL_DIG must be here to work!
emergency spell // only when fleeing
}
@@ -31,766 +31,774 @@
{ MST_ORC_WIZARD_I,
- MS_MMISSILE,
- MS_SLOW,
- MS_HASTE,
- MS_MMISSILE,
- MS_BLINK,
- MS_BLINK },
+ SPELL_MAGIC_DART,
+ SPELL_SLOW,
+ SPELL_HASTE,
+ SPELL_MAGIC_DART,
+ SPELL_BLINK,
+ SPELL_BLINK },
{ MST_ORC_WIZARD_II,
- MS_FLAME,
- MS_CONFUSE,
- MS_INVIS,
- MS_MMISSILE,
- MS_NO_SPELL,
- MS_CONFUSE },
+ SPELL_THROW_FLAME,
+ SPELL_CONFUSE,
+ SPELL_INVISIBILITY,
+ SPELL_MAGIC_DART,
+ SPELL_NO_SPELL,
+ SPELL_CONFUSE },
{ MST_ORC_WIZARD_III,
- MS_FROST,
- MS_CANTRIP,
- MS_HASTE,
- MS_FLAME,
- MS_MMISSILE,
- MS_INVIS },
+ SPELL_THROW_FROST,
+ SPELL_CANTRIP,
+ SPELL_HASTE,
+ SPELL_THROW_FLAME,
+ SPELL_MAGIC_DART,
+ SPELL_INVISIBILITY },
{ MST_GUARDIAN_NAGA,
- MS_TELEPORT_OTHER,
- MS_TELEPORT_OTHER,
- MS_HEAL,
- MS_VENOM_BOLT,
- MS_SLOW,
- MS_HEAL },
+ SPELL_TELEPORT_OTHER,
+ SPELL_TELEPORT_OTHER,
+ SPELL_LESSER_HEALING,
+ SPELL_VENOM_BOLT,
+ SPELL_SLOW,
+ SPELL_LESSER_HEALING },
{ MST_LICH_I,
- MS_COLD_BOLT,
- MS_PARALYSIS,
- MS_SUMMON_DEMON_GREATER,
- MS_ANIMATE_DEAD,
- MS_IRON_BOLT,
- MS_TELEPORT },
+ SPELL_BOLT_OF_COLD,
+ SPELL_PARALYSE,
+ SPELL_SUMMON_GREATER_DEMON,
+ SPELL_ANIMATE_DEAD,
+ SPELL_BOLT_OF_IRON,
+ SPELL_TELEPORT_SELF },
{ MST_LICH_II,
- MS_FIRE_BOLT,
- MS_CONFUSE,
- MS_HASTE,
- MS_NEGATIVE_BOLT,
- MS_SUMMON_DEMON_GREATER,
- MS_BANISHMENT },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_CONFUSE,
+ SPELL_HASTE,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_SUMMON_GREATER_DEMON,
+ SPELL_BANISHMENT },
{ MST_LICH_III,
- MS_NEGATIVE_BOLT,
- MS_ANIMATE_DEAD,
- MS_SUMMON_UNDEAD,
- MS_FROST,
- MS_CRYSTAL_SPEAR,
- MS_SUMMON_UNDEAD },
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_ANIMATE_DEAD,
+ SPELL_SUMMON_UNDEAD,
+ SPELL_THROW_FROST,
+ SPELL_LEHUDIBS_CRYSTAL_SPEAR,
+ SPELL_SUMMON_UNDEAD },
{ MST_LICH_IV,
- MS_ORB_ENERGY,
- MS_COLD_BOLT,
- MS_INVIS,
- MS_ANIMATE_DEAD,
- MS_IRON_BOLT,
- MS_INVIS },
+ SPELL_ISKENDERUNS_MYSTIC_BLAST,
+ SPELL_BOLT_OF_COLD,
+ SPELL_INVISIBILITY,
+ SPELL_ANIMATE_DEAD,
+ SPELL_BOLT_OF_IRON,
+ SPELL_INVISIBILITY },
{ MST_BURNING_DEVIL,
- MS_HELLFIRE_BURST,
- MS_HELLFIRE_BURST,
- MS_NO_SPELL,
- MS_HELLFIRE_BURST,
- MS_HELLFIRE_BURST,
- MS_HELLFIRE_BURST },
+ SPELL_HELLFIRE_BURST,
+ SPELL_HELLFIRE_BURST,
+ SPELL_NO_SPELL,
+ SPELL_HELLFIRE_BURST,
+ SPELL_HELLFIRE_BURST,
+ SPELL_HELLFIRE_BURST },
{ MST_VAMPIRE,
- MS_VAMPIRE_SUMMON,
- MS_CONFUSE,
- MS_INVIS,
- MS_NO_SPELL,
- MS_VAMPIRE_SUMMON,
- MS_VAMPIRE_SUMMON },
+ SPELL_VAMPIRE_SUMMON,
+ SPELL_CONFUSE,
+ SPELL_INVISIBILITY,
+ SPELL_NO_SPELL,
+ SPELL_VAMPIRE_SUMMON,
+ SPELL_VAMPIRE_SUMMON },
{ MST_VAMPIRE_KNIGHT,
- MS_VAMPIRE_SUMMON,
- MS_PARALYSIS,
- MS_HASTE,
- MS_INVIS,
- MS_VAMPIRE_SUMMON,
- MS_HEAL },
+ SPELL_VAMPIRE_SUMMON,
+ SPELL_PARALYSE,
+ SPELL_HASTE,
+ SPELL_INVISIBILITY,
+ SPELL_VAMPIRE_SUMMON,
+ SPELL_LESSER_HEALING },
{ MST_VAMPIRE_MAGE,
- MS_NEGATIVE_BOLT,
- MS_SUMMON_UNDEAD,
- MS_INVIS,
- MS_ANIMATE_DEAD,
- MS_ANIMATE_DEAD,
- MS_TELEPORT },
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_SUMMON_UNDEAD,
+ SPELL_INVISIBILITY,
+ SPELL_ANIMATE_DEAD,
+ SPELL_ANIMATE_DEAD,
+ SPELL_TELEPORT_SELF },
{ MST_EFREET,
- MS_FIRE_BOLT,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_FIREBALL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_FIREBALL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_BRAIN_WORM,
- MS_BRAIN_FEED,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_BRAIN_FEED,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_BRAIN_FEED,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_BRAIN_FEED,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_GIANT_ORANGE_BRAIN,
- MS_BRAIN_FEED,
- MS_MUTATION,
- MS_LEVEL_SUMMON,
- MS_CONFUSE,
- MS_BLINK,
- MS_TELEPORT },
+ SPELL_BRAIN_FEED,
+ SPELL_POLYMORPH_OTHER,
+ SPELL_SHADOW_CREATURES,
+ SPELL_CONFUSE,
+ SPELL_BLINK,
+ SPELL_TELEPORT_SELF },
{ MST_RAKSHASA,
- MS_FAKE_RAKSHASA_SUMMON,
- MS_BLINK,
- MS_INVIS,
- MS_FAKE_RAKSHASA_SUMMON,
- MS_BLINK,
- MS_TELEPORT },
+ SPELL_FAKE_RAKSHASA_SUMMON,
+ SPELL_BLINK,
+ SPELL_INVISIBILITY,
+ SPELL_FAKE_RAKSHASA_SUMMON,
+ SPELL_BLINK,
+ SPELL_TELEPORT_SELF },
{ MST_GREAT_ORB_OF_EYES,
- MS_PARALYSIS,
- MS_DISINTEGRATE,
- MS_NO_SPELL,
- MS_SLOW,
- MS_CONFUSE,
- MS_TELEPORT_OTHER },
+ SPELL_PARALYSE,
+ SPELL_DISINTEGRATE,
+ SPELL_NO_SPELL,
+ SPELL_SLOW,
+ SPELL_CONFUSE,
+ SPELL_TELEPORT_OTHER },
{ MST_ORC_SORCERER,
- MS_FIRE_BOLT,
- MS_NEGATIVE_BOLT,
- MS_SUMMON_DEMON,
- MS_PARALYSIS,
- MS_ANIMATE_DEAD,
- MS_TELEPORT },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_SUMMON_DEMON,
+ SPELL_PARALYSE,
+ SPELL_ANIMATE_DEAD,
+ SPELL_TELEPORT_SELF },
{ MST_STEAM_DRAGON,
- MS_STEAM_BALL,
- MS_STEAM_BALL,
- MS_NO_SPELL,
- MS_STEAM_BALL,
- MS_STEAM_BALL,
- MS_NO_SPELL },
+ SPELL_STEAM_BALL,
+ SPELL_STEAM_BALL,
+ SPELL_NO_SPELL,
+ SPELL_STEAM_BALL,
+ SPELL_STEAM_BALL,
+ SPELL_NO_SPELL },
{ MST_HELL_KNIGHT_I,
- MS_NO_SPELL,
- MS_PAIN,
- MS_HASTE,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_HASTE },
+ SPELL_NO_SPELL,
+ SPELL_PAIN,
+ SPELL_HASTE,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_HASTE },
{ MST_HELL_KNIGHT_II,
- MS_NO_SPELL,
- MS_FIRE_BOLT,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_BLINK },
+ SPELL_NO_SPELL,
+ SPELL_BOLT_OF_FIRE,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_BLINK },
{ MST_NECROMANCER_I,
- MS_COLD_BOLT,
- MS_NEGATIVE_BOLT,
- MS_NO_SPELL,
- MS_ANIMATE_DEAD,
- MS_ANIMATE_DEAD,
- MS_TELEPORT },
+ SPELL_BOLT_OF_COLD,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_NO_SPELL,
+ SPELL_ANIMATE_DEAD,
+ SPELL_ANIMATE_DEAD,
+ SPELL_TELEPORT_SELF },
{ MST_NECROMANCER_II,
- MS_FIRE_BOLT,
- MS_PAIN,
- MS_INVIS,
- MS_ANIMATE_DEAD,
- MS_ANIMATE_DEAD,
- MS_BLINK },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_PAIN,
+ SPELL_INVISIBILITY,
+ SPELL_ANIMATE_DEAD,
+ SPELL_ANIMATE_DEAD,
+ SPELL_BLINK },
{ MST_WIZARD_I,
- MS_MMISSILE,
- MS_PARALYSIS,
- MS_HASTE,
- MS_LIGHTNING_BOLT,
- MS_CONFUSE,
- MS_TELEPORT },
+ SPELL_MAGIC_DART,
+ SPELL_PARALYSE,
+ SPELL_HASTE,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_CONFUSE,
+ SPELL_TELEPORT_SELF },
{ MST_WIZARD_II,
- MS_VENOM_BOLT,
- MS_ORB_ENERGY,
- MS_INVIS,
- MS_CONFUSE,
- MS_SLOW,
- MS_TELEPORT },
+ SPELL_VENOM_BOLT,
+ SPELL_ISKENDERUNS_MYSTIC_BLAST,
+ SPELL_INVISIBILITY,
+ SPELL_CONFUSE,
+ SPELL_SLOW,
+ SPELL_TELEPORT_SELF },
{ MST_WIZARD_III,
- MS_PARALYSIS,
- MS_CRYSTAL_SPEAR,
- MS_BLINK,
- MS_FIRE_BOLT,
- MS_COLD_BOLT,
- MS_HEAL },
+ SPELL_PARALYSE,
+ SPELL_LEHUDIBS_CRYSTAL_SPEAR,
+ SPELL_BLINK,
+ SPELL_BOLT_OF_FIRE,
+ SPELL_BOLT_OF_COLD,
+ SPELL_LESSER_HEALING },
{ MST_WIZARD_IV,
- MS_STONE_ARROW,
- MS_STING,
- MS_BLINK,
- MS_LIGHTNING_BOLT,
- MS_BANISHMENT,
- MS_HEAL },
+ SPELL_STONE_ARROW,
+ SPELL_STING,
+ SPELL_BLINK,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_BANISHMENT,
+ SPELL_LESSER_HEALING },
{ MST_WIZARD_V,
- MS_PARALYSIS,
- MS_FLAME,
- MS_INVIS,
- MS_TELEPORT_OTHER,
- MS_FIREBALL,
- MS_TELEPORT_OTHER },
+ SPELL_PARALYSE,
+ SPELL_THROW_FLAME,
+ SPELL_INVISIBILITY,
+ SPELL_TELEPORT_OTHER,
+ SPELL_FIREBALL,
+ SPELL_TELEPORT_OTHER },
{ MST_ORC_PRIEST,
- MS_PAIN,
- MS_NO_SPELL,
- MS_CANTRIP,
- MS_SMITE,
- MS_NO_SPELL,
- MS_HEAL },
+ SPELL_PAIN,
+ SPELL_NO_SPELL,
+ SPELL_CANTRIP,
+ SPELL_SMITING,
+ SPELL_NO_SPELL,
+ SPELL_LESSER_HEALING },
{ MST_ORC_HIGH_PRIEST,
- MS_PAIN,
- MS_SUMMON_DEMON,
- MS_SUMMON_DEMON,
- MS_SMITE,
- MS_ANIMATE_DEAD,
- MS_HEAL },
+ SPELL_PAIN,
+ SPELL_SUMMON_DEMON,
+ SPELL_SUMMON_DEMON,
+ SPELL_SMITING,
+ SPELL_ANIMATE_DEAD,
+ SPELL_LESSER_HEALING },
{ MST_MOTTLED_DRAGON,
- MS_STICKY_FLAME,
- MS_STICKY_FLAME,
- MS_NO_SPELL,
- MS_STICKY_FLAME,
- MS_STICKY_FLAME,
- MS_NO_SPELL },
+ SPELL_STICKY_FLAME,
+ SPELL_STICKY_FLAME,
+ SPELL_NO_SPELL,
+ SPELL_STICKY_FLAME,
+ SPELL_STICKY_FLAME,
+ SPELL_NO_SPELL },
{ MST_ICE_FIEND,
- MS_COLD_BOLT,
- MS_COLD_BOLT,
- MS_NO_SPELL,
- MS_TORMENT,
- MS_NO_SPELL,
- MS_SUMMON_DEMON },
+ SPELL_BOLT_OF_COLD,
+ SPELL_BOLT_OF_COLD,
+ SPELL_NO_SPELL,
+ SPELL_SYMBOL_OF_TORMENT,
+ SPELL_NO_SPELL,
+ SPELL_SUMMON_DEMON },
{ MST_SHADOW_FIEND,
- MS_COLD_BOLT,
- MS_NEGATIVE_BOLT,
- MS_NO_SPELL,
- MS_TORMENT,
- MS_NO_SPELL,
- MS_SUMMON_DEMON },
+ SPELL_BOLT_OF_COLD,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_NO_SPELL,
+ SPELL_SYMBOL_OF_TORMENT,
+ SPELL_NO_SPELL,
+ SPELL_SUMMON_DEMON },
{ MST_TORMENTOR,
- MS_PAIN,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_PAIN,
- MS_NO_SPELL,
- MS_TORMENT },
+ SPELL_PAIN,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_PAIN,
+ SPELL_NO_SPELL,
+ SPELL_SYMBOL_OF_TORMENT },
{ MST_STORM_DRAGON,
- MS_LIGHTNING_BOLT,
- MS_LIGHTNING_BOLT,
- MS_NO_SPELL,
- MS_LIGHTNING_BOLT,
- MS_LIGHTNING_BOLT,
- MS_NO_SPELL },
+ SPELL_LIGHTNING_BOLT,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_NO_SPELL,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_NO_SPELL },
{ MST_WHITE_IMP,
- MS_FROST,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_THROW_FROST,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_YNOXINUL,
- MS_NO_SPELL,
- MS_IRON_BOLT,
- MS_SUMMON_UFETUBUS,
- MS_NO_SPELL,
- MS_SUMMON_UFETUBUS,
- MS_NO_SPELL },
+ SPELL_NO_SPELL,
+ SPELL_BOLT_OF_IRON,
+ SPELL_SUMMON_UFETUBUS,
+ SPELL_NO_SPELL,
+ SPELL_SUMMON_UFETUBUS,
+ SPELL_NO_SPELL },
{ MST_NEQOXEC,
- MS_MUTATION,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_BRAIN_FEED,
- MS_SUMMON_DEMON_LESSER,
- MS_NO_SPELL },
+ SPELL_POLYMORPH_OTHER,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_BRAIN_FEED,
+ SPELL_CALL_IMP,
+ SPELL_NO_SPELL },
{ MST_HELLWING,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_TELEPORT_OTHER,
- MS_ANIMATE_DEAD,
- MS_TELEPORT },
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_TELEPORT_OTHER,
+ SPELL_ANIMATE_DEAD,
+ SPELL_TELEPORT_SELF },
{ MST_SMOKE_DEMON,
- MS_STICKY_FLAME,
- MS_STEAM_BALL,
- MS_NO_SPELL,
- MS_SMITE,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_STICKY_FLAME,
+ SPELL_STEAM_BALL,
+ SPELL_NO_SPELL,
+ SPELL_SMITING,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_CACODEMON,
- MS_SUMMON_DEMON_LESSER,
- MS_SUMMON_DEMON_LESSER,
- MS_SUMMON_DEMON_LESSER,
- MS_MUTATION,
- MS_DIG,
- MS_SUMMON_DEMON },
+ SPELL_CALL_IMP,
+ SPELL_CALL_IMP,
+ SPELL_CALL_IMP,
+ SPELL_POLYMORPH_OTHER,
+ SPELL_DIG,
+ SPELL_SUMMON_DEMON },
{ MST_GREEN_DEATH,
- MS_POISON_ARROW,
- MS_POISON_BLAST,
- MS_NO_SPELL,
- MS_VENOM_BOLT,
- MS_SUMMON_DEMON_LESSER,
- MS_BLINK },
+ SPELL_POISON_ARROW,
+ SPELL_POISONOUS_CLOUD,
+ SPELL_NO_SPELL,
+ SPELL_VENOM_BOLT,
+ SPELL_CALL_IMP,
+ SPELL_BLINK },
{ MST_BALRUG,
- MS_FIRE_BOLT,
- MS_FIREBALL,
- MS_NO_SPELL,
- MS_STICKY_FLAME,
- MS_SMITE,
- MS_TELEPORT },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_FIREBALL,
+ SPELL_NO_SPELL,
+ SPELL_STICKY_FLAME,
+ SPELL_SMITING,
+ SPELL_TELEPORT_SELF },
{ MST_BLUE_DEATH,
- MS_LIGHTNING_BOLT,
- MS_COLD_BOLT,
- MS_NO_SPELL,
- MS_SUMMON_DEMON_LESSER,
- MS_LEVEL_SUMMON,
- MS_TELEPORT_OTHER },
+ SPELL_LIGHTNING_BOLT,
+ SPELL_BOLT_OF_COLD,
+ SPELL_NO_SPELL,
+ SPELL_CALL_IMP,
+ SPELL_SHADOW_CREATURES,
+ SPELL_TELEPORT_OTHER },
{ MST_GERYON,
- MS_SUMMON_BEAST,
- MS_SUMMON_BEAST,
- MS_NO_SPELL,
- MS_SUMMON_BEAST,
- MS_NO_SPELL,
- MS_SUMMON_BEAST },
+ SPELL_SUMMON_BEAST,
+ SPELL_SUMMON_BEAST,
+ SPELL_NO_SPELL,
+ SPELL_SUMMON_BEAST,
+ SPELL_NO_SPELL,
+ SPELL_SUMMON_BEAST },
{ MST_DISPATER,
- MS_SUMMON_DEMON_GREATER,
- MS_IRON_BOLT,
- MS_SUMMON_DEMON,
- MS_LIGHTNING_BOLT,
- MS_HELLFIRE,
- MS_SUMMON_DEMON_GREATER },
+ SPELL_SUMMON_GREATER_DEMON,
+ SPELL_BOLT_OF_IRON,
+ SPELL_SUMMON_DEMON,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_HELLFIRE,
+ SPELL_SUMMON_GREATER_DEMON },
{ MST_ASMODEUS,
- MS_FIRE_BOLT,
- MS_HELLFIRE,
- MS_SUMMON_DEMON,
- MS_SUMMON_DEMON_GREATER,
- MS_NEGATIVE_BOLT,
- MS_TELEPORT },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_HELLFIRE,
+ SPELL_SUMMON_DEMON,
+ SPELL_SUMMON_GREATER_DEMON,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_TELEPORT_SELF },
{ MST_ERESHKIGAL,
- MS_NEGATIVE_BOLT,
- MS_COLD_BOLT,
- MS_SUMMON_DEMON,
- MS_PAIN,
- MS_PARALYSIS,
- MS_HEAL },
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_BOLT_OF_COLD,
+ SPELL_SUMMON_DEMON,
+ SPELL_PAIN,
+ SPELL_PARALYSE,
+ SPELL_LESSER_HEALING },
{ MST_ANTAEUS,
- MS_COLD_BOLT,
- MS_LIGHTNING_BOLT,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_BOLT_OF_COLD,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_MNOLEG,
- MS_SUMMON_DEMON,
- MS_SMITE,
- MS_INVIS,
- MS_MUTATION,
- MS_LEVEL_SUMMON,
- MS_TELEPORT },
+ SPELL_SUMMON_DEMON,
+ SPELL_SMITING,
+ SPELL_INVISIBILITY,
+ SPELL_POLYMORPH_OTHER,
+ SPELL_SHADOW_CREATURES,
+ SPELL_TELEPORT_SELF },
{ MST_LOM_LOBON,
- MS_LIGHTNING_BOLT,
- MS_COLD_BOLT,
- MS_HEAL,
- MS_SUMMON_DEMON,
- MS_TELEPORT,
- MS_TELEPORT },
+ SPELL_LIGHTNING_BOLT,
+ SPELL_BOLT_OF_COLD,
+ SPELL_LESSER_HEALING,
+ SPELL_SUMMON_DEMON,
+ SPELL_TELEPORT_SELF,
+ SPELL_TELEPORT_SELF },
{ MST_CEREBOV,
- MS_FIRE_BOLT,
- MS_IRON_BOLT,
- MS_NO_SPELL,
- MS_FIREBALL,
- MS_SUMMON_DEMON_LESSER,
- MS_NO_SPELL },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_BOLT_OF_IRON,
+ SPELL_NO_SPELL,
+ SPELL_FIREBALL,
+ SPELL_CALL_IMP,
+ SPELL_NO_SPELL },
{ MST_GLOORX_VLOQ,
- MS_POISON_ARROW,
- MS_SLOW,
- MS_SUMMON_DEMON,
- MS_NEGATIVE_BOLT,
- MS_SUMMON_DEMON,
- MS_NO_SPELL },
+ SPELL_POISON_ARROW,
+ SPELL_SLOW,
+ SPELL_SUMMON_DEMON,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_SUMMON_DEMON,
+ SPELL_NO_SPELL },
{ MST_TITAN,
- MS_LIGHTNING_BOLT,
- MS_NO_SPELL,
- MS_HEAL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_HEAL },
+ SPELL_LIGHTNING_BOLT,
+ SPELL_NO_SPELL,
+ SPELL_LESSER_HEALING,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_LESSER_HEALING },
{ MST_GOLDEN_DRAGON,
- MS_FIRE_BOLT,
- MS_COLD_BOLT,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_POISON_BLAST,
- MS_NO_SPELL },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_BOLT_OF_COLD,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_POISONOUS_CLOUD,
+ SPELL_NO_SPELL },
{ MST_DEEP_ELF_SUMMONER,
- MS_BLINK,
- MS_SUMMON_DEMON_LESSER,
- MS_SUMMON_UFETUBUS,
- MS_VAMPIRE_SUMMON,
- MS_SUMMON_DEMON,
- MS_TELEPORT },
+ SPELL_BLINK,
+ SPELL_CALL_IMP,
+ SPELL_SUMMON_UFETUBUS,
+ SPELL_VAMPIRE_SUMMON,
+ SPELL_SUMMON_DEMON,
+ SPELL_TELEPORT_SELF },
{ MST_DEEP_ELF_CONJURER_I,
- MS_FIRE_BOLT,
- MS_COLD_BOLT,
- MS_CANTRIP,
- MS_LIGHTNING_BOLT,
- MS_STICKY_FLAME,
- MS_TELEPORT },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_BOLT_OF_COLD,
+ SPELL_CANTRIP,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_STICKY_FLAME,
+ SPELL_TELEPORT_SELF },
{ MST_DEEP_ELF_CONJURER_II,
- MS_STICKY_FLAME,
- MS_ORB_ENERGY,
- MS_INVIS,
- MS_STONE_ARROW,
- MS_NEGATIVE_BOLT,
- MS_TELEPORT },
+ SPELL_STICKY_FLAME,
+ SPELL_ISKENDERUNS_MYSTIC_BLAST,
+ SPELL_INVISIBILITY,
+ SPELL_STONE_ARROW,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_TELEPORT_SELF },
{ MST_DEEP_ELF_PRIEST,
- MS_PAIN,
- MS_CANTRIP,
- MS_HEAL,
- MS_SMITE,
- MS_ANIMATE_DEAD,
- MS_HEAL },
+ SPELL_PAIN,
+ SPELL_CANTRIP,
+ SPELL_LESSER_HEALING,
+ SPELL_SMITING,
+ SPELL_ANIMATE_DEAD,
+ SPELL_LESSER_HEALING },
{ MST_DEEP_ELF_HIGH_PRIEST,
- MS_SUMMON_DEMON,
- MS_HELLFIRE_BURST,
- MS_HEAL,
- MS_SMITE,
- MS_ANIMATE_DEAD,
- MS_HEAL },
+ SPELL_SUMMON_DEMON,
+ SPELL_HELLFIRE_BURST,
+ SPELL_LESSER_HEALING,
+ SPELL_SMITING,
+ SPELL_ANIMATE_DEAD,
+ SPELL_LESSER_HEALING },
{ MST_DEEP_ELF_DEMONOLOGIST,
- MS_SUMMON_DEMON,
- MS_BANISHMENT,
- MS_SUMMON_DEMON,
- MS_SUMMON_DEMON_GREATER,
- MS_SUMMON_DEMON_LESSER,
- MS_TELEPORT },
+ SPELL_SUMMON_DEMON,
+ SPELL_BANISHMENT,
+ SPELL_SUMMON_DEMON,
+ SPELL_SUMMON_GREATER_DEMON,
+ SPELL_CALL_IMP,
+ SPELL_TELEPORT_SELF },
{ MST_DEEP_ELF_ANNIHILATOR,
- MS_LIGHTNING_BOLT,
- MS_CRYSTAL_SPEAR,
- MS_BLINK,
- MS_IRON_BOLT,
- MS_POISON_ARROW,
- MS_TELEPORT },
+ SPELL_LIGHTNING_BOLT,
+ SPELL_LEHUDIBS_CRYSTAL_SPEAR,
+ SPELL_BLINK,
+ SPELL_BOLT_OF_IRON,
+ SPELL_POISON_ARROW,
+ SPELL_TELEPORT_SELF },
{ MST_DEEP_ELF_SORCERER,
- MS_NEGATIVE_BOLT,
- MS_BANISHMENT,
- MS_HASTE,
- MS_SUMMON_DEMON,
- MS_HELLFIRE,
- MS_TELEPORT },
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_BANISHMENT,
+ SPELL_HASTE,
+ SPELL_SUMMON_DEMON,
+ SPELL_HELLFIRE,
+ SPELL_TELEPORT_SELF },
{ MST_DEEP_ELF_DEATH_MAGE,
- MS_NEGATIVE_BOLT,
- MS_NEGATIVE_BOLT,
- MS_HEAL,
- MS_ANIMATE_DEAD,
- MS_ANIMATE_DEAD,
- MS_TELEPORT },
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_LESSER_HEALING,
+ SPELL_ANIMATE_DEAD,
+ SPELL_ANIMATE_DEAD,
+ SPELL_TELEPORT_SELF },
{ MST_KOBOLD_DEMONOLOGIST,
- MS_SUMMON_DEMON_LESSER,
- MS_SUMMON_DEMON,
- MS_CANTRIP,
- MS_SUMMON_DEMON_LESSER,
- MS_SUMMON_DEMON,
- MS_CANTRIP }, // this should be cute -- bwr
+ SPELL_CALL_IMP,
+ SPELL_SUMMON_DEMON,
+ SPELL_CANTRIP,
+ SPELL_CALL_IMP,
+ SPELL_SUMMON_DEMON,
+ SPELL_CANTRIP }, // this should be cute -- bwr
{ MST_NAGA,
- MS_POISON_SPLASH,
- MS_POISON_SPLASH,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_POISON_SPLASH,
+ SPELL_POISON_SPLASH,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_NAGA_MAGE,
- MS_VENOM_BOLT,
- MS_ORB_ENERGY,
- MS_HASTE,
- MS_POISON_ARROW,
- MS_TELEPORT_OTHER,
- MS_TELEPORT },
+ SPELL_VENOM_BOLT,
+ SPELL_ISKENDERUNS_MYSTIC_BLAST,
+ SPELL_HASTE,
+ SPELL_POISON_ARROW,
+ SPELL_TELEPORT_OTHER,
+ SPELL_TELEPORT_SELF },
{ MST_CURSE_SKULL,
- MS_SUMMON_UNDEAD,
- MS_SUMMON_UNDEAD,
- MS_NO_SPELL,
- MS_TORMENT,
- MS_SUMMON_UNDEAD,
- MS_NO_SPELL },
+ SPELL_SUMMON_UNDEAD,
+ SPELL_SUMMON_UNDEAD,
+ SPELL_NO_SPELL,
+ SPELL_SYMBOL_OF_TORMENT,
+ SPELL_SUMMON_UNDEAD,
+ SPELL_NO_SPELL },
{ MST_SHINING_EYE,
- MS_MUTATION,
- MS_MUTATION,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_POLYMORPH_OTHER,
+ SPELL_POLYMORPH_OTHER,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_FROST_GIANT,
- MS_COLD_BOLT,
- MS_COLD_BOLT,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_BOLT_OF_COLD,
+ SPELL_BOLT_OF_COLD,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_ANGEL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_HEAL,
- MS_NO_SPELL,
- MS_HEAL,
- MS_HEAL },
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_LESSER_HEALING,
+ SPELL_NO_SPELL,
+ SPELL_LESSER_HEALING,
+ SPELL_LESSER_HEALING },
{ MST_DAEVA,
- MS_SMITE,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_SMITE,
- MS_SMITE,
- MS_NO_SPELL },
+ SPELL_SMITING,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_SMITING,
+ SPELL_SMITING,
+ SPELL_NO_SPELL },
{ MST_SHADOW_DRAGON,
- MS_NEGATIVE_BOLT,
- MS_NEGATIVE_BOLT,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NEGATIVE_BOLT,
- MS_NO_SPELL },
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_BOLT_OF_DRAINING,
+ SPELL_NO_SPELL },
{ MST_SPHINX,
- MS_CONFUSE,
- MS_PARALYSIS,
- MS_HEAL,
- MS_SMITE,
- MS_SLOW,
- MS_HEAL },
+ SPELL_CONFUSE,
+ SPELL_PARALYSE,
+ SPELL_LESSER_HEALING,
+ SPELL_SMITING,
+ SPELL_SLOW,
+ SPELL_LESSER_HEALING },
{ MST_MUMMY,
- MS_SUMMON_DEMON,
- MS_SMITE,
- MS_NO_SPELL,
- MS_TORMENT,
- MS_SUMMON_UNDEAD,
- MS_SUMMON_UNDEAD },
+ SPELL_SUMMON_DEMON,
+ SPELL_SMITING,
+ SPELL_NO_SPELL,
+ SPELL_SYMBOL_OF_TORMENT,
+ SPELL_SUMMON_UNDEAD,
+ SPELL_SUMMON_UNDEAD },
{ MST_ELECTRIC_GOLEM,
- MS_LIGHTNING_BOLT,
- MS_LIGHTNING_BOLT,
- MS_BLINK,
- MS_LIGHTNING_BOLT,
- MS_LIGHTNING_BOLT,
- MS_BLINK },
+ SPELL_LIGHTNING_BOLT,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_BLINK,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_LIGHTNING_BOLT,
+ SPELL_BLINK },
{ MST_ORB_OF_FIRE,
- MS_FIRE_BOLT,
- MS_FIRE_BOLT,
- MS_NO_SPELL,
- MS_MUTATION,
- MS_FIREBALL,
- MS_FIREBALL },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_BOLT_OF_FIRE,
+ SPELL_NO_SPELL,
+ SPELL_POLYMORPH_OTHER,
+ SPELL_FIREBALL,
+ SPELL_FIREBALL },
{ MST_SHADOW_IMP,
- MS_PAIN,
- MS_NO_SPELL,
- MS_ANIMATE_DEAD,
- MS_ANIMATE_DEAD,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_PAIN,
+ SPELL_NO_SPELL,
+ SPELL_ANIMATE_DEAD,
+ SPELL_ANIMATE_DEAD,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_GHOST, // actual spells taken from struct (see mon-util.cc),
- MS_NO_SPELL, // this line: splist[x] = ghost.values[x + 14] -- dlb
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_NO_SPELL, // this line: splist[x] = ghost.values[x + 14] -- dlb
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_HELL_HOG,
- MS_STICKY_FLAME,
- MS_STICKY_FLAME,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_STICKY_FLAME,
+ SPELL_STICKY_FLAME,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_SWAMP_DRAGON,
- MS_POISON_BLAST,
- MS_POISON_BLAST,
- MS_NO_SPELL,
- MS_POISON_BLAST,
- MS_POISON_BLAST,
- MS_NO_SPELL },
+ SPELL_POISONOUS_CLOUD,
+ SPELL_POISONOUS_CLOUD,
+ SPELL_NO_SPELL,
+ SPELL_POISONOUS_CLOUD,
+ SPELL_POISONOUS_CLOUD,
+ SPELL_NO_SPELL },
{ MST_SWAMP_DRAKE,
- MS_MARSH_GAS,
- MS_MARSH_GAS,
- MS_NO_SPELL,
- MS_MARSH_GAS,
- MS_MARSH_GAS,
- MS_NO_SPELL },
+ SPELL_MEPHITIC_CLOUD,
+ SPELL_MEPHITIC_CLOUD,
+ SPELL_NO_SPELL,
+ SPELL_MEPHITIC_CLOUD,
+ SPELL_MEPHITIC_CLOUD,
+ SPELL_NO_SPELL },
{ MST_SERPENT_OF_HELL,
- MS_HELLFIRE,
- MS_HELLFIRE,
- MS_NO_SPELL,
- MS_HELLFIRE,
- MS_HELLFIRE,
- MS_NO_SPELL },
+ SPELL_HELLFIRE,
+ SPELL_HELLFIRE,
+ SPELL_NO_SPELL,
+ SPELL_HELLFIRE,
+ SPELL_HELLFIRE,
+ SPELL_NO_SPELL },
{ MST_BOGGART,
- MS_CONFUSE,
- MS_SLOW,
- MS_INVIS,
- MS_BLINK,
- MS_LEVEL_SUMMON,
- MS_LEVEL_SUMMON },
+ SPELL_CONFUSE,
+ SPELL_SLOW,
+ SPELL_INVISIBILITY,
+ SPELL_BLINK,
+ SPELL_SHADOW_CREATURES,
+ SPELL_SHADOW_CREATURES },
{ MST_EYE_OF_DEVASTATION,
- MS_ENERGY_BOLT,
- MS_ENERGY_BOLT,
- MS_NO_SPELL,
- MS_ENERGY_BOLT,
- MS_ENERGY_BOLT,
- MS_NO_SPELL },
+ SPELL_ENERGY_BOLT,
+ SPELL_ENERGY_BOLT,
+ SPELL_NO_SPELL,
+ SPELL_ENERGY_BOLT,
+ SPELL_ENERGY_BOLT,
+ SPELL_NO_SPELL },
{ MST_QUICKSILVER_DRAGON,
- MS_QUICKSILVER_BOLT,
- MS_QUICKSILVER_BOLT,
- MS_NO_SPELL,
- MS_QUICKSILVER_BOLT,
- MS_QUICKSILVER_BOLT,
- MS_NO_SPELL },
+ SPELL_QUICKSILVER_BOLT,
+ SPELL_QUICKSILVER_BOLT,
+ SPELL_NO_SPELL,
+ SPELL_QUICKSILVER_BOLT,
+ SPELL_QUICKSILVER_BOLT,
+ SPELL_NO_SPELL },
{ MST_IRON_DRAGON,
- MS_METAL_SPLINTERS,
- MS_METAL_SPLINTERS,
- MS_NO_SPELL,
- MS_METAL_SPLINTERS,
- MS_METAL_SPLINTERS,
- MS_NO_SPELL },
+ SPELL_METAL_SPLINTERS,
+ SPELL_METAL_SPLINTERS,
+ SPELL_NO_SPELL,
+ SPELL_METAL_SPLINTERS,
+ SPELL_METAL_SPLINTERS,
+ SPELL_NO_SPELL },
{ MST_SKELETAL_WARRIOR,
- MS_ANIMATE_DEAD,
- MS_NO_SPELL,
- MS_ANIMATE_DEAD,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_NO_SPELL },
+ SPELL_ANIMATE_DEAD,
+ SPELL_NO_SPELL,
+ SPELL_ANIMATE_DEAD,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL },
{ MST_MYSTIC,
- MS_BRAIN_FEED,
- MS_SMITE,
- MS_INVIS,
- MS_CONFUSE,
- MS_PARALYSIS,
- MS_HEAL },
+ SPELL_BRAIN_FEED,
+ SPELL_SMITING,
+ SPELL_INVISIBILITY,
+ SPELL_CONFUSE,
+ SPELL_PARALYSE,
+ SPELL_LESSER_HEALING },
{ MST_DEATH_DRAKE,
- MS_MIASMA,
- MS_MIASMA,
- MS_NO_SPELL,
- MS_MIASMA,
- MS_MIASMA,
- MS_NO_SPELL },
+ SPELL_MIASMA,
+ SPELL_MIASMA,
+ SPELL_NO_SPELL,
+ SPELL_MIASMA,
+ SPELL_MIASMA,
+ SPELL_NO_SPELL },
{ MST_DRAC_SCORCHER,
- MS_FIRE_BOLT,
- MS_STICKY_FLAME,
- MS_NO_SPELL,
- MS_FIREBALL,
- MS_HELLFIRE,
- MS_HELLFIRE_BURST },
+ SPELL_BOLT_OF_FIRE,
+ SPELL_STICKY_FLAME,
+ SPELL_NO_SPELL,
+ SPELL_FIREBALL,
+ SPELL_HELLFIRE,
+ SPELL_HELLFIRE_BURST },
{ MST_DRAC_CALLER,
- MS_NO_SPELL,
- MS_SUMMON_DRAKES,
- MS_SUMMON_DRAKES,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_SUMMON_DRAKES },
+ SPELL_NO_SPELL,
+ SPELL_SUMMON_DRAKES,
+ SPELL_SUMMON_DRAKES,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_SUMMON_DRAKES },
{ MST_DRAC_SHIFTER,
- MS_BANISHMENT,
- MS_BLINK_OTHER,
- MS_BLINK,
- MS_NO_SPELL,
- MS_BLINK_OTHER,
- MS_CONTROLLED_BLINK },
+ SPELL_BANISHMENT,
+ SPELL_BLINK_OTHER,
+ SPELL_BLINK,
+ SPELL_NO_SPELL,
+ SPELL_BLINK_OTHER,
+ SPELL_CONTROLLED_BLINK },
// Curse toe menu should be kept full, because otherwise the toe spends
// too much time crawling around.
{ MST_CURSE_TOE,
- MS_SUMMON_UNDEAD,
- MS_SUMMON_MUSHROOMS, // fungal theme
- MS_SUMMON_MUSHROOMS,
- MS_TORMENT,
- MS_SUMMON_UNDEAD,
- MS_TORMENT },
+ SPELL_SUMMON_UNDEAD,
+ SPELL_SUMMON_MUSHROOMS, // fungal theme
+ SPELL_SUMMON_MUSHROOMS,
+ SPELL_SYMBOL_OF_TORMENT,
+ SPELL_SUMMON_UNDEAD,
+ SPELL_SYMBOL_OF_TORMENT },
// Crusader theme.
{ MST_RUPERT,
- MS_PARALYSIS,
- MS_CONFUSE,
- MS_BERSERK_RAGE,
- MS_NO_SPELL,
- MS_NO_SPELL,
- MS_BERSERK_RAGE },
+ SPELL_PARALYSE,
+ SPELL_CONFUSE,
+ SPELL_BERSERKER_RAGE,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_BERSERKER_RAGE },
+
+ { MST_ICE_STATUE,
+ SPELL_BOLT_OF_COLD,
+ SPELL_ICE_BOLT,
+ SPELL_NO_SPELL,
+ SPELL_FREEZING_CLOUD,
+ SPELL_SUMMON_ICE_BEAST,
+ SPELL_SUMMON_ICE_BEAST },
#endif
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index c4ced2539e..8ec3d02efa 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -18,6 +18,7 @@
// some routines snatched from former monsstat.cc
#include "AppHdr.h"
+#include "enum.h"
#include "mon-util.h"
#include "monstuff.h"
@@ -40,6 +41,7 @@
#include "mtransit.h"
#include "player.h"
#include "randart.h"
+#include "spl-util.h"
#include "stuff.h"
#include "view.h"
@@ -73,79 +75,6 @@ static int mspell_list[][7] = {
#include "mon-spll.h"
};
-#if DEBUG_DIAGNOSTICS
-static const char *monster_spell_name[] = {
- "Magic Missile",
- "Throw Flame",
- "Throw Frost",
- "Paralysis",
- "Slow",
- "Haste",
- "Confuse",
- "Venom Bolt",
- "Fire Bolt",
- "Cold Bolt",
- "Lightning Bolt",
- "Invisibility",
- "Fireball",
- "Heal",
- "Teleport",
- "Teleport Other",
- "Blink",
- "Crystal Spear",
- "Dig",
- "Negative Bolt",
- "Hellfire Burst",
- "Vampire Summon",
- "Orb Energy",
- "Brain Feed",
- "Level Summon",
- "Fake Rakshasa Summon",
- "Steam Ball",
- "Summon Demon",
- "Animate Dead",
- "Pain",
- "Smite",
- "Sticky Flame",
- "Poison Blast",
- "Summon Demon Lesser",
- "Summon Ufetubus",
- "Purple Blast",
- "Summon Beast",
- "Energy Bolt",
- "Sting",
- "Iron Bolt",
- "Stone Arrow",
- "Poison Splash",
- "Summon Undead",
- "Mutation",
- "Cantrip",
- "Disintegrate",
- "Marsh Gas",
- "Quicksilver Bolt",
- "Torment",
- "Hellfire",
- "Metal Splinters",
- "Summon Demon Greater",
- "Banishment",
- "Controlled Blink",
- "Control Undead",
- "Miasma",
- "Summon Drakes",
- "Blink Other",
- "Dispel Undead",
- "Hellfrost",
- "Poison Arrow",
- "Summon Small Mammals",
- "Summon Mushrooms",
- "Ice Bolt",
- "Magma",
- "Shock",
- "Berserk Rage",
- "Might"
-};
-#endif
-
static int mons_exp_mod(int mclass);
static monsterentry *seekmonster(int p_monsterid);
@@ -392,7 +321,9 @@ bool invalid_monster_class(int mclass)
bool mons_is_statue(int mc)
{
- return (mc == MONS_ORANGE_STATUE || mc == MONS_SILVER_STATUE);
+ return (mc == MONS_ORANGE_STATUE
+ || mc == MONS_SILVER_STATUE
+ || mc == MONS_ICE_STATUE);
}
bool mons_is_mimic( int mc )
@@ -1070,10 +1001,8 @@ int exper_value( const struct monsters *monster )
if (mons_class_flag(mclass, M_NO_EXP_GAIN))
return (0);
- // no experience for destroying furniture, even if the furniture started
- // the fight.
if (mons_is_statue(mclass))
- return (0);
+ return (mHD * 15);
// These undead take damage to maxhp, so we use only HD. -- bwr
if (mclass == MONS_ZOMBIE_SMALL
@@ -1103,25 +1032,25 @@ int exper_value( const struct monsters *monster )
{
switch (hspell_pass[i])
{
- case MS_PARALYSIS:
- case MS_SMITE:
- case MS_HELLFIRE_BURST:
- case MS_HELLFIRE:
- case MS_TORMENT:
+ case SPELL_PARALYSE:
+ case SPELL_SMITING:
+ case SPELL_HELLFIRE_BURST:
+ case SPELL_HELLFIRE:
+ case SPELL_SYMBOL_OF_TORMENT:
diff += 25;
break;
- case MS_LIGHTNING_BOLT:
- case MS_NEGATIVE_BOLT:
- case MS_VENOM_BOLT:
- case MS_STICKY_FLAME:
- case MS_DISINTEGRATE:
- case MS_SUMMON_DEMON_GREATER:
- case MS_BANISHMENT:
- case MS_CRYSTAL_SPEAR:
- case MS_IRON_BOLT:
- case MS_TELEPORT:
- case MS_TELEPORT_OTHER:
+ case SPELL_LIGHTNING_BOLT:
+ case SPELL_BOLT_OF_DRAINING:
+ case SPELL_VENOM_BOLT:
+ case SPELL_STICKY_FLAME:
+ case SPELL_DISINTEGRATE:
+ case SPELL_SUMMON_GREATER_DEMON:
+ case SPELL_BANISHMENT:
+ case SPELL_LEHUDIBS_CRYSTAL_SPEAR:
+ case SPELL_BOLT_OF_IRON:
+ case SPELL_TELEPORT_SELF:
+ case SPELL_TELEPORT_OTHER:
diff += 10;
break;
@@ -1208,14 +1137,13 @@ void mons_load_spells( monsters *mon, int book )
mon->load_spells(book);
}
-#if DEBUG_DIAGNOSTICS
-const char *mons_spell_name( int spell )
-{
- if (spell == MS_NO_SPELL || spell >= NUM_MONSTER_SPELLS || spell < 0)
- return ("No spell");
+#ifdef DEBUG_DIAGNOSTICS
- return (monster_spell_name[ spell ]);
+const char *mons_spell_name( spell_type spell )
+{
+ return (spell_title(spell));
}
+
#endif
// generate a shiny new and unscarred monster
@@ -1863,175 +1791,47 @@ bool mons_should_fire(struct bolt &beam)
// note - this function assumes that the monster is "nearby"
// its target!
-bool ms_requires_tracer(int monspell)
-{
- bool requires = false;
-
- switch(monspell)
- {
- case MS_BANISHMENT:
- case MS_COLD_BOLT:
- case MS_ICE_BOLT:
- case MS_SHOCK:
- case MS_MAGMA:
- case MS_CONFUSE:
- case MS_CRYSTAL_SPEAR:
- case MS_DISINTEGRATE:
- case MS_ENERGY_BOLT:
- case MS_FIRE_BOLT:
- case MS_FIREBALL:
- case MS_FLAME:
- case MS_FROST:
- case MS_HELLFIRE:
- case MS_IRON_BOLT:
- case MS_LIGHTNING_BOLT:
- case MS_MARSH_GAS:
- case MS_MIASMA:
- case MS_METAL_SPLINTERS:
- case MS_MMISSILE:
- case MS_NEGATIVE_BOLT:
- case MS_ORB_ENERGY:
- case MS_PAIN:
- case MS_PARALYSIS:
- case MS_POISON_BLAST:
- case MS_POISON_ARROW:
- case MS_POISON_SPLASH:
- case MS_QUICKSILVER_BOLT:
- case MS_SLOW:
- case MS_STEAM_BALL:
- case MS_STICKY_FLAME:
- case MS_STING:
- case MS_STONE_ARROW:
- case MS_TELEPORT_OTHER:
- case MS_VENOM_BOLT:
- requires = true;
- break;
-
- // self-niceties and direct effects
- case MS_ANIMATE_DEAD:
- case MS_BLINK:
- case MS_BRAIN_FEED:
- case MS_DIG:
- case MS_FAKE_RAKSHASA_SUMMON:
- case MS_HASTE:
- case MS_HEAL:
- case MS_HELLFIRE_BURST:
- case MS_INVIS:
- case MS_LEVEL_SUMMON:
- case MS_MUTATION:
- case MS_SMITE:
- case MS_SUMMON_BEAST:
- case MS_SUMMON_DEMON_LESSER:
- case MS_SUMMON_DEMON:
- case MS_SUMMON_DEMON_GREATER:
- case MS_SUMMON_UFETUBUS:
- case MS_TELEPORT:
- case MS_TORMENT:
- case MS_SUMMON_SMALL_MAMMALS:
- case MS_VAMPIRE_SUMMON:
- case MS_CANTRIP:
- case MS_BERSERK_RAGE:
-
- // meaningless, but sure, why not?
- case MS_NO_SPELL:
- break;
-
- default:
- break;
- }
-
- return (requires);
+bool ms_requires_tracer(spell_type monspell)
+{
+ return (spell_needs_tracer(monspell));
}
// returns true if the spell is something you wouldn't want done if
// you had a friendly target.. only returns a meaningful value for
// non-beam spells
-bool ms_direct_nasty(int monspell)
+bool ms_direct_nasty(spell_type monspell)
{
- bool nasty = true;
-
- switch(monspell)
- {
- // self-niceties/summonings
- case MS_ANIMATE_DEAD:
- case MS_BLINK:
- case MS_DIG:
- case MS_FAKE_RAKSHASA_SUMMON:
- case MS_HASTE:
- case MS_HEAL:
- case MS_INVIS:
- case MS_LEVEL_SUMMON:
- case MS_SUMMON_BEAST:
- case MS_SUMMON_DEMON_LESSER:
- case MS_SUMMON_DEMON:
- case MS_SUMMON_DEMON_GREATER:
- case MS_SUMMON_UFETUBUS:
- case MS_TELEPORT:
- case MS_SUMMON_SMALL_MAMMALS:
- case MS_VAMPIRE_SUMMON:
- nasty = false;
- break;
-
- case MS_BRAIN_FEED:
- case MS_HELLFIRE_BURST:
- case MS_MUTATION:
- case MS_SMITE:
- case MS_TORMENT:
- case MS_BERSERK_RAGE:
-
- // meaningless, but sure, why not?
- case MS_NO_SPELL:
- break;
-
- default:
- break;
- }
-
- return (nasty);
+ return (spell_needs_foe(monspell));
}
// Spells a monster may want to cast if fleeing from the player, and
// the player is not in sight.
-bool ms_useful_fleeing_out_of_sight( struct monsters *mon, int monspell )
+bool ms_useful_fleeing_out_of_sight( const monsters *mon, spell_type monspell )
{
if (ms_waste_of_time( mon, monspell ))
return (false);
switch (monspell)
{
- case MS_HASTE:
- case MS_INVIS:
- case MS_HEAL:
- case MS_ANIMATE_DEAD:
+ case SPELL_HASTE:
+ case SPELL_INVISIBILITY:
+ case SPELL_LESSER_HEALING:
+ case SPELL_ANIMATE_DEAD:
return (true);
- case MS_SUMMON_SMALL_MAMMALS:
- case MS_VAMPIRE_SUMMON:
- case MS_SUMMON_UFETUBUS:
- case MS_FAKE_RAKSHASA_SUMMON:
- case MS_LEVEL_SUMMON:
- case MS_SUMMON_DEMON:
- case MS_SUMMON_DEMON_LESSER:
- case MS_SUMMON_BEAST:
- case MS_SUMMON_UNDEAD:
- case MS_SUMMON_MUSHROOMS:
- case MS_SUMMON_DEMON_GREATER:
- if (one_chance_in(10)) // only summon friends some of the time
- return (true);
- break;
-
default:
+ if ((get_spell_flags(monspell) & SPTYP_SUMMONING) && one_chance_in(4))
+ return (true);
break;
}
return (false);
}
-bool ms_low_hitpoint_cast( struct monsters *mon, int monspell )
+bool ms_low_hitpoint_cast( const monsters *mon, spell_type monspell )
{
bool ret = false;
-
bool targ_adj = false;
if (mon->foe == MHITYOU || mon->foe == MHITNOT)
@@ -2046,22 +1846,20 @@ bool ms_low_hitpoint_cast( struct monsters *mon, int monspell )
switch (monspell)
{
- case MS_TELEPORT:
- case MS_TELEPORT_OTHER:
- case MS_HEAL:
+ case SPELL_TELEPORT_SELF:
+ case SPELL_TELEPORT_OTHER:
+ case SPELL_LESSER_HEALING:
ret = true;
break;
- case MS_BLINK:
+ case SPELL_BLINK:
+ case SPELL_BLINK_OTHER:
if (targ_adj)
ret = true;
break;
- case MS_SUMMON_SMALL_MAMMALS:
- case MS_VAMPIRE_SUMMON:
- case MS_SUMMON_UFETUBUS:
- case MS_FAKE_RAKSHASA_SUMMON:
- if (!targ_adj)
+ default:
+ if (!targ_adj && (get_spell_flags(monspell) & SPTYP_SUMMONING))
ret = true;
break;
}
@@ -2070,7 +1868,7 @@ bool ms_low_hitpoint_cast( struct monsters *mon, int monspell )
}
// Checks to see if a particular spell is worth casting in the first place.
-bool ms_waste_of_time( struct monsters *mon, int monspell )
+bool ms_waste_of_time( const monsters *mon, spell_type monspell )
{
bool ret = false;
int intel, est_magic_resist, power, diff;
@@ -2081,34 +1879,34 @@ bool ms_waste_of_time( struct monsters *mon, int monspell )
// handled here as well. -- bwr
switch (monspell)
{
- case MS_BERSERK_RAGE:
+ case SPELL_BERSERKER_RAGE:
if (!mon->needs_berserk(false))
ret = true;
break;
- case MS_HASTE:
+ case SPELL_HASTE:
if (mon->has_ench(ENCH_HASTE))
ret = true;
break;
- case MS_INVIS:
+ case SPELL_INVISIBILITY:
if (mon->has_ench(ENCH_INVIS) ||
(mons_friendly(mon) && !player_see_invis(false)))
ret = true;
break;
- case MS_HEAL:
+ case SPELL_LESSER_HEALING:
if (mon->hit_points > mon->max_hit_points / 2)
ret = true;
break;
- case MS_TELEPORT:
+ case SPELL_TELEPORT_SELF:
// Monsters aren't smart enough to know when to cancel teleport.
if (mon->has_ench( ENCH_TP ))
ret = true;
break;
- case MS_TELEPORT_OTHER:
+ case SPELL_TELEPORT_OTHER:
// Monsters aren't smart enough to know when to cancel teleport.
if (mon->foe == MHITYOU)
{
@@ -2122,12 +1920,12 @@ bool ms_waste_of_time( struct monsters *mon, int monspell )
}
// intentional fall-through
- case MS_SLOW:
- case MS_CONFUSE:
- case MS_PAIN:
- case MS_BANISHMENT:
- case MS_DISINTEGRATE:
- case MS_PARALYSIS:
+ case SPELL_SLOW:
+ case SPELL_CONFUSE:
+ case SPELL_PAIN:
+ case SPELL_BANISHMENT:
+ case SPELL_DISINTEGRATE:
+ case SPELL_PARALYSE:
// occasionally we don't estimate... just fire and see:
if (one_chance_in(5))
return (false);
@@ -2158,15 +1956,15 @@ bool ms_waste_of_time( struct monsters *mon, int monspell )
est_magic_resist += random2(30) - 15;
}
- power = 12 * mon->hit_dice * (monspell == MS_PAIN ? 2 : 1);
+ power = 12 * mon->hit_dice * (monspell == SPELL_PAIN ? 2 : 1);
power = stepdown_value( power, 30, 40, 100, 120 );
// Determine the amount of chance allowed by the benefit from
// the spell. The estimated difficulty is the probability
// of rolling over 100 + diff on 2d100. -- bwr
- diff = (monspell == MS_PAIN
- || monspell == MS_SLOW
- || monspell == MS_CONFUSE) ? 0 : 50;
+ diff = (monspell == SPELL_PAIN
+ || monspell == SPELL_SLOW
+ || monspell == SPELL_CONFUSE) ? 0 : 50;
if (est_magic_resist - power > diff)
ret = true;
@@ -2180,15 +1978,15 @@ bool ms_waste_of_time( struct monsters *mon, int monspell )
return (ret);
}
-static bool ms_ranged_spell( int monspell )
+static bool ms_ranged_spell( spell_type monspell )
{
switch (monspell)
{
- case MS_HASTE:
- case MS_HEAL:
- case MS_TELEPORT:
- case MS_INVIS:
- case MS_BLINK:
+ case SPELL_HASTE:
+ case SPELL_LESSER_HEALING:
+ case SPELL_TELEPORT_SELF:
+ case SPELL_INVISIBILITY:
+ case SPELL_BLINK:
return (false);
default:
@@ -2204,14 +2002,14 @@ bool mons_is_magic_user( const monsters *mon )
{
for (int i = 0; i < NUM_MONSTER_SPELL_SLOTS; ++i)
{
- if (mon->spells[i] != MS_NO_SPELL)
+ if (mon->spells[i] != SPELL_NO_SPELL)
return (true);
}
}
return (false);
}
-bool mons_has_ranged_spell( struct monsters *mon )
+bool mons_has_ranged_spell( const monsters *mon )
{
const int mclass = mon->type;
@@ -2227,7 +2025,7 @@ bool mons_has_ranged_spell( struct monsters *mon )
return (false);
}
-bool mons_has_ranged_attack( struct monsters *mon )
+bool mons_has_ranged_attack( const monsters *mon )
{
const int weapon = mon->inv[MSLOT_WEAPON];
const int ammo = mon->inv[MSLOT_MISSILE];
@@ -2321,7 +2119,9 @@ static bool mons_can_smite(const monsters *monster)
const monster_spells &hspell_pass = monster->spells;
for (unsigned i = 0; i < hspell_pass.size(); ++i)
- if (hspell_pass[i] == MS_TORMENT || hspell_pass[i] == MS_SMITE)
+ if (hspell_pass[i] == SPELL_SYMBOL_OF_TORMENT
+ || hspell_pass[i] == SPELL_SMITING
+ || hspell_pass[i] == SPELL_HELLFIRE_BURST)
return (true);
return (false);
@@ -3034,7 +2834,7 @@ void monsters::set_transit(level_id dest)
void monsters::load_spells(int book)
{
- spells.init(MS_NO_SPELL);
+ spells.init(SPELL_NO_SPELL);
if (book == MST_NO_SPELLS || (book == MST_GHOST && !ghost.get()))
return;
@@ -3047,7 +2847,8 @@ void monsters::load_spells(int book)
{
for (int i = 0; i < NUM_MONSTER_SPELL_SLOTS; i++)
{
- spells[i] = ghost->values[ GVAL_SPELL_1 + i ];
+ spells[i] =
+ static_cast<spell_type>( ghost->values[ GVAL_SPELL_1 + i ] );
#if DEBUG_DIAGNOSTICS
mprf( MSGCH_DIAGNOSTICS, "spell #%d: %d", i, spells[i] );
#endif
@@ -3066,7 +2867,7 @@ void monsters::load_spells(int book)
if (i < NUM_MSTYPES)
{
for (int z = 0; z < NUM_MONSTER_SPELL_SLOTS; z++)
- spells[z] = mspell_list[i][z + 1];
+ spells[z] = static_cast<spell_type>( mspell_list[i][z + 1] );
}
}
}
@@ -3857,7 +3658,7 @@ bool monsters::needs_berserk(bool check_spells) const
for (int i = 0; i < NUM_MONSTER_SPELL_SLOTS; ++i)
{
const int spell = spells[i];
- if (spell != MS_NO_SPELL && spell != MS_BERSERK_RAGE)
+ if (spell != SPELL_NO_SPELL && spell != SPELL_BERSERKER_RAGE)
return (false);
}
}
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index df1add3afb..ca1f0b4153 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -350,12 +350,12 @@ void define_monster(int mid);
const char *moname(int mcl, bool vis, char descrip, char glog[ ITEMNAME_SIZE ]);
-#if DEBUG_DIAGNOSTICS
+#ifdef DEBUG_DIAGNOSTICS
// last updated 25sep2001 {dlb}
/* ***********************************************************************
* called from: describe
* *********************************************************************** */
-const char *mons_spell_name( int spell );
+extern const char *mons_spell_name(spell_type);
#endif
// last updated 4jan2001 (gdl)
@@ -369,20 +369,20 @@ bool mons_should_fire(struct bolt &beam);
/* ***********************************************************************
* called from: monstuff
* *********************************************************************** */
-bool ms_direct_nasty(int monspell);
+bool ms_direct_nasty(spell_type monspell);
// last updated 14jan2001 (gdl)
/* ***********************************************************************
* called from: monstuff
* *********************************************************************** */
-bool ms_requires_tracer(int mons_spell);
+bool ms_requires_tracer(spell_type mons_spell);
-bool ms_useful_fleeing_out_of_sight( struct monsters *mon, int monspell );
-bool ms_waste_of_time( struct monsters *mon, int monspell );
-bool ms_low_hitpoint_cast( struct monsters *mon, int monspell );
+bool ms_useful_fleeing_out_of_sight( const monsters *mon, spell_type monspell );
+bool ms_waste_of_time( const monsters *mon, spell_type monspell );
+bool ms_low_hitpoint_cast( const monsters *mon, spell_type monspell );
-bool mons_has_ranged_spell( struct monsters *mon );
-bool mons_has_ranged_attack( struct monsters *mon );
+bool mons_has_ranged_spell( const monsters *mon );
+bool mons_has_ranged_attack( const monsters *mon );
bool mons_is_magic_user( const monsters *mon );
// last updated 06mar2001 (gdl)
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index b7248d26dc..3df19c9d6c 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -52,6 +52,7 @@
#include "randart.h"
#include "religion.h"
#include "spl-cast.h"
+#include "spl-util.h"
#include "spells2.h"
#include "spells4.h"
#include "stuff.h"
@@ -991,6 +992,7 @@ static bool valid_morph( struct monsters *monster, int new_mclass )
|| new_mclass == MONS_ROYAL_JELLY
|| new_mclass == MONS_ORANGE_STATUE
|| new_mclass == MONS_SILVER_STATUE
+ || new_mclass == MONS_ICE_STATUE
|| (new_mclass >= MONS_GERYON && new_mclass <= MONS_ERESHKIGAL))
{
return (false);
@@ -2251,14 +2253,14 @@ static bool handle_special_ability(struct monsters *monster, bolt & beem)
// badly they'll damage the player with torment) -- GDL
if (one_chance_in(4))
{
- int spell_cast;
+ spell_type spell_cast = SPELL_NO_SPELL;
switch (random2(4))
{
case 0:
if (!mons_friendly(monster))
{
- spell_cast = MS_TORMENT;
+ spell_cast = SPELL_SYMBOL_OF_TORMENT;
mons_cast(monster, beem, spell_cast);
used = true;
break;
@@ -2267,7 +2269,7 @@ static bool handle_special_ability(struct monsters *monster, bolt & beem)
case 1:
case 2:
case 3:
- spell_cast = MS_HELLFIRE;
+ spell_cast = SPELL_HELLFIRE;
setup_mons_cast(monster, beem, spell_cast);
// fire tracer
@@ -2768,32 +2770,32 @@ static bool handle_wand(struct monsters *monster, bolt &beem)
// Returns a suitable breath weapon for the draconian; does not handle all
// draconians, does fire a tracer.
-static int get_draconian_breath_spell( struct monsters *monster )
+static spell_type get_draconian_breath_spell( const monsters *monster )
{
- int draco_breath = MS_NO_SPELL;
+ spell_type draco_breath = SPELL_NO_SPELL;
if (mons_genus( monster->type ) == MONS_DRACONIAN)
{
switch (draco_subspecies( monster ))
{
case MONS_BLACK_DRACONIAN:
- draco_breath = MS_LIGHTNING_BOLT;
+ draco_breath = SPELL_LIGHTNING_BOLT;
break;
case MONS_PALE_DRACONIAN:
- draco_breath = MS_STEAM_BALL;
+ draco_breath = SPELL_STEAM_BALL;
break;
case MONS_GREEN_DRACONIAN:
- draco_breath = MS_POISON_BLAST;
+ draco_breath = SPELL_POISONOUS_CLOUD;
break;
case MONS_PURPLE_DRACONIAN:
- draco_breath = MS_ORB_ENERGY;
+ draco_breath = SPELL_ISKENDERUNS_MYSTIC_BLAST;
break;
case MONS_MOTTLED_DRACONIAN:
- draco_breath = MS_STICKY_FLAME;
+ draco_breath = SPELL_STICKY_FLAME;
break;
case MONS_DRACONIAN:
@@ -2806,7 +2808,7 @@ static int get_draconian_breath_spell( struct monsters *monster )
}
- if (draco_breath != MS_NO_SPELL)
+ if (draco_breath != SPELL_NO_SPELL)
{
// [ds] Check line-of-fire here. It won't happen elsewhere.
bolt beem;
@@ -2815,7 +2817,7 @@ static int get_draconian_breath_spell( struct monsters *monster )
fire_tracer(monster, beem);
if (!mons_should_fire(beem))
- draco_breath = MS_NO_SPELL;
+ draco_breath = SPELL_NO_SPELL;
}
return (draco_breath);
@@ -2831,6 +2833,165 @@ static bool is_emergency_spell(const monster_spells &msp, int spell)
return (msp[5] == spell);
}
+static bool mons_announce_cast(monsters *monster, bool nearby,
+ spell_type spell_cast,
+ spell_type draco_breath)
+{
+ if (nearby) // handle monsters within range of player
+ {
+ if (monster->type == MONS_GERYON)
+ {
+ if (silenced(monster->x, monster->y))
+ return (false);
+
+ simple_monster_message( monster, " winds a great silver horn.",
+ MSGCH_MONSTER_SPELL );
+ }
+ else if (mons_is_demon( monster->type ))
+ {
+ simple_monster_message( monster, " gestures.",
+ MSGCH_MONSTER_SPELL );
+ }
+ else
+ {
+ switch (monster->type)
+ {
+ default:
+ if (spell_cast == draco_breath)
+ {
+ if (!simple_monster_message(monster, " breathes.",
+ MSGCH_MONSTER_SPELL))
+ {
+ if (!silenced(monster->x, monster->y)
+ && !silenced(you.x_pos, you.y_pos))
+ {
+ mpr("You hear a roar.", MSGCH_SOUND);
+ }
+ }
+ break;
+ }
+
+ if (silenced(monster->x, monster->y))
+ return (false);
+
+ if (mons_class_flag(monster->type, M_PRIEST))
+ {
+ switch (random2(3))
+ {
+ case 0:
+ simple_monster_message( monster,
+ " prays.",
+ MSGCH_MONSTER_SPELL );
+ break;
+ case 1:
+ simple_monster_message( monster,
+ " mumbles some strange prayers.",
+ MSGCH_MONSTER_SPELL );
+ break;
+ case 2:
+ default:
+ simple_monster_message( monster,
+ " utters an invocation.",
+ MSGCH_MONSTER_SPELL );
+ break;
+ }
+ }
+ else
+ {
+ switch (random2(3))
+ {
+ case 0:
+ // XXX: could be better, chosen to match the
+ // ones in monspeak.cc... has the problem
+ // that it doesn't suggest a vocal component. -- bwr
+ if (player_monster_visible(monster))
+ simple_monster_message( monster,
+ " gestures wildly.",
+ MSGCH_MONSTER_SPELL );
+ break;
+ case 1:
+ simple_monster_message( monster,
+ " mumbles some strange words.",
+ MSGCH_MONSTER_SPELL );
+ break;
+ case 2:
+ default:
+ simple_monster_message( monster,
+ " casts a spell.",
+ MSGCH_MONSTER_SPELL );
+ break;
+ }
+ }
+ break;
+
+ case MONS_BALL_LIGHTNING:
+ monster->hit_points = -1;
+ break;
+
+ case MONS_STEAM_DRAGON:
+ case MONS_MOTTLED_DRAGON:
+ case MONS_STORM_DRAGON:
+ case MONS_GOLDEN_DRAGON:
+ case MONS_SHADOW_DRAGON:
+ case MONS_SWAMP_DRAGON:
+ case MONS_SWAMP_DRAKE:
+ case MONS_DEATH_DRAKE:
+ case MONS_HELL_HOG:
+ case MONS_SERPENT_OF_HELL:
+ case MONS_QUICKSILVER_DRAGON:
+ case MONS_IRON_DRAGON:
+ if (!simple_monster_message(monster, " breathes.",
+ MSGCH_MONSTER_SPELL))
+ {
+ if (!silenced(monster->x, monster->y)
+ && !silenced(you.x_pos, you.y_pos))
+ {
+ mpr("You hear a roar.", MSGCH_SOUND);
+ }
+ }
+ break;
+
+ case MONS_VAPOUR:
+ monster->add_ench(ENCH_SUBMERGED);
+ break;
+
+ case MONS_BRAIN_WORM:
+ case MONS_ELECTRIC_GOLEM:
+ case MONS_ICE_STATUE:
+ // These don't show any signs that they're casting a spell.
+ break;
+
+ case MONS_GREAT_ORB_OF_EYES:
+ case MONS_SHINING_EYE:
+ case MONS_EYE_OF_DEVASTATION:
+ simple_monster_message(monster, " gazes.", MSGCH_MONSTER_SPELL);
+ break;
+
+ case MONS_GIANT_ORANGE_BRAIN:
+ simple_monster_message(monster, " pulsates.",
+ MSGCH_MONSTER_SPELL);
+ break;
+
+ case MONS_NAGA:
+ case MONS_NAGA_WARRIOR:
+ simple_monster_message(monster, " spits poison.",
+ MSGCH_MONSTER_SPELL);
+ break;
+ }
+ }
+ }
+ else // handle far-away monsters
+ {
+ if (monster->type == MONS_GERYON
+ && !silenced(you.x_pos, you.y_pos))
+ {
+ mpr("You hear a weird and mournful sound.", MSGCH_SOUND);
+ }
+ }
+
+ return (true);
+}
+
//---------------------------------------------------------------
//
// handle_spell
@@ -2843,12 +3004,12 @@ static bool handle_spell( monsters *monster, bolt & beem )
{
bool monsterNearby = mons_near(monster);
bool finalAnswer = false; // as in: "Is that your...?" {dlb}
- const int draco_breath = get_draconian_breath_spell(monster);
+ const spell_type draco_breath = get_draconian_breath_spell(monster);
// yes, there is a logic to this ordering {dlb}:
if (monster->behaviour == BEH_SLEEP
|| (!mons_class_flag(monster->type, M_SPELLCASTER)
- && draco_breath == MS_NO_SPELL)
+ && draco_breath == SPELL_NO_SPELL)
|| monster->has_ench(ENCH_SUBMERGED))
{
return (false);
@@ -2878,23 +3039,23 @@ static bool handle_spell( monsters *monster, bolt & beem )
}
else
{
- int spell_cast = MS_NO_SPELL;
+ spell_type spell_cast = SPELL_NO_SPELL;
monster_spells hspell_pass = monster->spells;
// forces the casting of dig when player not visible - this is EVIL!
if (!monsterNearby)
{
- if (hspell_pass[4] == MS_DIG && monster->behaviour == BEH_SEEK)
+ if (hspell_pass[4] == SPELL_DIG && monster->behaviour == BEH_SEEK)
{
- spell_cast = MS_DIG;
+ spell_cast = SPELL_DIG;
finalAnswer = true;
}
- else if (hspell_pass[2] == MS_HEAL
+ else if (hspell_pass[2] == SPELL_LESSER_HEALING
&& monster->hit_points < monster->max_hit_points)
{
// The player's out of sight!
// Quick, let's take a turn to heal ourselves. -- bwr
- spell_cast = MS_HEAL;
+ spell_cast = SPELL_LESSER_HEALING;
finalAnswer = true;
}
else if (monster->behaviour == BEH_FLEE)
@@ -2943,25 +3104,25 @@ static bool handle_spell( monsters *monster, bolt & beem )
if (!finalAnswer)
{
// should monster not have selected dig by now, it never will:
- if (hspell_pass[4] == MS_DIG)
- hspell_pass[4] = MS_NO_SPELL;
+ if (hspell_pass[4] == SPELL_DIG)
+ hspell_pass[4] = SPELL_NO_SPELL;
// remove healing/invis/haste if we don't need them
int num_no_spell = 0;
for (int i = 0; i < 6; i++)
{
- if (hspell_pass[i] == MS_NO_SPELL)
+ if (hspell_pass[i] == SPELL_NO_SPELL)
num_no_spell++;
else if (ms_waste_of_time( monster, hspell_pass[i] ))
{
- hspell_pass[i] = MS_NO_SPELL;
+ hspell_pass[i] = SPELL_NO_SPELL;
num_no_spell++;
}
}
// If no useful spells... cast no spell.
- if (num_no_spell == 6 && draco_breath == MS_NO_SPELL)
+ if (num_no_spell == 6 && draco_breath == SPELL_NO_SPELL)
return (false);
// up to four tries to pick a spell.
@@ -2973,7 +3134,7 @@ static bool handle_spell( monsters *monster, bolt & beem )
// choose their emergency spell.
if (monster->behaviour == BEH_FLEE)
{
- spell_cast = (one_chance_in(5) ? MS_NO_SPELL
+ spell_cast = (one_chance_in(5) ? SPELL_NO_SPELL
: hspell_pass[5]);
}
else
@@ -2982,7 +3143,7 @@ static bool handle_spell( monsters *monster, bolt & beem )
spell_cast = hspell_pass[random2(5)];
}
- if (spell_cast == MS_NO_SPELL)
+ if (spell_cast == SPELL_NO_SPELL)
continue;
// setup the spell
@@ -3028,17 +3189,17 @@ static bool handle_spell( monsters *monster, bolt & beem )
// if not okay, then maybe we'll cast a defensive spell
if (!spellOK)
- spell_cast = (coinflip() ? hspell_pass[2] : MS_NO_SPELL);
+ spell_cast = (coinflip() ? hspell_pass[2] : SPELL_NO_SPELL);
- if (spell_cast != MS_NO_SPELL)
+ if (spell_cast != SPELL_NO_SPELL)
break;
}
}
// If there's otherwise no ranged attack use the breath weapon.
// The breath weapon is also occasionally used.
- if (draco_breath != MS_NO_SPELL
- && (spell_cast == MS_NO_SPELL
+ if (draco_breath != SPELL_NO_SPELL
+ && (spell_cast == SPELL_NO_SPELL
|| (!is_emergency_spell(hspell_pass, spell_cast)
&& one_chance_in(4))))
{
@@ -3047,169 +3208,22 @@ static bool handle_spell( monsters *monster, bolt & beem )
}
// should the monster *still* not have a spell, well, too bad {dlb}:
- if (spell_cast == MS_NO_SPELL)
+ if (spell_cast == SPELL_NO_SPELL)
return (false);
// Try to animate dead: if nothing rises, pretend we didn't cast it
- if (spell_cast == MS_ANIMATE_DEAD
+ if (spell_cast == SPELL_ANIMATE_DEAD
&& !animate_dead( 100, SAME_ATTITUDE(monster), monster->foe, 0 ))
{
return (false);
}
- if (monsterNearby) // handle monsters within range of player
- {
- if (monster->type == MONS_GERYON)
- {
- if (silenced(monster->x, monster->y))
- return (false);
-
- simple_monster_message( monster, " winds a great silver horn.",
- MSGCH_MONSTER_SPELL );
- }
- else if (mons_is_demon( monster->type ))
- {
- simple_monster_message( monster, " gestures.",
- MSGCH_MONSTER_SPELL );
- }
- else
- {
- switch (monster->type)
- {
- default:
- if (spell_cast == draco_breath)
- {
- if (!simple_monster_message(monster, " breathes.",
- MSGCH_MONSTER_SPELL))
- {
- if (!silenced(monster->x, monster->y)
- && !silenced(you.x_pos, you.y_pos))
- {
- mpr("You hear a roar.", MSGCH_SOUND);
- }
- }
- break;
- }
-
- if (silenced(monster->x, monster->y))
- return (false);
-
- if (mons_class_flag(monster->type, M_PRIEST))
- {
- switch (random2(3))
- {
- case 0:
- simple_monster_message( monster,
- " prays.",
- MSGCH_MONSTER_SPELL );
- break;
- case 1:
- simple_monster_message( monster,
- " mumbles some strange prayers.",
- MSGCH_MONSTER_SPELL );
- break;
- case 2:
- default:
- simple_monster_message( monster,
- " utters an invocation.",
- MSGCH_MONSTER_SPELL );
- break;
- }
- }
- else
- {
- switch (random2(3))
- {
- case 0:
- // XXX: could be better, chosen to match the
- // ones in monspeak.cc... has the problem
- // that it doesn't suggest a vocal component. -- bwr
- if (player_monster_visible(monster))
- simple_monster_message( monster,
- " gestures wildly.",
- MSGCH_MONSTER_SPELL );
- break;
- case 1:
- simple_monster_message( monster,
- " mumbles some strange words.",
- MSGCH_MONSTER_SPELL );
- break;
- case 2:
- default:
- simple_monster_message( monster,
- " casts a spell.",
- MSGCH_MONSTER_SPELL );
- break;
- }
- }
- break;
-
- case MONS_BALL_LIGHTNING:
- monster->hit_points = -1;
- break;
-
- case MONS_STEAM_DRAGON:
- case MONS_MOTTLED_DRAGON:
- case MONS_STORM_DRAGON:
- case MONS_GOLDEN_DRAGON:
- case MONS_SHADOW_DRAGON:
- case MONS_SWAMP_DRAGON:
- case MONS_SWAMP_DRAKE:
- case MONS_DEATH_DRAKE:
- case MONS_HELL_HOG:
- case MONS_SERPENT_OF_HELL:
- case MONS_QUICKSILVER_DRAGON:
- case MONS_IRON_DRAGON:
- if (!simple_monster_message(monster, " breathes.",
- MSGCH_MONSTER_SPELL))
- {
- if (!silenced(monster->x, monster->y)
- && !silenced(you.x_pos, you.y_pos))
- {
- mpr("You hear a roar.", MSGCH_SOUND);
- }
- }
- break;
-
- case MONS_VAPOUR:
- monster->add_ench(ENCH_SUBMERGED);
- break;
-
- case MONS_BRAIN_WORM:
- case MONS_ELECTRIC_GOLEM:
- // These don't show any signs that they're casting a spell.
- break;
-
- case MONS_GREAT_ORB_OF_EYES:
- case MONS_SHINING_EYE:
- case MONS_EYE_OF_DEVASTATION:
- simple_monster_message(monster, " gazes.", MSGCH_MONSTER_SPELL);
- break;
-
- case MONS_GIANT_ORANGE_BRAIN:
- simple_monster_message(monster, " pulsates.",
- MSGCH_MONSTER_SPELL);
- break;
-
- case MONS_NAGA:
- case MONS_NAGA_WARRIOR:
- simple_monster_message(monster, " spits poison.",
- MSGCH_MONSTER_SPELL);
- break;
- }
- }
- }
- else // handle far-away monsters
- {
- if (monster->type == MONS_GERYON
- && !silenced(you.x_pos, you.y_pos))
- {
- mpr("You hear a weird and mournful sound.", MSGCH_SOUND);
- }
- }
-
+ if (!mons_announce_cast(monster, monsterNearby,
+ spell_cast, draco_breath))
+ return (false);
+
// FINALLY! determine primary spell effects {dlb}:
- if (spell_cast == MS_BLINK)
+ if (spell_cast == SPELL_BLINK)
{
// why only cast blink if nearby? {dlb}
if (monsterNearby)
@@ -5178,46 +5192,46 @@ static int map_wand_to_mspell(int wand_type)
switch (wand_type)
{
case WAND_FLAME:
- mzap = MS_FLAME;
+ mzap = SPELL_THROW_FLAME;
break;
case WAND_FROST:
- mzap = MS_FROST;
+ mzap = SPELL_THROW_FROST;
break;
case WAND_SLOWING:
- mzap = MS_SLOW;
+ mzap = SPELL_SLOW;
break;
case WAND_HASTING:
- mzap = MS_HASTE;
+ mzap = SPELL_HASTE;
break;
case WAND_MAGIC_DARTS:
- mzap = MS_MMISSILE;
+ mzap = SPELL_MAGIC_DART;
break;
case WAND_HEALING:
- mzap = MS_HEAL;
+ mzap = SPELL_LESSER_HEALING;
break;
case WAND_PARALYSIS:
- mzap = MS_PARALYSIS;
+ mzap = SPELL_PARALYSE;
break;
case WAND_FIRE:
- mzap = MS_FIRE_BOLT;
+ mzap = SPELL_BOLT_OF_FIRE;
break;
case WAND_COLD:
- mzap = MS_COLD_BOLT;
+ mzap = SPELL_BOLT_OF_COLD;
break;
case WAND_CONFUSION:
- mzap = MS_CONFUSE;
+ mzap = SPELL_CONFUSE;
break;
case WAND_INVISIBILITY:
- mzap = MS_INVIS;
+ mzap = SPELL_INVISIBILITY;
break;
case WAND_TELEPORTATION:
- mzap = MS_TELEPORT_OTHER;
+ mzap = SPELL_TELEPORT_OTHER;
break;
case WAND_LIGHTNING:
- mzap = MS_LIGHTNING_BOLT;
+ mzap = SPELL_LIGHTNING_BOLT;
break;
case WAND_DRAINING:
- mzap = MS_NEGATIVE_BOLT;
+ mzap = SPELL_BOLT_OF_DRAINING;
break;
default:
mzap = 0;
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc
index 618cbdeb28..2e0dd8fd9d 100644
--- a/crawl-ref/source/mstuff2.cc
+++ b/crawl-ref/source/mstuff2.cc
@@ -43,7 +43,7 @@
#include "stuff.h"
#include "view.h"
-static unsigned char monster_abjuration(int pow, bool test);
+static int monster_abjuration(bool friendly, int pow, bool test);
// XXX: must fix species abils to not use duration 15
// -- ummm ... who wrote this? {dlb}
@@ -329,7 +329,69 @@ void mons_trap(struct monsters *monster)
return;
} // end mons_trap()
-void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
+static bool mons_abjured(monsters *monster, bool nearby)
+{
+ const bool friendly = mons_friendly(monster);
+ if (nearby && monster_abjuration(friendly, 1, true) > 0
+ && coinflip())
+ {
+ monster_abjuration( friendly, monster->hit_dice * 10, false );
+ return (true);
+ }
+
+ return (false);
+}
+
+static monster_type pick_random_wraith()
+{
+ static monster_type wraiths[] =
+ {
+ MONS_WRAITH, MONS_FREEZING_WRAITH, MONS_SHADOW_WRAITH
+ };
+
+ return wraiths[ random2(sizeof(wraiths) / sizeof(*wraiths)) ];
+}
+
+static monster_type pick_horrible_thing()
+{
+ return (one_chance_in(4)? MONS_TENTACLED_MONSTROSITY
+ : MONS_ABOMINATION_LARGE);
+}
+
+static monster_type pick_undead_summon()
+{
+ int summonik = MONS_PROGRAM_BUG;
+
+ // FIXME: This is ridiculous.
+ do
+ {
+ summonik = random2(241); // hmmmm ... {dlb}
+ }
+ while (mons_class_holiness(summonik) != MH_UNDEAD);
+
+ return static_cast<monster_type>(summonik);
+}
+
+static void do_high_level_summon(monsters *monster, bool monsterNearby,
+ monster_type (*mpicker)(),
+ int nsummons)
+{
+ if (mons_abjured(monster, monsterNearby))
+ return;
+
+ const int duration = cap_int(2 + monster->hit_dice / 5, 6);
+ for (int i = 0; i < nsummons; ++i)
+ {
+ const monster_type which_mons = mpicker();
+ if (which_mons == MONS_PROGRAM_BUG)
+ continue;
+ create_monster( which_mons, duration,
+ SAME_ATTITUDE(monster), monster->x, monster->y,
+ monster->foe, 250 );
+ }
+}
+
+void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast)
{
// always do setup. It might be done already, but it doesn't
// hurt to do it again (cheap).
@@ -340,7 +402,6 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
int sumcount = 0;
int sumcount2;
- int summonik = 0;
int duration = 0;
#if DEBUG_DIAGNOSTICS
@@ -350,8 +411,8 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
mpr( info, MSGCH_DIAGNOSTICS );
#endif
- if (spell_cast == MS_HELLFIRE_BURST || spell_cast == MS_BRAIN_FEED
- || spell_cast == MS_SMITE || spell_cast == MS_MUTATION)
+ if (spell_cast == SPELL_HELLFIRE_BURST || spell_cast == SPELL_BRAIN_FEED
+ || spell_cast == SPELL_SMITING)
{ // etc.
if (monster->foe == MHITYOU || monster->foe == MHITNOT)
{
@@ -366,13 +427,16 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
switch (spell_cast)
{
- case MS_BERSERK_RAGE:
+ default:
+ break;
+
+ case SPELL_BERSERKER_RAGE:
monster->go_berserk(true);
return;
- case MS_SUMMON_SMALL_MAMMALS:
- case MS_VAMPIRE_SUMMON:
- if ( spell_cast == MS_SUMMON_SMALL_MAMMALS )
+ case SPELL_SUMMON_SMALL_MAMMAL:
+ case SPELL_VAMPIRE_SUMMON:
+ if ( spell_cast == SPELL_SUMMON_SMALL_MAMMAL )
sumcount2 = 1 + random2(4);
else
sumcount2 = 3 + random2(3) + monster->hit_dice / 5;
@@ -409,13 +473,9 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
}
return;
- case MS_LEVEL_SUMMON: // summon anything appropriate for level
- if (!mons_friendly(monster) && monsterNearby
- && monster_abjuration(1, true) > 0 && coinflip())
- {
- monster_abjuration( monster->hit_dice * 10, false );
+ case SPELL_SHADOW_CREATURES: // summon anything appropriate for level
+ if (mons_abjured(monster, monsterNearby))
return;
- }
sumcount2 = 1 + random2(4) + random2( monster->hit_dice / 7 + 1 );
@@ -426,7 +486,7 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
}
return;
- case MS_FAKE_RAKSHASA_SUMMON:
+ case SPELL_FAKE_RAKSHASA_SUMMON:
sumcount2 = (coinflip() ? 2 : 3);
for (sumcount = 0; sumcount < sumcount2; sumcount++)
@@ -437,13 +497,9 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
}
return;
- case MS_SUMMON_DEMON: // class 2-4 demons
- if (!mons_friendly(monster) && monsterNearby
- && monster_abjuration(1, true) > 0 && coinflip())
- {
- monster_abjuration(monster->hit_dice * 10, false);
+ case SPELL_SUMMON_DEMON: // class 2-4 demons
+ if (mons_abjured(monster, monsterNearby))
return;
- }
sumcount2 = 1 + random2(2) + random2( monster->hit_dice / 10 + 1 );
@@ -456,12 +512,12 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
}
return;
- case MS_ANIMATE_DEAD:
+ case SPELL_ANIMATE_DEAD:
// see special handling in monstuff::handle_spell {dlb}
animate_dead( 5 + random2(5), SAME_ATTITUDE(monster), monster->foe, 1 );
return;
- case MS_SUMMON_DEMON_LESSER: // class 5 demons
+ case SPELL_CALL_IMP: // class 5 demons
sumcount2 = 1 + random2(3) + random2( monster->hit_dice / 5 + 1 );
duration = cap_int(2 + monster->hit_dice / 5, 6);
@@ -473,7 +529,7 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
}
return;
- case MS_SUMMON_UFETUBUS:
+ case SPELL_SUMMON_UFETUBUS:
sumcount2 = 2 + random2(2) + random2( monster->hit_dice / 5 + 1 );
duration = cap_int(2 + monster->hit_dice / 5, 6);
@@ -485,19 +541,20 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
}
return;
- case MS_SUMMON_BEAST: // Geryon
+ case SPELL_SUMMON_BEAST: // Geryon
create_monster( MONS_BEAST, 4, SAME_ATTITUDE(monster),
monster->x, monster->y, monster->foe, 250 );
return;
- case MS_SUMMON_MUSHROOMS: // Summon swarms of icky crawling fungi.
- if (!mons_friendly(monster) && monsterNearby
- && monster_abjuration(1, true) > 0 && coinflip())
- {
- monster_abjuration( monster->hit_dice * 10, false );
- return;
- }
+ case SPELL_SUMMON_ICE_BEAST:
+ create_monster( MONS_ICE_BEAST, 5, SAME_ATTITUDE(monster),
+ monster->x, monster->y, monster->foe, 250 );
+ return;
+ case SPELL_SUMMON_MUSHROOMS: // Summon swarms of icky crawling fungi.
+ if (mons_abjured(monster, monsterNearby))
+ return;
+
sumcount2 = 1 + random2(2) + random2( monster->hit_dice / 4 + 1 );
duration = cap_int(2 + monster->hit_dice / 5, 6);
@@ -509,31 +566,23 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
250);
return;
- case MS_SUMMON_UNDEAD: // summon undead around player
- if (!mons_friendly(monster) && monsterNearby
- && monster_abjuration(1, true) > 0 && coinflip())
- {
- monster_abjuration( monster->hit_dice * 10, false );
- return;
- }
-
- sumcount2 = 2 + random2(2) + random2( monster->hit_dice / 4 + 1 );
+ case SPELL_SUMMON_WRAITHS:
+ do_high_level_summon(monster, monsterNearby, pick_random_wraith,
+ random_range(3, 6));
+ return;
- duration = cap_int(2 + monster->hit_dice / 5, 6);
- for (sumcount = 0; sumcount < sumcount2; sumcount++)
- {
- do
- {
- summonik = random2(241); // hmmmm ... {dlb}
- }
- while (mons_class_holiness(summonik) != MH_UNDEAD);
+ case SPELL_SUMMON_HORRIBLE_THINGS:
+ do_high_level_summon(monster, monsterNearby, pick_horrible_thing,
+ random_range(3, 5));
+ return;
- create_monster(summonik, duration, SAME_ATTITUDE(monster),
- monster->x, monster->y, monster->foe, 250);
- }
+ case SPELL_SUMMON_UNDEAD: // summon undead around player
+ do_high_level_summon(monster, monsterNearby, pick_undead_summon,
+ 2 + random2(2)
+ + random2( monster->hit_dice / 4 + 1 ));
return;
- case MS_TORMENT:
+ case SPELL_SYMBOL_OF_TORMENT:
if (!monsterNearby || mons_friendly(monster))
return;
@@ -542,13 +591,9 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
torment(monster_index(monster), monster->x, monster->y);
return;
- case MS_SUMMON_DEMON_GREATER:
- if (!mons_friendly(monster) && !monsterNearby &&
- monster_abjuration(1, true) > 0 && coinflip())
- {
- monster_abjuration(monster->hit_dice * 10, false);
+ case SPELL_SUMMON_GREATER_DEMON:
+ if (mons_abjured(monster, monsterNearby))
return;
- }
sumcount2 = 1 + random2( monster->hit_dice / 10 + 1 );
@@ -562,13 +607,9 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
return;
// Journey -- Added in Summon Lizards and Draconian
- case MS_SUMMON_DRAKES:
- if (!mons_friendly( monster ) && !monsterNearby &&
- monster_abjuration( 1, true ) > 0 && coinflip())
- {
- monster_abjuration( monster->hit_dice * 10, false );
+ case SPELL_SUMMON_DRAKES:
+ if (mons_abjured(monster, monsterNearby))
return;
- }
sumcount2 = 1 + random2(3) + random2( monster->hit_dice / 5 + 1 );
@@ -598,7 +639,7 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
}
break;
- case MS_CANTRIP:
+ case SPELL_CANTRIP:
{
const bool friendly = mons_friendly(monster);
bool need_friendly_stub = false;
@@ -665,7 +706,7 @@ void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
*
*/
-void setup_mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast)
+void setup_mons_cast(const monsters *monster, struct bolt &pbolt, int spell_cast)
{
// always set these -- used by things other than fire_beam()
@@ -674,32 +715,29 @@ void setup_mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cas
// squashed.
pbolt.ench_power = 4 * monster->hit_dice;
- if (spell_cast == MS_TELEPORT)
+ if (spell_cast == SPELL_TELEPORT_SELF)
pbolt.ench_power = 2000;
- else if (spell_cast == MS_PAIN) // this is cast by low HD monsters
+ else if (spell_cast == SPELL_PAIN) // this is cast by low HD monsters
pbolt.ench_power *= 2;
pbolt.beam_source = monster_index(monster);
// set bolt type
- if (spell_cast == MS_HELLFIRE_BURST
- || spell_cast == MS_BRAIN_FEED
- || spell_cast == MS_SMITE || spell_cast == MS_MUTATION)
+ if (spell_cast == SPELL_HELLFIRE_BURST
+ || spell_cast == SPELL_BRAIN_FEED
+ || spell_cast == SPELL_SMITING)
{ // etc.
switch (spell_cast)
{
- case MS_HELLFIRE_BURST:
+ case SPELL_HELLFIRE_BURST:
pbolt.type = DMNBM_HELLFIRE;
break;
- case MS_BRAIN_FEED:
+ case SPELL_BRAIN_FEED:
pbolt.type = DMNBM_BRAIN_FEED;
break;
- case MS_SMITE:
+ case SPELL_SMITING:
pbolt.type = DMNBM_SMITING;
break;
- case MS_MUTATION:
- pbolt.type = DMNBM_MUTATION;
- break;
}
return;
}
@@ -708,23 +746,25 @@ void setup_mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cas
// fire_tracer, or beam.
switch (spell_cast)
{
- case MS_SUMMON_SMALL_MAMMALS:
- case MS_VAMPIRE_SUMMON:
- case MS_LEVEL_SUMMON: // summon anything appropriate for level
- case MS_FAKE_RAKSHASA_SUMMON:
- case MS_SUMMON_DEMON:
- case MS_ANIMATE_DEAD:
- case MS_SUMMON_DEMON_LESSER:
- case MS_SUMMON_UFETUBUS:
- case MS_SUMMON_BEAST: // Geryon
- case MS_SUMMON_UNDEAD: // summon undead around player
- case MS_SUMMON_MUSHROOMS:
- case MS_SUMMON_DRAKES:
- case MS_TORMENT:
- case MS_SUMMON_DEMON_GREATER:
- case MS_CANTRIP:
- case MS_BERSERK_RAGE:
- case MS_MIGHT:
+ case SPELL_SUMMON_SMALL_MAMMAL:
+ case SPELL_VAMPIRE_SUMMON:
+ case SPELL_SHADOW_CREATURES: // summon anything appropriate for level
+ case SPELL_FAKE_RAKSHASA_SUMMON:
+ case SPELL_SUMMON_DEMON:
+ case SPELL_ANIMATE_DEAD:
+ case SPELL_CALL_IMP:
+ case SPELL_SUMMON_UFETUBUS:
+ case SPELL_SUMMON_BEAST: // Geryon
+ case SPELL_SUMMON_UNDEAD: // summon undead around player
+ case SPELL_SUMMON_ICE_BEAST:
+ case SPELL_SUMMON_MUSHROOMS:
+ case SPELL_SUMMON_DRAKES:
+ case SPELL_SUMMON_HORRIBLE_THINGS:
+ case SPELL_SUMMON_WRAITHS:
+ case SPELL_SYMBOL_OF_TORMENT:
+ case SPELL_SUMMON_GREATER_DEMON:
+ case SPELL_CANTRIP:
+ case SPELL_BERSERKER_RAGE:
return;
default:
break;
@@ -733,7 +773,7 @@ void setup_mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cas
// Need to correct this for power of spellcaster
int power = 12 * monster->hit_dice;
- struct bolt theBeam = mons_spells(spell_cast, power);
+ bolt theBeam = mons_spells(spell_cast, power);
pbolt.colour = theBeam.colour;
pbolt.range = theBeam.range;
@@ -758,9 +798,10 @@ void setup_mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cas
else
pbolt.aux_source.clear();
- if (spell_cast == MS_HASTE
- || spell_cast == MS_INVIS
- || spell_cast == MS_HEAL || spell_cast == MS_TELEPORT)
+ if (spell_cast == SPELL_HASTE
+ || spell_cast == SPELL_INVISIBILITY
+ || spell_cast == SPELL_LESSER_HEALING
+ || spell_cast == SPELL_TELEPORT_SELF)
{
pbolt.target_x = monster->x;
pbolt.target_y = monster->y;
@@ -1319,7 +1360,7 @@ bolt mons_spells( int spell_cast, int power )
switch (spell_cast)
{
- case MS_MMISSILE:
+ case SPELL_MAGIC_DART:
beam.colour = LIGHTMAGENTA; //inv_colour [throw_2];
beam.name = "magic dart"; // inv_name [throw_2]);
beam.range = 6;
@@ -1332,7 +1373,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_FLAME:
+ case SPELL_THROW_FLAME:
beam.colour = RED;
beam.name = "puff of flame";
beam.range = 6;
@@ -1350,14 +1391,14 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_FROST:
+ case SPELL_THROW_FROST:
beam.colour = WHITE;
beam.name = "puff of frost";
beam.range = 6;
beam.rangeMax = 10;
// should this be the same as magic missile?
- // see MS_FLAME -- bwr
+ // see SPELL_FLAME -- bwr
beam.damage = dice_def( 3, 5 + (power / 40) );
beam.hit = 25 + power / 40;
@@ -1367,7 +1408,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_PARALYSIS:
+ case SPELL_PARALYSE:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1377,7 +1418,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_SLOW:
+ case SPELL_SLOW:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1387,7 +1428,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_HASTE: // (self)
+ case SPELL_HASTE: // (self)
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1397,7 +1438,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_CONFUSE:
+ case SPELL_CONFUSE:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1407,7 +1448,17 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_VENOM_BOLT:
+ case SPELL_POLYMORPH_OTHER:
+ beam.name = "0";
+ beam.range = 6;
+ beam.rangeMax = 9;
+ beam.type = 0;
+ beam.flavour = BEAM_POLYMORPH;
+ beam.thrower = KILL_MON_MISSILE;
+ beam.is_beam = true;
+ break;
+
+ case SPELL_VENOM_BOLT:
beam.name = "bolt of poison";
beam.range = 7;
beam.rangeMax = 16;
@@ -1420,7 +1471,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_POISON_ARROW:
+ case SPELL_POISON_ARROW:
beam.name = "poison arrow";
beam.damage = dice_def( 3, 7 + power / 12 );
beam.colour = LIGHTGREEN;
@@ -1431,7 +1482,7 @@ bolt mons_spells( int spell_cast, int power )
beam.range = beam.rangeMax = 8;
break;
- case MS_MAGMA:
+ case SPELL_BOLT_OF_MAGMA:
beam.name = "bolt of magma";
beam.range = 5;
beam.rangeMax = 13;
@@ -1444,7 +1495,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_FIRE_BOLT:
+ case SPELL_BOLT_OF_FIRE:
beam.name = "bolt of fire";
beam.range = 5;
beam.rangeMax = 13;
@@ -1457,7 +1508,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_ICE_BOLT:
+ case SPELL_ICE_BOLT:
beam.name = "bolt of ice";
beam.range = 5;
beam.rangeMax = 13;
@@ -1470,7 +1521,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_COLD_BOLT:
+ case SPELL_BOLT_OF_COLD:
beam.name = "bolt of cold";
beam.range = 5;
beam.rangeMax = 13;
@@ -1483,7 +1534,21 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_SHOCK:
+ case SPELL_FREEZING_CLOUD:
+ beam.name = "freezing blast";
+ beam.range = 5;
+ beam.rangeMax = 12;
+ beam.damage = dice_def( 2, 9 + power / 11 );
+ beam.colour = WHITE;
+ beam.type = SYM_ZAP;
+ beam.thrower = KILL_MON;
+ beam.flavour = BEAM_COLD;
+ beam.hit = 17 + power / 25;
+ beam.is_beam = true;
+ beam.is_big_cloud = true;
+ break;
+
+ case SPELL_SHOCK:
beam.name = "zap";
beam.range = 8;
beam.rangeMax = 16;
@@ -1496,7 +1561,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_LIGHTNING_BOLT:
+ case SPELL_LIGHTNING_BOLT:
beam.name = "bolt of lightning";
beam.range = 7;
beam.rangeMax = 16;
@@ -1509,7 +1574,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_INVIS:
+ case SPELL_INVISIBILITY:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1519,7 +1584,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_FIREBALL:
+ case SPELL_FIREBALL:
beam.colour = RED;
beam.name = "fireball";
beam.range = 6;
@@ -1533,7 +1598,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_explosion = true;
break;
- case MS_HEAL:
+ case SPELL_LESSER_HEALING:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1544,7 +1609,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_TELEPORT:
+ case SPELL_TELEPORT_SELF:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1554,7 +1619,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_TELEPORT_OTHER:
+ case SPELL_TELEPORT_OTHER:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1564,11 +1629,11 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_BLINK:
+ case SPELL_BLINK:
beam.is_beam = false;
break;
- case MS_CRYSTAL_SPEAR: // was splinters
+ case SPELL_LEHUDIBS_CRYSTAL_SPEAR: // was splinters
beam.name = "crystal spear";
beam.range = 7;
beam.rangeMax = 16;
@@ -1581,7 +1646,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_DIG:
+ case SPELL_DIG:
beam.name = "0";
beam.range = 3;
beam.rangeMax = 7 + random2(power) / 10;
@@ -1591,7 +1656,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_NEGATIVE_BOLT: // negative energy
+ case SPELL_BOLT_OF_DRAINING: // negative energy
beam.name = "bolt of negative energy";
beam.range = 7;
beam.rangeMax = 16;
@@ -1606,7 +1671,7 @@ bolt mons_spells( int spell_cast, int power )
// 20, 21 are used
- case MS_ORB_ENERGY: // mystic blast
+ case SPELL_ISKENDERUNS_MYSTIC_BLAST: // mystic blast
beam.colour = LIGHTMAGENTA;
beam.name = "orb of energy";
beam.range = 6;
@@ -1621,7 +1686,7 @@ bolt mons_spells( int spell_cast, int power )
// 23 is brain feed
- case MS_STEAM_BALL:
+ case SPELL_STEAM_BALL:
beam.colour = LIGHTGREY;
beam.name = "ball of steam";
beam.range = 6;
@@ -1637,7 +1702,7 @@ bolt mons_spells( int spell_cast, int power )
// 27 is summon devils
// 28 is animate dead
- case MS_PAIN:
+ case SPELL_PAIN:
beam.name = "0";
beam.range = 7;
beam.rangeMax = 14;
@@ -1652,7 +1717,7 @@ bolt mons_spells( int spell_cast, int power )
// 30 is smiting
- case MS_STICKY_FLAME:
+ case SPELL_STICKY_FLAME:
beam.colour = RED;
beam.name = "sticky flame";
beam.range = 6;
@@ -1665,7 +1730,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_POISON_BLAST: // demon
+ case SPELL_POISONOUS_CLOUD: // demon
beam.name = "blast of poison";
beam.range = 7;
beam.rangeMax = 16;
@@ -1679,21 +1744,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_big_cloud = true;
break;
- case MS_PURPLE_BLAST: // purple bang thing
- beam.colour = LIGHTMAGENTA;
- beam.name = "orb of energy";
- beam.range = 6;
- beam.rangeMax = 10;
- beam.damage = dice_def( 3, 10 + power / 15 );
- beam.hit = 20 + power / 25;
- beam.type = SYM_ZAP;
- beam.thrower = KILL_MON_MISSILE;
- beam.flavour = BEAM_MMISSILE;
- beam.is_beam = false;
- beam.is_explosion = true;
- break;
-
- case MS_ENERGY_BOLT: // eye of devastation
+ case SPELL_ENERGY_BOLT: // eye of devastation
beam.colour = YELLOW;
beam.name = "bolt of energy";
beam.range = 9;
@@ -1706,7 +1757,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_STING: // sting
+ case SPELL_STING: // sting
beam.colour = GREEN;
beam.name = "sting";
beam.range = 8;
@@ -1719,7 +1770,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_IRON_BOLT:
+ case SPELL_BOLT_OF_IRON:
beam.colour = LIGHTCYAN;
beam.name = "iron bolt";
beam.range = 4;
@@ -1732,7 +1783,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_STONE_ARROW:
+ case SPELL_STONE_ARROW:
beam.colour = LIGHTGREY;
beam.name = "stone arrow";
beam.range = 8;
@@ -1745,7 +1796,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_POISON_SPLASH:
+ case SPELL_POISON_SPLASH:
beam.colour = GREEN;
beam.name = "splash of poison";
beam.range = 5;
@@ -1758,7 +1809,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_DISINTEGRATE:
+ case SPELL_DISINTEGRATE:
beam.name = "0";
beam.range = 7;
beam.rangeMax = 14;
@@ -1771,7 +1822,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_MARSH_GAS: // swamp drake
+ case SPELL_MEPHITIC_CLOUD: // swamp drake
beam.name = "foul vapour";
beam.range = 7;
beam.rangeMax = 16;
@@ -1785,7 +1836,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_big_cloud = true;
break;
- case MS_MIASMA: // death drake
+ case SPELL_MIASMA: // death drake
beam.name = "foul vapour";
beam.damage = dice_def( 3, 5 + power / 24 );
beam.colour = DARKGREY;
@@ -1798,7 +1849,7 @@ bolt mons_spells( int spell_cast, int power )
beam.range = beam.rangeMax = 8;
break;
- case MS_QUICKSILVER_BOLT: // Quicksilver dragon
+ case SPELL_QUICKSILVER_BOLT: // Quicksilver dragon
beam.colour = random_colour();
beam.name = "bolt of energy";
beam.range = 9;
@@ -1811,7 +1862,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = false;
break;
- case MS_HELLFIRE: // fiend's hellfire
+ case SPELL_HELLFIRE: // fiend's hellfire
beam.name = "hellfire";
beam.colour = RED;
beam.range = 4;
@@ -1825,7 +1876,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_explosion = true;
break;
- case MS_METAL_SPLINTERS:
+ case SPELL_METAL_SPLINTERS:
beam.name = "spray of metal splinters";
beam.range = 7;
beam.rangeMax = 16;
@@ -1838,7 +1889,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_BANISHMENT:
+ case SPELL_BANISHMENT:
beam.name = "0";
beam.range = 5;
beam.rangeMax = 9;
@@ -1848,7 +1899,7 @@ bolt mons_spells( int spell_cast, int power )
beam.is_beam = true;
break;
- case MS_BLINK_OTHER:
+ case SPELL_BLINK_OTHER:
beam.name = "0";
beam.type = 0;
beam.flavour = BEAM_BLINK;
@@ -1866,10 +1917,10 @@ bolt mons_spells( int spell_cast, int power )
return (beam);
} // end mons_spells()
-static unsigned char monster_abjuration(int pow, bool test)
+static int monster_abjuration(bool friendly, int pow, bool test)
{
- unsigned char result = 0;
- struct monsters *monster = 0; // NULL {dlb}
+ int result = 0;
+ monsters *monster = NULL;
if (!test)
mpr("Send 'em back where they came from!");
@@ -1885,10 +1936,10 @@ static unsigned char monster_abjuration(int pow, bool test)
{
monster = &menv[ab];
- if (monster->type == -1 || !mons_near(monster))
+ if (!monster->alive() || !mons_near(monster))
continue;
- if (!mons_friendly(monster))
+ if (friendly == mons_friendly(monster))
continue;
mon_enchant abjLevel = monster->get_ench(ENCH_ABJ);
diff --git a/crawl-ref/source/mstuff2.h b/crawl-ref/source/mstuff2.h
index d584406762..9f55d933ee 100644
--- a/crawl-ref/source/mstuff2.h
+++ b/crawl-ref/source/mstuff2.h
@@ -50,13 +50,13 @@ void setup_dragon(struct monsters *monster, struct bolt &pbolt);
/* ***********************************************************************
* called from: monstuff
* *********************************************************************** */
-void mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast);
+void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast);
// last updated 7jan2001 {gdl}
/* ***********************************************************************
* called from: monstuff
* *********************************************************************** */
-void setup_mons_cast(struct monsters *monster, struct bolt &pbolt, int spell_cast);
+void setup_mons_cast(const monsters *monster, bolt &pbolt, int spell_cast);
// last updated 28july2000 (gdl)
/* ***********************************************************************
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 196bf9e142..e61f3a944c 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -1872,7 +1872,7 @@ static void give_basic_spells(int which_job)
if (which_job == JOB_WANDERER)
return;
- unsigned char which_spell = SPELL_NO_SPELL;
+ spell_type which_spell = SPELL_NO_SPELL;
switch (which_job)
{
diff --git a/crawl-ref/source/notes.cc b/crawl-ref/source/notes.cc
index 425e00e719..fc02d9d0a1 100644
--- a/crawl-ref/source/notes.cc
+++ b/crawl-ref/source/notes.cc
@@ -162,8 +162,11 @@ static bool is_noteworthy( const Note& note )
return false;
break;
case NOTE_LEARN_SPELL:
- if (spell_difficulty(rnote.first) >= spell_difficulty(note.first))
+ if (spell_difficulty(static_cast<spell_type>(rnote.first)) >=
+ spell_difficulty(static_cast<spell_type>(note.first)))
+ {
return false;
+ }
break;
case NOTE_GOD_POWER:
if ( rnote.first == note.first && rnote.second == note.second )
@@ -253,7 +256,8 @@ std::string Note::describe( bool when, bool where, bool what ) const
break;
case NOTE_LEARN_SPELL:
snprintf(buf, sizeof buf, "Learned a level %d spell: %s",
- spell_difficulty(first), spell_title(first));
+ spell_difficulty(static_cast<spell_type>(first)),
+ spell_title(static_cast<spell_type>(first)));
break;
case NOTE_GET_GOD:
snprintf(buf, sizeof buf, "Became a worshipper of %s",
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 7d450a8f7d..d63c7b3c55 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -82,7 +82,7 @@ bool cast_selective_amnesia(bool force)
}
// actual handling begins here {dlb}:
- const int spell = get_spell_by_letter( keyin );
+ const spell_type spell = get_spell_by_letter( keyin );
const int slot = get_spell_slot_by_letter( keyin );
if (spell == SPELL_NO_SPELL)
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 2f850333c0..566d361ee9 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -40,10 +40,10 @@
#include "spl-util.h"
#include "stuff.h"
-static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
+static spell_type spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
{
// 0 - Minor Magic I
- {0,
+ {SPELL_NO_SPELL,
SPELL_MAGIC_DART,
SPELL_SUMMON_SMALL_MAMMAL,
SPELL_THROW_FLAME,
@@ -54,7 +54,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 1 - Minor Magic II
- {0,
+ {SPELL_NO_SPELL,
SPELL_MAGIC_DART,
SPELL_THROW_FROST,
SPELL_BLINK,
@@ -65,7 +65,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 2 - Minor Magic III
- {0,
+ {SPELL_NO_SPELL,
SPELL_MAGIC_DART,
SPELL_SUMMON_SMALL_MAMMAL,
SPELL_BLINK,
@@ -76,7 +76,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 3 - Book of Conjurations I - Fire and Earth
- {0,
+ {SPELL_NO_SPELL,
SPELL_MAGIC_DART,
SPELL_THROW_FLAME,
SPELL_STONE_ARROW,
@@ -87,7 +87,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 4 - Book of Conjurations II - Air and Ice
- {0,
+ {SPELL_NO_SPELL,
SPELL_MAGIC_DART,
SPELL_THROW_FROST,
SPELL_MEPHITIC_CLOUD,
@@ -98,7 +98,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 5 - Book of Flames
- {0,
+ {SPELL_NO_SPELL,
SPELL_FLAME_TONGUE,
SPELL_THROW_FLAME,
SPELL_CONJURE_FLAME,
@@ -109,7 +109,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 6 - Book of Frost
- {0,
+ {SPELL_NO_SPELL,
SPELL_FREEZE,
SPELL_THROW_FROST,
SPELL_OZOCUBUS_ARMOUR,
@@ -120,7 +120,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 7 - Book of Summonings
- {0,
+ {SPELL_NO_SPELL,
SPELL_ABJURATION_I,
SPELL_RECALL,
SPELL_SUMMON_LARGE_MAMMAL,
@@ -131,7 +131,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 8 - Book of Fire
- {0,
+ {SPELL_NO_SPELL,
SPELL_EVAPORATE,
SPELL_FIRE_BRAND,
SPELL_SUMMON_ELEMENTAL,
@@ -142,7 +142,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 9 - Book of Ice
- {0,
+ {SPELL_NO_SPELL,
SPELL_FREEZING_AURA,
SPELL_SLEEP,
SPELL_CONDENSATION_SHIELD,
@@ -154,7 +154,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 10 - Book of Surveyances
- {0,
+ {SPELL_NO_SPELL,
SPELL_DETECT_SECRET_DOORS,
SPELL_DETECT_TRAPS,
SPELL_DETECT_ITEMS,
@@ -165,7 +165,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL
},
// 11 - Book of Spatial Translocations
- {0,
+ {SPELL_NO_SPELL,
SPELL_APPORTATION,
SPELL_BLINK,
SPELL_RECALL,
@@ -176,7 +176,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 12 - Book of Enchantments (fourth one)
- {0,
+ {SPELL_NO_SPELL,
SPELL_LEVITATION,
SPELL_SELECTIVE_AMNESIA,
SPELL_REMOVE_CURSE,
@@ -187,7 +187,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 13 - Young Poisoner's Handbook
- {0,
+ {SPELL_NO_SPELL,
SPELL_STING,
SPELL_CURE_POISON_II,
SPELL_MEPHITIC_CLOUD,
@@ -198,7 +198,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 14 - Book of the Tempests
- {0,
+ {SPELL_NO_SPELL,
SPELL_DISCHARGE,
SPELL_LIGHTNING_BOLT,
SPELL_FIREBALL,
@@ -209,7 +209,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 15 - Book of Death
- {0,
+ {SPELL_NO_SPELL,
SPELL_CORPSE_ROT,
SPELL_BONE_SHARDS,
SPELL_LETHAL_INFUSION,
@@ -220,18 +220,18 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 16 - Book of Hinderance
- {0,
+ {SPELL_NO_SPELL,
SPELL_CONFUSING_TOUCH,
SPELL_SLOW,
SPELL_CONFUSE,
- SPELL_PARALYZE,
+ SPELL_PARALYSE,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
},
// 17 - Book of Changes
- {0,
+ {SPELL_NO_SPELL,
SPELL_FULSOME_DISTILLATION,
SPELL_STICKS_TO_SNAKES,
SPELL_EVAPORATE,
@@ -242,7 +242,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 18 - Book of Transfigurations
- {0,
+ {SPELL_NO_SPELL,
SPELL_SANDBLAST,
SPELL_POLYMORPH_OTHER,
SPELL_STATUE_FORM,
@@ -253,7 +253,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 19 - Book of Practical Magic
- {0,
+ {SPELL_NO_SPELL,
SPELL_PROJECTED_NOISE,
SPELL_SELECTIVE_AMNESIA,
SPELL_DETECT_CURSE,
@@ -265,7 +265,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 20 - Book of War Chants
- {0,
+ {SPELL_NO_SPELL,
SPELL_FIRE_BRAND,
SPELL_FREEZING_AURA,
SPELL_REPEL_MISSILES,
@@ -276,7 +276,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 21 - Book of Clouds
- {0,
+ {SPELL_NO_SPELL,
SPELL_EVAPORATE,
SPELL_MEPHITIC_CLOUD,
SPELL_CONJURE_FLAME,
@@ -287,7 +287,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 22 - Book of Healing
- {0,
+ {SPELL_NO_SPELL,
SPELL_CURE_POISON_I,
SPELL_LESSER_HEALING,
SPELL_GREATER_HEALING,
@@ -298,7 +298,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 23 - Book of Necromancy
- {0,
+ {SPELL_NO_SPELL,
SPELL_PAIN,
SPELL_ANIMATE_SKELETON,
SPELL_VAMPIRIC_DRAINING,
@@ -309,7 +309,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 24 - Necronomicon -- Kikubaaqudgha special
- {0,
+ {SPELL_NO_SPELL,
SPELL_SYMBOL_OF_TORMENT,
SPELL_CONTROL_UNDEAD,
SPELL_SUMMON_WRAITHS,
@@ -320,7 +320,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 25 - Book of Callings
- {0,
+ {SPELL_NO_SPELL,
SPELL_SUMMON_SMALL_MAMMAL,
SPELL_STICKS_TO_SNAKES,
SPELL_CALL_IMP,
@@ -331,7 +331,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 26 - Book of Charms
- {0,
+ {SPELL_NO_SPELL,
SPELL_BACKLIGHT,
SPELL_REPEL_MISSILES,
SPELL_SLEEP,
@@ -342,7 +342,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 27 - Book of Demonology -- Vehumet special
- {0,
+ {SPELL_NO_SPELL,
SPELL_ABJURATION_I,
SPELL_RECALL,
SPELL_CALL_IMP,
@@ -353,7 +353,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 28 - Book of Air
- {0,
+ {SPELL_NO_SPELL,
SPELL_SHOCK,
SPELL_SWIFTNESS,
SPELL_REPEL_MISSILES,
@@ -380,7 +380,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
// two books!)
// 29 - Book of the Sky
- {0,
+ {SPELL_NO_SPELL,
SPELL_SUMMON_ELEMENTAL,
SPELL_INSULATION,
SPELL_AIRSTRIKE,
@@ -392,7 +392,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 30 - Book of Divinations
- {0,
+ {SPELL_NO_SPELL,
SPELL_DETECT_SECRET_DOORS,
SPELL_DETECT_CREATURES,
SPELL_DETECT_ITEMS,
@@ -403,7 +403,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 31 - Book of the Warp
- {0,
+ {SPELL_NO_SPELL,
SPELL_BANISHMENT,
SPELL_WARP_BRAND,
SPELL_DISPERSAL,
@@ -414,7 +414,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 32 - Book of Envenomations
- {0,
+ {SPELL_NO_SPELL,
SPELL_SPIDER_FORM,
SPELL_POISON_AMMUNITION,
SPELL_SUMMON_SCORPIONS,
@@ -425,7 +425,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 33 - Book of Annihilations -- Vehumet special
- {0,
+ {SPELL_NO_SPELL,
SPELL_ISKENDERUNS_MYSTIC_BLAST,
SPELL_POISON_ARROW,
SPELL_CHAIN_LIGHTNING,
@@ -436,7 +436,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 34 - Book of Unlife
- {0,
+ {SPELL_NO_SPELL,
SPELL_SUBLIMATION_OF_BLOOD,
SPELL_ANIMATE_DEAD,
SPELL_TWISTED_RESURRECTION,
@@ -448,7 +448,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 35 - Tome of Destruction
- {0,
+ {SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -459,7 +459,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 36 - Book of Control
- {0,
+ {SPELL_NO_SPELL,
SPELL_ENSLAVEMENT,
SPELL_TAME_BEASTS,
SPELL_MASS_CONFUSION,
@@ -470,7 +470,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 37 - Book of Mutations //jmf: now Morphology
- {0,
+ {SPELL_NO_SPELL,
SPELL_FRAGMENTATION,
SPELL_POLYMORPH_OTHER,
SPELL_ALTER_SELF,
@@ -483,7 +483,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 38 - Book of Tukima
- {0,
+ {SPELL_NO_SPELL,
SPELL_SURE_BLADE,
SPELL_TUKIMAS_VORPAL_BLADE,
SPELL_TUKIMAS_DANCE,
@@ -494,7 +494,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 39 - Book of Geomancy
- {0,
+ {SPELL_NO_SPELL,
SPELL_SANDBLAST,
SPELL_STONESKIN,
SPELL_PASSWALL,
@@ -506,7 +506,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 40 - Book of Earth
- {0,
+ {SPELL_NO_SPELL,
SPELL_MAXWELLS_SILVER_HAMMER,
SPELL_MAGIC_MAPPING,
SPELL_DIG,
@@ -517,7 +517,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL
},
// 41 - manuals of all kinds
- {0,
+ {SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -528,7 +528,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 42 - Book of Wizardry
- {0,
+ {SPELL_NO_SPELL,
SPELL_DETECT_CREATURES,
SPELL_SUMMON_ELEMENTAL,
SPELL_MAGIC_MAPPING,
@@ -539,7 +539,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 43 - Book of Power
- {0,
+ {SPELL_NO_SPELL,
SPELL_ANIMATE_DEAD,
SPELL_TELEPORT_OTHER,
SPELL_VENOM_BOLT,
@@ -550,7 +550,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 44 - Book of Cantrips //jmf: added 04jan2000
- {0,
+ {SPELL_NO_SPELL,
SPELL_CONFUSING_TOUCH,
SPELL_ANIMATE_SKELETON,
SPELL_SUMMON_SMALL_MAMMAL,
@@ -562,7 +562,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 45 - Book of Party Tricks //jmf: added 04jan2000
- {0,
+ {SPELL_NO_SPELL,
SPELL_SUMMON_BUTTERFLIES,
SPELL_APPORTATION,
SPELL_PROJECTED_NOISE,
@@ -574,7 +574,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 46 - Book of Beasts //jmf: added 19mar2000
- {0,
+ {SPELL_NO_SPELL,
SPELL_SUMMON_SMALL_MAMMAL,
SPELL_STICKS_TO_SNAKES,
SPELL_DETECT_CREATURES,
@@ -586,19 +586,19 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 47 - Book of Stalking //jmf: 24jun2000
- {0,
+ {SPELL_NO_SPELL,
SPELL_STING,
SPELL_SURE_BLADE,
SPELL_PROJECTED_NOISE,
SPELL_MEPHITIC_CLOUD,
SPELL_POISON_WEAPON,
- SPELL_PARALYZE,
+ SPELL_PARALYSE,
SPELL_INVISIBILITY,
SPELL_NO_SPELL,
},
// 48 -- unused
- {0,
+ {SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -610,7 +610,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 49 - unused
- {0,
+ {SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -622,7 +622,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
// 50 - Staff of Smiting //jmf: totally obsolete --- no longer looks here.
- {0,
+ {SPELL_NO_SPELL,
SPELL_SMITING,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -633,7 +633,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 51 - Staff of Summoning
- {0,
+ {SPELL_NO_SPELL,
SPELL_ABJURATION_I,
SPELL_RECALL,
SPELL_SUMMON_ELEMENTAL,
@@ -644,7 +644,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 52 - Staff of Destruction
- {0,
+ {SPELL_NO_SPELL,
SPELL_THROW_FLAME,
SPELL_BOLT_OF_FIRE,
SPELL_FIREBALL,
@@ -655,7 +655,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 53 - Staff of Destruction
- {0,
+ {SPELL_NO_SPELL,
SPELL_THROW_FROST,
SPELL_ICE_BOLT,
SPELL_FREEZING_CLOUD,
@@ -666,7 +666,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 54 - Staff of Destruction
- {0,
+ {SPELL_NO_SPELL,
SPELL_BOLT_OF_IRON,
SPELL_FIREBALL,
SPELL_LIGHTNING_BOLT,
@@ -677,7 +677,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 55 - Staff of Destruction
- {0,
+ {SPELL_NO_SPELL,
SPELL_BOLT_OF_INACCURACY,
SPELL_BOLT_OF_MAGMA,
SPELL_BOLT_OF_COLD,
@@ -688,7 +688,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 56 - Staff of Warding
- {0,
+ {SPELL_NO_SPELL,
SPELL_ABJURATION_I,
SPELL_CONDENSATION_SHIELD,
SPELL_CAUSE_FEAR,
@@ -699,7 +699,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 57 - Staff of Exploration
- {0,
+ {SPELL_NO_SPELL,
SPELL_DETECT_SECRET_DOORS,
SPELL_DETECT_TRAPS,
SPELL_DETECT_ITEMS,
@@ -710,7 +710,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 58 - Staff of Demonology
- {0,
+ {SPELL_NO_SPELL,
SPELL_ABJURATION_I,
SPELL_RECALL,
SPELL_CALL_IMP,
@@ -721,7 +721,7 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 59 - Staff of Striking -- unused like Smiting
- {0,
+ {SPELL_NO_SPELL,
SPELL_STRIKING,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -733,8 +733,9 @@ static int spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
},
};
-static void spellbook_template( int sbook_type,
- FixedVector < int, SPELLBOOK_SIZE > &sbtemplate_pass )
+static void spellbook_template(
+ int sbook_type,
+ FixedVector < spell_type, SPELLBOOK_SIZE > &sbtemplate_pass )
{
ASSERT( sbook_type >= 0 );
ASSERT( sbook_type < NUMBER_SPELLBOOKS );
@@ -749,9 +750,9 @@ static void spellbook_template( int sbook_type,
}
} // end spellbook_template()
-int which_spell_in_book(int sbook_type, int spl)
+spell_type which_spell_in_book(int sbook_type, int spl)
{
- FixedVector < int, SPELLBOOK_SIZE > wsib_pass; // was 10 {dlb}
+ FixedVector < spell_type, SPELLBOOK_SIZE > wsib_pass; // was 10 {dlb}
spellbook_template(sbook_type, wsib_pass);
@@ -763,7 +764,7 @@ int which_spell_in_book(int sbook_type, int spl)
unsigned char spellbook_contents( item_def &book, int action,
formatted_string *fs )
{
- FixedVector<int, SPELLBOOK_SIZE> spell_types; // was 10 {dlb}
+ FixedVector<spell_type, SPELLBOOK_SIZE> spell_types; // was 10 {dlb}
int spelcount = 0;
int i, j;
bool update_screen = !fs;
@@ -1019,7 +1020,7 @@ char book_rarity(unsigned char which_book)
bool is_valid_spell_in_book( unsigned int splbook, int spell )
{
- FixedVector< int, SPELLBOOK_SIZE > spells;
+ FixedVector< spell_type, SPELLBOOK_SIZE > spells;
spellbook_template( you.inv[ splbook ].sub_type, spells );
@@ -1252,7 +1253,7 @@ bool learn_spell(void)
return (false);
}
- unsigned int specspell = which_spell_in_book(you.inv[book].sub_type,index);
+ spell_type specspell = which_spell_in_book(you.inv[book].sub_type,index);
if (specspell == SPELL_NO_SPELL)
{
@@ -1394,7 +1395,7 @@ int count_staff_spells(const item_def &item, bool need_id)
if (stype < STAFF_SMITING || stype >= STAFF_AIR)
return (0);
- FixedVector< int, SPELLBOOK_SIZE > spell_list;
+ FixedVector< spell_type, SPELLBOOK_SIZE > spell_list;
spellbook_template( type, spell_list );
int num_spells = 0;
@@ -1427,9 +1428,9 @@ int rod_shield_leakage()
int staff_spell( int staff )
{
int spell;
- unsigned char specspell;
+ spell_type specspell;
int mana, diff, food, energy;
- FixedVector< int, SPELLBOOK_SIZE > spell_list;
+ FixedVector< spell_type, SPELLBOOK_SIZE > spell_list;
// converting sub_type into book index type
const int type = you.inv[staff].sub_type + 40;
diff --git a/crawl-ref/source/spl-book.h b/crawl-ref/source/spl-book.h
index 6c34a596e2..80631f1feb 100644
--- a/crawl-ref/source/spl-book.h
+++ b/crawl-ref/source/spl-book.h
@@ -57,7 +57,7 @@ bool learn_spell(void);
/* ***********************************************************************
* called from: it_use3 - item_use - spl-book
* *********************************************************************** */
-int which_spell_in_book(int sbook_type, int spl);
+spell_type which_spell_in_book(int sbook_type, int spl);
int staff_spell( int zap_device_2 );
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 03efe0b96c..20616b4801 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -177,7 +177,7 @@ char list_spells(void)
}
const char letter = index_to_letter(j);
- const int spell = get_spell_by_letter(letter);
+ const spell_type spell = get_spell_by_letter(letter);
if (spell != SPELL_NO_SPELL)
{
@@ -277,7 +277,7 @@ static int apply_vehumet_wizardry_boost(int spell, int chance)
return (chance * fail_reduce / 100);
}
-int spell_fail(int spell)
+int spell_fail(spell_type spell)
{
int chance = 60;
int chance2 = 0, armour = 0;
@@ -640,7 +640,7 @@ bool cast_a_spell(void)
return (false);
}
- const int spell = get_spell_by_letter( spc );
+ const spell_type spell = get_spell_by_letter( spc );
spc2 = letter_to_index(spc);
@@ -699,18 +699,18 @@ bool cast_a_spell(void)
// "Utility" spells for the sake of simplicity are currently ones with
// enchantments, translocations, or divinations.
-bool spell_is_utility_spell( int spell_id )
+bool spell_is_utility_spell( spell_type spell_id )
{
return (spell_typematch( spell_id,
SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION | SPTYP_DIVINATION ));
}
-bool spell_is_unholy( int spell_id )
+bool spell_is_unholy( spell_type spell_id )
{
return (testbits( get_spell_flags( spell_id ), SPFLAG_UNHOLY ));
}
-void spellcasting_side_effects(int spc2, bool idonly = false)
+void spellcasting_side_effects(spell_type spc2, bool idonly = false)
{
int total_skill = 0;
@@ -852,7 +852,7 @@ static bool spell_is_uncastable(int spell)
// returns SPRET_SUCCESS if spell is successfully cast for purposes of
// exercising, SPRET_FAIL otherwise, or SPRET_ABORT if the player canceled
// the casting.
-spret_type your_spells( int spc2, int powc, bool allow_fail )
+spret_type your_spells( spell_type spc2, int powc, bool allow_fail )
{
int dem_hor = 0;
int dem_hor2 = 0;
@@ -1092,7 +1092,7 @@ spret_type your_spells( int spc2, int powc, bool allow_fail )
zapping(ZAP_HASTING, powc, beam);
break;
- case SPELL_PARALYZE:
+ case SPELL_PARALYSE:
zapping(ZAP_PARALYSIS, powc, beam);
break;
@@ -1862,7 +1862,7 @@ spret_type your_spells( int spc2, int powc, bool allow_fail )
return (SPRET_SUCCESS);
} // end you_spells()
-void exercise_spell( int spell, bool spc, bool success )
+void exercise_spell( spell_type spell, bool spc, bool success )
{
// (!success) reduces skill increase for miscast spells
int ndx = 0;
diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h
index 04557a95d7..dec590b915 100644
--- a/crawl-ref/source/spl-cast.h
+++ b/crawl-ref/source/spl-cast.h
@@ -17,7 +17,7 @@
#include "enum.h"
char list_spells( void );
-int spell_fail( int spell );
+int spell_fail( spell_type spell );
int calc_spell_power( int spell, bool apply_intel, bool fail_rate_chk = false );
int spell_enhancement( unsigned int typeflags );
@@ -25,7 +25,7 @@ int spell_enhancement( unsigned int typeflags );
/* ***********************************************************************
* called from: it_use3 - spell
* *********************************************************************** */
-void exercise_spell( int spell_ex, bool spc, bool divide );
+void exercise_spell( spell_type spell_ex, bool spc, bool divide );
// last updaetd 12may2000 {dlb}
@@ -39,7 +39,7 @@ bool cast_a_spell( void );
/* ***********************************************************************
* called from: ability - debug - it_use3 - spell
* *********************************************************************** */
-spret_type your_spells( int spc2, int powc = 0, bool allow_fail = true );
+spret_type your_spells( spell_type spc2, int powc = 0, bool allow_fail = true );
// last updated 12may2000 {dlb}
/* ***********************************************************************
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index f588cbdae8..09cd7d2546 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -138,10 +138,12 @@
{
SPELL_IDENTIFY, "Identify",
- SPTYP_DIVINATION,
- SPFLAG_NONE,
- 6,
- NULL
+ SPTYP_DIVINATION,
+ SPFLAG_NONE,
+ 6,
+ NULL,
+ false,
+ true
},
{
@@ -149,7 +151,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -157,7 +161,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -165,7 +171,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ true
},
{
@@ -173,7 +181,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ true
},
{
@@ -181,7 +191,9 @@
SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET,
1,
- NULL
+ NULL,
+ true,
+ false
},
{
@@ -189,7 +201,9 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_DIR_OR_TARGET,
6,
- NULL
+ NULL,
+ true,
+ false
},
{
@@ -197,7 +211,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -205,7 +221,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -213,7 +231,8 @@
SPTYP_TRANSLOCATION,
SPFLAG_DIR_OR_TARGET,
1,
- NULL
+ NULL,
+ true
},
{
@@ -221,7 +240,9 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -229,7 +250,9 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
4,
- NULL
+ NULL,
+ false,
+ true
},
{
@@ -237,7 +260,8 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_DIR_OR_TARGET,
5,
- NULL
+ NULL,
+ true
},
{
@@ -245,7 +269,8 @@
SPTYP_CONJURATION | SPTYP_ICE,
SPFLAG_DIR_OR_TARGET,
5,
- NULL
+ NULL,
+ true
},
{
@@ -253,7 +278,8 @@
SPTYP_CONJURATION | SPTYP_AIR,
SPFLAG_DIR_OR_TARGET,
6,
- NULL
+ NULL,
+ true
},
{
@@ -261,7 +287,8 @@
SPTYP_CONJURATION | SPTYP_FIRE | SPTYP_EARTH,
SPFLAG_DIR_OR_TARGET,
5,
- NULL
+ NULL,
+ true
},
{
@@ -269,7 +296,8 @@
SPTYP_TRANSMIGRATION, // removed enchantment, wasn't needed -- bwr
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
5,
- NULL
+ NULL,
+ true
},
{
@@ -277,7 +305,8 @@
SPTYP_ENCHANTMENT,
SPFLAG_DIR_OR_TARGET,
3,
- NULL
+ NULL,
+ true
},
{
@@ -287,15 +316,18 @@
6, // lowered to 6 from 8, since its easily available from various items
// and Swiftness is level 2 (and gives a similar effect). Its also
// not that much better than Invisibility. -- bwr
- NULL
+ NULL,
+ false,
+ true
},
{
- SPELL_PARALYZE, "Paralyse",
+ SPELL_PARALYSE, "Paralyse",
SPTYP_ENCHANTMENT,
SPFLAG_DIR_OR_TARGET,
4,
- NULL
+ NULL,
+ true
},
{
@@ -303,7 +335,8 @@
SPTYP_ENCHANTMENT,
SPFLAG_DIR_OR_TARGET,
3,
- NULL
+ NULL,
+ true
},
{
@@ -311,7 +344,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_DIR_OR_TARGET | SPFLAG_HELPFUL,
6,
- NULL
+ NULL,
+ false,
+ true
},
{
@@ -319,7 +354,8 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_DIR_OR_TARGET,
2,
- NULL
+ NULL,
+ true
},
{
@@ -327,7 +363,8 @@
SPTYP_CONJURATION | SPTYP_ICE,
SPFLAG_DIR_OR_TARGET,
2,
- NULL
+ NULL,
+ true
},
{
@@ -335,7 +372,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -343,7 +382,8 @@
SPTYP_CONJURATION | SPTYP_ICE | SPTYP_AIR,
SPFLAG_GRID,
7,
- "Where do you want to put it?"
+ "Where do you want to put it?",
+ true
},
{
@@ -351,7 +391,8 @@
SPTYP_CONJURATION | SPTYP_POISON | SPTYP_AIR,
SPFLAG_DIR_OR_TARGET,
3,
- NULL
+ NULL,
+ true
},
{
@@ -359,7 +400,9 @@
SPTYP_ENCHANTMENT | SPTYP_FIRE,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -367,7 +410,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -375,7 +420,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -383,7 +430,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -391,7 +440,8 @@
SPTYP_CONJURATION | SPTYP_POISON,
SPFLAG_DIR_OR_TARGET,
5,
- NULL
+ NULL,
+ true
},
{
@@ -399,7 +449,8 @@
SPTYP_POISON,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ true
},
{
@@ -407,7 +458,8 @@
SPTYP_TRANSLOCATION,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
4,
- NULL
+ NULL,
+ true
},
{
@@ -415,7 +467,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ true
},
{
@@ -423,7 +477,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -431,7 +487,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -439,7 +497,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -447,7 +507,9 @@
SPTYP_ENCHANTMENT | SPTYP_NECROMANCY,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -455,7 +517,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -463,7 +527,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -471,7 +537,9 @@
SPTYP_HOLY,
SPFLAG_TARGET | SPFLAG_NOT_SELF,
4,
- "Smite whom?"
+ "Smite whom?",
+ false,
+ false
},
{
@@ -479,7 +547,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -487,7 +557,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -495,7 +567,9 @@
SPTYP_DIVINATION,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -503,7 +577,9 @@
SPTYP_SUMMONING,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -511,7 +587,9 @@
SPTYP_SUMMONING,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -519,7 +597,9 @@
SPTYP_SUMMONING | SPTYP_POISON,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -527,7 +607,9 @@
SPTYP_ENCHANTMENT | SPTYP_AIR,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -535,7 +617,8 @@
SPTYP_CONJURATION | SPTYP_NECROMANCY,
SPFLAG_DIR_OR_TARGET,
6,
- NULL
+ NULL,
+ true
},
{
@@ -543,7 +626,8 @@
SPTYP_CONJURATION | SPTYP_EARTH,
SPFLAG_DIR_OR_TARGET,
8,
- NULL
+ NULL,
+ true
},
{
@@ -551,7 +635,8 @@
SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET,
2,
- NULL
+ NULL,
+ true
},
{
@@ -559,7 +644,8 @@
SPTYP_CONJURATION | SPTYP_POISON | SPTYP_AIR,
SPFLAG_GRID,
6,
- "Where do you want to put it?"
+ "Where do you want to put it?",
+ true
}
,
@@ -568,7 +654,8 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_GRID,
9,
- "Where?"
+ "Where?",
+ true
},
{
@@ -576,7 +663,9 @@
SPTYP_DIVINATION,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -584,7 +673,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ true
},
@@ -595,7 +686,8 @@
SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET,
4,
- NULL
+ NULL,
+ true
},
{
@@ -603,7 +695,9 @@
SPTYP_SUMMONING,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -611,7 +705,9 @@
SPTYP_SUMMONING,
SPFLAG_UNHOLY,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -619,7 +715,8 @@
SPTYP_ENCHANTMENT,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
4,
- NULL
+ NULL,
+ true
},
{
@@ -627,7 +724,9 @@
SPTYP_DIVINATION | SPTYP_EARTH,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -635,7 +734,9 @@
SPTYP_HOLY,
SPFLAG_DIR_OR_TARGET | SPFLAG_HELPFUL | SPFLAG_NOT_SELF,
3,
- NULL
+ NULL,
+ true,
+ false
},
{
@@ -643,7 +744,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ true
},
{
@@ -651,7 +754,8 @@
SPTYP_NECROMANCY,
SPFLAG_DIR_OR_TARGET,
1,
- NULL
+ NULL,
+ true
},
{
@@ -659,7 +763,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -667,7 +773,8 @@
SPTYP_ENCHANTMENT | SPTYP_NECROMANCY,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ true
},
{
@@ -675,7 +782,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -683,7 +792,9 @@
SPTYP_NECROMANCY,
SPFLAG_DIR | SPFLAG_NOT_SELF,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -691,7 +802,9 @@
SPTYP_NECROMANCY | SPTYP_SUMMONING,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -699,7 +812,9 @@
SPTYP_DIVINATION,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -707,7 +822,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -715,7 +832,9 @@
SPTYP_FIRE,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -723,7 +842,9 @@
SPTYP_ICE,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -731,7 +852,9 @@
SPTYP_SUMMONING,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -739,7 +862,8 @@
SPTYP_ICE,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ true
},
{
@@ -747,7 +871,8 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_DIR_OR_TARGET,
4,
- NULL
+ NULL,
+ true
},
{
@@ -755,7 +880,9 @@
SPTYP_ICE | SPTYP_SUMMONING,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -763,7 +890,9 @@
SPTYP_ENCHANTMENT | SPTYP_ICE,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -771,7 +900,9 @@
SPTYP_SUMMONING,
SPFLAG_UNHOLY,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -779,7 +910,9 @@
SPTYP_ENCHANTMENT | SPTYP_AIR,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -787,7 +920,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -795,7 +930,8 @@
SPTYP_NECROMANCY,
SPFLAG_DIR_OR_TARGET,
4,
- NULL
+ NULL,
+ true
},
{
@@ -803,7 +939,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -811,14 +949,18 @@
SPTYP_HOLY,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
SPELL_THUNDERBOLT, "Thunderbolt",
SPTYP_HOLY | SPTYP_AIR,
SPFLAG_DIR_OR_TARGET,
- 6 // why is this the only holy spell with a secondary? {dlb}
+ 6, // why is this the only holy spell with a secondary? {dlb}
+ NULL,
+ true
}
,
@@ -827,7 +969,8 @@
SPTYP_HOLY,
SPFLAG_DIR_OR_TARGET,
8,
- NULL
+ NULL,
+ true
},
{
@@ -835,7 +978,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -843,7 +988,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -851,7 +998,9 @@
SPTYP_HOLY,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -859,7 +1008,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -867,7 +1018,9 @@
SPTYP_ENCHANTMENT | SPTYP_NECROMANCY,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -875,7 +1028,8 @@
SPTYP_NECROMANCY,
SPFLAG_DIR_OR_TARGET,
3,
- NULL
+ NULL,
+ true
},
{
@@ -883,7 +1037,8 @@
SPTYP_TRANSLOCATION,
SPFLAG_DIR_OR_TARGET | SPFLAG_UNHOLY,
5,
- NULL
+ NULL,
+ true
},
{
@@ -891,7 +1046,9 @@
SPTYP_TRANSMIGRATION | SPTYP_NECROMANCY,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -899,7 +1056,8 @@
SPTYP_CONJURATION | SPTYP_POISON,
SPFLAG_DIR_OR_TARGET,
1,
- NULL
+ NULL,
+ true
},
{
@@ -907,7 +1065,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -915,7 +1075,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -923,7 +1085,8 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_DIR_OR_TARGET | SPFLAG_UNHOLY,
9,
- NULL
+ NULL,
+ true
},
{
@@ -931,7 +1094,9 @@
SPTYP_SUMMONING,
SPFLAG_UNHOLY,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -939,7 +1104,9 @@
SPTYP_SUMMONING,
SPFLAG_UNHOLY,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -947,7 +1114,9 @@
SPTYP_SUMMONING,
SPFLAG_UNHOLY,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -955,7 +1124,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -963,7 +1134,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -971,7 +1144,9 @@
SPTYP_ENCHANTMENT | SPTYP_FIRE,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -979,7 +1154,9 @@
SPTYP_ENCHANTMENT | SPTYP_ICE,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -987,7 +1164,9 @@
SPTYP_ENCHANTMENT | SPTYP_NECROMANCY,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -995,7 +1174,9 @@
SPTYP_EARTH,
SPFLAG_DIR | SPFLAG_NOT_SELF,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1003,7 +1184,8 @@
SPTYP_CONJURATION | SPTYP_EARTH,
SPFLAG_DIR_OR_TARGET,
6,
- NULL
+ NULL,
+ true
},
{
@@ -1011,14 +1193,18 @@
SPTYP_CONJURATION | SPTYP_EARTH,
SPFLAG_DIR_OR_TARGET,
3,
- NULL
+ NULL,
+ true
},
{
SPELL_TOMB_OF_DOROKLOHE, "Tomb of Doroklohe",
SPTYP_CONJURATION | SPTYP_EARTH, // conj makes more sense than tmig -- bwr
SPFLAG_NONE,
- 7
+ 7,
+ NULL,
+ false,
+ false
}
,
@@ -1027,7 +1213,9 @@
SPTYP_ENCHANTMENT | SPTYP_EARTH,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1035,7 +1223,8 @@
SPTYP_CONJURATION | SPTYP_AIR,
SPFLAG_DIR_OR_TARGET,
1,
- NULL
+ NULL,
+ true
},
{
@@ -1043,7 +1232,9 @@
SPTYP_ENCHANTMENT | SPTYP_AIR,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1051,7 +1242,9 @@
SPTYP_ENCHANTMENT | SPTYP_AIR,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1059,7 +1252,9 @@
SPTYP_ENCHANTMENT | SPTYP_AIR,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1067,7 +1262,8 @@
SPTYP_CONJURATION | SPTYP_AIR,
SPFLAG_DIR_OR_TARGET,
7,
- NULL
+ NULL,
+ true
},
{
@@ -1075,14 +1271,19 @@
SPTYP_DIVINATION,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
SPELL_CURE_POISON_II, "Cure Poison",
SPTYP_POISON,
SPFLAG_NONE,
- 2
+ 2,
+ NULL,
+ false,
+ false
}
,
@@ -1091,14 +1292,19 @@
SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
SPELL_POISON_AMMUNITION, "Poison Ammunition",
SPTYP_ENCHANTMENT | SPTYP_POISON,
SPFLAG_NONE,
- 4 // jmf: SPTYP_TRANSMIGRATION vs SPTYP_ENCHANTMENT?
+ 4, // jmf: SPTYP_TRANSMIGRATION vs SPTYP_ENCHANTMENT?
+ NULL,
+ false,
+ false
}
,
@@ -1107,7 +1313,9 @@
SPTYP_ENCHANTMENT | SPTYP_POISON,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1115,7 +1323,9 @@
SPTYP_ENCHANTMENT | SPTYP_POISON,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1123,7 +1333,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1131,7 +1343,9 @@
SPTYP_TRANSMIGRATION,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1139,7 +1353,9 @@
SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1147,7 +1363,9 @@
SPTYP_SUMMONING | SPTYP_TRANSLOCATION,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1155,7 +1373,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1163,7 +1383,9 @@
SPTYP_NECROMANCY,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1171,7 +1393,9 @@
SPTYP_TRANSMIGRATION | SPTYP_POISON,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1179,7 +1403,9 @@
SPTYP_TRANSMIGRATION,
SPFLAG_DIR_OR_TARGET,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1187,7 +1413,8 @@
SPTYP_TRANSMIGRATION,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
6,
- NULL
+ NULL,
+ true
},
{
@@ -1195,7 +1422,9 @@
SPTYP_TRANSMIGRATION,
SPFLAG_NONE,
5, // only removes weapon, so I raised this from 4 -- bwr
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1203,7 +1432,9 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1211,7 +1442,9 @@
SPTYP_ICE | SPTYP_TRANSMIGRATION,
SPFLAG_NONE,
4, // doesn't allow for equipment, so I lowered this from 5 -- bwr
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1219,7 +1452,9 @@
SPTYP_FIRE | SPTYP_TRANSMIGRATION,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1227,7 +1462,9 @@
SPTYP_TRANSMIGRATION | SPTYP_NECROMANCY,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1235,7 +1472,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
9,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1243,7 +1482,9 @@
SPTYP_NECROMANCY,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1251,7 +1492,9 @@
SPTYP_ENCHANTMENT | SPTYP_AIR,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1259,7 +1502,8 @@
SPTYP_CONJURATION | SPTYP_EARTH,
SPFLAG_DIR_OR_TARGET,
7,
- NULL
+ NULL,
+ true
},
{
@@ -1267,7 +1511,8 @@
SPTYP_CONJURATION | SPTYP_ICE,
SPFLAG_DIR_OR_TARGET,
4,
- NULL
+ NULL,
+ true
},
{
@@ -1275,7 +1520,8 @@
SPTYP_CONJURATION | SPTYP_ICE,
SPFLAG_DIR_OR_TARGET,
9,
- NULL
+ NULL,
+ true
},
{
@@ -1283,7 +1529,9 @@
SPTYP_AIR,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1291,14 +1539,18 @@
SPTYP_AIR,
SPFLAG_TARGET | SPFLAG_NOT_SELF,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
SPELL_SHADOW_CREATURES, "Shadow Creatures",
SPTYP_SUMMONING, // jmf: or SPTYP_SUMMONING | SPTYP_CONJURATION
SPFLAG_NONE,
- 5
+ 5,
+ NULL,
+ false
}
,
@@ -1307,7 +1559,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1315,7 +1569,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
@@ -1328,7 +1584,9 @@
SPTYP_CONJURATION | SPTYP_FIRE,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1336,7 +1594,9 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1344,7 +1604,9 @@
SPTYP_FIRE | SPTYP_TRANSMIGRATION,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1352,7 +1614,9 @@
SPTYP_TRANSMIGRATION | SPTYP_SUMMONING,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1360,7 +1624,9 @@
SPTYP_SUMMONING,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1368,7 +1634,9 @@
SPTYP_FIRE | SPTYP_SUMMONING,
SPFLAG_NONE,
9,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1376,7 +1644,9 @@
SPTYP_ENCHANTMENT,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1384,7 +1654,8 @@
SPTYP_ENCHANTMENT | SPTYP_ICE,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
2,
- NULL
+ NULL,
+ true
},
{
@@ -1392,7 +1663,9 @@
SPTYP_ENCHANTMENT | SPTYP_ICE,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1400,7 +1673,9 @@
SPTYP_DIVINATION,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1408,7 +1683,9 @@
SPTYP_DIVINATION,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1416,7 +1693,9 @@
SPTYP_ENCHANTMENT | SPTYP_DIVINATION,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1424,7 +1703,9 @@
SPTYP_DIVINATION,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1432,7 +1713,9 @@
SPTYP_SUMMONING,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1440,7 +1723,9 @@
SPTYP_ENCHANTMENT | SPTYP_NECROMANCY,
SPFLAG_NONE,
5, // fairly high level - potentially one of the best brands
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1448,7 +1733,9 @@
SPTYP_ENCHANTMENT | SPTYP_TRANSLOCATION,
SPFLAG_NONE,
7, // this is high for a reason - Warp brands are very powerful.
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1456,7 +1743,9 @@
SPTYP_ENCHANTMENT | SPTYP_AIR,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1464,7 +1753,9 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_NONE,
9,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1472,7 +1763,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1480,7 +1773,9 @@
SPTYP_CONJURATION | SPTYP_AIR,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1488,7 +1783,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1496,7 +1793,8 @@
SPTYP_ENCHANTMENT,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
1,
- NULL
+ NULL,
+ true
},
{
@@ -1504,7 +1802,9 @@
SPTYP_TRANSMIGRATION | SPTYP_POISON,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1520,7 +1820,8 @@
SPTYP_FIRE | SPTYP_TRANSMIGRATION,
SPFLAG_NONE,
2, // XXX: level 2 or 3, what should it be now? -- bwr
- NULL
+ NULL,
+ true
},
{
@@ -1528,7 +1829,9 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1536,7 +1839,9 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1544,7 +1849,9 @@
SPTYP_TRANSMIGRATION | SPTYP_AIR,
SPFLAG_NONE,
9,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1552,7 +1859,8 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_DIR_OR_TARGET | SPFLAG_NOT_SELF,
1,
- NULL
+ NULL,
+ true
},
{
@@ -1560,7 +1868,9 @@
SPTYP_TRANSMIGRATION | SPTYP_NECROMANCY,
SPFLAG_NONE,
5,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1568,7 +1878,9 @@
SPTYP_TRANSMIGRATION | SPTYP_EARTH,
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1576,7 +1888,9 @@
SPTYP_ICE | SPTYP_TRANSMIGRATION,
SPFLAG_NONE,
4,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1584,7 +1898,9 @@
SPTYP_TRANSLOCATION,
SPFLAG_NONE,
3,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1592,7 +1908,9 @@
SPTYP_EARTH | SPTYP_TRANSMIGRATION, // was ench -- bwr
SPFLAG_NONE,
2,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1600,7 +1918,9 @@
SPTYP_ICE | SPTYP_NECROMANCY,
SPFLAG_NONE,
6,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1608,7 +1928,9 @@
SPTYP_AIR | SPTYP_CONJURATION,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1616,7 +1938,9 @@
SPTYP_AIR | SPTYP_CONJURATION,
SPFLAG_NONE,
8,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1624,7 +1948,9 @@
SPTYP_FIRE | SPTYP_CONJURATION,
SPFLAG_NONE,
7,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1632,7 +1958,9 @@
SPTYP_TRANSMIGRATION | SPTYP_NECROMANCY,
SPFLAG_NONE,
1,
- NULL
+ NULL,
+ false,
+ false
},
{
@@ -1640,7 +1968,8 @@
SPTYP_CONJURATION | SPTYP_POISON,
SPFLAG_DIR_OR_TARGET,
6,
- NULL
+ NULL,
+ true
},
{
@@ -1648,7 +1977,169 @@
0,
SPFLAG_DIR_OR_TARGET,
1,
- NULL
+ NULL,
+ true
+},
+
+{
+ SPELL_HELLFIRE_BURST, "Hellfire Burst",
+ SPTYP_CONJURATION | SPTYP_FIRE,
+ SPFLAG_DIR_OR_TARGET | SPFLAG_UNHOLY,
+ 9,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_VAMPIRE_SUMMON, "Vampire Summon",
+ SPTYP_SUMMONING,
+ SPFLAG_UNHOLY,
+ 3,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_BRAIN_FEED, "Brain Feed",
+ SPTYP_NECROMANCY,
+ SPFLAG_UNHOLY,
+ 3,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_FAKE_RAKSHASA_SUMMON, "Rakshasa Summon",
+ SPTYP_SUMMONING | SPTYP_NECROMANCY,
+ SPFLAG_UNHOLY,
+ 3,
+ NULL,
+ false
+},
+
+{
+ SPELL_STEAM_BALL, "Steam Ball",
+ SPTYP_CONJURATION | SPTYP_FIRE,
+ SPFLAG_DIR_OR_TARGET,
+ 4,
+ NULL,
+ true
+},
+
+{
+ SPELL_SUMMON_UFETUBUS, "Summon Ufetubus",
+ SPTYP_SUMMONING,
+ SPFLAG_UNHOLY,
+ 4,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_SUMMON_BEAST, "Summon Beast",
+ SPTYP_SUMMONING,
+ SPFLAG_NONE,
+ 4,
+ NULL,
+ false
+},
+
+{
+ SPELL_ENERGY_BOLT, "Energy Bolt",
+ SPTYP_CONJURATION,
+ SPFLAG_DIR_OR_TARGET,
+ 4,
+ NULL,
+ true
+},
+
+{
+ SPELL_POISON_SPLASH, "Poison Splash",
+ SPTYP_POISON,
+ SPFLAG_DIR_OR_TARGET,
+ 2,
+ NULL,
+ true
+},
+
+{
+ SPELL_SUMMON_UNDEAD, "Summon Undead",
+ SPTYP_SUMMONING | SPTYP_NECROMANCY,
+ SPFLAG_NONE,
+ 7,
+ NULL,
+ false,
+ false,
+},
+
+{
+ SPELL_CANTRIP, "Cantrip",
+ SPTYP_NONE,
+ SPFLAG_NONE,
+ 1,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_QUICKSILVER_BOLT, "Quicksilver Bolt",
+ SPTYP_CONJURATION,
+ SPFLAG_DIR_OR_TARGET,
+ 5,
+ NULL,
+ true
+},
+
+{
+ SPELL_METAL_SPLINTERS, "Metal Splinters",
+ SPTYP_CONJURATION,
+ SPFLAG_DIR_OR_TARGET,
+ 5,
+ NULL,
+ true
+},
+
+{
+ SPELL_MIASMA, "Miasma",
+ SPTYP_CONJURATION | SPTYP_NECROMANCY,
+ SPFLAG_DIR_OR_TARGET,
+ 6,
+ NULL,
+ true
+},
+
+{
+ SPELL_SUMMON_DRAKES, "Summon Drakes",
+ SPTYP_SUMMONING,
+ SPFLAG_NONE,
+ 6,
+ NULL,
+ false,
+ false
+},
+
+{
+ SPELL_BLINK_OTHER, "Blink Other",
+ SPTYP_TRANSLOCATION,
+ SPFLAG_NONE,
+ 2,
+ NULL,
+ true
+},
+
+{
+ SPELL_SUMMON_MUSHROOMS, "Summon Mushrooms",
+ SPTYP_SUMMONING,
+ SPFLAG_NONE,
+ 4,
+ NULL,
+ false,
+ false
},
{
@@ -1656,8 +2147,9 @@
0,
0,
0,
- NULL
+ NULL,
+ false,
+ false
},
-
#endif
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index b0465fb75c..8a8a291e9b 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -41,15 +41,15 @@
#endif
-static struct playerspell spelldata[] = {
+static struct spell_desc spelldata[] = {
#include "spl-data.h"
};
-static int plyrspell_list[NUM_SPELLS];
+static int spell_list[NUM_SPELLS];
-#define PLYRSPELLDATASIZE (sizeof(spelldata)/sizeof(struct playerspell))
+#define SPELLDATASIZE (sizeof(spelldata)/sizeof(struct spell_desc))
-static struct playerspell *seekspell(int spellid);
+static struct spell_desc *seekspell(int spellid);
static bool cloud_helper( int (*func) (int, int, int, int, kill_category),
int x, int y,
int pow, int ctype, kill_category );
@@ -59,27 +59,27 @@ static bool cloud_helper( int (*func) (int, int, int, int, kill_category),
*/
// all this does is merely refresh the internal spell list {dlb}:
-void init_playerspells(void)
+void init_spell_descs(void)
{
unsigned int x = 0;
for (x = 0; x < NUM_SPELLS; x++)
- plyrspell_list[x] = -1;
+ spell_list[x] = -1;
- // can only use up to PLYRSPELLDATASIZE _MINUS ONE_, or the
- // last entry tries to set plyrspell_list[SPELL_NO_SPELL]
+ // can only use up to SPELLDATASIZE _MINUS ONE_, or the
+ // last entry tries to set spell_list[SPELL_NO_SPELL]
// which corrupts the heap.
- for (x = 0; x < PLYRSPELLDATASIZE - 1; x++)
- plyrspell_list[spelldata[x].id] = x;
+ for (x = 0; x < SPELLDATASIZE - 1; x++)
+ spell_list[spelldata[x].id] = x;
for (x = 0; x < NUM_SPELLS; x++)
{
- if (plyrspell_list[x] == -1)
- plyrspell_list[x] = plyrspell_list[SPELL_NO_SPELL];
+ if (spell_list[x] == -1)
+ spell_list[x] = spell_list[SPELL_NO_SPELL];
}
return; // return value should not matter here {dlb}
-} // end init_playerspells()
+} // end init_spell_descs()
int get_spell_slot_by_letter( char letter )
{
@@ -93,7 +93,7 @@ int get_spell_slot_by_letter( char letter )
return (you.spell_letter_table[index]);
}
-int get_spell_by_letter( char letter )
+spell_type get_spell_by_letter( char letter )
{
ASSERT( isalpha( letter ) );
@@ -102,7 +102,7 @@ int get_spell_by_letter( char letter )
return ((slot == -1) ? SPELL_NO_SPELL : you.spells[slot]);
}
-bool add_spell_to_memory( int spell )
+bool add_spell_to_memory( spell_type spell )
{
int i, j;
@@ -150,7 +150,7 @@ bool del_spell_from_memory_by_slot( int slot )
}
-int spell_hunger(int which_spell)
+int spell_hunger(spell_type which_spell)
{
int level = seekspell(which_spell)->level;
@@ -175,21 +175,31 @@ int spell_hunger(int which_spell)
}
} // end spell_hunger();
+bool spell_needs_tracer(spell_type spell)
+{
+ return (seekspell(spell)->ms_needs_tracer);
+}
+
+bool spell_needs_foe(spell_type spell)
+{
+ return (!seekspell(spell)->ms_utility);
+}
+
// applied to spell misfires (more power = worse) and triggers
// for Xom acting (more power = more likely to grab his attention) {dlb}
-int spell_mana(int which_spell)
+int spell_mana(spell_type which_spell)
{
return (seekspell(which_spell)->level);
}
// applied in naughties (more difficult = higher level knowledge = worse)
// and triggers for Sif acting (same reasoning as above, just good) {dlb}
-int spell_difficulty(int which_spell)
+int spell_difficulty(spell_type which_spell)
{
return (seekspell(which_spell)->level);
}
-int spell_levels_required( int which_spell )
+int spell_levels_required( spell_type which_spell )
{
int levels = spell_difficulty( which_spell );
@@ -207,12 +217,12 @@ int spell_levels_required( int which_spell )
return (levels);
}
-unsigned int get_spell_flags( int which_spell )
+unsigned int get_spell_flags( spell_type which_spell )
{
return (seekspell(which_spell)->flags);
}
-const char *get_spell_target_prompt( int which_spell )
+const char *get_spell_target_prompt( spell_type which_spell )
{
return (seekspell(which_spell)->target_prompt);
}
@@ -223,7 +233,7 @@ bool spell_typematch(int which_spell, unsigned int which_discipline)
}
//jmf: next two for simple bit handling
-unsigned int spell_type(int spell)
+unsigned int get_spell_type(int spell)
{
return (seekspell(spell)->disciplines);
}
@@ -256,7 +266,7 @@ int count_bits(unsigned int bits)
} // end spell_title()
*/
-const char *spell_title(int spell) //jmf: ah the joys of driving ms. data
+const char *spell_title(spell_type spell)
{
return (seekspell(spell)->title);
}
@@ -815,10 +825,10 @@ int spell_type2skill(unsigned int spelltype)
**************************************************
*/
-//jmf: simplified; moved init code to top function, init_playerspells()
-static struct playerspell *seekspell(int spell)
+//jmf: simplified; moved init code to top function, init_spell_descs()
+static struct spell_desc *seekspell(int spell)
{
- return (&spelldata[plyrspell_list[spell]]);
+ return (&spelldata[spell_list[spell]]);
}
static bool cloud_helper( int (*func) (int, int, int, int, kill_category),
diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h
index d294fdb9d3..2f181470aa 100644
--- a/crawl-ref/source/spl-util.h
+++ b/crawl-ref/source/spl-util.h
@@ -18,48 +18,56 @@
#include "enum.h" // just for NUM_SPELL_TYPES and TARG_ENEMY
#include "direct.h" // just for DIR_NONE
-struct playerspell
+struct spell_desc
{
- int id;
- const char *title;
- unsigned int disciplines; // bitfield
- unsigned int flags; // bitfield
- unsigned int level;
- const char *target_prompt;
+ int id;
+ const char *title;
+ unsigned int disciplines; // bitfield
+ unsigned int flags; // bitfield
+ unsigned int level;
+ const char *target_prompt;
+
+ // If a monster is casting this, does it need a tracer?
+ bool ms_needs_tracer;
+
+ // The spell can be used no matter what the monster's foe is.
+ bool ms_utility;
};
//* * called from: acr
-void init_playerspells(void);
+void init_spell_descs(void);
int get_spell_slot_by_letter( char letter );
-int get_spell_by_letter( char letter );
+spell_type get_spell_by_letter( char letter );
-bool add_spell_to_memory( int spell );
+bool add_spell_to_memory( spell_type spell );
bool del_spell_from_memory_by_slot( int slot );
// * called from: spell
-int spell_hunger(int which_spell);
+int spell_hunger(spell_type which_spell);
// * called from: it_use3 - spell - spells3
-int spell_mana(int which_spell);
+int spell_mana(spell_type which_spell);
// * called from: chardump - it_use3 - player - spell - spl-book -
// * spells0 - spells3
-int spell_difficulty(int which_spell);
-const char *get_spell_target_prompt( int which_spell );
+int spell_difficulty(spell_type which_spell);
+const char *get_spell_target_prompt( spell_type which_spell );
-int spell_levels_required(int which_spell);
+bool spell_needs_tracer(spell_type spell);
+bool spell_needs_foe(spell_type spell);
+int spell_levels_required(spell_type which_spell);
-unsigned int get_spell_flags( int which_spell );
+unsigned int get_spell_flags( spell_type which_spell );
// * called from: chardump - spell - spl-book - spells0
bool spell_typematch(int which_spell, unsigned int which_discipline);
-unsigned int spell_type( int which_spell ); //jmf: simplification of above
+unsigned int get_spell_type( int which_spell ); //jmf: simplification of above
int count_bits( unsigned int bits );
// * called from: chardump - command - debug - spl-book - spells0
-const char *spell_title(int which_spell);
+const char *spell_title(spell_type which_spell);
const char* spelltype_short_name( int which_spelltype );
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 6dae67aca2..c2cd0d59ad 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -1061,7 +1061,8 @@ static void tag_read_you(struct tagHeader &th, char minorVersion)
count_c = unmarshallByte(th);
for (i = 0; i < count_c; ++i)
{
- you.spells[i] = unmarshallByte(th);
+ you.spells[i] =
+ static_cast<spell_type>( (unsigned char) unmarshallByte(th) );
if (you.spells[i] != SPELL_NO_SPELL)
you.spell_no++;
}
@@ -1616,7 +1617,7 @@ static void unmarshall_monster(tagHeader &th, monsters &m)
m.inv[j] = unmarshallShort(th);
for (int j = 0; j < NUM_MONSTER_SPELL_SLOTS; ++j)
- m.spells[j] = unmarshallShort(th);
+ m.spells[j] = static_cast<spell_type>( unmarshallShort(th) );
m.god = (god_type) unmarshallByte(th);