Skip to content

Commit 042ed52

Browse files
committed
Fix re-keying Thiefstones.
1 parent 532afd0 commit 042ed52

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

src/potion.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,28 +3080,23 @@ potion_dip(struct obj *obj, struct obj *potion)
30803080
learn_it = TRUE;
30813081
did_something = TRUE;
30823082
}
3083+
/* resetting a cancelled thiefstone */
3084+
else if (obj->otyp == THIEFSTONE
3085+
&& !thiefstone_ledger_valid(obj)
3086+
&& !In_endgame(&u.uz)) {
3087+
obj->keyed_ledger = ledger_no(&u.uz);
3088+
set_keyed_loc(obj, u.ux, u.uy);
3089+
pline("%s for an instant.", Tobjnam(obj, "quiver"));
3090+
learn_it = TRUE;
3091+
did_something = TRUE;
3092+
}
30833093
if (learn_it && potion->dknown)
30843094
makeknown(POT_RESTORE_ABILITY);
30853095
if (did_something)
30863096
useup(potion);
30873097
return ECMD_TIME;
30883098
}
30893099

3090-
/* resetting a cancelled thiefstone */
3091-
if (potion->otyp == POT_RESTORE_ABILITY
3092-
&& obj->otyp == THIEFSTONE && !thiefstone_ledger_valid(obj)
3093-
&& !In_endgame(&u.uz)) { /* thiefstones can't key to endgame levels */
3094-
if (potion->cursed) {
3095-
pline("%s.", Tobjnam(obj, "twitch"));
3096-
}
3097-
else {
3098-
obj->keyed_ledger = ledger_no(&u.uz);
3099-
set_keyed_loc(obj, u.ux, u.uy);
3100-
pline("%s for an instant.", Tobjnam(obj, "quiver"));
3101-
}
3102-
poof(potion);
3103-
return ECMD_TIME;
3104-
}
31053100
more_dips:
31063101

31073102
/* Allow filling of MAGIC_LAMPs to prevent identification by player */

0 commit comments

Comments
 (0)