On-death explosion

From NetHackWiki
Jump to navigation Jump to search

An on-death explosion is an attack type that appears in NetHack, and it is distinct from the active explosion attack—both are primarily used by monsters. The attack type is defined by the AT_BOOM flag within monattk.h in the source code.[1]

Description

A monster that has an on-death explosion attack will naturally only 'use' that attack if they are killed by HP loss, somewhat similar to a passive attack:[2] being killed by poison or zapped by a death ray meets the conditions for the attack, but death by stoning and disintegration do not. The on-death explosion is not counted as a standard attack by the game code for most purposes (e.g. interrupting occupations or determining whether the monster can attempt an attack on the hero).[3][4]

The only monster to have an on-death explosion attack is the gas spore, whose dying explosion always occurs and deals physical damage.[5] A hero that polymorphs into a gas spore will explode in the same way upon dying, though this "death" will always return the hero to normal form (even if they have a source of unchanging) and they will not be affected by the resulting explosion.[6]

Monsters that explode on death will create a 3x3 explosion centered on their former square that makes noise and deals damage to a hero or any other monsters caught in that explosion[7][8][9][10]—damage from this explosion is dealt to the hero after all other monsters are accounted for, and a hero caught in an on-death explosion abuses strength.[11][12] If the hero kills a monster and causes it to explode in this manner, they are credited for any monsters hit or killed by the explosion, including any penalties for angering peaceful monsters or killing peacefuls and pets. Monsters will not attack another monster that explodes on death under normal circumstances (e.g., they are not confused or under conflict), unless their current HP is higher than the maximum amount of damage the explosion can deal.

A monster that is killed by engulfing (including via digestion) and explodes on death will solely damage the monster that was engulfing them, and the explosion will make less noise than it would normally.[13][14] If a hero or monster is caught in a holding attack when they are hit by an on-death explosion, the grabber takes double damage from that explosion.[15][16]

Cancellation and magic cancellation have no effect on a monster's ability to explode upon dying, though a monster's MR score can halve damage, and half physical damage halves damage taken by the hero from the explosion.[17][18][19]

History

The on-death explosion attack type is formally defined in NetHack 3.3.0.

From this version to NetHack 3.6.7, including some variants based on those versions, on-death explosions are subject to multiple notable software bugs, some of which are also related to gas spores:

Messages

<The monster> explodes!
A monster used an on-death explosion attack against you—this will never occur in practice due to how the attack functions.[20]
You hear a blast.
A monster exploded upon dying while it was outside of your range of vision, and you are not deaf.[21]
You are caught in <the monster's> explosion!
You were in the range of an on-death explosion and took damage.
It is fatal.
The damage from the above explosion killed you.
<The victim> is caught in <the monster's> explosion!
Another monster was in the range of an on-death explosion and took damage.
You hear an explosion.
A monster exploded upon death as a result of being engulfed.
<The engulfer> seems to have indigestion.
The engulfer took damage from the above explosion.
<The engulfer> rips open!
The engulfer took lethal damage from the above explosion.
There is an explosion in your <stomach>!
As above, but you are the engulfing monster in question via polymorph.[22]
<The monster> reconstitutes!
A monster's on-death explosion triggered an amulet of life saving.[23]
You explode!
You "died" while in the form of a monster and your on-death explosion attack went off, returning you to normal form.[6]

Variants

NetHack variants of may give on-death explosion attacks to new and returning monsters, as well as implement additional different damage types for on-death explosions.

UnNetHack

In UnNetHack, dungeon ferns can generate spores that have on-death explosion attacks:

All of these attacks deal 2d4 physical damage and propagate more ferns of the corresponding type—"normal" fern spores are only generated by a hero or monster reading a blessed scroll of stinking cloud while confused, and their explosions can propagate any type of dungeon fern.

dNetHack

In dNetHack, notdNetHack and notnotdNetHack, many monsters are given on-death explosion attacks:

References