Fix the perpetual haste cheat.
Rogue V3 allowed the player to gain perpetual haste by quaffing a potion of haste while already hasted. This is supposed to remove the haste effect and cause temporary paralysis. Super-Rogue removed haste correctly, but gave confusing messages.
This commit is contained in:
parent
714bad8c3c
commit
c194ec3dc9
6 changed files with 13 additions and 8 deletions
|
|
@ -320,20 +320,23 @@ chg_str(int amt)
|
|||
* add a haste to the player
|
||||
*/
|
||||
|
||||
void
|
||||
bool
|
||||
add_haste(int potion)
|
||||
{
|
||||
if (on(player, ISHASTE))
|
||||
{
|
||||
msg("You faint from exhaustion.");
|
||||
no_command += rnd(8);
|
||||
player.t_flags &= ~ISHASTE;
|
||||
extinguish(nohaste);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.t_flags |= ISHASTE;
|
||||
if (potion)
|
||||
fuse(nohaste, 0, rnd(4)+4, AFTER);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue