Contribute to Me Now - Share via - - Google+ - E-mail

Pokémon Mystery Dungeon - Damage Calculation

Pokémon Mystery Dungeon - In-Depth GuidesPokémon Mystery Dungeon - Damage Calculation

Tags: pokemon-mystery-dungeon

This page has proved very complicated for many people. A shorter and simpler version of this page is available. This page is intended for those who want to create a battle system for Mystery Dungeon.

Here is the procedure for calculating damage in Mystery Dungeon. No rounding up or down is done in multiplication or division.

Internally, the game uses a 64-bit fixed point number format, with a 16-bit fractional part, in the damage calculation.

Damage Formula

Damage = (((D*2)-C)+10)+((D*D)*3276/65536)

where:

  • A = Attacker’s Attack or Special Attack
  • B = Attacker’s level
  • C = The target’s Defense or Special Defense
  • D = ((A-C)/8)+(B*43690/65536)

For physical attack types (Normal, Fighting, Flying, Poison, Ground, Rock, Bug, Ghost, Steel, None), use the Attack and Defense values. For special attack types (Fire, Water, Electric, Grass, Ice, Psychic, Dragon, Dark), use the Special Attack and Special Defense values.

Attack and Defense Modification

For the purposes of this formula, the attacker’s and defender’s stats are modified as follows, in this order:

  • If there is a defender and the attack is a Fire type, add X to the Special Attack stat stage, where X is the attacker’s Flash Fire rate (initially 0).
  • If the attacker is Deoxys, add 2 to the Attack or Special Attack stat stage if it’s the Attack Form; subtract 2 if it’s the Defense or Speed Form.
  • The Attack or Special Attack stat stage becomes min(20,max(0,Orig. value)).
  • If the defender has the Skull Bash status, add 1 to the Defense stat stage.
  • If the defender is Deoxys, add 2 to the Defense or Special Defense stat stage if it’s the Defense Form; subtract 2 if it’s the Attack or Speed Form.
  • The Defense or Special Defense stat stage becomes min(20,max(0,Orig. value)).
  • Add the attack’s power to the attacker’s Attack or Special Attack. (See "Power" in the list of moves. If the move has a number after a "+", for example, Scratch+1, that number, which can have a maximum of 255, is added to the attack’s power, which has no maximum value.)
  • Attack or Special Attack is multiplied by the respective stat stage multiplier.
  • Attack or Special Attack is multiplied by the respective stat multiplier (from Aurora Beam, and so on.).
  • Attack or Special Attack is rounded down.
  • Defense or Special Defense is multiplied by the respective stat stage multiplier.
  • Defense or Special Defense is multiplied by the respective stat multiplier (from Screech, and so on.).
  • Defense or Special Defense is rounded down.
  • If the attacker is holding a Power Band, add 12 to Attack.
  • If the attacker is holding a Munch Belt, add 8 to Attack.
  • If the defender is holding a Def. Scarf, add 12 to Defense.
  • If the defender is holding a Zinc Band, add 8 to Special Defense.
  • If the attacker is holding a Special Band, add 12 to Special Attack.
  • If the attacker is holding a Munch Belt, add 8 to Special Attack.
  • Attack/Defense/Special Attack/Special Defense become min(999,max(1,Orig. value)).
  • Four variables, X, Y, A, and B, are set to 1.
    • If the attacker has Guts and has a status problem (see "Status Problems" in the Status page), set X to 2 if the attack is a physical attack.
    • If the attacker has Huge Power or Pure Power and a random integer from 0 through 99 is less than or equal to 32, multiply X by 3 and Y by 2 if the attack is a physical attack.
    • If the attacker has Hustle, multiply X by 3 and Y by 2 if the attack is a physical attack.
    • If the attacker has Plus and one of the attacker’s allies has Minus, multiply X by 15 and Y by 10 if the attack is a special attack.
    • If the attacker has Minus and one of the attacker’s allies has Plus, multiply X by 15 and Y by 10 if the attack is a special attack.
    • If the defender has Intimidate, multiply X by 4 and Y by 5 if the attack is a physical attack.
    • If the defender has Marvel Scale and has a status problem, multiply A by 3 and B by 2 if the attack is a physical attack.
    Then, Attack or Special Attack is multiplied by X and divided by Y (rounding down), and Defense or Special Defense is multiplied by A and divided by B (rounding down).

Damage Modification

After calculating the damage using the formula above, the damage is modified as follows, in this order.

  • If the damage is less than 1, it equals 1. If the damage is greater than 999, it equals 999.
  • Next, an damage multiplier is created. This multiplier begins at 1. (This process will be called the "type matchup process".)
    • If there is no the target, the damage multiplier is 1 and processing stops.
    • For each type the defender has:
      • If the attack’s type has "little effect" against that type, Damage is halved (actually, multiplied by 32768/65536).
      • If the attack’s type is "not very effective" against that type, multiply the damage by 58982/65536.
      • If the attack’s type is "super effective" against that type, multiply the damage by 98304/65536.
      • As an exception, if the defender is exposed, Normal- and Fighting-type attacks are normally effective against the Ghost type.
    • If the defender has Wonder Guard and the attack is neither typeless nor "super effective" against the defender, the damage is 0.
    • If the defender has Thick Fat and the attack is a Fire or Ice type, the Damage is halved.
    • If the attack is a Fire type and the defender has Flash Fire, the damage multiplier is 0.
    • If the attack is a Ground type and the defender has Levitate, the damage multiplier is 0.
    • If the attack is a Water type, attacker has Torrent, and floor(Maximum HP/4)>=Current HP, Damage is doubled.
    • If the attack is a Grass type, attacker has Overgrow, and floor(Maximum HP/4)>=Current HP, Damage is doubled.
    • If the attack is a Bug type, attacker has Swarm, and floor(Maximum HP/4)>=Current HP, Damage is doubled.
    • If the attack is a Fire type, attacker has Blaze, and floor(Maximum HP/4)>=Current HP, Damage is doubled.
    • If the attacker shares a type with the attack’s type, multiply the damage by 1.5.
    • If the current weather is Sunny, the Damage is multiplied by 1.5 (actually 98304/65536) if the attack is a Fire type, and halved if the attack is a Water type.
    • If the current weather is Rainy, the Damage is multiplied by 1.5 (actually 98304/65536) if the attack is a Water type, and halved if the attack is a Fire type.
    • If the current weather is Cloudy and the attack isn’t of the Normal type, the Damage is multiplied by 3/4 (actually 49152/65536).
    • If the floor’s status is Mud Sport or the current weather is Fog; and the attack is an Electric type, the Damage is halved.
    • If the floor’s status is Water Sport and the attack is a Fire type, the Damage is halved.
    • If the attacker has the Charging status and the attack is an Electric type, the Damage is doubled.
  • If the attack is a Fire type and the defender has Flash Fire, and the attack was the first Fire-type attack this turn, the defender’s Flash Fire rate rises by 1 up to a maximum of 2. The Flash Fire rate is reset to 0 when the defender leaves the floor.
  • If the defender has the Reflect status and the attack is a physical attack, or if the defender has the Light Screen status and the attack is a special attack, the Damage is halved. (Reflect and Light Screen are mutually exclusive.)
  • If the attack is a critical hit (see "Critical Hits", below), the Damage is multiplied by 1.5.
  • The damage is multiplied by the damage multiplier.
  • The damage is multiplied by an additional multiplier specific to the attack. This multiplier is usually equal to 1. For example, if the defender is using Dig and the attack is Earthquake, this value equals 2.
  • The damage is multiplied by ((57344+X)/65536) where X is a random integer from 0 through 16383.
  • The damage is rounded to the nearest integer.

Critical Hits

  • If the defender has Battle Armor or Shell Armor, the attack can’t be a critical hit.
  • A variable, C, is set to the move’s initial critical hit rate (see "Crit" in the list of moves).
  • If Focus Energy is in effect for attacker, set C to 999.
  • Otherwise:
    • If the attacker is holding Scope Lens, add 40 to C.
    • If the defender is holding Patsy Band, add 40 to C.
    • If there is no defender or the attack is "super effective" against the defender; and Type-Advantage Master is enabled for the attacker, set C to 40.
  • If a random integer from 0 through 99 is less than C, the attack is a critical hit.
5Fixed Damage

For moves that deal a fixed amount of damage, such as Magnitude, the following process is used instead. Such moves use the words "fixed damage" in their descriptions.

  • If the damage is less than 1, it equals 1. If the damage is greater than 999, it equals 999.
  • Follow the type matchup process above.
  • The damage is multiplied by the damage multiplier.
  • The damage is rounded to the nearest integer.

This process is not to be confused with effects that simply reduce HP.

Exceptions

In the normal damage calculation process, the defender is always dealt 1 damage in at least one of these cases:

  • When the attacker’s Belly is empty and the attacker isn’t the team leader.
  • When the attacker uses its regular attack and the defender has Wonder Guard.

The exceptions above don’t apply to fixed damage.