1
Classic Roguelikes / Bug in Rogue v1.1 for DOS?
« on: July 11, 2013, 10:35:33 PM »
I was recently playing my childhood version of Rogue, v1.1 for DOS, and contemplating how brutally difficult it is. To help me judge whether my character could go toe-to-toe with trolls, I wrote a combat simulator to give me the probability of winning. The simulator insisted my odds were 90% or better even though I kept dying. So I delved into the source code (for not quite the same version) and discovered that sleep/held status is not properly handled for the player.
When a monster or player is sleeping or held, the to-hit roll for an attacker is supposed to be at +4; this is handled by a flag called ISRUN (for "is the thing up and running around?"). However, although the player can have his ISRUN set to false (by potions of paralysis, scrolls of sleep, starving, etc.), no part of the code ever sets it to true. I checked a Unix version (v5.4) and verified that ISRUN is set true whenever a sleep/hold expires. By tedious bookkeeping, I checked that while a level-1 monster (say, an emu) should hit a starting character 35% of the time, they actually hit 55% of the time.
Now I wonder: Is this a known bug? Was it ever fixed on DOS? If a bug goes undetected for 30 years, does that make it a feature? Do I have to get the amulet of Yendor with this -4 penalty to really win?
When a monster or player is sleeping or held, the to-hit roll for an attacker is supposed to be at +4; this is handled by a flag called ISRUN (for "is the thing up and running around?"). However, although the player can have his ISRUN set to false (by potions of paralysis, scrolls of sleep, starving, etc.), no part of the code ever sets it to true. I checked a Unix version (v5.4) and verified that ISRUN is set true whenever a sleep/hold expires. By tedious bookkeeping, I checked that while a level-1 monster (say, an emu) should hit a starting character 35% of the time, they actually hit 55% of the time.
Now I wonder: Is this a known bug? Was it ever fixed on DOS? If a bug goes undetected for 30 years, does that make it a feature? Do I have to get the amulet of Yendor with this -4 penalty to really win?