diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-13 13:56:45 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-13 13:56:45 +0000 |
commit | d2a1017761869d23760a73a30e51903e872da28a (patch) | |
tree | 5e103a79e9b78236a955d9510c90ace143daff86 /crawl-ref/source/beam.cc | |
parent | 7a66364b0a9a5ee83119698e5d84b8293d3b3b62 (diff) | |
download | crawl-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/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index a49f943d84..9e8d112083 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -5257,11 +5257,21 @@ static bool _nasty_beam(monsters *mon, const bolt &beam) return (true); // Now for some non-hurtful enchantments. + if (beam.flavour == BEAM_DIGGING) + return (false); + + // haste/healing/invisibility + if (_nice_beam(mon, beam)) + return (false); // No charming holy beings! if (beam.flavour == BEAM_CHARM) return (mons_is_holy(mon)); + // Friendly and good neutral monsters don't mind being teleported. + if (beam.flavour == BEAM_TELEPORT) + return (!mons_wont_attack(mon)); + // degeneration / sleep / enslave soul if (beam.flavour == BEAM_DEGENERATE || beam.flavour == BEAM_SLEEP || beam.flavour == BEAM_ENSLAVE_SOUL) @@ -5284,13 +5294,6 @@ static bool _nasty_beam(monsters *mon, const bolt &beam) if (beam.flavour == BEAM_ENSLAVE_DEMON) return (mons_holiness(mon) == MH_DEMONIC); - // haste/healing/invisibility - if (beam.flavour == BEAM_HASTE || beam.flavour == BEAM_HEALING - || beam.flavour == BEAM_INVISIBILITY) - { - return (false); - } - // everything else is considered nasty by everyone return (true); } |