fix #H7396 - wishing for "orange"
Wishing for "orange" might grant an orange, but it might give an orange gem, orange potion, or orange spellbook instead (but never orange dragon scales or orange dragon scale mail). Force the food object to be an exact match so wishing always produces an orange.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1533352036 2018/08/04 03:07:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.206 $ */
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1537313446 2018/09/18 23:30:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.208 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -3204,6 +3204,11 @@ struct obj *no_wish;
|
||||
typ = SPE_BLANK_PAPER;
|
||||
goto typfnd;
|
||||
}
|
||||
/* specific food rather than color of gem/potion/spellbook[/scales] */
|
||||
if (!BSTRCMPI(bp, p - 6, "orange") && mntmp == NON_PM) {
|
||||
typ = ORANGE;
|
||||
goto typfnd;
|
||||
}
|
||||
/*
|
||||
* NOTE: Gold pieces are handled as objects nowadays, and therefore
|
||||
* this section should probably be reconsidered as well as the entire
|
||||
|
||||
Reference in New Issue
Block a user