diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-03 18:02:39 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-02-03 18:02:39 +0000 |
commit | b0afcc8dd38ff00d80b4955bdc2f12c3a843c594 (patch) | |
tree | 34b7ae461b462f3a9ba0dedf70c2b6c2d0bd41c4 /crawl-ref/source/directn.cc | |
parent | 81af4f86540998fcfe758e757ddb2098ac0733b8 (diff) | |
download | crawl-ref-b0afcc8dd38ff00d80b4955bdc2f12c3a843c594.tar.gz crawl-ref-b0afcc8dd38ff00d80b4955bdc2f12c3a843c594.zip |
Fix [2504221]: if a monster gets both Slow and Haste (by being slowed and
then speeding up from Zin's Recitation power) don't give a confusing
description.
I left in the possibility of actually having both enchantments at once;
arguably Slow should just be deleted in this case.
Fixed doubled message when enchanting a creature with haste/slow.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8882 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 57 |
1 files changed, 23 insertions, 34 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 3edb2846e8..88655f4be4 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -2729,45 +2729,34 @@ static std::string _describe_mons_enchantment(const monsters &mons, return ""; } + if (ench.ench == ENCH_HASTE && mons.has_ench(ENCH_SLOW)) + return ""; + + if (ench.ench == ENCH_SLOW && mons.has_ench(ENCH_HASTE)) + return ""; + if (ench.ench == ENCH_PETRIFIED && mons.has_ench(ENCH_PETRIFYING)) return ""; switch (ench.ench) { - case ENCH_POISON: - return "poisoned"; - case ENCH_SICK: - return "sick"; - case ENCH_ROT: - return "rotting away"; //jmf: "covered in sores"? - case ENCH_BACKLIGHT: - return "softly glowing"; - case ENCH_SLOW: - return "moving slowly"; - case ENCH_BERSERK: - return "berserk"; - case ENCH_BATTLE_FRENZY: - return "consumed by blood-lust"; - case ENCH_HASTE: - return "moving very quickly"; - case ENCH_CONFUSION: - return "bewildered and confused"; - case ENCH_INVIS: - return "slightly transparent"; - case ENCH_CHARM: - return "in your thrall"; - case ENCH_STICKY_FLAME: - return "covered in liquid flames"; - case ENCH_HELD: - return "entangled in a net"; - case ENCH_PETRIFIED: - return "petrified"; - case ENCH_PETRIFYING: - return "slowly petrifying"; - case ENCH_LOWERED_MR: - return "susceptible to magic"; - default: - return ""; + case ENCH_POISON: return "poisoned"; + case ENCH_SICK: return "sick"; + case ENCH_ROT: return "rotting away"; //jmf: "covered in sores"? + case ENCH_BACKLIGHT: return "softly glowing"; + case ENCH_SLOW: return "moving slowly"; + case ENCH_BERSERK: return "berserk"; + case ENCH_BATTLE_FRENZY: return "consumed by blood-lust"; + case ENCH_HASTE: return "moving very quickly"; + case ENCH_CONFUSION: return "bewildered and confused"; + case ENCH_INVIS: return "slightly transparent"; + case ENCH_CHARM: return "in your thrall"; + case ENCH_STICKY_FLAME: return "covered in liquid flames"; + case ENCH_HELD: return "entangled in a net"; + case ENCH_PETRIFIED: return "petrified"; + case ENCH_PETRIFYING: return "slowly petrifying"; + case ENCH_LOWERED_MR: return "susceptible to magic"; + default: return ""; } } |