gold dragon and scales

Add two new monsters and two new objects:
 gold dragon
 baby gold dragon
 gold dragon scale mail
 set of gold dragon scales

A couple of variants seem to have added these already, but this came
off my ancient list of monsters to add and was done from scratch.
It's a clone of silver dragon, but instead of having reflection and
breathing cold, a gold dragon emits light and breathes fire; because
of the latter it can be seen with infravision like a red dragon.
Adult gold dragons are lawful as in the AD&D Monster Manual rather
than chaotic as the wiki pages show for the variant versions.

Worn gold dragon scales operate similar to wielded Sunsword:  when
blessed, radius is 3 (same as a lamp), if uncursed, radius is 2, and
if cursed, radius is 1 (but functions as 2 when worn by the hero,
otherwise there would be no tangible effect).  Gold dragon scale mail
gets an extra +1, making blessed gold DSM have a bigger radius than
lamps.  Embedded scales have radius 1 regardless of BUC state; light
for that case comes from the gold dragon monster form the hero is in.
When not worn, gold scales and scale-mail don't emit any light.

The tiles use a mix of yellow (for gold) and red.  The two object
tiles seem reasonable variations of the corresponding silver dragon
ones.  The two monster tiles definitely need work since the silver
ones were mostly cyan and changing that to red did not produce very
good result; subsequent attempt at a mixture was haphazard at best.
This commit is contained in:
PatR
2021-07-23 10:41:57 -07:00
parent 8e2f168544
commit 5a09a01a13
17 changed files with 1222 additions and 947 deletions

View File

@@ -1675,6 +1675,13 @@ finesse_ahriman(struct obj *obj)
boolean
artifact_light(struct obj *obj)
{
/* not artifacts but treat them as if they were because they emit
light without burning */
if (obj && (obj->otyp == GOLD_DRAGON_SCALE_MAIL
|| obj->otyp == GOLD_DRAGON_SCALES)
&& (obj->owornmask & W_ARM) != 0L)
return TRUE;
return (boolean) (get_artifact(obj) && obj->oartifact == ART_SUNSWORD);
}

View File

@@ -695,21 +695,37 @@ static int
Armor_on(void)
{
/*
* No suits require special handling. Special properties conferred by
* suits are set up as intrinsics (actually 'extrinsics') by setworn()
* which is called by armor_or_accessory_on() before Armor_on().
* Gold DSM requires special handling since it emits light when worn.
*/
if (uarm) /* no known instances of !uarm here but play it safe */
uarm->known = 1; /* suit's +/- evident because of status line AC */
if (!uarm) /* no known instances of !uarm here but play it safe */
return 0;
uarm->known = 1; /* suit's +/- evident because of status line AC */
if (artifact_light(uarm) && !uarm->lamplit) {
begin_burn(uarm, FALSE);
if (!Blind)
pline("%s %s to shine %s!",
Yname2(uarm), otense(uarm, "begin"),
arti_light_description(uarm));
}
return 0;
}
int
Armor_off(void)
{
struct obj *otmp = uarm;
boolean was_arti_light = otmp && otmp->lamplit && artifact_light(otmp);
g.context.takeoff.mask &= ~W_ARM;
setworn((struct obj *) 0, W_ARM);
g.context.takeoff.cancelled_don = FALSE;
if (was_arti_light && !artifact_light(otmp)) {
end_burn(otmp, FALSE);
if (!Blind)
pline("%s shining.", Tobjnam(otmp, "stop"));
}
return 0;
}
@@ -722,9 +738,18 @@ Armor_off(void)
int
Armor_gone(void)
{
struct obj *otmp = uarm;
boolean was_arti_light = otmp && otmp->lamplit && artifact_light(otmp);
g.context.takeoff.mask &= ~W_ARM;
setnotworn(uarm);
g.context.takeoff.cancelled_don = FALSE;
if (was_arti_light && !artifact_light(otmp)) {
end_burn(otmp, FALSE);
if (!Blind)
pline("%s shining.", Tobjnam(otmp, "stop"));
}
return 0;
}
@@ -2773,6 +2798,10 @@ destroy_arm(register struct obj *atmp)
} else if (DESTROY_ARM(uarm)) {
if (donning(otmp))
cancel_don();
/* for gold DSM, we don't want Armor_gone() to report that it
stops shining _after_ we've been told that it is destroyed */
if (otmp->lamplit)
end_burn(otmp, FALSE);
Your("armor turns to dust and falls to the %s!", surface(u.ux, u.uy));
(void) Armor_gone();
useup(otmp);

View File

@@ -775,6 +775,8 @@ candle_light_range(struct obj *obj)
int
arti_light_radius(struct obj *obj)
{
int res;
/*
* Used by begin_burn() when setting up a new light source
* (obj->lamplit will already be set by this point) and
@@ -789,20 +791,34 @@ arti_light_radius(struct obj *obj)
/* cursed radius of 1 is not noticeable for an item that's
carried by the hero but is if it's carried by a monster
or left lit on the floor (not applicable for Sunsword) */
return (obj->blessed ? 3 : !obj->cursed ? 2 : 1);
res = (obj->blessed ? 3 : !obj->cursed ? 2 : 1);
/* if poly'd into gold dragon with embedded scales, make the scales
have minimum radiance (hero as light source will use light radius
based on monster form); otherwise, worn gold DSM gives off more
light than other light sources */
if (obj == uskin)
res = 1;
else if (obj->otyp == GOLD_DRAGON_SCALE_MAIL) /* DSM but not scales */
++res;
return res;
}
/* adverb describing lit artifact's light; depends on curse/bless state */
/* adverb describing lit artifact's light; radius varies depending upon
curse/bless state; also used for gold dragon scales/scale mail */
const char *
arti_light_description(struct obj *obj)
{
switch (arti_light_radius(obj)) {
case 4:
return "radiantly"; /* blessed gold dragon scale mail */
case 3:
return "brilliantly"; /* blessed */
return "brilliantly"; /* blessed artifact, uncursed gold DSM */
case 2:
return "brightly"; /* uncursed */
return "brightly"; /* uncursed artifact, cursed gold DSM */
case 1:
return "dimly"; /* cursed */
return "dimly"; /* cursed artifact, embedded scales */
default:
break;
}

View File

@@ -7,7 +7,6 @@
static void mkbox_cnts(struct obj *);
static unsigned nextoid(struct obj *, struct obj *);
static void maybe_adjust_light(struct obj *, int);
static void obj_timer_checks(struct obj *, xchar, xchar, int);
static void container_weight(struct obj *);
static struct obj *save_mtraits(struct obj *, struct monst *);
@@ -1227,8 +1226,8 @@ start_corpse_timeout(struct obj* body)
(void) start_timer(when, TIMER_OBJECT, action, obj_to_any(body));
}
static void
maybe_adjust_light(struct obj* obj, int old_range)
void
maybe_adjust_light(struct obj *obj, int old_range)
{
char buf[BUFSZ];
xchar ox, oy;
@@ -1238,9 +1237,9 @@ maybe_adjust_light(struct obj* obj, int old_range)
so will change after blessing or cursing */
if (delta) {
obj_adjust_light_radius(obj, new_range);
/* simplifying assumptions: hero is wielding this object;
artifacts have to be in use to emit light and monsters'
gear won't change bless or curse state */
/* simplifying assumptions: hero is wielding or wearing this object;
artifacts have to be in use to emit light and monsters' gear won't
change bless or curse state */
if (!Blind && get_obj_location(obj, &ox, &oy, 0)) {
*buf = '\0';
if (iflags.last_msg == PLNMSG_OBJ_GLOWS)

View File

@@ -298,8 +298,10 @@ bee_eat_jelly(struct monst* mon, struct obj* obj)
return -1; /* a queen is already present; ordinary bee hasn't moved yet */
}
#define flees_light(mon) ((mon)->data == &mons[PM_GREMLIN] \
&& (uwep && artifact_light(uwep) && uwep->lamplit))
#define flees_light(mon) \
((mon)->data == &mons[PM_GREMLIN] \
&& ((uwep && uwep->lamplit && artifact_light(uwep)) \
|| (uarm && uarm->lamplit && artifact_light(uarm))))
/* we could include this in the above macro, but probably overkill/overhead */
/* && (!(which_armor((mon), W_ARMC) != 0 */
/* && which_armor((mon), W_ARMH) != 0)) */

View File

@@ -1126,11 +1126,16 @@ NEARDATA struct permonst mons_init[] = {
/* The order of the dragons is VERY IMPORTANT. Quite a few
* pieces of code depend on gray being first and yellow being last.
* The code also depends on the *order* being the same as that for
* dragon scale mail and dragon scales in objects.c. Baby dragons
* cannot confer intrinsics, to avoid polyself/egg abuse.
* dragon scale mail and dragon scales in objects.c. [Also,
* 'tilemap' assumes that shimmering dragon follows silver dragon.]
*
* As reptiles, dragons are cold-blooded and thus aren't seen
* with infravision. Red dragons are the exception.
* Adult dragons are all lawful or chaotic; baby dragons are all
* neutral. This affects monster generation on some special levels.
* Baby dragons cannot confer intrinsics, to avoid polyself/egg abuse.
*
* As reptiles, dragons are cold-blooded and thus aren't seen with
* infravision. Red and gold dragons (also Chromatic Dragon) are
* the exceptions because they breathe fire.
*/
MON("baby gray dragon", S_DRAGON, LVL(12, 9, 2, 10, 0), G_GENO,
A(ATTK(AT_BITE, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK,
@@ -1138,6 +1143,13 @@ NEARDATA struct permonst mons_init[] = {
SIZ(1500, 500, MS_ROAR, MZ_HUGE), 0, 0,
M1_FLY | M1_THICK_HIDE | M1_NOHANDS | M1_CARNIVORE,
M2_HOSTILE | M2_STRONG | M2_GREEDY | M2_JEWELS, 0, 13, CLR_GRAY),
MON("baby gold dragon", S_DRAGON, LVL(12, 9, 2, 10, 0), G_GENO,
A(ATTK(AT_BITE, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK,
NO_ATTK),
SIZ(1500, 500, MS_ROAR, MZ_HUGE), 0, 0,
M1_FLY | M1_THICK_HIDE | M1_NOHANDS | M1_CARNIVORE,
M2_HOSTILE | M2_STRONG | M2_GREEDY | M2_JEWELS, M3_INFRAVISIBLE,
13, HI_GOLD),
MON("baby silver dragon", S_DRAGON, LVL(12, 9, 2, 10, 0), G_GENO,
A(ATTK(AT_BITE, AD_PHYS, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK, NO_ATTK,
NO_ATTK),
@@ -1145,6 +1157,7 @@ NEARDATA struct permonst mons_init[] = {
M1_FLY | M1_THICK_HIDE | M1_NOHANDS | M1_CARNIVORE,
M2_HOSTILE | M2_STRONG | M2_GREEDY | M2_JEWELS, 0, 13, DRAGON_SILVER),
#if 0 /* DEFERRED */
/* [see "shimmering dragon" below] */
MON("baby shimmering dragon", S_DRAGON,
LVL(12, 9, 2, 10, 0), G_GENO,
A(ATTK(AT_BITE, AD_PHYS, 2, 6),
@@ -1205,6 +1218,15 @@ NEARDATA struct permonst mons_init[] = {
| M1_CARNIVORE,
M2_HOSTILE | M2_STRONG | M2_NASTY | M2_GREEDY | M2_JEWELS | M2_MAGIC,
0, 20, CLR_GRAY),
MON("gold dragon", S_DRAGON, LVL(15, 9, -1, 20, 4), (G_GENO | 1),
A(ATTK(AT_BREA, AD_FIRE, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8),
ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4),
NO_ATTK, NO_ATTK),
SIZ(WT_DRAGON, 1500, MS_ROAR, MZ_GIGANTIC), MR_FIRE, 0,
M1_FLY | M1_THICK_HIDE | M1_NOHANDS | M1_SEE_INVIS | M1_OVIPAROUS
| M1_CARNIVORE,
M2_HOSTILE | M2_STRONG | M2_NASTY | M2_GREEDY | M2_JEWELS | M2_MAGIC,
M3_INFRAVISIBLE, 20, HI_GOLD),
MON("silver dragon", S_DRAGON, LVL(15, 9, -1, 20, 4), (G_GENO | 1),
A(ATTK(AT_BREA, AD_COLD, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8),
ATTK(AT_CLAW, AD_PHYS, 1, 4), ATTK(AT_CLAW, AD_PHYS, 1, 4), NO_ATTK,
@@ -1215,6 +1237,10 @@ NEARDATA struct permonst mons_init[] = {
M2_HOSTILE | M2_STRONG | M2_NASTY | M2_GREEDY | M2_JEWELS | M2_MAGIC,
0, 20, DRAGON_SILVER),
#if 0 /* DEFERRED */
/* shimmering scales/scale-mail would confer displacement when worn by
the hero, so shimmering dragon ought to be displaced (hero who can
see one might misjudge its location) but monster displacement hasn't
been implemented so we don't include it */
MON("shimmering dragon", S_DRAGON,
LVL(15, 9, -1, 20, 4), (G_GENO | 1),
A(ATTK(AT_BREA, AD_MAGM, 4, 6), ATTK(AT_BITE, AD_PHYS, 3, 8),
@@ -3042,7 +3068,8 @@ struct permonst _mons2[] = {
| M2_HOSTILE | M2_NASTY | M2_COLLECT | M2_MAGIC,
M3_WANTSARTI | M3_WAITFORU | M3_INFRAVISIBLE, 22, HI_LORD),
/* Multi-headed, possessing the breath attacks of all the other dragons
* (selected at random when attacking).
* (selected at random when attacking). Despite being a superset of
* gold dragon, does not emit light.
*/
MON("Chromatic Dragon", S_DRAGON, LVL(16, 12, 0, 30, -14),
(G_NOGEN | G_UNIQ),

View File

@@ -377,6 +377,8 @@ HELM("helm of telepathy", "visored helmet",
/* 3.4.1: dragon scale mail reclassified as "magic" since magic is
needed to create them */
DRGN_ARMR("gray dragon scale mail", 1, ANTIMAGIC, 1200, 1, CLR_GRAY),
/* gold DSM is a light source; there's no property for that */
DRGN_ARMR("gold dragon scale mail", 1, 0, 900, 1, HI_GOLD),
DRGN_ARMR("silver dragon scale mail", 1, REFLECTING, 1200, 1, DRAGON_SILVER),
#if 0 /* DEFERRED */
DRGN_ARMR("shimmering dragon scale mail", 1, DISPLACED, 1200, 1, CLR_CYAN),
@@ -389,9 +391,10 @@ DRGN_ARMR("blue dragon scale mail", 1, SHOCK_RES, 900, 1, CLR_BLUE),
DRGN_ARMR("green dragon scale mail", 1, POISON_RES, 900, 1, CLR_GREEN),
DRGN_ARMR("yellow dragon scale mail", 1, ACID_RES, 900, 1, CLR_YELLOW),
/* For now, only dragons leave these. */
/* 3.4.1: dragon scales left classified as "non-magic"; they confer
magical properties but are produced "naturally" */
/* 3.4.1: dragon scales left classified as "non-magic"; they confer magical
properties but are produced "naturally"; affects use as polypile fodder */
DRGN_ARMR("gray dragon scales", 0, ANTIMAGIC, 700, 7, CLR_GRAY),
DRGN_ARMR("gold dragon scales", 0, 0, 500, 7, HI_GOLD),
DRGN_ARMR("silver dragon scales", 0, REFLECTING, 700, 7, DRAGON_SILVER),
#if 0 /* DEFERRED */
DRGN_ARMR("shimmering dragon scales", 0, DISPLACED, 700, 7, CLR_CYAN),

View File

@@ -1093,6 +1093,9 @@ doname_base(struct obj* obj, unsigned int doname_flags)
if (obj == uarmg && Glib) /* just appended "(something)",
* change to "(something; slippery)" */
Strcpy(rindex(bp, ')'), "; slippery)");
else if (!Blind && obj->lamplit && artifact_light(obj))
Sprintf(rindex(bp, ')'), ", %s lit)",
arti_light_description(obj));
}
/*FALLTHRU*/
case WEAPON_CLASS:
@@ -1228,13 +1231,17 @@ doname_base(struct obj* obj, unsigned int doname_flags)
/* avoid "tethered wielded in right hand" for twoweapon */
(twoweap_primary && !tethered) ? "wielded" : "weapon",
twoweap_primary ? "right " : "", hand_s);
if (g.warn_obj_cnt && obj == uwep
&& (EWarn_of_mon & W_WEP) != 0L) {
if (!Blind) /* we know bp[] ends with ')'; overwrite that */
if (!Blind) {
if (g.warn_obj_cnt && obj == uwep
&& (EWarn_of_mon & W_WEP) != 0L)
/* we know bp[] ends with ')'; overwrite that */
Sprintf(eos(bp) - 1, ", %s %s)",
glow_verb(g.warn_obj_cnt, TRUE),
glow_color(obj->oartifact));
else if (obj->lamplit && artifact_light(obj))
/* as above, overwrite known closing paren */
Sprintf(eos(bp) - 1, ", %s lit)",
arti_light_description(obj));
}
}
}

View File

@@ -456,7 +456,9 @@ polyself(int psflags)
by_class:
class = name_to_monclass(buf, &mntmp);
if (class && mntmp == NON_PM)
mntmp = mkclass_poly(class);
mntmp = (draconian && class == S_DRAGON)
? armor_to_dragon(uarm->otyp)
: mkclass_poly(class);
}
if (mntmp < LOW_PM) {
if (!class)
@@ -514,24 +516,23 @@ polyself(int psflags)
do_merge:
mntmp = armor_to_dragon(uarm->otyp);
if (!(g.mvitals[mntmp].mvflags & G_GENOD)) {
unsigned was_lit = uarm->lamplit;
int arm_light = artifact_light(uarm) ? arti_light_radius(uarm)
: 0;
/* allow G_EXTINCT */
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;
} else { /* dragon scale mail reverts to scales */
/* 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);
Strcpy(buf, simpleonames(uarm));
strsubst(buf, " dragon ", " ");
/* tricky phrasing; dragon scale mail is singular, dragon
scales are plural (note: we don't use "set of scales",
which usually overrides the distinction, here) */
Your("%s reverts to scales as you merge with them.", buf);
/* uarm->spe enchantment remains unchanged;
re-converting scales to mail poses risk
of evaporation due to over enchanting */
@@ -543,6 +544,8 @@ polyself(int psflags)
uarm = (struct obj *) 0;
/* save/restore hack */
uskin->owornmask |= I_SPECIAL;
if (was_lit)
maybe_adjust_light(uskin, arm_light);
update_inventory();
}
} else if (iswere) {
@@ -554,9 +557,10 @@ polyself(int psflags)
} else if (isvamp) {
do_vampyr:
if (mntmp < LOW_PM || (mons[mntmp].geno & G_UNIQ)) {
mntmp = (g.youmonst.data == &mons[PM_VAMPIRE_LEADER] && !rn2(10))
? PM_WOLF
: !rn2(4) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
mntmp = (g.youmonst.data == &mons[PM_VAMPIRE_LEADER]
&& !rn2(10)) ? PM_WOLF
: !rn2(4) ? PM_FOG_CLOUD
: PM_VAMPIRE_BAT;
if (g.youmonst.cham >= LOW_PM
&& !is_vampire(g.youmonst.data) && !rn2(2))
mntmp = g.youmonst.cham;
@@ -920,6 +924,11 @@ break_armor(void)
if ((otmp = uarm) != 0) {
if (donning(otmp))
cancel_don();
/* for gold DSM, we don't want Armor_gone() to report that it
stops shining _after_ we've been told that it is destroyed */
if (otmp->lamplit)
end_burn(otmp, FALSE);
You("break out of your armor!");
exercise(A_STR, FALSE);
(void) Armor_gone();
@@ -945,6 +954,10 @@ break_armor(void)
if (donning(otmp))
cancel_don();
Your("armor falls around you!");
/* [note: _gone() instead of _off() dates to when life-saving
could force fire resisting armor back on if hero burned in
hell (3.0, predating Gehennom); the armor isn't actually
gone here but also isn't available to be put back on] */
(void) Armor_gone();
dropp(otmp);
}
@@ -1653,12 +1666,17 @@ void
skinback(boolean silently)
{
if (uskin) {
int old_light = arti_light_radius(uskin);
if (!silently)
Your("skin returns to its original form.");
uarm = uskin;
uskin = (struct obj *) 0;
/* undo save/restore hack */
uarm->owornmask &= ~I_SPECIAL;
if (artifact_light(uarm))
maybe_adjust_light(uarm, old_light);
}
}
@@ -1877,6 +1895,9 @@ armor_to_dragon(int atyp)
case SILVER_DRAGON_SCALE_MAIL:
case SILVER_DRAGON_SCALES:
return PM_SILVER_DRAGON;
case GOLD_DRAGON_SCALE_MAIL:
case GOLD_DRAGON_SCALES:
return PM_GOLD_DRAGON;
#if 0 /* DEFERRED */
case SHIMMERING_DRAGON_SCALE_MAIL:
case SHIMMERING_DRAGON_SCALES:
@@ -1904,7 +1925,7 @@ armor_to_dragon(int atyp)
case YELLOW_DRAGON_SCALES:
return PM_YELLOW_DRAGON;
default:
return -1;
return NON_PM;
}
}

View File

@@ -1113,11 +1113,17 @@ seffect_enchant_armor(struct obj **sobjp)
? rnd(3 - otmp->spe / 3)
: 1;
if (s >= 0 && Is_dragon_scales(otmp)) {
unsigned was_lit = otmp->lamplit;
int old_light = artifact_light(otmp) ? arti_light_radius(otmp) : 0;
/* 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 - GRAY_DRAGON_SCALES;
otmp->lamplit = 0; /* don't want bless() or uncurse() to adjust
* light radius because scales -> scale_mail will
* result in a second increase with own message */
if (sblessed) {
otmp->spe++;
cap_spe(otmp);
@@ -1129,6 +1135,9 @@ seffect_enchant_armor(struct obj **sobjp)
setworn(otmp, W_ARM);
if (otmp->unpaid)
alter_cost(otmp, 0L); /* shop bill */
otmp->lamplit = was_lit;
if (old_light)
maybe_adjust_light(otmp, old_light);
return;
}
pline("%s %s%s%s%s for a %s.", Yname2(otmp),

View File

@@ -528,8 +528,9 @@ m_dowear_type(struct monst *mon, long flag, boolean creation,
boolean racialexception)
{
struct obj *old, *best, *obj;
long oldmask = 0L;
int m_delay = 0;
int unseen = !canseemon(mon);
int sawmon = canseemon(mon), sawloc = cansee(mon->mx, mon->my);
boolean autocurse;
char nambuf[BUFSZ];
@@ -629,13 +630,15 @@ m_dowear_type(struct monst *mon, long flag, boolean creation,
m_delay += 2;
/* when upgrading a piece of armor, account for time spent
taking off current one */
if (old)
if (old) {
m_delay += objects[old->otyp].oc_delay;
if (old) /* do this first to avoid "(being worn)" */
old->owornmask = 0L;
oldmask = old->owornmask; /* needed later by artifact_light() */
old->owornmask = 0L; /* avoid doname() showing "(being worn)" */
}
if (!creation) {
if (canseemon(mon)) {
if (sawmon) {
char buf[BUFSZ];
if (old)
@@ -654,20 +657,45 @@ m_dowear_type(struct monst *mon, long flag, boolean creation,
if (mon->mfrozen)
mon->mcanmove = 0;
}
if (old)
if (old) {
update_mon_intrinsics(mon, old, FALSE, creation);
/* owornmask was cleared above but artifact_light() expects it */
old->owornmask = oldmask;
if (old->lamplit && artifact_light(old))
end_burn(old, FALSE);
old->owornmask = 0L;
}
mon->misc_worn_check |= flag;
best->owornmask |= flag;
if (autocurse)
curse(best);
if (artifact_light(best) && !best->lamplit) {
begin_burn(best, FALSE);
vision_recalc(1);
if (!creation && best->lamplit && cansee(mon->mx, mon->my)) {
const char *adesc = arti_light_description(best);
if (sawmon) /* could already see monster */
pline("%s %s to shine %s.", Yname2(best),
otense(best, "begin"), adesc);
else if (canseemon(mon)) /* didn't see it until new light */
pline("%s %s shining %s.", Yname2(best),
otense(best, "are"), adesc);
else if (sawloc) /* saw location but not invisible monster */
pline("%s begins to shine %s.", Something, adesc);
else /* didn't see location until new light */
pline("%s is shining %s.", Something, adesc);
}
}
update_mon_intrinsics(mon, best, TRUE, creation);
/* if couldn't see it but now can, or vice versa, */
if (!creation && (unseen ^ !canseemon(mon))) {
if (!creation && (sawmon ^ !canseemon(mon))) {
if (mon->minvis && !See_invisible) {
pline("Suddenly you cannot see %s.", nambuf);
makeknown(best->otyp);
} /* else if (!mon->minvis) pline("%s suddenly appears!",
Amonnam(mon)); */
} /* else if (!mon->minvis)
* pline("%s suddenly appears!", Amonnam(mon)); */
}
}
#undef RACE_EXCEPTION
@@ -1057,6 +1085,11 @@ extract_from_minvent(
impossible("extract_from_minvent called on object not in minvent");
return;
}
/* handle gold dragon scales/scale-mail (lit when worn) before clearing
obj->owornmask because artifact_light() expects that to be W_ARM */
if ((unwornmask & W_ARM) != 0 && obj->lamplit && artifact_light(obj))
end_burn(obj, FALSE);
obj_extract_self(obj);
obj->owornmask = 0L;
if (unwornmask) {