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

@@ -810,29 +810,20 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */
(Blind || same_color) ? nul :
hcolor(scursed ? NH_BLACK : NH_SILVER),
otense(otmp, "evaporate"));
if(is_cloak(otmp)) (void) Cloak_off();
if(is_boots(otmp)) (void) Boots_off();
if(is_helmet(otmp)) (void) Helmet_off();
if(is_gloves(otmp)) (void) Gloves_off();
if(is_shield(otmp)) (void) Shield_off();
if(otmp == uarm) (void) Armor_gone();
#ifdef TOURIST
if (is_shirt(otmp)) (void) Shirt_off();
#endif
remove_worn_item(otmp, FALSE);
useup(otmp);
break;
}
s = scursed ? -1 :
otmp->spe >= 9 ? (rn2(otmp->spe) == 0) :
sblessed ? rnd(3 - otmp->spe / 3) : 1;
if (s >= 0 && otmp->otyp >= GRAY_DRAGON_SCALES &&
otmp->otyp <= YELLOW_DRAGON_SCALES) {
if (s >= 0 && Is_dragon_scales(otmp)) {
/* dragon scales get turned into dragon scale mail */
pline("%s merges and hardens!", Yname2(otmp));
setworn((struct obj *)0, W_ARM);
/* assumes same order */
otmp->otyp = GRAY_DRAGON_SCALE_MAIL +
otmp->otyp - GRAY_DRAGON_SCALES;
otmp->otyp += GRAY_DRAGON_SCALE_MAIL
- GRAY_DRAGON_SCALES;
if (sblessed) {
otmp->spe++;
if (!otmp->blessed) bless(otmp);