New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unkillable troll (Zork 1) #23
Comments
Hmm...what platform are you on? I wonder if the random number generator is doing something unexpected. |
Ah, so this uses BUT, not having So we do this... long r = random();
r = (r >> (sizeof (r) / 2) * 8) ^ r; I don't know why I'm doing that second line (it might be in the Z-Machine spec?) but when "long" is 32-bits, like it is in Visual Studio, and the largest random number is 0x7FFF, this always results in zero by the time you hit the That's my guess, at least. I'll check for sure soon. |
When you get a chance, see if the latest in revision control fixes it for you! |
It's fixed in standalone mojozork, but the fact that you axed srandom in mojozork.c broke compilation of mojozork-libretro.c where it still expects it to be defined in mojozork.c. (I just axed libretro build from CMakeLists.txt [set(MOJOZORK_LIBRETRO_DEFAULT OFF)] to test.) Thanks for the attention to this, by the way. |
Okay, easy fix, then, I'll correct that shortly. |
Ok, you should be good to go now! |
Looks good, thank you. |
s; e; open window; w; take all; w; take all; move rug; open trap door; turn on lamp; d; n; kill troll with sword; kill troll with sword
In Frotz and the original game, this is enough to kill the troll. In mojozork (from current source and the version downloadable in retroarch), it constantly gives you "miss" messages with the occasional "staggered/dropped weapon" statuses, but repeating the command goes back to more "miss" messages. In fact, repeating "kill troll with sword" over and over will never kill the troll.
This behavior is constant on every platform and with libretro as well as every single Zork 1 data file I've tried, including the one you include in this repository, one I had from an Infocom compilation, and the one from Zork Anthology on Steam.
The text was updated successfully, but these errors were encountered: