Permalink
Browse files

CS44: Make Thiefbane unwishable

  • Loading branch information...
1 parent 9dd9382 commit 89b52ec818e7091fd3b1e219355a5a45d4c920eb @tung committed Apr 12, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 libnitrohack/src/objnam.c
@@ -1999,6 +1999,7 @@ struct obj *readobjnam(char *bp, struct obj *no_wish, boolean from_user)
if (strncmpi(bp, "wizard lock", 11)) /* not the "wizard" monster! */
if (strncmpi(bp, "ninja-to", 8)) /* not the "ninja" rank */
if (strncmpi(bp, "master key", 10)) /* not the "master" rank */
+ if (strncmpi(bp, "Thiefbane", 9)) /* not the "thief" rank */
if (strncmpi(bp, "magenta", 7)) /* not the "mage" rank */
if (mntmp < LOW_PM && strlen(bp) > 2 &&
(mntmp = name_to_mon(bp)) >= LOW_PM) {
@@ -2612,6 +2613,7 @@ struct obj *readobjnam(char *bp, struct obj *no_wish, boolean from_user)
/* more wishing abuse: don't allow wishing for certain artifacts */
/* and make them pay; charge them for the wish anyway! */
if ((is_quest_artifact(otmp) ||
+ (otmp->oartifact && otmp->oartifact == ART_THIEFBANE) ||
(otmp->oartifact && rn2(nartifact_exist()) > 1)) && !wizard) {
artifact_exists(otmp, ONAME(otmp), FALSE);
obfree(otmp, NULL);

0 comments on commit 89b52ec

Please sign in to comment.