summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/traps.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-13 13:56:45 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-13 13:56:45 +0000
commitd2a1017761869d23760a73a30e51903e872da28a (patch)
tree5e103a79e9b78236a955d9510c90ace143daff86 /crawl-ref/source/traps.cc
parent7a66364b0a9a5ee83119698e5d84b8293d3b3b62 (diff)
downloadcrawl-ref-d2a1017761869d23760a73a30e51903e872da28a.tar.gz
crawl-ref-d2a1017761869d23760a73a30e51903e872da28a.zip
FR 2046572: Don't anger allies by teleporting them. (Maybe enslaved monsters
should be exempted from that, but for now they're not.) Make *all* allies (including zombies) avoid Zot traps known to the player, but don't let them avoid unknown ones (unless native, or highly intelligent, as usual.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7444 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/traps.cc')
-rw-r--r--crawl-ref/source/traps.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/crawl-ref/source/traps.cc b/crawl-ref/source/traps.cc
index c30381da63..dc27ad8df8 100644
--- a/crawl-ref/source/traps.cc
+++ b/crawl-ref/source/traps.cc
@@ -152,7 +152,6 @@ bool trap_def::is_known(const actor* act) const
if (act->atype() == ACT_MONSTER)
{
const monsters* monster = dynamic_cast<const monsters*>(act);
- const bool mechanical = (this->category() == DNGN_TRAP_MECHANICAL);
const int intel = mons_intel(monster);
// Smarter trap handling for intelligent monsters
@@ -163,7 +162,7 @@ bool trap_def::is_known(const actor* act) const
// * very intelligent monsters can be assumed to have a high T&D
// skill (or have memorised part of the dungeon layout ;) )
- rc = (intel >= I_NORMAL && mechanical
+ rc = (intel >= I_NORMAL
&& (mons_is_native_in_branch(monster)
|| mons_wont_attack(monster) && player_knows
|| intel >= I_HIGH && one_chance_in(3)));