summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-12-15 22:34:55 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-12-15 23:16:43 +0100
commitf81fc34f7f4f4cab5ba1cc01ba8c0e96498574a4 (patch)
tree9912318671f72f26db66d7eb483dc3b63a1b7856
parent02256d318a68bc0fed1949633981fc14d2f7147c (diff)
downloadcrawl-ref-f81fc34f7f4f4cab5ba1cc01ba8c0e96498574a4.tar.gz
crawl-ref-f81fc34f7f4f4cab5ba1cc01ba8c0e96498574a4.zip
Remove Mislead.
It was a pure interface screw, and even worse, required a large amount of support code that's a maintenance burden, causing crashes we need to fix from time to time.
-rw-r--r--crawl-ref/source/Crawl.xcodeproj/project.pbxproj8
-rw-r--r--crawl-ref/source/MSVC/crawl.vcproj8
-rw-r--r--crawl-ref/source/MSVC/crawl.vcxproj2
-rw-r--r--crawl-ref/source/MSVC/crawl.vcxproj.filters2
-rw-r--r--crawl-ref/source/Makefile.obj1
-rw-r--r--crawl-ref/source/dat/database/monspell.txt14
-rw-r--r--crawl-ref/source/dat/descript/fr/spells.txt6
-rw-r--r--crawl-ref/source/dat/descript/ja/spells.txt6
-rw-r--r--crawl-ref/source/effects.cc8
-rw-r--r--crawl-ref/source/enum.h4
-rw-r--r--crawl-ref/source/hiscores.cc7
-rw-r--r--crawl-ref/source/main.cc6
-rw-r--r--crawl-ref/source/mislead.cc160
-rw-r--r--crawl-ref/source/mislead.h10
-rw-r--r--crawl-ref/source/mon-cast.cc12
-rw-r--r--crawl-ref/source/mon-info.cc8
-rw-r--r--crawl-ref/source/mon-place.cc4
-rw-r--r--crawl-ref/source/mon-spll.h4
-rw-r--r--crawl-ref/source/mon-stuff.cc5
-rw-r--r--crawl-ref/source/mon-util.cc19
-rw-r--r--crawl-ref/source/mon-util.h1
-rw-r--r--crawl-ref/source/monster.cc18
-rw-r--r--crawl-ref/source/monster.h1
-rw-r--r--crawl-ref/source/output.cc1
-rw-r--r--crawl-ref/source/player.cc5
-rw-r--r--crawl-ref/source/player.h1
-rw-r--r--crawl-ref/source/rltiles/dc-spells.txt1
-rw-r--r--crawl-ref/source/spl-damage.cc2
-rw-r--r--crawl-ref/source/spl-data.h2
-rw-r--r--crawl-ref/source/status.cc2
-rw-r--r--crawl-ref/source/tags.cc17
-rw-r--r--crawl-ref/source/throw.cc8
-rw-r--r--crawl-ref/source/tilepick.cc1
-rw-r--r--crawl-ref/source/view.cc7
-rw-r--r--crawl-ref/source/wiz-you.cc3
-rw-r--r--crawl-ref/source/xom.cc2
36 files changed, 35 insertions, 331 deletions
diff --git a/crawl-ref/source/Crawl.xcodeproj/project.pbxproj b/crawl-ref/source/Crawl.xcodeproj/project.pbxproj
index 34be8f46ff..43158adfac 100644
--- a/crawl-ref/source/Crawl.xcodeproj/project.pbxproj
+++ b/crawl-ref/source/Crawl.xcodeproj/project.pbxproj
@@ -111,7 +111,6 @@
7B09F5471133D63E004F149D /* l_feat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F5411133D63E004F149D /* l_feat.cc */; };
7B09F5481133D63E004F149D /* l_spells.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F5421133D63E004F149D /* l_spells.cc */; };
7B09F5601133D66C004F149D /* mgen_data.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F54D1133D66C004F149D /* mgen_data.cc */; };
- 7B09F5611133D66C004F149D /* mislead.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F5501133D66C004F149D /* mislead.cc */; };
7B09F5621133D66C004F149D /* mon_resist_def.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F5521133D66C004F149D /* mon_resist_def.cc */; };
7B09F5631133D66C004F149D /* mon-clone.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F5541133D66C004F149D /* mon-clone.cc */; };
7B09F5641133D66C004F149D /* mon-death.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F5561133D66C004F149D /* mon-death.cc */; };
@@ -212,7 +211,6 @@
7B09F5CE1133D6AB004F149D /* message.cc in Sources */ = {isa = PBXBuildFile; fileRef = E5D6402010BD494400A99626 /* message.cc */; };
7B09F5CF1133D6AB004F149D /* mgen_data.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F54D1133D66C004F149D /* mgen_data.cc */; };
7B09F5D01133D6AB004F149D /* misc.cc in Sources */ = {isa = PBXBuildFile; fileRef = E5D6402210BD494400A99626 /* misc.cc */; };
- 7B09F5D11133D6AB004F149D /* mislead.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7B09F5501133D66C004F149D /* mislead.cc */; };
7B09F5D21133D6AB004F149D /* mon-abil.cc in Sources */ = {isa = PBXBuildFile; fileRef = E5D6402410BD494400A99626 /* mon-abil.cc */; };
7B09F5D31133D6AB004F149D /* mon-act.cc in Sources */ = {isa = PBXBuildFile; fileRef = E5D6402610BD494400A99626 /* mon-act.cc */; };
7B09F5D41133D6AB004F149D /* mon-behv.cc in Sources */ = {isa = PBXBuildFile; fileRef = E5D6402810BD494400A99626 /* mon-behv.cc */; };
@@ -1030,8 +1028,6 @@
7B09F54D1133D66C004F149D /* mgen_data.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mgen_data.cc; sourceTree = "<group>"; };
7B09F54E1133D66C004F149D /* mgen_data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mgen_data.h; sourceTree = "<group>"; };
7B09F54F1133D66C004F149D /* mgen_enum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mgen_enum.h; sourceTree = "<group>"; };
- 7B09F5501133D66C004F149D /* mislead.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mislead.cc; sourceTree = "<group>"; };
- 7B09F5511133D66C004F149D /* mislead.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mislead.h; sourceTree = "<group>"; };
7B09F5521133D66C004F149D /* mon_resist_def.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mon_resist_def.cc; sourceTree = "<group>"; };
7B09F5531133D66C004F149D /* mon_resist_def.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mon_resist_def.h; sourceTree = "<group>"; };
7B09F5541133D66C004F149D /* mon-clone.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "mon-clone.cc"; sourceTree = "<group>"; };
@@ -2015,8 +2011,6 @@
7B09F54F1133D66C004F149D /* mgen_enum.h */,
E5D6402210BD494400A99626 /* misc.cc */,
E5D6402310BD494400A99626 /* misc.h */,
- 7B09F5501133D66C004F149D /* mislead.cc */,
- 7B09F5511133D66C004F149D /* mislead.h */,
E5D6402410BD494400A99626 /* mon-abil.cc */,
E5D6402510BD494400A99626 /* mon-abil.h */,
E5D6402610BD494400A99626 /* mon-act.cc */,
@@ -3055,7 +3049,6 @@
7B09F5CE1133D6AB004F149D /* message.cc in Sources */,
7B09F5CF1133D6AB004F149D /* mgen_data.cc in Sources */,
7B09F5D01133D6AB004F149D /* misc.cc in Sources */,
- 7B09F5D11133D6AB004F149D /* mislead.cc in Sources */,
7B09F5D21133D6AB004F149D /* mon-abil.cc in Sources */,
7B09F5D31133D6AB004F149D /* mon-act.cc in Sources */,
7B09F5D41133D6AB004F149D /* mon-behv.cc in Sources */,
@@ -3302,7 +3295,6 @@
E5D6412610BD494500A99626 /* message.cc in Sources */,
7B09F5601133D66C004F149D /* mgen_data.cc in Sources */,
E5D6412710BD494500A99626 /* misc.cc in Sources */,
- 7B09F5611133D66C004F149D /* mislead.cc in Sources */,
E5D6412810BD494500A99626 /* mon-abil.cc in Sources */,
E5D6412910BD494500A99626 /* mon-act.cc in Sources */,
E5D6412A10BD494500A99626 /* mon-behv.cc in Sources */,
diff --git a/crawl-ref/source/MSVC/crawl.vcproj b/crawl-ref/source/MSVC/crawl.vcproj
index 21e852e128..f2c8ec202c 100644
--- a/crawl-ref/source/MSVC/crawl.vcproj
+++ b/crawl-ref/source/MSVC/crawl.vcproj
@@ -1854,14 +1854,6 @@
RelativePath="..\misc.h"
>
</File>
- <File
- RelativePath="..\mislead.cc"
- >
- </File>
- <File
- RelativePath="..\mislead.h"
- >
- </File>
<File
RelativePath="..\mon-abil.cc"
>
diff --git a/crawl-ref/source/MSVC/crawl.vcxproj b/crawl-ref/source/MSVC/crawl.vcxproj
index 71a3dc13ec..614febb62c 100644
--- a/crawl-ref/source/MSVC/crawl.vcxproj
+++ b/crawl-ref/source/MSVC/crawl.vcxproj
@@ -411,7 +411,6 @@ perl.exe "util/gen-cflg.pl" compflag.h "&lt;UNKNOWN&gt;" "&lt;UNKNOWN&gt;"
<ClCompile Include="..\message-stream.cc" />
<ClCompile Include="..\message.cc" />
<ClCompile Include="..\misc.cc" />
- <ClCompile Include="..\mislead.cc" />
<ClCompile Include="..\mon-abil.cc" />
<ClCompile Include="..\mon-act.cc" />
<ClCompile Include="..\mon-behv.cc" />
@@ -756,7 +755,6 @@ perl.exe "util/gen-cflg.pl" compflag.h "&lt;UNKNOWN&gt;" "&lt;UNKNOWN&gt;"
<ClInclude Include="..\mgen_data.h" />
<ClInclude Include="..\mgen_enum.h" />
<ClInclude Include="..\misc.h" />
- <ClInclude Include="..\mislead.h" />
<ClInclude Include="..\mon-abil.h" />
<ClInclude Include="..\mon-act.h" />
<ClInclude Include="..\mon-behv.h" />
diff --git a/crawl-ref/source/MSVC/crawl.vcxproj.filters b/crawl-ref/source/MSVC/crawl.vcxproj.filters
index d6c74c6084..32189d9aa2 100644
--- a/crawl-ref/source/MSVC/crawl.vcxproj.filters
+++ b/crawl-ref/source/MSVC/crawl.vcxproj.filters
@@ -152,7 +152,6 @@
<ClCompile Include="..\message-stream.cc" />
<ClCompile Include="..\message.cc" />
<ClCompile Include="..\misc.cc" />
- <ClCompile Include="..\mislead.cc" />
<ClCompile Include="..\mon-abil.cc" />
<ClCompile Include="..\mon-act.cc" />
<ClCompile Include="..\mon-behv.cc" />
@@ -452,7 +451,6 @@
<ClInclude Include="..\mgen_data.h" />
<ClInclude Include="..\mgen_enum.h" />
<ClInclude Include="..\misc.h" />
- <ClInclude Include="..\mislead.h" />
<ClInclude Include="..\mon-abil.h" />
<ClInclude Include="..\mon-act.h" />
<ClInclude Include="..\mon-behv.h" />
diff --git a/crawl-ref/source/Makefile.obj b/crawl-ref/source/Makefile.obj
index a2ca91334a..5fcb90fc4e 100644
--- a/crawl-ref/source/Makefile.obj
+++ b/crawl-ref/source/Makefile.obj
@@ -131,7 +131,6 @@ menu.o \
message-stream.o \
message.o \
misc.o \
-mislead.o \
mon-abil.o \
mon-act.o \
mon-behv.o \
diff --git a/crawl-ref/source/dat/database/monspell.txt b/crawl-ref/source/dat/database/monspell.txt
index 80b09cbd0a..33abdf1949 100644
--- a/crawl-ref/source/dat/database/monspell.txt
+++ b/crawl-ref/source/dat/database/monspell.txt
@@ -101,20 +101,6 @@ Greater Healing cast
@The_monster@ briefly glows brightly.
%%%%
-Mislead cast
-
-@The_monster@ weaves an illusion.
-
-@The_monster@ misleads you.
-
-@The_monster@ clouds your mind.
-%%%%
-unseen Mislead cast
-
-Something tries to mislead you!
-
-Something weaves an illusion around you!
-%%%%
Mara Summon cast
@The_monster@ weaves an illusion.
diff --git a/crawl-ref/source/dat/descript/fr/spells.txt b/crawl-ref/source/dat/descript/fr/spells.txt
index aaf0f3339c..26488a12e3 100644
--- a/crawl-ref/source/dat/descript/fr/spells.txt
+++ b/crawl-ref/source/dat/descript/fr/spells.txt
@@ -689,12 +689,6 @@ Minor Healing spell
Ce sort soigne une petite quantité de dégâts au corps du sorcier.
%%%%
-Mislead spell
-
-Ce sortilège brouille l'esprit d'un ennemi. Les gens ainsi touchés ne peuvent
-pas discerner l'identité des êtres les entourant, bien que certains détailles
-importants restent évident.
-%%%%
Necromutation spell
Ce sort transforme d'abord le sorcier en liche — une puissante créature
diff --git a/crawl-ref/source/dat/descript/ja/spells.txt b/crawl-ref/source/dat/descript/ja/spells.txt
index 9ec5dffd00..df71cc2b5e 100644
--- a/crawl-ref/source/dat/descript/ja/spells.txt
+++ b/crawl-ref/source/dat/descript/ja/spells.txt
@@ -659,12 +659,6 @@ Minor Healing spell
この呪文は術者が肉体に負ったダメージを少しだけ癒す。
%%%%
-Mislead spell
-
-この呪文は一体の敵の精神を曇らせる。
-この呪文の影響を受けると周囲のものを識別できなくなるが、
-明らかに目立つ風景は明白に残る。
-%%%%
Necromutation spell
この呪文はまず術者を力ある骸骨であるリッチに変化させる。
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index f2e5c342dd..1410576dc2 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -51,7 +51,6 @@
#include "message.h"
#include "mgen_data.h"
#include "misc.h"
-#include "mislead.h"
#include "mon-behv.h"
#include "mon-cast.h"
#include "mon-pathfind.h"
@@ -614,13 +613,6 @@ void direct_effect(monster* source, spell_type spell,
mons_cast_haunt(source);
break;
- case SPELL_MISLEAD:
- if (!def)
- mons_cast_mislead(source);
- else
- defender->confuse(source, source->hit_dice * 12);
- break;
-
case SPELL_SUMMON_SPECTRAL_ORCS:
if (def)
simple_monster_message(def, " is surrounded by Orcish apparitions.");
diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h
index 25c6035e35..b9cb5f330c 100644
--- a/crawl-ref/source/enum.h
+++ b/crawl-ref/source/enum.h
@@ -1517,7 +1517,9 @@ enum duration_type
DUR_SLIMIFY,
DUR_TIME_STEP,
DUR_ICEMAIL_DEPLETED, // Wait this many turns for full Icemail
+#if TAG_MAJOR_VERSION == 34
DUR_MISLED,
+#endif
DUR_QUAD_DAMAGE,
DUR_AFRAID,
DUR_MIRROR_DAMAGE,
@@ -3565,7 +3567,9 @@ enum spell_type
SPELL_BLINK_CLOSE,
SPELL_BLINK_RANGE,
SPELL_BLINK_AWAY,
+#if TAG_MAJOR_VERSION == 34
SPELL_MISLEAD,
+#endif
SPELL_FAKE_MARA_SUMMON,
#if TAG_MAJOR_VERSION == 34
SPELL_SUMMON_RAKSHASA,
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 81462e20be..352b8ebd2a 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -1139,12 +1139,6 @@ void scorefile_entry::init_death_cause(int dam, int dsrc,
if (source_monster)
killer_map = source_monster->originating_map();
- // Save this here. We don't want to completely remove the status, as that
- // would look odd in the "screenshot", but having DUR_MISLED as a non-zero
- // value at his point in time will generate such odities as "killed by a
- // golden eye, wielding an orcish crossbo [19 damage]", etc. {due}
- unwind_var<int> misled(you.duration[DUR_MISLED], 0);
-
// Set the default aux data value...
// If aux is passed in (ie for a trap), we'll default to that.
if (aux == NULL)
@@ -1505,7 +1499,6 @@ void scorefile_entry::init(time_t dt)
DUR_LOWERED_MR,
DUR_MAGIC_SHIELD,
DUR_MIGHT,
- DUR_MISLED,
DUR_PARALYSIS,
DUR_PETRIFIED,
DUR_PETRIFYING,
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 34bdc99d0f..b527078248 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -89,7 +89,6 @@
#include "melee_attack.h"
#include "message.h"
#include "misc.h"
-#include "mislead.h"
#include "mon-act.h"
#include "mon-abil.h"
#include "mon-cast.h"
@@ -2655,11 +2654,6 @@ static void _decrement_durations()
_decrement_a_duration(DUR_LOWERED_MR, delay, "You feel less vulnerable to hostile enchantments.");
_decrement_a_duration(DUR_SLIMIFY, delay, "You feel less slimy.",
coinflip(), "Your slime is starting to congeal.");
- if (_decrement_a_duration(DUR_MISLED, delay,
- "Your thoughts are your own once more."))
- {
- end_mislead();
- }
if (_decrement_a_duration(DUR_QUAD_DAMAGE, delay, NULL, 0,
"Quad Damage is wearing off."))
{
diff --git a/crawl-ref/source/mislead.cc b/crawl-ref/source/mislead.cc
deleted file mode 100644
index b024142054..0000000000
--- a/crawl-ref/source/mislead.cc
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- * @file
- * @brief Handling of Mara's Mislead spell and stats, plus fakes.
-**/
-
-#include "AppHdr.h"
-#include "mislead.h"
-
-#include "act-iter.h"
-#include "enum.h"
-#include "env.h"
-#include "hints.h"
-#include "message.h"
-#include "misc.h"
-#include "monster.h"
-#include "mon-util.h"
-#ifdef USE_TILE_LOCAL
- #include "tilepick.h"
-#endif
-#include "view.h"
-#include "xom.h"
-
-bool unsuitable_misled_monster(monster_type mons)
-{
- return invalid_monster_type(mons)
- || mons_is_unique(mons)
- || mons_is_mimic(mons)
- || mons_is_ghost_demon(mons)
- || mons_class_is_stationary(mons)
- || mons_class_is_zombified(mons)
- || mons_is_tentacle_or_tentacle_segment(mons)
- || mons_class_flag(mons, M_NO_POLY_TO | M_CANT_SPAWN)
- || mons_class_flag(mons, M_UNFINISHED)
- || mons_genus(mons) == MONS_DRACONIAN
- || mons == MONS_MANTICORE
- || mons == MONS_SLIME_CREATURE
- || mons == MONS_HYDRA
- || mons == MONS_KRAKEN
- || mons == MONS_BALLISTOMYCETE
- || mons == MONS_HYPERACTIVE_BALLISTOMYCETE
- || mons == MONS_SHAPESHIFTER
- || mons == MONS_GLOWING_SHAPESHIFTER
- || mons == MONS_KILLER_KLOWN;
-}
-
-static monster_type _get_misled_monster(monster* mons)
-{
- monster_type mt = random_monster_at_grid(mons->pos());
- if (unsuitable_misled_monster(mt))
- mt = random_monster_at_grid(mons->pos());
-
- if (unsuitable_misled_monster(mt))
- return MONS_0;
-
- return mt;
-}
-
-bool update_mislead_monster(monster* mons)
-{
- // Don't affect uniques, named monsters, and monsters with special tiles.
- if (mons_is_unique(mons->type) || !mons->mname.empty()
- || mons->props.exists("monster_tile")
- || mons->props.exists("mislead_as")
- || mons_is_projectile(mons->type) // Only orbs, not boulders
- || mons_is_tentacle_or_tentacle_segment(mons->type)
- || mons->type == MONS_MARA_FAKE)
- {
- return false;
- }
-
- monster misled_as;
- misled_as.type = _get_misled_monster(mons);
- if (misled_as.type == MONS_0)
- return false;
-
- misled_as.mid = mons->mid;
- define_monster(&misled_as);
- mons->props["mislead_as"] = misled_as;
-
- return true;
-}
-
-static int _update_mislead_monsters(monster* caster)
-{
- int count = 0;
-
- for (monster_iterator mi; mi; ++mi)
- if (*mi != caster && update_mislead_monster(*mi))
- count++;
-
- return count;
-}
-
-void end_mislead()
-{
- you.duration[DUR_MISLED] = 0;
- for (monster_iterator mi; mi; ++mi)
- if (mi->props.exists("mislead_as"))
- mi->props.erase("mislead_as");
-}
-
-void mons_cast_mislead(monster* mons)
-{
- // This really only affects the player; it causes confusion when cast on
- // non-player foes, but that is dealt with inside ye-great-Switch-of-Doom.
- if (mons->foe != MHITYOU)
- return;
-
- // We deal with pointless misleads in the right place now.
-
- if (you.clarity())
- {
- mpr("Your vision blurs momentarily.");
- if (!you.clarity(false))
- maybe_id_clarity();
- return;
- }
-
- _update_mislead_monsters(mons);
-
- const int old_value = you.duration[DUR_MISLED];
- you.increase_duration(DUR_MISLED, mons->hit_dice * 12 / 3, 50);
- if (you.duration[DUR_MISLED] > old_value)
- {
- you.check_awaken(500);
-
- if (old_value <= 0)
- {
- mprf(MSGCH_WARN, "But for a moment, strange images dance in front of your eyes.");
-#ifdef USE_TILE_LOCAL
- tiles.add_overlay(you.pos(), tileidx_zap(MAGENTA));
- update_screen();
-#else
- flash_view(MAGENTA);
-#endif
- more();
- }
- else
- mprf(MSGCH_WARN, "You are even more misled!");
-
- learned_something_new(HINT_YOU_ENCHANTED);
-
- xom_is_stimulated((you.duration[DUR_MISLED] - old_value)
- / BASELINE_DELAY);
- }
-
- return;
-}
-
-int count_mara_fakes()
-{
- int count = 0;
- for (monster_iterator mi; mi; ++mi)
- {
- if (mi->type == MONS_MARA_FAKE)
- count++;
- }
-
- return count;
-}
diff --git a/crawl-ref/source/mislead.h b/crawl-ref/source/mislead.h
deleted file mode 100644
index 9e9e98daf8..0000000000
--- a/crawl-ref/source/mislead.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * @file
- * @brief Handling of Mara's Mislead spell and stats, plus fakes.
-**/
-
-bool unsuitable_misled_monster(monster_type mons);
-void mons_cast_mislead(monster* mons);
-bool update_mislead_monster(monster* mons);
-int count_mara_fakes();
-void end_mislead();
diff --git a/crawl-ref/source/mon-cast.cc b/crawl-ref/source/mon-cast.cc
index 99d2acade6..29e1ee3b6c 100644
--- a/crawl-ref/source/mon-cast.cc
+++ b/crawl-ref/source/mon-cast.cc
@@ -33,7 +33,6 @@
#include "mon-place.h"
#include "mon-project.h"
#include "terrain.h"
-#include "mislead.h"
#include "mgen_data.h"
#include "mon-gear.h"
#include "mon-speak.h"
@@ -1010,7 +1009,6 @@ static bool _los_free_spell(spell_type spell_cast)
|| spell_cast == SPELL_FIRE_STORM
|| spell_cast == SPELL_AIRSTRIKE
|| spell_cast == SPELL_WATERSTRIKE
- || spell_cast == SPELL_MISLEAD
|| spell_cast == SPELL_HOLY_FLAMES
|| spell_cast == SPELL_SUMMON_SPECTRAL_ORCS;
}
@@ -1046,7 +1044,6 @@ bool setup_mons_cast(monster* mons, bolt &pbolt, spell_type spell_cast,
switch (spell_cast)
{
case SPELL_BRAIN_FEED:
- case SPELL_MISLEAD:
case SPELL_SMITING:
case SPELL_AIRSTRIKE:
case SPELL_WATERSTRIKE:
@@ -1120,7 +1117,9 @@ bool setup_mons_cast(monster* mons, bolt &pbolt, spell_type spell_cast,
case SPELL_CHAIN_LIGHTNING: // the only user is reckless
case SPELL_SUMMON_EYEBALLS:
case SPELL_SUMMON_BUTTERFLIES:
+#if TAG_MAJOR_VERSION == 34
case SPELL_MISLEAD:
+#endif
case SPELL_CALL_TIDE:
case SPELL_INK_CLOUD:
case SPELL_SILENCE:
@@ -1615,12 +1614,6 @@ static bool _ms_waste_of_time(const monster* mon, spell_type monspell)
break;
}
- case SPELL_MISLEAD:
- if (you.duration[DUR_MISLED] > 10 && one_chance_in(3))
- ret = true;
-
- break;
-
case SPELL_SUMMON_ILLUSION:
if (!foe || !actor_is_illusion_cloneable(foe))
ret = true;
@@ -1795,6 +1788,7 @@ static bool _ms_waste_of_time(const monster* mon, spell_type monspell)
#if TAG_MAJOR_VERSION == 34
case SPELL_SUMMON_TWISTER:
case SPELL_SHAFT_SELF:
+ case SPELL_MISLEAD:
#endif
case SPELL_NO_SPELL:
ret = true;
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index e139eeae85..5262b0b129 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -410,13 +410,8 @@ monster_info::monster_info(const monster* m, int milev)
bool type_known = false;
bool nomsg_wounds = false;
- if (m->props.exists("mislead_as") && you.misled())
- {
- type = m->get_mislead_type();
- threat = mons_threat_level(&m->props["mislead_as"].get_monster());
- }
// friendly fake Rakshasas/Maras are known
- else if (attitude != ATT_FRIENDLY && m->props.exists("faking"))
+ if (attitude != ATT_FRIENDLY && m->props.exists("faking"))
{
type = m->props["faking"].get_monster().type;
threat = mons_threat_level(&m->props["faking"].get_monster());
@@ -705,7 +700,6 @@ monster_info::monster_info(const monster* m, int milev)
if (m->submerged())
mb.set(MB_SUBMERGED);
- // these are excluded as mislead types
if (mons_is_pghost(type))
{
ASSERT(m->ghost.get());
diff --git a/crawl-ref/source/mon-place.cc b/crawl-ref/source/mon-place.cc
index 8d8bbc4950..bb6b3be954 100644
--- a/crawl-ref/source/mon-place.cc
+++ b/crawl-ref/source/mon-place.cc
@@ -28,7 +28,6 @@
#include "libutil.h"
#include "losglobal.h"
#include "message.h"
-#include "mislead.h"
#include "mon-behv.h"
#include "mon-death.h"
#include "mon-gear.h"
@@ -1489,9 +1488,6 @@ static monster* _place_monster_aux(const mgen_data &mg, const monster *leader,
mon->add_ench(mon_enchant(ENCH_TORNADO, 0, 0, INFINITE_DURATION));
}
- if (!crawl_state.game_is_arena() && you.misled())
- update_mislead_monster(mon);
-
mon->flags |= MF_JUST_SUMMONED;
// Don't leave shifters in their starting shape.
diff --git a/crawl-ref/source/mon-spll.h b/crawl-ref/source/mon-spll.h
index a84f1b4d2e..3fed493dcb 100644
--- a/crawl-ref/source/mon-spll.h
+++ b/crawl-ref/source/mon-spll.h
@@ -1426,7 +1426,7 @@
{ MST_MARA,
{
- SPELL_MISLEAD,
+ SPELL_NO_SPELL,
SPELL_BOLT_OF_FIRE,
SPELL_FAKE_MARA_SUMMON,
SPELL_SUMMON_ILLUSION,
@@ -1437,7 +1437,7 @@
{ MST_MARA_FAKE,
{
- SPELL_MISLEAD,
+ SPELL_NO_SPELL,
SPELL_BOLT_OF_FIRE,
SPELL_NO_SPELL,
SPELL_NO_SPELL,
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc
index 1dd84684d2..58fd3b24bc 100644
--- a/crawl-ref/source/mon-stuff.cc
+++ b/crawl-ref/source/mon-stuff.cc
@@ -3598,11 +3598,8 @@ bool summon_can_attack(const monster* mons, const actor* targ)
mon_dam_level_type mons_get_damage_level(const monster* mons)
{
- if (!mons_can_display_wounds(mons)
- || !mons_class_can_display_wounds(mons->get_mislead_type()))
- {
+ if (!mons_can_display_wounds(mons))
return MDAM_OKAY;
- }
if (mons->hit_points <= mons->max_hit_points / 5)
return MDAM_ALMOST_DEAD;
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc
index 250f0a2ee8..cf06b84fbe 100644
--- a/crawl-ref/source/mon-util.cc
+++ b/crawl-ref/source/mon-util.cc
@@ -3129,7 +3129,6 @@ static bool _ms_los_spell(spell_type monspell)
if (monspell == SPELL_SMITING
|| monspell == SPELL_AIRSTRIKE
|| monspell == SPELL_HAUNT
- || monspell == SPELL_MISLEAD
|| monspell == SPELL_SUMMON_SPECTRAL_ORCS
|| spell_typematch(monspell, SPTYP_SUMMONING))
{
@@ -3145,8 +3144,7 @@ static bool _ms_ranged_spell(spell_type monspell, bool attack_only = false,
// Check for Smiting specially, so it's not filtered along
// with the summon spells.
if (attack_only
- && (monspell == SPELL_SMITING || monspell == SPELL_AIRSTRIKE
- || monspell == SPELL_MISLEAD))
+ && (monspell == SPELL_SMITING || monspell == SPELL_AIRSTRIKE))
{
return true;
}
@@ -3535,8 +3533,7 @@ static bool _mons_has_smite_attack(const monster* mons)
|| hspell_pass[i] == SPELL_SMITING
|| hspell_pass[i] == SPELL_HELLFIRE_BURST
|| hspell_pass[i] == SPELL_FIRE_STORM
- || hspell_pass[i] == SPELL_AIRSTRIKE
- || hspell_pass[i] == SPELL_MISLEAD)
+ || hspell_pass[i] == SPELL_AIRSTRIKE)
{
return true;
}
@@ -4581,6 +4578,18 @@ bool monster_nearby()
return false;
}
+int count_mara_fakes()
+{
+ int count = 0;
+ for (monster_iterator mi; mi; ++mi)
+ {
+ if (mi->type == MONS_MARA_FAKE)
+ count++;
+ }
+
+ return count;
+}
+
actor *actor_by_mid(mid_t m)
{
if (m == MID_PLAYER)
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h
index 8e541b97b0..6ee7eb1d27 100644
--- a/crawl-ref/source/mon-util.h
+++ b/crawl-ref/source/mon-util.h
@@ -443,6 +443,7 @@ bool mons_is_immotile(const monster* mons);
int get_dist_to_nearest_monster();
bool monster_nearby();
+int count_mara_fakes();
actor *actor_by_mid(mid_t m);
monster *monster_by_mid(mid_t m);
bool mons_is_tentacle_head(monster_type mc);
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc
index e8f82d1c70..3a890fd479 100644
--- a/crawl-ref/source/monster.cc
+++ b/crawl-ref/source/monster.cc
@@ -2534,17 +2534,13 @@ static string _mon_special_name(const monster& mon, description_level_type desc,
if (desc == DESC_NONE)
return "";
- monster_type type = mon.type;
- if (!crawl_state.game_is_arena() && you.misled())
- type = mon.get_mislead_type();
-
const bool arena_submerged = crawl_state.game_is_arena() && !force_seen
&& mon.submerged();
- if (type == MONS_NO_MONSTER)
+ if (mon.type == MONS_NO_MONSTER)
return "DEAD MONSTER";
- else if (invalid_monster_type(type) && type != MONS_PROGRAM_BUG)
- return _invalid_monster_str(type);
+ else if (invalid_monster_type(mon.type) && mon.type != MONS_PROGRAM_BUG)
+ return _invalid_monster_str(mon.type);
// Handle non-visible case first.
if (!force_seen && !mon.observable() && !arena_submerged)
@@ -5345,14 +5341,6 @@ const monsterentry *monster::find_monsterentry() const
: get_monster_data(type);
}
-monster_type monster::get_mislead_type() const
-{
- if (props.exists("mislead_as"))
- return props["mislead_as"].get_monster().type;
- else
- return type;
-}
-
int monster::action_energy(energy_use_type et) const
{
if (const monsterentry *me = find_monsterentry())
diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h
index 1f8a66a4d1..a82229e363 100644
--- a/crawl-ref/source/monster.h
+++ b/crawl-ref/source/monster.h
@@ -91,7 +91,6 @@ public:
bool has_base_name() const;
const monsterentry *find_monsterentry() const;
- monster_type get_mislead_type() const;
void init_experience();
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index f76cf4371a..f28d21511c 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -961,7 +961,6 @@ static void _get_status_lights(vector<status_light>& out)
DUR_LOWERED_MR,
STATUS_BEHELD,
DUR_LIQUID_FLAMES,
- DUR_MISLED,
DUR_POISONING,
STATUS_SICK,
STATUS_ROT,
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index 2234314632..ba5d88babd 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -7466,11 +7466,6 @@ bool player::invisible() const
return duration[DUR_INVIS] && !backlit();
}
-bool player::misled() const
-{
- return duration[DUR_MISLED];
-}
-
bool player::visible_to(const actor *looker) const
{
if (crawl_state.game_is_arena())
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 944d103f55..f5a4368321 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -426,7 +426,6 @@ public:
bool is_web_immune() const;
bool cannot_speak() const;
bool invisible() const;
- bool misled() const;
bool can_see_invisible() const;
bool can_see_invisible(bool unid, bool items = true) const;
bool visible_to(const actor *looker) const;
diff --git a/crawl-ref/source/rltiles/dc-spells.txt b/crawl-ref/source/rltiles/dc-spells.txt
index e69cbe16f8..ff89b1afc2 100644
--- a/crawl-ref/source/rltiles/dc-spells.txt
+++ b/crawl-ref/source/rltiles/dc-spells.txt
@@ -239,7 +239,6 @@ miasma_breath MIASMA_BREATH
%sdir misc
error MIGHT
error MIGHT_OTHER
-error MISLEAD
error NOXIOUS_CLOUD
error PETRIFYING_CLOUD
%sdir gui/spells/monster
diff --git a/crawl-ref/source/spl-damage.cc b/crawl-ref/source/spl-damage.cc
index 9adee5ef62..5f62fd967a 100644
--- a/crawl-ref/source/spl-damage.cc
+++ b/crawl-ref/source/spl-damage.cc
@@ -824,7 +824,7 @@ spret_type vampiric_drain(int pow, monster* mons, bool fail)
return SPRET_SUCCESS;
}
- // Monster might be invisible or player misled.
+ // Monster might be invisible.
if (mons->holiness() == MH_UNDEAD || mons->holiness() == MH_DEMONIC)
{
mpr("Aaaarggghhhhh!");
diff --git a/crawl-ref/source/spl-data.h b/crawl-ref/source/spl-data.h
index 463362e3d8..fdaeb292bb 100644
--- a/crawl-ref/source/spl-data.h
+++ b/crawl-ref/source/spl-data.h
@@ -2475,7 +2475,6 @@ struct spell_desc
false,
false
},
-#endif
{
SPELL_MISLEAD, "Mislead",
@@ -2489,6 +2488,7 @@ struct spell_desc
false,
false
},
+#endif
{
SPELL_SUMMON_ILLUSION, "Summon Illusion",
diff --git a/crawl-ref/source/status.cc b/crawl-ref/source/status.cc
index 6855bf5279..e87191637f 100644
--- a/crawl-ref/source/status.cc
+++ b/crawl-ref/source/status.cc
@@ -70,8 +70,6 @@ static duration_def duration_data[] =
0, "", "shielded", "" },
{ DUR_MIGHT, false,
0, "", "mighty", "You are mighty." },
- { DUR_MISLED, true,
- LIGHTMAGENTA, "Misled", "misled", "" },
{ DUR_PARALYSIS, false,
RED, "Para", "paralysed", "You are paralysed." },
{ DUR_PETRIFIED, false,
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 2d9d01ad22..f119180ceb 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -49,7 +49,6 @@
#include "libutil.h"
#include "mapmark.h"
#include "misc.h"
-#include "mislead.h"
#include "mon-info.h"
#if TAG_MAJOR_VERSION == 34
#include "mon-chimera.h"
@@ -3610,12 +3609,6 @@ void marshallMonster(writer &th, const monster& m)
if (parts & MP_CONSTRICTION)
_marshall_constriction(th, &m);
- if (m.props.exists("mislead_as"))
- {
- ASSERT(!unsuitable_misled_monster(
- m.props["mislead_as"].get_monster().type));
- }
-
m.props.write(th);
}
@@ -4332,16 +4325,6 @@ void unmarshallMonster(reader &th, monster& m)
if (m.type == MONS_WAR_DOG)
m.type = MONS_WOLF;
}
-
- // The second part of this is here to deal with saves that have the
- // invald misled monster problem (#7501).
- if (m.props.exists("mislead_as")
- && (!you.misled()
- || unsuitable_misled_monster(
- m.props["mislead_as"].get_monster().type)))
- {
- m.props.erase("mislead_as");
- }
#endif
if (m.type != MONS_PROGRAM_BUG && mons_species(m.type) == MONS_PROGRAM_BUG)
diff --git a/crawl-ref/source/throw.cc b/crawl-ref/source/throw.cc
index 5ba2252be2..04427f2949 100644
--- a/crawl-ref/source/throw.cc
+++ b/crawl-ref/source/throw.cc
@@ -2341,11 +2341,6 @@ bool mons_throw(monster* mons, bolt &beam, int msl)
_throw_noise(mons, beam, item);
- // Store misled values here, as the setting up of the aux source
- // will use the wrong monster name.
- int misled = you.duration[DUR_MISLED];
- you.duration[DUR_MISLED] = 0;
-
// [dshaligram] When changing bolt names here, you must edit
// hiscores.cc (scorefile_entry::terse_missile_cause()) to match.
if (projected == LRET_LAUNCHED)
@@ -2361,9 +2356,6 @@ bool mons_throw(monster* mons, bolt &beam, int msl)
mons->name(DESC_A).c_str());
}
- // And restore it here.
- you.duration[DUR_MISLED] = misled;
-
// Add everything up.
beam.hit = baseHit + random2avg(exHitBonus, 2) + ammoHitBonus;
beam.damage =
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index 1ba373fd40..ea4a4af186 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -5098,7 +5098,6 @@ tileidx_t tileidx_spell(spell_type spell)
case SPELL_MIASMA_BREATH: return TILEG_MIASMA_BREATH;
case SPELL_MIGHT: return TILEG_MIGHT;
case SPELL_MIGHT_OTHER: return TILEG_MIGHT_OTHER;
- case SPELL_MISLEAD: return TILEG_MISLEAD;
case SPELL_NOXIOUS_CLOUD: return TILEG_NOXIOUS_CLOUD;
case SPELL_PETRIFYING_CLOUD: return TILEG_PETRIFYING_CLOUD;
case SPELL_POLYMORPH: return TILEG_POLYMORPH;
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index bb5fb3997d..2fb7bf5402 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -290,12 +290,7 @@ void update_monsters_in_view()
map<monster_type, int> genera; // This is the plural for genus!
for (unsigned int i = 0; i < size; ++i)
{
- monster_type type;
- if (monsters[i]->props.exists("mislead_as") && you.misled())
- type = monsters[i]->get_mislead_type();
- else
- type = monsters[i]->type;
-
+ const monster_type type = monsters[i]->type;
types[type]++;
genera[mons_genus(type)]++;
}
diff --git a/crawl-ref/source/wiz-you.cc b/crawl-ref/source/wiz-you.cc
index fb6f79a056..2bd472d6be 100644
--- a/crawl-ref/source/wiz-you.cc
+++ b/crawl-ref/source/wiz-you.cc
@@ -311,7 +311,6 @@ void wizard_heal(bool super_heal)
you.rotting = 0;
you.disease = 0;
you.duration[DUR_CONF] = 0;
- you.duration[DUR_MISLED] = 0;
you.duration[DUR_POISONING] = 0;
you.duration[DUR_EXHAUSTED] = 0;
set_hp(you.hp_max);
@@ -802,7 +801,9 @@ static const char* dur_names[] =
"slimify",
"time step",
"icemail depleted",
+#if TAG_MAJOR_VERSION == 34
"misled",
+#endif
"quad damage",
"afraid",
"mirror damage",
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 46a6db0dc0..d8d6189237 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -1080,7 +1080,7 @@ static int _xom_do_potion(bool debug = false)
{
case POT_CURING:
if (you.duration[DUR_POISONING] || you.rotting || you.disease
- || you.duration[DUR_CONF] || you.duration[DUR_MISLED])
+ || you.duration[DUR_CONF])
{
break;
}