Files
nethack/doc
PatR 58477b33f4 more fix for #H5056 - achievement tracking
The followup message about the fix for #5056 was trapped by the spam
filter so didn't reach us for a while.

xlogfile has an extra field to track various achievements made during
the game it logs, two of which are fully exploring the gnomish mines
and fully exploring sokoban.  Those are accomplished by finding the
special 'prize' item on the final level of their branch:  luckstone
for mines and bag of holding or amulet of reflecition for sokoban.
3.6.0 had a bug where any item of the target type found anywhere in
the dungeon resulted in achieving the relevant goal.  A post-3.6.1 fix
for that required that the item be found on the end level of the branch
and attempted to require that it an item explicitly placed there by the
special level loader, but the latter aspect had a bug which meant that
random items of the appropriate type placed on final level would count
as the prize.  Chance of extra luckstones on mines' end is fairly high,
so potential for false completion of the achievement was also high.

The second complaint was that since the achievement was only recorded
if the special prize item was found on final level, then if a monster
took it to another level then the achievement became impossible.  (Not
true, the player could take it back, drop it, and pick it up again, but
that is admittedly a pretty silly hoop to jump through.)  On the other
hand, if a monster removed the item before the hero found it, then a
case could be made that the hero hadn't really fully explored the
level.  However, this fix records the achievement no matter where the
hero picks up the item.  The final level must be entered--otherwise no
monster could possibly acquire and transport the item--but it isn't
guaranteed to have been fully explored.  Big deal....

The prize could also be acquired in bones data.  Before the second
portion of this fix, that wouldn't have mattered.  But now it does, so
clear the prize indicator when saving bones unless it happens to be the
same level where that item is created (impossible for sokoban, where no
bones are left; not sure offhand about mines' end).  The former prize
stone or bag or amulet becomes an ordinary one of its type.

This can all be done in a much cleaner fashion once we give up on the
current save file compatability.  Putting obj->o_id values into new
context.mines_prize and context.soko_prize, plus a hack to mkobj() to
not reuse those two values if the o_id counter ever wraps back to 0,
would cover most of the details.  Adding an achievement tracking flag
to lev_comp's object handling for use by the special level loader
would cover most of the rest.
2017-10-24 00:37:21 -07:00
..
2015-03-31 09:50:02 -04:00
2015-02-26 16:35:55 -05:00
2016-05-22 00:00:06 +03:00
2015-05-25 09:21:31 +09:00
2002-01-05 21:05:47 +00:00
2015-05-25 09:21:31 +09:00
2002-01-05 21:05:47 +00:00
2002-01-11 18:02:22 +00:00
2015-05-25 09:21:31 +09:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2003-05-11 13:40:01 +00:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2015-05-25 09:21:31 +09:00
2016-02-22 17:57:00 -08:00
2002-01-05 21:05:47 +00:00
2015-05-25 09:21:31 +09:00
2010-05-01 23:10:22 +00:00
2015-12-08 15:15:00 -08:00
2015-12-08 15:15:00 -08:00
2017-09-26 10:04:25 +03:00