Mercurial > hg > early-roguelike
diff rogue3/misc.c @ 251:e7862a021609
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.
author | John "Elwin" Edwards |
---|---|
date | Sat, 28 Jan 2017 11:45:36 -0500 |
parents | 527e2150eaf0 |
children | e52a8a7ad4c5 |
line wrap: on
line diff
--- a/rogue3/misc.c Wed Jul 20 20:44:41 2016 -0400 +++ b/rogue3/misc.c Sat Jan 28 11:45:36 2017 -0500 @@ -320,20 +320,23 @@ * 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; } }