summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-abil.cc
diff options
context:
space:
mode:
authorNicholas Feinberg <pleasingfung@gmail.com>2014-07-29 08:08:42 -0700
committerNicholas Feinberg <pleasingfung@gmail.com>2014-07-29 08:08:42 -0700
commit4dcdddd065607d1886704654ee0f69e17b915ac6 (patch)
treef68a1f09ebc6f663367428353c14ee29a20efb22 /crawl-ref/source/mon-abil.cc
parent970b2e003239f9e1abdcdca935c68138b19acaa2 (diff)
downloadcrawl-ref-4dcdddd065607d1886704654ee0f69e17b915ac6.tar.gz
crawl-ref-4dcdddd065607d1886704654ee0f69e17b915ac6.zip
Adjust invisible mermaids
Invisible mermaids/sirens can't mesmerize the player, so I've made them sing half as often, matching their odds of singing when not targeting the player. This let me remove a hacky special case later in the code.
Diffstat (limited to 'crawl-ref/source/mon-abil.cc')
-rw-r--r--crawl-ref/source/mon-abil.cc22
1 files changed, 9 insertions, 13 deletions
diff --git a/crawl-ref/source/mon-abil.cc b/crawl-ref/source/mon-abil.cc
index 2b72f11828..7bbd761e76 100644
--- a/crawl-ref/source/mon-abil.cc
+++ b/crawl-ref/source/mon-abil.cc
@@ -3349,9 +3349,11 @@ bool _mermaid_sing(monster* mons, msg_channel_type spl)
const bool already_mesmerised = you.beheld_by(mons);
- // XXX: clarify this block
+ // If the mer is trying to mesmerize you, sing 80% of the time. Otherwise,
+ // only sing 40% of the time.
if (!one_chance_in(5)
- && (mons->foe != MHITYOU || already_mesmerised || coinflip()))
+ && (mons->foe != MHITYOU || already_mesmerised || !you.can_see(mons)
+ || coinflip()))
{
return false;
}
@@ -3378,18 +3380,12 @@ bool _mermaid_sing(monster* mons, msg_channel_type spl)
mprf(MSGCH_SOUND, "You hear a luring song.");
else
{
- // reduce spamminess
- if (mons->type == MONS_SIREN || one_chance_in(4))
- {
- if (coinflip())
- mprf(MSGCH_SOUND, "You hear a haunting song.");
- else
- mprf(MSGCH_SOUND, "You hear an eerie melody.");
-
- return true;
- }
+ if (coinflip())
+ mprf(MSGCH_SOUND, "You hear a haunting song.");
+ else
+ mprf(MSGCH_SOUND, "You hear an eerie melody.");
- return false;
+ return true;
}
}