diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-14 17:00:11 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2009-12-14 17:00:11 +0100 |
commit | 4f1494ceb034f1b47bc98620277415f19d0ef80e (patch) | |
tree | 582ad01ac90cef165c0e5285a4b4759d1b5c64fe /crawl-ref/source | |
parent | 7d826f12280097aafc2e85aa9066bd73f7dd1367 (diff) | |
download | crawl-ref-4f1494ceb034f1b47bc98620277415f19d0ef80e.tar.gz crawl-ref-4f1494ceb034f1b47bc98620277415f19d0ef80e.zip |
Prevent Maurice from stealing something when confused.
Also add some appropriate messages for this case.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/dat/database/monspeak.txt | 15 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 11 |
2 files changed, 26 insertions, 0 deletions
diff --git a/crawl-ref/source/dat/database/monspeak.txt b/crawl-ref/source/dat/database/monspeak.txt index 612ac4b491..1b63fbcbcd 100644 --- a/crawl-ref/source/dat/database/monspeak.txt +++ b/crawl-ref/source/dat/database/monspeak.txt @@ -2716,6 +2716,21 @@ Maurice nonstealing @The_monster@ groans, "What are you, a monk?" %%%% +# Triggered when Maurice tries to steal but is too confused to do so. +Maurice confused nonstealing + +w:70 +__NONE + +@The_monster@ makes a clumsy attempt to grab your valuables. + +@The_monster@ fumbles for your pockets and misses. + +@The_monster@ lunges for your pockets and trips. + +w:5 +@The_monster@ sings off-key, "You got some money for me?" +%%%% ############ MENKAURE ### A mummy whose rest you've disturbed Menkaure diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 47d1718bd0..52568110c1 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -4739,6 +4739,17 @@ void melee_attack::splash_defender_with_acid(int strength) static void _steal_item_from_player(monsters *mon) { + if (mon->confused()) + { + std::string msg = getSpeakString("Maurice confused nonstealing"); + if (!msg.empty() && msg != "__NONE") + { + msg = replace_all(msg, "@The_monster@", mon->name(DESC_CAP_THE)); + mpr(msg.c_str(), MSGCH_TALK); + } + return; + } + mon_inv_type mslot = NUM_MONSTER_SLOTS; int steal_what = -1; int total_value = 0; |