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
ZCRK2DJ5VKECRQXZTWT4NUDL2VT5ZHUK7NT6NQPLRJ56TDX5PJSAC
5VFJGYI4MCPASCLFBHHNHXRREYPQURKXZTBMXUM72KPYONCQNQFAC
4BSWRAIA7TLRFRZ4RMLOVDHWDWBGJCAQZUOPXPJYW6OJY6B3HPLQC
3FBKOX4Y5QYPMBOCSAMHNZXCY7Z75YDQDL4EJZHZIGDXL7RMZ7TAC
AQ36MO7VNGSGQ5KK7JCQA2WEHUELAFLSU2QBUWROVJFOTPMGFGMQC
SVY2PTCLXR3KNPQAWXVXTTGCC5DR334HOAKHYO3VDDRWM2BWMALAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
SJOTTUZMA3UTGT5D6LKUTBDP2CZFXT24FB5IAWCUFHSHLLACM75QC
LIBWXPN6HLJAIGEFJYLOL4HLIUD236U3WM5QPHIZ3DSB4CCUJERAC
KFULGQQOHWUTXOM3BXCCYPGGVGGY4Z6265XUFRCBPNLTZAEHJZSQC
DTO3EUKWHZ5RJNGNCFYXSOVTIPVXPP637F2W7WFGYKJ7JK7VNKNQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
VNHFP63ZLLZU3A3PLXP4BITX57DUIYDHFOHQYK3BOBHV3S64G26QC
L6O4LGZRKBURVWEY7XRVCSQLJ5RULNBEWMQJ6I2UYVWWB66FM3MQC
ILOED4VB4I6VPAUTR75ZWX6MXDYXB5DO2EDK2UH67O3HNKWV23RQC
GQL5SIGBHLU3FMCE54XVGLRY5AZHRM6DUEB722REA2DPLGJSN6EQC
4UXFU3FZOCBSLDQ4S7MJKAE2H7VUHCNRDQMIY6NJ3PHYXWNGISDQC
3KAINFIXO7WNWGUGZB43EUNFRS2ZPBLQZDTY456QACMRHYIJ7WDAC
5CNYJQGEILRX2TAYBWMVECJ6D4OPV2CD6YPDIERS2SR77Z4LTZPAC
case TRAP_AMNESIA:
mpr("You feel momentarily disoriented.");
if (!wearing_amulet(AMU_CLARITY))
forget_map(random2avg(100, 2));
case TRAP_ALARM:
if (silenced(you.x_pos, you.y_pos))
{
if (trap_known)
mpr("The alarm is silenced.");
else
grd[you.x_pos][you.y_pos] = DNGN_UNDISCOVERED_TRAP;
return;
}
noisy(12, you.x_pos, you.y_pos, "An alarm trap emits a blaring wail!");
{"You occasionally forget where you are.",
"You sometimes forget where you are.",
"You frequently forget where you are."},
{"You occasionally scream uncontrollably.",
"You sometimes scream uncontrollably.",
"You frequently scream uncontrollably."},
// amnesia traps do not affect monsters (yet) and
// only monsters of normal+ IQ will direct a msg
// to the player - also, *never* revealed: {dlb}
case TRAP_AMNESIA:
if (mons_intel(monster->type) > I_ANIMAL)
simple_monster_message(monster,
" seems momentarily disoriented.");
// alarm trap aren't set off by hostile monsters, because that would
// be way too nasty for the player.
case TRAP_ALARM:
if (!mons_friendly(monster) || silenced(monster->x, monster->y))
{
if (trapKnown && you.can_see(monster)
&& !silenced(you.x_pos, you.y_pos))
{
mpr("The alarm trap makes no noise.");
}
return;
}
noisy(12, monster->x, monster->y);
if (!silenced(you.x_pos, you.y_pos))
{
if (monsterNearby)
{
mpr("You hear a blaring wail!", MSGCH_SOUND);
if (you.can_see(monster))
revealTrap = true;
}
else
mpr("You hear a distant blaring wail!", MSGCH_SOUND);
}
// If the player has the lost mutation forget portions of the map
if (you.mutation[MUT_LOST] && !wearing_amulet(AMU_CLARITY) &&
(random2(100) <= you.mutation[MUT_LOST] * 5) )
forget_map(5 + random2(you.mutation[MUT_LOST] * 10));
if (you.mutation[MUT_SCREAM]
&& (random2(100) <= you.mutation[MUT_SCREAM] * 5) )
{
yell(true);
}
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!");
// Called when the player moves by walking/running. Also calls
// attack function and trap function etc when necessary.
static void drift_player(int move_x, int move_y)
{
int drift_dir = -1;
int okay_dirs = 0;
for (int i = 0; i < 8; i++)
{
const coord_def drift_delta = Compass[i];
const coord_def new_pos = you.pos() + drift_delta;
const unsigned short targ_monst = mgrd(new_pos);
if (you.can_pass_through(new_pos)
&& !is_grid_dangerous(grd(new_pos))
&& (targ_monst == NON_MONSTER ||
mons_is_submerged(&menv[targ_monst])))
{
if (one_chance_in(++okay_dirs))
drift_dir = i;
}
}
if (okay_dirs > 0)
{
const coord_def drift_delta = Compass[drift_dir];
const coord_def new_pos = you.pos() + drift_delta;
if (drift_delta == coord_def(-move_x, -move_y))
mpr("You drift backwards.");
else if (drift_delta == coord_def(move_x, move_y))
mpr("You drift forwards.");
else
mpr("You drift.");
move_player_to_grid(new_pos.x, new_pos.y, true, true, false);
}
}
// Called when the player moves by walking/running. Also calls attack
// function etc when necessary.