Previous hero rising as undead in bones retains intrinsics
This commit is contained in:
@@ -1331,6 +1331,7 @@ avoid impossible "trapped without a trap (fmon)" from 'sanity_check' when a
|
|||||||
demons cannot be frightened by showing them their reflection
|
demons cannot be frightened by showing them their reflection
|
||||||
HP regeneration formula has changed, primarily to be less fast in the endgame
|
HP regeneration formula has changed, primarily to be less fast in the endgame
|
||||||
riding negates stealth unless the steed is flying
|
riding negates stealth unless the steed is flying
|
||||||
|
previous hero rising as undead in bones retains intrinsics
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||||
|
|||||||
@@ -1799,6 +1799,7 @@ unsigned long cvt_adtyp_to_mseenres(uchar);
|
|||||||
unsigned long cvt_prop_to_mseenres(uchar);
|
unsigned long cvt_prop_to_mseenres(uchar);
|
||||||
extern void monstseesu(unsigned long);
|
extern void monstseesu(unsigned long);
|
||||||
extern void monstunseesu(unsigned long);
|
extern void monstunseesu(unsigned long);
|
||||||
|
extern void give_u_to_m_resistances(struct monst *) NONNULLARG1;
|
||||||
extern boolean resist_conflict(struct monst *) NONNULLARG1;
|
extern boolean resist_conflict(struct monst *) NONNULLARG1;
|
||||||
extern boolean mon_knows_traps(struct monst *, int) NONNULLARG1;
|
extern boolean mon_knows_traps(struct monst *, int) NONNULLARG1;
|
||||||
extern void mon_learns_traps(struct monst *, int) NONNULLARG1;
|
extern void mon_learns_traps(struct monst *, int) NONNULLARG1;
|
||||||
|
|||||||
@@ -486,6 +486,7 @@ savebones(int how, time_t when, struct obj *corpse)
|
|||||||
u.ugrave_arise = NON_PM; /* in case caller cares */
|
u.ugrave_arise = NON_PM; /* in case caller cares */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
give_u_to_m_resistances(mtmp);
|
||||||
mtmp = christen_monst(mtmp, gp.plname);
|
mtmp = christen_monst(mtmp, gp.plname);
|
||||||
newsym(u.ux, u.uy);
|
newsym(u.ux, u.uy);
|
||||||
/* ["Your body rises from the dead as an <mname>..." used
|
/* ["Your body rises from the dead as an <mname>..." used
|
||||||
|
|||||||
@@ -1480,6 +1480,19 @@ monstunseesu(unsigned long seenres)
|
|||||||
m_clearseenres(mtmp, seenres);
|
m_clearseenres(mtmp, seenres);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* give monster mtmp the same intrinsics hero has */
|
||||||
|
void
|
||||||
|
give_u_to_m_resistances(struct monst *mtmp)
|
||||||
|
{
|
||||||
|
const int u_intrins[] = { FIRE_RES, COLD_RES, SLEEP_RES, DISINT_RES, SHOCK_RES, POISON_RES, ACID_RES, STONE_RES };
|
||||||
|
const int m_intrins[] = { MR_FIRE, MR_COLD, MR_SLEEP, MR_DISINT, MR_ELEC, MR_POISON, MR_ACID, MR_STONE };
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < SIZE(u_intrins); i++)
|
||||||
|
if (u.uprops[u_intrins[i]].intrinsic & INTRINSIC)
|
||||||
|
mtmp->mintrinsics |= m_intrins[i];
|
||||||
|
}
|
||||||
|
|
||||||
/* Can monster resist conflict caused by hero?
|
/* Can monster resist conflict caused by hero?
|
||||||
|
|
||||||
High-CHA heroes will be able to 'convince' monsters
|
High-CHA heroes will be able to 'convince' monsters
|
||||||
|
|||||||
Reference in New Issue
Block a user