fix #H4388 - wishing conduct inconsistency

Make wishing for an artifact and not getting it because it already
exists break never-wished-for-artifact conduct.  The wish was made
even if the result wasn't what the player wanted.
This commit is contained in:
PatR
2016-06-16 22:01:27 -07:00
parent 2c8a359feb
commit 1af081edc5
3 changed files with 25 additions and 1 deletions

View File

@@ -3570,7 +3570,8 @@ typfnd:
}
otmp = oname(otmp, name);
if (otmp->oartifact) {
/* name==aname => wished for artifact (otmp->oartifact => got it) */
if (otmp->oartifact || name == aname) {
otmp->quan = 1L;
u.uconduct.wisharti++; /* KMH, conduct */
}