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:
@@ -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
|
||||
|
||||
@@ -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 ### */
|
||||
|
||||
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