new property: BLND_RES
Add enlightenment feedback for Sunsword's blocking of becoming blind from light flashes. It uses an extra property so that wizard mode can report the reason. EDITLEVEL is being incremented, so existing save and bones files are invalidated.
This commit is contained in:
@@ -629,7 +629,10 @@ protects(struct obj *otmp, boolean being_worn)
|
||||
* unworn/unwielded/dropped. Pickup/drop only set/reset the W_ART mask.
|
||||
*/
|
||||
void
|
||||
set_artifact_intrinsic(struct obj *otmp, boolean on, long wp_mask)
|
||||
set_artifact_intrinsic(
|
||||
struct obj *otmp,
|
||||
boolean on,
|
||||
long wp_mask)
|
||||
{
|
||||
long *mask = 0;
|
||||
const struct artifact *art, *oart = get_artifact(otmp);
|
||||
@@ -796,6 +799,13 @@ set_artifact_intrinsic(struct obj *otmp, boolean on, long wp_mask)
|
||||
&& (u.uprops[oart->inv_prop].extrinsic & W_ARTI))
|
||||
(void) arti_invoke(otmp);
|
||||
}
|
||||
|
||||
if (wp_mask == W_WEP && is_art(otmp, ART_SUNSWORD)) {
|
||||
if (on)
|
||||
EBlnd_resist |= wp_mask;
|
||||
else
|
||||
EBlnd_resist &= ~wp_mask;
|
||||
}
|
||||
}
|
||||
|
||||
/* touch_artifact()'s return value isn't sufficient to tell whether it
|
||||
@@ -2210,6 +2220,10 @@ what_gives(long *abil)
|
||||
if ((art->spfx & spfx) == spfx && obj->owornmask)
|
||||
return obj;
|
||||
}
|
||||
if (obj == uwep && abil == &EBlnd_resist
|
||||
&& (*abil & W_WEP) != 0L) {
|
||||
return obj; /* Sunsword */
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (wornbits && wornbits == (wornmask & obj->owornmask))
|
||||
|
||||
Reference in New Issue
Block a user