[net.games.hack] Bug in Hack 1.0.2

aeb@mcvax.UUCP (Andries Brouwer) (05/06/85)

As ut-sally!fletcher pointed out to me, it is possible to
increase u.uluck indefinitely, and thus spoil the game. The fix follows.
hack.main.c
289c289
< 		u.uluck++;
---
> 		if(!u.uluck) u.uluck++;

ab@unido.UUCP (05/06/85)

I think it is more appropriate to decrease the uluck when you save the
game on full moon days. Imagine you start a game on a day before full moon:
After saving and resuming it on the full moon day you should now get
a bonus by increasing the uluck. When you save the game again and resume
it on some day after the full moon, you then will have the normal uluck.

	Andreas

Here is the alternative fix:

--- hack.save.c, line 39:
>       if((fd = creat(SAVEF, FMASK)) < 0) {
>               if(!hu) pline("Cannot open save file. (Continue or Quit)");
*               (void) unlink(SAVEF);   /* another fix */
>               return(0);
>       }
*       if(flags.moonphase == FULL_MOON)
*               u.uluck--;
>       savelev(fd,dlevel);
>       saveobjchn(fd, invent);
>       saveobjchn(fd, fcobj);
>       savemonchn(fd, fallen_down);
---

Andreas Bormann                 ab@unido.UUCP
University of Dortmund          N 51 29' 05"   E 07 24' 42"
West Germany