summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/spl-cast.cc8
-rw-r--r--crawl-ref/source/spl-cast.h3
-rw-r--r--crawl-ref/source/spl-util.cc2
-rw-r--r--crawl-ref/source/spl-util.h2
4 files changed, 8 insertions, 7 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 7a3f84d2dd..f617790e4e 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -106,14 +106,14 @@ static bool surge_identify_boosters(int spell)
return false;
}
-static void surge_power(int spell)
+static void surge_power(spell_type spell)
{
int enhanced = 0;
surge_identify_boosters(spell);
//jmf: simplified
- enhanced += spell_enhancement(spell_type(spell));
+ enhanced += spell_enhancement(get_spell_disciplines(spell));
if (enhanced) // one way or the other {dlb}
{
@@ -468,7 +468,7 @@ int spell_fail(spell_type spell)
} // end spell_fail()
-int calc_spell_power( int spell, bool apply_intel, bool fail_rate_check )
+int calc_spell_power(spell_type spell, bool apply_intel, bool fail_rate_check)
{
unsigned int bit;
int ndx;
@@ -480,7 +480,7 @@ int calc_spell_power( int spell, bool apply_intel, bool fail_rate_check )
+ (fail_rate_check? 0 : player_mag_abil(false));
int enhanced = 0;
- unsigned int disciplines = spell_type( spell );
+ unsigned int disciplines = get_spell_disciplines( spell );
//jmf: evil evil evil -- exclude HOLY bit
disciplines &= (~SPTYP_HOLY);
diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h
index dec590b915..349fd34216 100644
--- a/crawl-ref/source/spl-cast.h
+++ b/crawl-ref/source/spl-cast.h
@@ -18,7 +18,8 @@
char list_spells( void );
int spell_fail( spell_type spell );
-int calc_spell_power( int spell, bool apply_intel, bool fail_rate_chk = false );
+int calc_spell_power(spell_type spell, bool apply_intel,
+ bool fail_rate_chk = false );
int spell_enhancement( unsigned int typeflags );
// last updaetd 12may2000 {dlb}
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index f3be88e194..05458c1ba5 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -233,7 +233,7 @@ bool spell_typematch(spell_type which_spell, unsigned int which_discipline)
}
//jmf: next two for simple bit handling
-unsigned int get_spell_type(spell_type spell)
+unsigned int get_spell_disciplines(spell_type spell)
{
return (seekspell(spell)->disciplines);
}
diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h
index 676eef40e6..25e98a5933 100644
--- a/crawl-ref/source/spl-util.h
+++ b/crawl-ref/source/spl-util.h
@@ -63,7 +63,7 @@ unsigned int get_spell_flags( spell_type which_spell );
// * called from: chardump - spell - spl-book - spells0
bool spell_typematch(spell_type which_spell, unsigned int which_discipline);
-unsigned int get_spell_type( spell_type which_spell );
+unsigned int get_spell_disciplines( spell_type which_spell );
int count_bits( unsigned int bits );
// * called from: chardump - command - debug - spl-book - spells0