Change touch of death from instadeath to maxhp reduction and damage
Touch of death will now do 50 + 8d6 damage, and drain max HP for half of that. If the drain is equal or greater than your max HP, then it will kill you instantly. Change originally from SporkHack by Derek Ray.
This commit is contained in:
22
src/mcastu.c
22
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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user