dragon scale mail degraded by polymorphing into dragon (trunk only)

Apparently I lied yesterday when I said that patch was the last
polyself one.  This has been on my agenda for a long time:  when dragon
scale mail merges with your skin during polymorph into the corresponding
dragon, have it revert from mail to scales.  Its enchantment stays the
same when reverting.  So after returning to your original form, using
enchant armor to convert it into scale mail again will eventually risk
its destruction due to over-enchanting.  (Cursed scroll of enchant armor,
spell of drain life, or being hit by a disenchanter can be used to reduce
its enchantment back to a safe-to-enchnat value.  Or cancellation if
you're desperate.  I think those all work on all colors of dragon scales
despite the assorted magical properties that scales confer.)
This commit is contained in:
nethack.rankin
2011-03-01 12:15:51 +00:00
parent df9e4b345d
commit 25ca388235
3 changed files with 32 additions and 14 deletions

View File

@@ -388,11 +388,36 @@ int psflags;
mntmp = armor_to_dragon(uarm->otyp);
if (!(mvitals[mntmp].mvflags & G_GENOD)) {
/* allow G_EXTINCT */
You("merge with your scaly armor.");
if (Is_dragon_scales(uarm)) {
/* dragon scales remain intact as uskin */
You("merge with your scaly armor.");
} else { /* dragon scale mail */
/* d.scale mail first reverts to scales */
char *p, *dsmail;
/* similar to noarmor(invent.c),
shorten to "<color> scale mail" */
dsmail = strcpy(buf, simpleonames(uarm));
if ((p = strstri(dsmail, " dragon ")) != 0)
while ((p[1] = p[8]) != '\0') ++p;
/* tricky phrasing; dragon scale mail
is singular, dragon scales are plural */
Your(
"%s reverts to scales as you merge with them.",
dsmail);
/* uarm->spe enchantment remains unchanged;
re-converting scales to mail poses risk
of evaporation due to over enchanting */
uarm->otyp += GRAY_DRAGON_SCALES
- GRAY_DRAGON_SCALE_MAIL;
uarm->dknown = 1;
context.botl = 1; /* AC is changing */
}
uskin = uarm;
uarm = (struct obj *)0;
/* save/restore hack */
uskin->owornmask |= I_SPECIAL;
update_inventory();
}
} else if (iswere) {
do_shift: