diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 2e56f3f83..4154520b9 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -2732,6 +2732,7 @@ enlightenment/attribute disclosure for saving-grace: include a line for have normal play, the prefix is suppressed tourists gain experience by seeing new types of creatures up close, and going to new dungeon levels +healers gain experience by healing pets Platform- and/or Interface-Specific New Features diff --git a/src/zap.c b/src/zap.c index 84cc79561..00120647a 100644 --- a/src/zap.c +++ b/src/zap.c @@ -426,11 +426,15 @@ bhitm(struct monst *mtmp, struct obj *otmp) } break; case SPE_HEALING: - case SPE_EXTRA_HEALING: + case SPE_EXTRA_HEALING: { + int healamt = d(6, otyp == SPE_EXTRA_HEALING ? 8 : 4); + reveal_invis = TRUE; if (mtmp->data != &mons[PM_PESTILENCE]) { + int delta = mtmp->mhpmax - mtmp->mhp; + wake = FALSE; /* wakeup() makes the target angry */ - mtmp->mhp += d(6, otyp == SPE_EXTRA_HEALING ? 8 : 4); + mtmp->mhp += healamt; if (mtmp->mhp > mtmp->mhpmax) mtmp->mhp = mtmp->mhpmax; /* plain healing must be blessed to cure blindness; extra @@ -451,15 +455,19 @@ bhitm(struct monst *mtmp, struct obj *otmp) pline("%s looks%s better.", Monnam(mtmp), otyp == SPE_EXTRA_HEALING ? " much" : ""); } + if (mtmp->mtame && Role_if(PM_HEALER) && (delta > 0)) { + more_experienced(min(delta, healamt), 0); + newexplevel(); + } if (mtmp->mtame || mtmp->mpeaceful) { adjalign(Role_if(PM_HEALER) ? 1 : sgn(u.ualign.type)); } } else { /* Pestilence */ - /* Pestilence will always resist; damage is half of 3d{4,8} */ - (void) resist(mtmp, otmp->oclass, - d(3, otyp == SPE_EXTRA_HEALING ? 8 : 4), TELL); + /* Pestilence will always resist; damage is half of (healamt/2) */ + (void) resist(mtmp, otmp->oclass, healamt / 2, TELL); } break; + } case WAN_LIGHT: /* (broken wand) */ if (flash_hits_mon(mtmp, otmp)) { learn_it = TRUE;