Merge branch 'hallutraps' of https://github.com/copperwater/NetHack into copperwater-hallutraps-3.7

This commit is contained in:
nhmall
2019-10-02 13:02:22 -04:00
13 changed files with 85 additions and 53 deletions

View File

@@ -3423,10 +3423,8 @@ struct obj *no_wish;
goto typfnd;
} else if (trapped == 1 || *zp != '\0') {
/* "trapped <foo>" or "<foo> trap" (actually "<foo>*") */
int idx = trap_to_defsym(beartrap ? BEAR_TRAP : LANDMINE);
/* use canonical trap spelling, skip object matching */
Strcpy(bp, defsyms[idx].explanation);
Strcpy(bp, trapname(beartrap ? BEAR_TRAP : LANDMINE, TRUE));
goto wiztrap;
}
/* [no prefix or suffix; we're going to end up matching
@@ -3628,7 +3626,7 @@ struct obj *no_wish;
struct trap *t;
const char *tname;
tname = defsyms[trap_to_defsym(trap)].explanation;
tname = trapname(trap, TRUE);
if (strncmpi(tname, bp, strlen(tname)))
continue;
/* found it; avoid stupid mistakes */
@@ -3636,7 +3634,7 @@ struct obj *no_wish;
trap = ROCKTRAP;
if ((t = maketrap(x, y, trap)) != 0) {
trap = t->ttyp;
tname = defsyms[trap_to_defsym(trap)].explanation;
tname = trapname(trap, TRUE);
pline("%s%s.", An(tname),
(trap != MAGIC_PORTAL) ? "" : " to nowhere");
} else