16
Classic Roguelikes / Re: Rogue - let's beat it
« on: August 06, 2016, 02:42:40 AM »
More bugs...
This one is really funny and quite unfortunate, present in v5, v4, and also Epyx 1.48:
File "fight.c", function roll_em(). This is supposed to give the player bonus chance to hit sleeping (held) monsters, and monsters to get this bonus when player is faint or frozen/paralyzed. The funny part is that it actually gives monsters this bonus all the time, while player never gets it. Ha-ha! As if the game was not intended to be hard enough these bugs make it still much harder and super-very unfair. And that Squeeealer managed to beat it with all these bugs and against all odds, I have to say again it's some kind of miracle.
Anyhow, there are two problems. First, ISRUN flag for the player is not handled properly somewhere else in the code so effectively the player is always "fainted" and thus the monsters always get this to-hit bonus. Second, in function fight(), there is a call to function runto(), which wakes up monsters, before the dice roll, so by the time it is decided whether to give the player to-hit bonus for sleeping/held monsters they are already up and running and thus the player never gets it.
This one is really funny and quite unfortunate, present in v5, v4, and also Epyx 1.48:
Quote
/*
* If the creature being attacked is not running (alseep or held)
* then the attacker gets a plus four bonus to hit.
*/
if (!on(*thdef, ISRUN))
hplus += 4;
File "fight.c", function roll_em(). This is supposed to give the player bonus chance to hit sleeping (held) monsters, and monsters to get this bonus when player is faint or frozen/paralyzed. The funny part is that it actually gives monsters this bonus all the time, while player never gets it. Ha-ha! As if the game was not intended to be hard enough these bugs make it still much harder and super-very unfair. And that Squeeealer managed to beat it with all these bugs and against all odds, I have to say again it's some kind of miracle.
Anyhow, there are two problems. First, ISRUN flag for the player is not handled properly somewhere else in the code so effectively the player is always "fainted" and thus the monsters always get this to-hit bonus. Second, in function fight(), there is a call to function runto(), which wakes up monsters, before the dice roll, so by the time it is decided whether to give the player to-hit bonus for sleeping/held monsters they are already up and running and thus the player never gets it.