diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 7956836bc..3c82aaf5d 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -521,6 +521,7 @@ prediscovered weapons adjustmens: only knights and samurai know polearms; of their race/species; likewise, rogues know all daggers if the move counter ever reaches 1000000000, end the game knights get no metal armor penalty for clerical spells +change touch of death from instadeath to maxhp reduction and damage Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index 230948f51..5956b547d 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1171,6 +1171,7 @@ extern boolean usmellmon(struct permonst *); /* ### mcastu.c ### */ extern int castmu(struct monst *, struct attack *, boolean, boolean); +extern void touch_of_death(void); extern int buzzmu(struct monst *, struct attack *); /* ### mdlib.c ### */ diff --git a/src/mcastu.c b/src/mcastu.c index 829a2dee1..76a53fd2f 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -346,6 +346,24 @@ m_cure_self(struct monst *mtmp, int dmg) return dmg; } +void +touch_of_death(void) +{ + int dmg = 50 + d(8, 6); + int drain = dmg / 2; + + You_feel("drained..."); + + if (drain >= u.uhpmax) { + g.killer.format = KILLED_BY_AN; + Strcpy(g.killer.name, "touch of death"); + done(DIED); + } else { + u.uhpmax -= drain; + losehp(dmg, "touch of death", KILLED_BY_AN); + } +} + /* monster wizard and cleric spellcasting functions */ /* If dmg is zero, then the monster is not casting at you. @@ -373,9 +391,7 @@ cast_wizard_spell(struct monst *mtmp, int dmg, int spellnum) if (Hallucination) { You("have an out of body experience."); } else { - g.killer.format = KILLED_BY_AN; - Strcpy(g.killer.name, "touch of death"); - done(DIED); + touch_of_death(); } } else { if (Antimagic) { diff --git a/src/uhitm.c b/src/uhitm.c index b93796306..36518c71f 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -3209,9 +3209,7 @@ mhitm_ad_deth(struct monst *magr, struct attack *mattk UNUSED, case 18: case 17: if (!Antimagic) { - g.killer.format = KILLED_BY_AN; - Strcpy(g.killer.name, "touch of death"); - done(DIED); + touch_of_death(); mhm->damage = 0; return; }