Skip to content

Commit

Permalink
Close loophole where player can #loot unpaid items to their pets.
Browse files Browse the repository at this point in the history
  • Loading branch information
elunna committed Oct 14, 2023
1 parent 6576dca commit 32357a5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pickup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,9 @@ boolean taking;
&& !which_armor(mtmp, W_ARMG)
&& !(resists_ston(mtmp)
|| defended(mtmp, AD_STON)));

boolean unpaid = otmp->unpaid
|| (!otmp->no_charge && costly_spot(otmp->ox, otmp->oy));

/* Clear inapplicable wornmask bits */
unwornmask &= ~(W_ART | W_ARTI | W_QUIVER);

Expand All @@ -2142,6 +2144,11 @@ boolean taking;
weldmsg(otmp);
continue;
}
if (unpaid) {
pline("A mysterious force prevents you from giving away %s...",
yname(otmp));
continue;
}
if (otmp->otyp == LOADSTONE && cursed(otmp, TRUE)
&& maxquan < otmp->quan) {
/* kludge for canletgo() feedback, also used in getobj() */
Expand Down

0 comments on commit 32357a5

Please sign in to comment.