lifesaved steed (trunk only)
From the newsgroup: hero's steed can become untame if killed while it is wearing an amulet of life saving, leaving the hero still mounted and resulting in repeated "placing steed onto map?" warnings when the steed tries to move. Force the hero to be thrown off the mount in that situation.
This commit is contained in:
@@ -374,6 +374,8 @@ archeologist shouldn't start with sling skill by carrying slingable touchstone
|
||||
ensure current_fruit gets set to the correct index when setting fruit
|
||||
option to existing entry whose fid is not the highest
|
||||
monsters already wearing suits can't put on shirts
|
||||
if life-saved steed became untame, repeated "placing steed onto map?" warnings
|
||||
would be given as long as the hero remained mounted
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
18
src/dog.c
18
src/dog.c
@@ -922,19 +922,23 @@ boolean was_dead;
|
||||
}
|
||||
} else {
|
||||
/* chance it goes wild anyway - Pet Semetary */
|
||||
if (!rn2(mtmp->mtame)) {
|
||||
mtmp->mpeaceful = mtmp->mtame = 0;
|
||||
}
|
||||
mtmp->mtame = rn2(mtmp->mtame + 1);
|
||||
if (!mtmp->mtame) mtmp->mpeaceful = rn2(2);
|
||||
}
|
||||
|
||||
if (!mtmp->mtame) {
|
||||
if (!quietly && canspotmon(mtmp))
|
||||
pline("%s %s.", Monnam(mtmp),
|
||||
mtmp->mpeaceful ? "is no longer tame" : "has become feral");
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
/* a life-saved monster might be leashed;
|
||||
don't leave it that way if it's no longer tame */
|
||||
if (mtmp->mleashed) m_unleash(mtmp, TRUE);
|
||||
}
|
||||
|
||||
/* if its still a pet, start a clean pet-slate now */
|
||||
if (edog && mtmp->mtame) {
|
||||
#ifdef STEED
|
||||
if (mtmp == u.usteed) dismount_steed(DISMOUNT_THROWN);
|
||||
#endif
|
||||
} else if (edog) {
|
||||
/* it's still a pet; start a clean pet-slate now */
|
||||
edog->revivals++;
|
||||
edog->killed_by_u = 0;
|
||||
edog->abuse = 0;
|
||||
|
||||
17
src/mon.c
17
src/mon.c
@@ -1481,6 +1481,7 @@ STATIC_OVL void
|
||||
lifesaved_monster(mtmp)
|
||||
struct monst *mtmp;
|
||||
{
|
||||
boolean surviver;
|
||||
struct obj *lifesave = mlifesaver(mtmp);
|
||||
|
||||
if (lifesave) {
|
||||
@@ -1504,19 +1505,21 @@ struct monst *mtmp;
|
||||
pline_The("medallion crumbles to dust!");
|
||||
}
|
||||
m_useup(mtmp, lifesave);
|
||||
|
||||
surviver = !(mvitals[monsndx(mtmp->data)].mvflags & G_GENOD);
|
||||
mtmp->mcanmove = 1;
|
||||
mtmp->mfrozen = 0;
|
||||
if (mtmp->mtame && !mtmp->isminion) {
|
||||
wary_dog(mtmp, FALSE);
|
||||
wary_dog(mtmp, !surviver);
|
||||
}
|
||||
if (mtmp->mhpmax <= 0) mtmp->mhpmax = 10;
|
||||
mtmp->mhp = mtmp->mhpmax;
|
||||
if (mvitals[monsndx(mtmp->data)].mvflags & G_GENOD) {
|
||||
if (cansee(mtmp->mx, mtmp->my))
|
||||
pline("Unfortunately %s is still genocided...",
|
||||
mon_nam(mtmp));
|
||||
} else
|
||||
return;
|
||||
if (surviver) return;
|
||||
|
||||
/* genocided monster can't be life-saved */
|
||||
if (cansee(mtmp->mx, mtmp->my))
|
||||
pline("Unfortunately, %s is still genocided...",
|
||||
mon_nam(mtmp));
|
||||
}
|
||||
mtmp->mhp = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user