several fixes for farming changes

* don't let player wish for multiple globs
* use newsym() to clean up merged globs on floor
* food effects should match original corpse effects
* tidy up remaining crash when merging in place
This commit is contained in:
Derek S. Ray
2015-04-05 18:04:22 -04:00
parent 0b4383e32e
commit b3e2772f7b
5 changed files with 21 additions and 9 deletions

View File

@@ -2499,11 +2499,18 @@ struct obj *no_wish;
}
/* intercept pudding globs here; they're a valid wish target,
* but we need them to not get treated like a corpse */
if (((p = strstri(bp, "glob of ")) != 0)
&& (mntmp = name_to_mon(p+8)) >= PM_GRAY_OOZE
&& mntmp <= PM_BLACK_PUDDING) {
mntmp = NON_PM; /* lie to ourselves */
* but we need them to not get treated like a corpse.
*
* also don't let player wish for multiple globs.
*/
if ((p = strstri(bp, "glob of ")) != 0
|| (p = strstri(bp, "globs of ")) != 0) {
int globoffset = (*(p+4) == 's') ? 9 : 8;
if ((mntmp = name_to_mon(p + globoffset)) >= PM_GRAY_OOZE
&& mntmp <= PM_BLACK_PUDDING) {
mntmp = NON_PM; /* lie to ourselves */
cnt = 0; /* force only one */
}
} else {
/*
* Find corpse type using "of" (figurine of an orc, tin of orc meat)