summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-13 20:36:56 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-13 20:36:56 +0000
commit309c246160be3d3cdc6c39fcf089e8e3ad3a622e (patch)
treeaf370bb522302bab481f7fa1fdf924e5549ddb2f
parente9181a121c71a972c33ecc9420234672cd88689f (diff)
downloadcrawl-ref-309c246160be3d3cdc6c39fcf089e8e3ad3a622e.tar.gz
crawl-ref-309c246160be3d3cdc6c39fcf089e8e3ad3a622e.zip
Remove four scroll-duplicate spells: Detect Curse, Remove Curse,
Magic Mapping, and Identify. [*] This leaves six spells in the Divinations school, of which Forescry and See Invisible could easily be moved to other schools; Detect Secret Doors could be removed; and Detect Traps/Items/Creatures should be moved to some kind of misc. item with charges (whether rechargeable or not). I didn't want to remove those until the replacement code is in. I added a hack to make sure the probabilities of Xom "casting" magic mapping remain the same. That will have to be repaired later, preferrably by handling it together with Detect Items/Creatures as a separate Xom effect. Shifts spells in saves and bones files. *) This is different from the recent addition of the scroll of silence in that these four spells pose no risk whatsoever and can be spammed safely, making even the food and magic costs negligible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10542 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/obsolete/cut_spells.txt68
-rw-r--r--crawl-ref/source/acr.cc4
-rw-r--r--crawl-ref/source/dat/descript/spells.txt16
-rw-r--r--crawl-ref/source/enum.h6
-rw-r--r--crawl-ref/source/spl-book.cc20
-rw-r--r--crawl-ref/source/spl-cast.cc22
-rw-r--r--crawl-ref/source/spl-data.h52
-rw-r--r--crawl-ref/source/xom.cc31
8 files changed, 110 insertions, 109 deletions
diff --git a/crawl-ref/docs/obsolete/cut_spells.txt b/crawl-ref/docs/obsolete/cut_spells.txt
index fa856badd2..b257175f4f 100644
--- a/crawl-ref/docs/obsolete/cut_spells.txt
+++ b/crawl-ref/docs/obsolete/cut_spells.txt
@@ -420,6 +420,58 @@ Spell definitions cut from the code:
true
},
+{
+ SPELL_IDENTIFY, "Identify",
+ SPTYP_DIVINATION,
+ SPFLAG_NONE,
+ 6,
+ 0,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ true
+},
+
+{
+ SPELL_REMOVE_CURSE, "Remove Curse",
+ SPTYP_ENCHANTMENT,
+ SPFLAG_NONE,
+ 5,
+ 0,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ true
+},
+
+{
+ SPELL_DETECT_CURSE, "Detect Curse",
+ SPTYP_DIVINATION,
+ SPFLAG_NONE,
+ 3,
+ 0,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ true
+},
+
+{
+ SPELL_MAGIC_MAPPING, "Magic Mapping",
+ SPTYP_DIVINATION | SPTYP_EARTH,
+ SPFLAG_MAPPING,
+ 4,
+ 45,
+ -1, -1,
+ 0,
+ NULL,
+ false,
+ true
+},
+
Spell descriptions cut from the code:
[Cure Poison and Abjuration are duplicates of existing spells and are omitted.]
@@ -511,3 +563,19 @@ Detect Magic
This spell probes one or more items lying nearby for enchantment. An experienced diviner may glean additional information.
%%%%
+Detect Curse
+
+This spell alerts the caster to the presence of curses on his or her possessions.
+%%%%
+Identify
+
+This spell allows the caster to determine the properties of an otherwise inscrutable magic item.
+%%%%
+Magic Mapping
+
+This spell reveals details about the caster's surroundings.
+%%%%
+Remove Curse
+
+This spell removes curses from any items which are being used by the caster.
+%%%%
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 585ddc1b8f..9002173298 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -4188,8 +4188,8 @@ static void _compile_time_asserts()
COMPILE_CHECK(SK_UNARMED_COMBAT == 19 , c1);
COMPILE_CHECK(SK_EVOCATIONS == 39 , c2);
COMPILE_CHECK(SP_VAMPIRE == 31 , c3);
- COMPILE_CHECK(SPELL_DEBUGGING_RAY == 107 , c4);
- COMPILE_CHECK(SPELL_PETRIFY == 160 , c5);
+ COMPILE_CHECK(SPELL_DEBUGGING_RAY == 103 , c4);
+ COMPILE_CHECK(SPELL_PETRIFY == 156 , c5);
COMPILE_CHECK(NUM_SPELLS == 199 , c6);
//jmf: NEW ASSERTS: we ought to do a *lot* of these
diff --git a/crawl-ref/source/dat/descript/spells.txt b/crawl-ref/source/dat/descript/spells.txt
index ae25593ca7..0682ac7ff9 100644
--- a/crawl-ref/source/dat/descript/spells.txt
+++ b/crawl-ref/source/dat/descript/spells.txt
@@ -174,10 +174,6 @@ Detect Creatures
This spell allows the caster to detect any creatures within a certain radius.
%%%%
-Detect Curse
-
-This spell alerts the caster to the presence of curses on his or her possessions.
-%%%%
Detect Items
This spell detects any items lying about the caster's general vicinity.
@@ -302,10 +298,6 @@ Ice Storm
This spell conjures forth a raging blizzard of ice, sleet and freezing gasses.
%%%%
-Identify
-
-This spell allows the caster to determine the properties of an otherwise inscrutable magic item.
-%%%%
Ignite Poison
This spell attempts to convert all poison within the caster's view into liquid flame. It is very effective against poisonous creatures or those carrying poison potions. It is also an amazingly painful way to eliminate poison from one's own system.
@@ -350,10 +342,6 @@ Magic Dart
This spell hurls a small bolt of magical energy.
%%%%
-Magic Mapping
-
-This spell reveals details about the caster's surroundings.
-%%%%
Mass Confusion
This spell causes confusion in all who gaze upon the caster.
@@ -442,10 +430,6 @@ Regeneration
This spell dramatically but temporarily increases the caster's recuperative abilities, while also increasing the rate of food consumption.
%%%%
-Remove Curse
-
-This spell removes curses from any items which are being used by the caster.
-%%%%
Repel Missiles
This spell reduces the chance of projectile attacks striking the caster. Even powerful attacks such as lightning bolts or dragon breath are affected, although smaller missiles are repelled to a much greater extent.
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 24e16e394b..757217cb10 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -2049,7 +2049,7 @@ enum monster_type // (int) menv[].type
MONS_KIRKE,
MONS_GRUM,
MONS_PURGY,
- MONS_MENKAURE,
+ MONS_MENKAURE,
// Testing monsters
MONS_TEST_SPAWNER,
@@ -2661,10 +2661,8 @@ enum species_type
enum spell_type
{
SPELL_NO_SPELL, // 0
- SPELL_IDENTIFY,
SPELL_TELEPORT_SELF,
SPELL_CAUSE_FEAR,
- SPELL_REMOVE_CURSE,
SPELL_MAGIC_DART, // 5
SPELL_FIREBALL,
SPELL_APPORTATION,
@@ -2697,7 +2695,6 @@ enum spell_type
SPELL_SELECTIVE_AMNESIA,
SPELL_MASS_CONFUSION, // 35
SPELL_SMITING,
- SPELL_DETECT_CURSE,
SPELL_SUMMON_SMALL_MAMMALS,
SPELL_ABJURATION,
SPELL_SUMMON_SCORPIONS, // 40
@@ -2713,7 +2710,6 @@ enum spell_type
SPELL_SUMMON_SWARM, // 50
SPELL_SUMMON_HORRIBLE_THINGS,
SPELL_ENSLAVEMENT,
- SPELL_MAGIC_MAPPING,
SPELL_ANIMATE_DEAD,
SPELL_PAIN, // 55
SPELL_EXTENSION,
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 88f2008a38..aabbd55723 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -172,7 +172,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] =
{SPELL_DETECT_SECRET_DOORS,
SPELL_DETECT_TRAPS,
SPELL_DETECT_ITEMS,
- SPELL_MAGIC_MAPPING,
+ SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -193,12 +193,12 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] =
// 12 - Book of Enchantments (fourth one)
{SPELL_LEVITATION,
SPELL_SELECTIVE_AMNESIA,
- SPELL_REMOVE_CURSE,
SPELL_CAUSE_FEAR,
SPELL_EXTENSION,
SPELL_DEFLECT_MISSILES,
SPELL_HASTE,
SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
},
// 13 - Young Poisoner's Handbook
@@ -269,10 +269,10 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] =
// 19 - Book of Practical Magic
{SPELL_PROJECTED_NOISE,
- SPELL_DETECT_CURSE,
SPELL_SELECTIVE_AMNESIA,
SPELL_DIG,
- SPELL_REMOVE_CURSE,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
@@ -359,10 +359,10 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] =
{SPELL_DETECT_SECRET_DOORS,
SPELL_DETECT_CREATURES,
SPELL_DETECT_ITEMS,
- SPELL_DETECT_CURSE,
SPELL_SEE_INVISIBLE,
SPELL_FORESCRY,
- SPELL_IDENTIFY,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
SPELL_NO_SPELL,
},
@@ -446,24 +446,24 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] =
// 35 - Book of Earth
{SPELL_MAXWELLS_SILVER_HAMMER,
- SPELL_MAGIC_MAPPING,
SPELL_DIG,
SPELL_STATUE_FORM,
SPELL_BOLT_OF_IRON,
SPELL_SHATTER,
SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
SPELL_NO_SPELL
},
// 36 - Book of Wizardry
{SPELL_DETECT_CREATURES,
SPELL_SUMMON_ELEMENTAL,
- SPELL_MAGIC_MAPPING,
SPELL_TELEPORT_SELF,
SPELL_FIREBALL,
- SPELL_IDENTIFY,
SPELL_HASTE,
SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
+ SPELL_NO_SPELL,
},
// 37 - Book of Power
@@ -692,7 +692,7 @@ static spell_type spellbook_template_array[][SPELLBOOK_SIZE] =
{SPELL_DETECT_SECRET_DOORS,
SPELL_DETECT_TRAPS,
SPELL_DETECT_ITEMS,
- SPELL_MAGIC_MAPPING,
+ SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index f549179ac8..adf96aa5ff 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -2067,18 +2067,6 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
break;
// Utility spells.
- case SPELL_DETECT_CURSE:
- detect_curse(false);
- break;
-
- case SPELL_REMOVE_CURSE:
- remove_curse(false);
- break;
-
- case SPELL_IDENTIFY:
- identify(powc);
- break;
-
case SPELL_DETECT_SECRET_DOORS:
if (_can_cast_detect())
cast_detect_secret_doors(powc);
@@ -2120,16 +2108,6 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
break;
}
- case SPELL_MAGIC_MAPPING:
- if (you.level_type == LEVEL_PANDEMONIUM)
- mpr("Your Earth magic cannot map Pandemonium.");
- else
- {
- powc = stepdown_value( powc, 10, 10, 40, 45 );
- magic_mapping( 5 + powc, 50 + random2avg( powc * 2, 2 ), false );
- }
- break;
-
case SPELL_PROJECTED_NOISE:
project_noise();
break;
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index 5c64fbe6b4..5dc56a79f0 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -129,19 +129,6 @@
{
- SPELL_IDENTIFY, "Identify",
- SPTYP_DIVINATION,
- SPFLAG_NONE,
- 6,
- 0,
- -1, -1,
- 0,
- NULL,
- false,
- true
-},
-
-{
SPELL_TELEPORT_SELF, "Teleport Self",
SPTYP_TRANSLOCATION,
SPFLAG_ESCAPE,
@@ -168,19 +155,6 @@
},
{
- SPELL_REMOVE_CURSE, "Remove Curse",
- SPTYP_ENCHANTMENT,
- SPFLAG_NONE,
- 5,
- 0,
- -1, -1,
- 0,
- NULL,
- false,
- true
-},
-
-{
SPELL_MAGIC_DART, "Magic Dart",
SPTYP_CONJURATION,
SPFLAG_DIR_OR_TARGET,
@@ -612,19 +586,6 @@
},
{
- SPELL_DETECT_CURSE, "Detect Curse",
- SPTYP_DIVINATION,
- SPFLAG_NONE,
- 3,
- 0,
- -1, -1,
- 0,
- NULL,
- false,
- true
-},
-
-{
SPELL_SUMMON_SMALL_MAMMALS, "Summon Small Mammals",
SPTYP_SUMMONING,
SPFLAG_BATTLE,
@@ -822,19 +783,6 @@
},
{
- SPELL_MAGIC_MAPPING, "Magic Mapping",
- SPTYP_DIVINATION | SPTYP_EARTH,
- SPFLAG_MAPPING,
- 4,
- 45,
- -1, -1,
- 0,
- NULL,
- false,
- true
-},
-
-{
SPELL_ANIMATE_DEAD, "Animate Dead",
SPTYP_NECROMANCY,
SPFLAG_AREA | SPFLAG_NEUTRAL,
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index c21a8c9be4..f4ff2c7c28 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -60,11 +60,14 @@ REVISION("$Rev$");
// I filtered some out, especially conjurations. Then I sorted them in
// roughly ascending order of power.
+// Define fake magic mapping spell to keep the old behaviour.
+#define FAKE_SPELL_MAGIC_MAPPING SPELL_NO_SPELL
+
// Spells to be cast at tension 0 (no or only low-level monsters around),
// mostly flavour.
static const spell_type _xom_nontension_spells[] =
{
- SPELL_MAGIC_MAPPING, SPELL_DETECT_ITEMS, SPELL_SUMMON_BUTTERFLIES,
+ FAKE_SPELL_MAGIC_MAPPING, SPELL_DETECT_ITEMS, SPELL_SUMMON_BUTTERFLIES,
SPELL_DETECT_CREATURES, SPELL_FLY, SPELL_SPIDER_FORM,
SPELL_STATUE_FORM, SPELL_ICE_FORM, SPELL_DRAGON_FORM, SPELL_NECROMUTATION
};
@@ -491,7 +494,7 @@ static bool _xom_makes_you_cast_random_spell(int sever, int tension)
spellenum = std::min(nxomspells, std::max(3 + coinflip(), spellenum));
spell = _xom_nontension_spells[random2(spellenum)];
- if (spell == SPELL_MAGIC_MAPPING || spell == SPELL_DETECT_ITEMS)
+ if (spell == FAKE_SPELL_MAGIC_MAPPING || spell == SPELL_DETECT_ITEMS)
{
// If the level is already mostly explored, there's
// a chance we might try something else.
@@ -500,6 +503,30 @@ static bool _xom_makes_you_cast_random_spell(int sever, int tension)
return (false);
}
}
+
+ // Handle magic mapping specially, now it's no longer a spell.
+ if (spell == FAKE_SPELL_MAGIC_MAPPING)
+ {
+ if (you.level_type == LEVEL_PANDEMONIUM)
+ return (false);
+
+ god_speaks(GOD_XOM, _get_xom_speech("spell effect").c_str());
+
+#if defined(DEBUG_DIAGNOSTICS) || defined(DEBUG_RELIGION) || defined(DEBUG_XOM)
+ mprf(MSGCH_DIAGNOSTICS,
+ "_xom_makes_you_cast_random_spell(); spell: %d, spellenum: %d",
+ spell, spellenum);
+#endif
+
+ take_note(Note(NOTE_XOM_EFFECT, you.piety, tension, "magic mapping"),
+ true);
+
+ const int power = stepdown_value( sever, 10, 10, 40, 45 );
+ magic_mapping( 5 + power, 50 + random2avg( power * 2, 2 ), false );
+
+ return (true);
+ }
+
// Don't attempt to cast spells the undead cannot memorise.
if (you_cannot_memorise(spell))
return (false);