Every attack in Paper Mario has an element that determines how it interacts with defenses, immunities, and status effects. Elements control whether an attack triggers burn animations, gets blocked by ice shields, or bypasses certain defenses entirely.
Element types
| Element | Description |
|---|---|
ELEMENT_NORMAL | Standard physical damage with no special properties. |
ELEMENT_FIRE | Fire damage. Triggers EVENT_BURN_HIT / EVENT_BURN_DEATH. |
ELEMENT_WATER | Water damage. |
ELEMENT_ICE | Ice damage. Can freeze targets. |
ELEMENT_MYSTERY | Special damage type used by certain star powers. |
ELEMENT_MAGIC | Magic damage, bypasses some physical defenses. |
ELEMENT_SMASH | Hammer-type damage. |
ELEMENT_JUMP | Jump-type damage. |
ELEMENT_COSMIC | Star-based damage (e.g. Star Beam). |
ELEMENT_BLAST | Explosion damage. Can flip actors with ACTOR_EVENT_FLAG_FLIPABLE. |
ELEMENT_SHOCK | Electric damage. Triggers EVENT_SHOCK_HIT / EVENT_SHOCK_DEATH. |
ELEMENT_QUAKE | Earthquake damage. Only hits grounded actors. |
ELEMENT_THROW | Throwing damage (e.g. Kooper's shell). |
ELEMENT_END (value 0) is a sentinel used to terminate defense tables, not an actual element.
Dealing elemental damage
To make an attack deal elemental damage, pass the corresponding DAMAGE_TYPE_ flag to EnemyDamageTarget. Each attack uses exactly one elemental flag, optionally combined with modifier flags:
// fire attack that doesn't make contact (e.g. fire breath)
Call(EnemyDamageTarget,actorID ACTOR_SELF,outResult LVar0,
damageType (DAMAGE_TYPE_FIRE | DAMAGE_TYPE_NO_CONTACT),
suppressEventFlags 0,debuffType 0,damageAmount 4,flagsModifier BS_FLAGS1_TRIGGER_EVENTS)See Actor Attacks for the full damage-dealing pattern.
Defense tables
A DefenseTable maps elements to defense values. Positive values reduce damage, negative values increase it (weakness), and a value of 99 effectively grants immunity.
s32 DefenseTable[] = {
ELEMENT_NORMAL, 1, // 1 point of defense against normal attacks
ELEMENT_FIRE, 99, // immune to fire
ELEMENT_WATER, -2, // takes 2 extra damage from water
ELEMENT_ICE, -2, // takes 2 extra damage from ice
ELEMENT_END,
};Every element the actor can be hit by should have an entry. If an element is missing from the table, the defense defaults to 0.
Defense tables are set per-part in the ActorPartBlueprint. See Actor Parts for how parts are defined.
Element immunity flags
The .elementImmunityFlags field on an ActorPartBlueprint provides another layer of elemental defense. While defense tables reduce damage, immunity flags cause the attack to be completely ignored — the actor won't flinch or react at all.
ActorPartBlueprint ActorParts[] = {
{
.flags = ACTOR_PART_FLAG_PRIMARY_TARGET,
.index = PRT_MAIN,
// ...
.elementImmunityFlags = ELEMENT_IMMUNITY_FLAG_FIRE,
},
};Elemental events
Fire and shock elements trigger special events in the event handler:
| Element | Hit event | Death event |
|---|---|---|
| Fire | EVENT_BURN_HIT | EVENT_BURN_DEATH |
| Shock | EVENT_SHOCK_HIT | EVENT_SHOCK_DEATH |
Handle these events to play the appropriate burn or shock animations using EVS_Enemy_BurnHit or EVS_Enemy_ShockHit.
Other elements use the standard EVENT_HIT and EVENT_DEATH events.