diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-18 16:23:40 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-18 16:23:40 +0000 |
commit | 361d79f1078a756eb41ddf14294cc017c38676a8 (patch) | |
tree | c00587810a5404b26f1781e023d034dffd5236f1 /crawl-ref/source | |
parent | 744fc99610098d9572508383f39a7aa5107f7762 (diff) | |
download | crawl-ref-361d79f1078a756eb41ddf14294cc017c38676a8.tar.gz crawl-ref-361d79f1078a756eb41ddf14294cc017c38676a8.zip |
Fix [2686013]: remove confusing "You resist." message from monster
Cantrip spell effect.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9515 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 80 |
1 files changed, 26 insertions, 54 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 6a00c6ad7a..642531c7a2 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -470,68 +470,40 @@ void mons_cast(monsters *monster, bolt &pbolt, spell_type spell_cast, case SPELL_CANTRIP: { + // Monster spell of uselessness, just prints a message. + // This spell exists so that some monsters with really strong + // spells (ie orc priest) can be toned down a bit. -- bwr + // + // XXX: Needs expansion, and perhaps different priest/mage flavours. + // Don't give any message if the monster isn't nearby. // (Otherwise you could get them from halfway across the level.) if (!mons_near(monster)) return; - const bool friendly = mons_friendly(monster); - const bool buff_only = !friendly && is_sanctuary(you.pos()); - bool need_friendly_stub = false; + const bool friendly = mons_friendly(monster); + const bool buff_only = !friendly && is_sanctuary(you.pos()); const msg_channel_type channel = (friendly) ? MSGCH_FRIEND_ENCHANT : MSGCH_MONSTER_ENCHANT; - // Monster spell of uselessness, just prints a message. - // This spell exists so that some monsters with really strong - // spells (ie orc priest) can be toned down a bit. -- bwr - // - // XXX: Needs expansion, and perhaps different priest/mage flavours. - switch (random2((buff_only || crawl_state.arena) ? 4 : 7)) - { - case 0: - simple_monster_message(monster, " glows brightly for a moment.", - channel); - break; - case 1: - simple_monster_message(monster, " looks stronger.", - channel); - break; - case 2: - simple_monster_message(monster, " becomes somewhat translucent.", - channel); - break; - case 3: - simple_monster_message(monster, "'s eyes start to glow.", - channel); - break; - case 4: - if (friendly) - need_friendly_stub = true; - else - mpr("You feel troubled."); - break; - case 5: - if (friendly) - need_friendly_stub = true; - else - mpr("You feel a wave of unholy energy pass over you."); - break; - case 6: - default: - if (friendly) - need_friendly_stub = true; - else if (one_chance_in(20)) - mpr("You resist (whatever that was supposed to do)."); - else - mpr("You resist."); - break; - } - - if (need_friendly_stub) - { - simple_monster_message(monster, " shimmers for a moment.", - channel); - } + // Messages about the monster influencing itself. + const char* buff_msgs[] = { " glows brightly for a moment.", + " looks stronger.", + " becomes somewhat translucent.", + "'s eyes start to glow." }; + + // Messages about the monster influencing you. + const char* other_msgs[] = { + "You feel troubled.", + "You feel a wave of unholy energy pass over you." + }; + + if (buff_only || crawl_state.arena || x_chance_in_y(2,3)) + simple_monster_message(monster, RANDOM_ELEMENT(buff_msgs), channel); + else if (friendly) + simple_monster_message(monster, " shimmers for a moment.", channel); + else + mpr(RANDOM_ELEMENT(other_msgs)); return; } |