dragon armor fix
Fix a segfault when polymorphed into a dragon and using ^X. One inconsistency I've spotted that I hadn't noticed earlier: if you wear red dragon scales/mail you obtain infravision ability, but if polymorph into a red dragon, you don't.
This commit is contained in:
+1
-1
@@ -67,7 +67,7 @@
|
|||||||
#define HSick_resistance u.uprops[SICK_RES].intrinsic
|
#define HSick_resistance u.uprops[SICK_RES].intrinsic
|
||||||
#define ESick_resistance u.uprops[SICK_RES].extrinsic
|
#define ESick_resistance u.uprops[SICK_RES].extrinsic
|
||||||
#define Sick_resistance (HSick_resistance || ESick_resistance \
|
#define Sick_resistance (HSick_resistance || ESick_resistance \
|
||||||
|| defends(AD_DISE, uwep))
|
|| defended(&g.youmonst, AD_DISE))
|
||||||
|
|
||||||
/* Intrinsics only */
|
/* Intrinsics only */
|
||||||
#define Invulnerable u.uprops[INVULNERABLE].intrinsic /* [Tom] */
|
#define Invulnerable u.uprops[INVULNERABLE].intrinsic /* [Tom] */
|
||||||
|
|||||||
@@ -396,6 +396,8 @@ defends(int adtyp, struct obj *otmp)
|
|||||||
{
|
{
|
||||||
struct artifact *weap;
|
struct artifact *weap;
|
||||||
|
|
||||||
|
if (!otmp)
|
||||||
|
return FALSE;
|
||||||
if ((weap = get_artifact(otmp)) != 0)
|
if ((weap = get_artifact(otmp)) != 0)
|
||||||
return (boolean) (weap->defn.adtyp == adtyp);
|
return (boolean) (weap->defn.adtyp == adtyp);
|
||||||
if (Is_dragon_armor(otmp)) {
|
if (Is_dragon_armor(otmp)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user