summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-15 04:03:33 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-15 04:03:33 +0000
commita1b82e6be0343a691d342b48dd9f9076ad53453a (patch)
tree444c3d51a7c14d0de579df58fc798fd68626eb85 /crawl-ref/source/effects.cc
parentcce629f112f720f195dc5b31a94dab10bdacd52e (diff)
downloadcrawl-ref-a1b82e6be0343a691d342b48dd9f9076ad53453a.tar.gz
crawl-ref-a1b82e6be0343a691d342b48dd9f9076ad53453a.zip
Removed amnesia/forgetfullness trap, mutation and scroll. The
mutation has been replaced with an involuntary shouting mutation, and the trap with an alarm trap. The scroll hasn't been replaced with anything, and the frequency of scrolls of random uselessness has thus doubled; someone needs to re-do the scroll frequencies. Also added a "drifting" mutation, which causes the player to sometimes drift in a random direction after moving. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2464 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc38
1 files changed, 31 insertions, 7 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 931f61498f..5b8761cd37 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1687,18 +1687,12 @@ bool recharge_wand(void)
return (true);
} // end recharge_wand()
-void yell(void)
+void yell(bool force)
{
bool targ_prev = false;
int mons_targd = MHITNOT;
struct dist targ;
- if (silenced(you.x_pos, you.y_pos) || you.cannot_speak())
- {
- mpr("You are unable to make a sound!");
- return;
- }
-
const std::string shout_verb = you.shout_verb();
std::string cap_shout = shout_verb;
cap_shout[0] = toupper(cap_shout[0]);
@@ -1710,6 +1704,36 @@ void yell(void)
noise_level = 18;
else if (shout_verb == "hiss")
noise_level = 8;
+ else if (shout_verb == "squeak")
+ noise_level = 4;
+ else if (shout_verb == "__NONE")
+ noise_level = 0;
+
+ if (silenced(you.x_pos, you.y_pos) || you.cannot_speak())
+ noise_level = 0;
+
+ if (noise_level == 0)
+ {
+ if (force)
+ {
+ if (shout_verb == "__NONE")
+ mpr("You must scream but have no lips!");
+ else
+ mprf("A %s rips itself from your lips, but you make no sound!",
+ shout_verb.c_str());
+ }
+ else
+ mpr("You are unable to make a sound!");
+
+ return;
+ }
+
+ if (force)
+ {
+ mprf("A %s rips itself from your lips!", shout_verb.c_str());
+ noisy( noise_level, you.x_pos, you.y_pos );
+ return;
+ }
mpr("What do you say?", MSGCH_PROMPT);
mprf(" ! - %s", cap_shout.c_str());