Fix #H5056/bz1086: Bug in Achievement Recording

Bug report was:

> "Completed sokoban" achievement was logged when picking up
> a randomly generated bag of holding in the gnomish mines.

The picking-up code was missing checks for the branches, so
you could get the achievements outside the correct branches.
This commit is contained in:
Pasi Kallinen
2017-02-06 16:42:33 +02:00
parent 0714e38d28
commit 76d7044872
4 changed files with 12 additions and 9 deletions

View File

@@ -1951,11 +1951,7 @@ struct mkroom *croom;
* "prize" and then set record_achieve_special (maps to corpsenm)
* for the object. That field will later be checked to find out if
* the player obtained the prize. */
if (otmp->otyp == LUCKSTONE && Is_mineend_level(&u.uz)) {
otmp->record_achieve_special = 1;
} else if ((otmp->otyp == AMULET_OF_REFLECTION
|| otmp->otyp == BAG_OF_HOLDING)
&& Is_sokoend_level(&u.uz)) {
if (is_mines_prize(otmp) || is_soko_prize(otmp)) {
otmp->record_achieve_special = 1;
}