Mercurial > hg > early-roguelike
comparison 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 |
comparison
equal
deleted
inserted
replaced
250:d08f19d529eb | 251:e7862a021609 |
---|---|
318 /* | 318 /* |
319 * add_haste: | 319 * add_haste: |
320 * add a haste to the player | 320 * add a haste to the player |
321 */ | 321 */ |
322 | 322 |
323 void | 323 bool |
324 add_haste(int potion) | 324 add_haste(int potion) |
325 { | 325 { |
326 if (on(player, ISHASTE)) | 326 if (on(player, ISHASTE)) |
327 { | 327 { |
328 msg("You faint from exhaustion."); | 328 msg("You faint from exhaustion."); |
329 no_command += rnd(8); | 329 no_command += rnd(8); |
330 player.t_flags &= ~ISHASTE; | |
330 extinguish(nohaste); | 331 extinguish(nohaste); |
332 return FALSE; | |
331 } | 333 } |
332 else | 334 else |
333 { | 335 { |
334 player.t_flags |= ISHASTE; | 336 player.t_flags |= ISHASTE; |
335 if (potion) | 337 if (potion) |
336 fuse(nohaste, 0, rnd(4)+4, AFTER); | 338 fuse(nohaste, 0, rnd(4)+4, AFTER); |
339 return TRUE; | |
337 } | 340 } |
338 } | 341 } |
339 | 342 |
340 /* | 343 /* |
341 * aggravate: | 344 * aggravate: |