# Damage Formula

##### WARNING: Do not read any further if you don't like and/or don't understand math. Doing so will make you think that Arpeggio is much more complicated than it really is.

Arpeggio is based on Paper Mario because Paper Mario's battle numbers are very small and simple and predictable, in direct contrast to every other RPG in existence. As such, damage calculations in Arpeggio are supposed to be extremely simple, taking the basic form of Attack Power minus Defense Power. However, I have added many different factors to the Arpeggio system that can affect the damage dealt by an attack, and the full damage formula will look incredibly complicated because of them. What you should remember is that most of the time, only one or two of the variables in the formula are actually being used, and all of the other ones are set to 0 or 1 in such ways as to make them have no effect on the outcome of the attack.

Here are all the variables involved in the formula:

• A = The power of the attack being used. For a basic attack, A will be equal to the user's Attack Power. For other attacks, A will be equal to Attack Power multiplied by and/or added to a specified value, unless the attack being used is magical or psychic; the user's Magic Power is used for magical attacks and the user's Brain Power is used for psychic attacks. The most common augmentations of power values are x1, x2, x2 +2, x2 +4, and x4. You may also see +1, +2, +4, x3, or others. The important part is, those multipliers or additives are the first thing calculated, and the result is stored in this one variable, A. Example: If Mario has an Attack Power of 3 and uses Power Jump, which deals x2 +2 damage, then A will be equal to 3x2+2, or 8. (One of the few things that affects A instead of X is the Feral state: the afflicted's base Attack Power is at +1 and base Brain Power at -1. So if Mario were Feral, Power Jump would do 4x2+2, or 10.)
• D = The Defense Power of the character being attacked. This will always be equal to the character's Defense Power value unless the attack being used is psychic, in which case D is equal to the character's Brain Power. (Again, if the defender has been turned Feral, base Brain Power is -1 to its normal value.)
• X = Any relevant Stat Increases or Stat Decreases applied to the attacking character. If the attack being used is physical, then any Attack Power Increase or Attack Power Decrease applied to the attacker is relevant; if the attack is magical, then Magic Power is relevant, and if it is psychic, then Brain Power is relevant. Since Stat Increases and Stat Decreases cannot be applied to the same character at once, it will only be one or the other, although if the character is also Charged, the Charge number will be added to the Increase or Decrease. X is equal to the value by which the relevant offensive stat is currently Charged and/or Increased or Decreased. If no Increase, Decrease, or Charge is applied, X equals 0. If the attacking character is currently Invincible and the attack being used refers to Attack Power, then X will be at +10 to its normal value—unless the defending character is ALSO Invincible (or Stone), in which case the attacker does not get the +10. Important to note is that projectile weapons like guns and bows deal damage based on their ammunition and completely ignore the user's stats, which means that X will always be equal to 0 for these attacks. (There is a single default exception in that the Mrs. Assault Rifle adds 1 to the power of any ammunition loaded into it, which could conceivably be stored in the X variable were one to bother running the entire formula for it.)
• Y = Any relevant Stat Increases or Stat Decreases applied to the defending character. If D is equal to the defender's Defense Power, then any Defense Power Increase or Decrease would be relevant; if D equals the defender's Brain Power, then a Brain Power Increase or Decrease applied to the defending character would be relevant. Y is equal to the value of the relevant defensive stat Increase or Decrease. If no relevant Increase or Decrease exists, Y equals 0.
• B = If the attack being used is marked [/] or [X], then B equals 0. If not, B equals 1.
• E = The Elemental Modifier of the defender. If the attack being used is non-Elemental, E is equal to 0. If the attack is of a particular Element, then E is equal to the relevant Elemental Modifier of the defender (with "--" being treated as 0), unless the relevant modifier is x0, in which case E equals 0 and the immunity is handled in the variable L.
• W = The effects of the Weapon Triangle on the attack being performed. If the attacker is using a weapon that is good against the weapon that the defender currently has equipped, then W = 1; if the attacker is using a weapon that is bad against the defender's weapon, then W = -1. "Reaver" weapons reverse the normal order of the Weapon Triangle and double the bonus damage, so if a "Reaver" weapon is being used, W may be equal to 2 or -2. If the weapons being used are neutral to each other, or if the attacker, the defender, or both of them do not have a weapon equipped, then W = 0.
• Z = Lumped together here are myriad factors that can increase the damage dealt by an attack. These include the +2 for augmenting an already Fire-type attack while in a Fire State (or Ice attack in an Ice State); the effects of Weather Conditions (+2 or -2; a x0 effect will be handled in the variable L instead of here); extra damage taken from psychic attacks due to being high or having a mental disorder (+2 or -2); and attacks designed to deal extra damage to flying characters, laguz, or specific styles of characters such as dragons (this bonus damage is almost always +2). Basically, Z accounts for anything not mentioned in any other variable, effectively negating the usefulness of this entire page. The point, though, is that all of these bonus effects will just be added to A and X, so whether you give them each their own variables or squish them into one, the result is the same. To summarize, Z is equal to all positive or negative bonus damage factors added together, except those accounted for in other variables.
• S = If the defending character is currently Shielded, then S equals 1. If not, S equals 0.
• L = This variable handles both immunities based on Elemental Modifiers and also the cancellation effects of some Weather Conditions on some types of Elemental attacks. If the attack being used is Elemental and the relevant Elemental Modifier of the defender is x0, then L is equal to 0; if the attack is Elemental and the current Weather Condition causes attacks of that Element to deal 0 damage, then L is also equal to 0. If neither of these is the case, then L equals 1. (Although, heck, throw in any other immunities here as well. Most of the time, though, if you know a character is immune to an attack, you're better off not bothering to run the whole formula =P )
• R = The defensive value provided by the armor that is currently being worn by the defending character. Remember to check whether or not the armor being worn protects against the type of attack being performed (most armor does not protect against psychic attacks). If the defender is not wearing any armor, R equals 0. The amount of damage that armor protects the wearer from per attack is subtracted from the armor's own HP (but cut in half if the wearer is Shielded), but that is not shown in this equation.
• P = If the attack being used is marked [X], then P equals 0. If not, P equals 1.
• V = If the defending character is currently using the Defend command, then V = 1. If not, V = 0. If the character has a Shield-type weapon equipped while using the Defend command, then V is equal to 1 plus that particular shield's Defend Bonus. (I ran out of obvious letters... I guess it's V for "vibranium shield"?)
• C = A small number of attacks have a chance of getting a critical hit for three times damage. If the hit is critical (which should be determined using chance devices such as coins or dice), then C equals 3. If not, C equals 1. Since this critical hit variable is applied after defenses are subtracted, a critical hit will still do 0 damage if the original attack would have done 0 damage (this is how it works in Fire Emblem, and somewhat balances out the incredible power of a critical hit against a defenseless enemy).
• I = If the defending character is currently Invincible or Stone, then I is equal to 0 unless the attacking character is ALSO Invincible and they are NOT attacking with a projectile weapon, an attacking item, or another ability that ignores their own stats. Under these circumstances, or if the defending character is not Invincible or Stone, then I equals 1.

Two very special rules apply to the damage formula. One: all instances of subtraction have a minimum result of 0, and any negative values should be immediately bumped up to 0 before continuing with the equation. (The variables themselves, though, can store negative values, as mentioned above.) Two: all non-integers should be immediately rounded down as soon as they appear (you should only end up with .5s, since the only possible division is by 2).

Here is the full formula, written in a sort of chronological order:

Damage = ((((A + X + E + W + Z) - ((D + Y)*B + R*P)) - V)/(1 + S*B))*C*L*I

Note that characters who have Obsessive-Compulsive Disorder round all damage off to even numbers. After feeding the numbers through this formula, if the result is an odd number, then add or subtract 1 according to whichever would be bad for the afflicted character.

#### Examples

• 1.) A Goomba uses a basic attack on Mario.

The Goomba's Attack Power is 1. Therefore, A = 1.

Mario's Defense Power is 0. Therefore, D = 0.

Let's say the Goomba has no Status Conditions, Weather Conditions, or anything else affecting it, and neither does Mario. Mario is not wearing any armor, and as we can see from the Goomba's sheet, his basic attack is not Elemental, it does not ignore defense, and it has no chance of getting a critical hit.

The formula would look like this:

Damage = ((((1 + 0 + 0 + 0 + 0) - ((0 + 0)*1 + 0*1)) - 0)/(1 + 0*1))*1*1*1

See how all of the unused variables just default to 0 and 1, making them do nothing? Not as complicated as it looked before, huh? And, of course, it just reduces to 1 - 0, which = 1.
• 2.) Mario uses Power Jump on a Green Koopa Troopa.

Koopas wear shells as armor, providing them with Defense Power that they don't have naked. A Green Shell provides 1 Defense. Let's put Mario's Attack Power at 3, but let's still say there are no other effects going on. Power Jump deals x2 +2 damage, which would be 3x2+2, or 8.

Damage = ((((8 + 0 + 0 + 0 + 0) - ((0 + 0)*1 + 1*1)) - 0)/(1 + 0*1))*1*1*1

So, after getting rid of all the extra 1s and 0s, we're left with 8 - 1, or 7 damage. The Koopa's dead.
• 3.) Mario uses Power Jump on a Shielded Green Koopa who used the Defend command.

Let's take the last example and add a couple of things. The Koopa now has a Shield, which halves all the damage he receives from attacks (except for [/] and [X] attacks). He's also used the handy Defend command, which reduces the damage he'll receive by 1 (even against [/] and [X]). Power Jump isn't marked with [/] or [X], so that gives us . . .

Damage = ((((8 + 0 + 0 + 0 + 0) - ((0 + 0)*1 + 1*1)) - 1)/(1 + 1*1))*1*1*1

So this time it's 8 - 1 - 1, first for the Green Shell and then for the Defend command. Divide that 6 by 2 because of the Shield, and we get 3 damage—the Koopa will live to see another turn.

Note that, if the Koopa hadn't used Defend, it would be 7 divided by 2, which, because it's rounded down, is still 3. In this particular case, the Koopa could have attacked instead of Defended, and he still would've survived Mario's Power Jump.
• 4.) Fire Mario uses Power Jump on a Buzzy Beetle.

The way that Fire Flowers work in Arpeggio is a little complicated, but all you need to know for now is that Mario's Power Jump, which is normally a non-Elemental attack, is now being treated as Fire-type. When you're in a Fire State, you can choose whether or not to apply the Fire Element to your attacks—so why did Mario choose to change Power Jump into a Fire attack when Buzzy Beetles are immune to Fire? I guess he had a bit of a brain fart.

Buzzy shells give them 4 Defense, by the way, rather than 1 like the Green Shell. Let's leave out the Shield and Defend for now.

Damage = ((((8 + 0 + 0 + 0 + 0) - ((0 + 0)*1 + 4*1)) - 0)/(1 + 0*1))*1*0*1

So we start out with 8 - 4 = 4, then divide by 1 and it's still 4 . . . but then we hit a *0, so no damage for Mario. It's as simple as that.

For the record, Buzzies' Fire immunity is a property of their shells, so if they're caught without a shell then Fire attacks will damage them. This is similar to how, in Paper Mario, they would be damaged by Fire attacks when flipped over. With most characters, though, Elemental Modifiers apply regardless of armor.
• 5.) Luigi uses Piercing Blow on a Shielded Buzzy Beetle who used the Defend command.

Time for Luigi to help out his brother. Piercing Blow is an attack that's marked [X], referred to as a "Strike Attack"—like a strike in bowling. [X] attacks ignore Defense Power, Shields, and armor defense (though not the Defend command), so we set both B and P to 0 this time. The attack's base power depends on the weapon he's using—let's give him an Ultra Hammer. That makes WBAP, or Weapon Base Attack Power, equal to 3x2+4, or 10. The Buzzy doesn't have a weapon equipped, so the Weapon Triangle is not in effect here.

Damage = ((((10 + 0 + 0 + 0 + 0) - ((0 + 0)*0 + 4*0)) - 1)/(1 + 0*0))*1*1*1

As you can see, B cancels out the effect of the Buzzy's Shield, and P cancels out his armor defense—but neither of them manages to cancel out V, making damage equal to 10 - 1, or 9. B would also have canceled out the Buzzy's regular, shell-less Defense Power, if he had any. Whereas the Defend command was useless for the Shielded Koopa, in this case it was the only break the Buzzy got—but it still wasn't enough to save him.
• 6.) An Iron Cleft uses its basic attack on a Shielded Buzzy Beetle who used the Defend command.

Remember the Iron Clefts from Paper Mario 2? Let's pretend that one of them has teamed up with the Mario Bros.

In PM2, the Iron Clefts' ramming attack would ignore any Defend Plus Badges that Mario was wearing. To honor that, I've marked their basic attack in Arpeggio with [/]. Remember how [X] was like a strike in bowling? [/] is like a spare. A spare isn't as good as a strike, so although Spare Attacks get through Defense Power and Shields, they don't get through the defense provided by armor.

One of the Buzzies on the opposing team is Shielded, and he's Defended again. Let's see how this works out . . .

Damage = ((((4 + 0 + 0 + 0 + 0) - ((0 + 0)*0 + 4*1)) - 1)/(1 + 1*0))*1*1*1

What happens here is that, because [/] attacks ignore Shields, the Iron Cleft's damage does not get divided by 2; however, since [/] attacks do not ignore armor, that's 4 - 4 = 0. We subtract 1 more for the Defend command, but remember that there's no going below 0, so while the Iron Cleft didn't do any damage, at least he didn't heal the Buzzy by 1. The point is, [/] attacks get through Defense Power and Shields but not armor, whilst [X] attacks get through everything but the Defend command (or Invincibility; see #13 below.)
• 7.) Luigi uses Piercing Blow on a Buzzy Beetle who used the Defend command while having an Iron Shield equipped.

This time, instead of having a sci-fi forcefield around him thanks to the Status Benefit called Shielded, the Buzzy has equipped a Shield-type weapon, which is a special type of weapon that gives a boost to the Defend command. Technically, the Buzzy would need a D Weapon Level in Shields in order to be able to use an Iron one, which they don't have by default, and even if he had it it's a little weird to picture the quadrupedal Buzzy holding up a shield, but if we ignore all that for the sake of the example . . .

Damage = ((((10 + 0 + 0 + 0 + 0) - ((0 + 0)*0 + 4*0)) - 3)/(1 + 0*0))*1*1*1

The Iron Shield gives a "Defend Bonus" of +2 to the Defend command, meaning that instead of V being 1, it's 1 + 2 = 3. And because V is the one thing that still reduces damage even from [X] attacks, we end up with 10 - 3 = 7. The Buzzy's still dead because he only has 5 HP, but the Iron Shield did give him a better chance to survive. Note that Shields as weapons tend to fall outside of any Weapon Triangles in order to avoid screwing up this defensive effect, so we won't have to worry about W with them.
• 8.) A Blue Koopa Troopa uses PK Beam α on Mario while Mario's Brain Power is Decreased by 2 and the Koopa's Brain Power is Increased by 2.

I've given Blue Koopas some psychic abilities in Arpeggio. Let's take a look at a psychic attack. Remember that for psychic attacks, the defending character's Brain Power is used in place of their Defense Power.

Don't get confused by that funny-looking "α"; as a tradition from the Mother/Earthbound games, different levels of the same psychic attack are denoted by the Greek letters α (alpha), β (beta), γ (gamma), and Ω (omega). So the α just means that the Blue Koopa is using the lowest-level edition of the PK Beam attack.

The Koopa's Brain Power is 2, and Beam α deals x2 damage. This version of Mario is normally better at defending against psychic attacks than physical attacks, with a Brain Power of 3, but there are those pesky stat changes, so we get . . .

Damage = ((((4 + 2 + 0 + 0 + 0) - ((3 + (-2))*1 + 0*1)) - 0)/(1 + 0*1))*1*1*1

4 plus 2 is 6, and 3 minus 2 is 1, and 6 minus 1 is 5, so the attack does 5 damage. Remember that the Defend command that I keep mentioning also works on psychic attacks, so if Mario had used it, then V would have turned that 5 into a 4.
• 9.) Ilyana uses Rexbolt on a Sharpea while holding a Magic Bullet and a Magnet.

Oh boy, this guy must have stolen her food or something, because this is gonna hurt.

The Magic Bullet and Magnet are both special Held Items that will happen to power up the Rexbolt attack, so they would fall under the variable Z. To make it even more fun, let's say that, somehow, Ilyana's Magic Power has been Increased by 3.

Damage = ((((16 + 3 + 2 + 0 + 4) - ((0 + 0)*1 + 3*1)) - 0)/(1 + 0*1))*1*1*1

So that's 16 (the power of Ilyana's Rexbolt) + 3 (her Magic is Increased by 3) + 2 (the Sharpea's Elemental Modifier) + 0 (for the irrelevancy of the Weapon Triangle) + 4 (the combined effects of the Magic Bullet, which gives her +2 for using a magical attack, and the Magnet, which gives her +2 for using a Thunder-type attack) - 3 (the Sharpea's armor defense) = 22. He's dead, to say the least.
• 10.) Stefan uses a Wyrmslayer against a Wyvern Rider equipped with an Iron Axe and gets a critical hit.

I'm cheating a little here. Wyrmslayers have no chance of landing a critical hit—at least, not with a basic attack: a special attack could feature a critical hit chance, but only very special weapons can critical with their basic attack. For the moment, though, let's pretend that this particular hit did end up critical (after all, this is Stefan we're talking about).

Let's give the Wyvern Rider an extra chance to survive by Increasing his Defense Power by 2.

If you review the Weapon Triangle, you'll see that swords are good against axes. If you look at the Wyrmslayer sheet, you'll see that this particular sword does extra damage to dragon-like characters, which would include Wyvern Riders even though the riders themselves aren't dragons.

I gave Stefan 3 Attack Power, and the Wyrmslayer's base power is x2 +1, so that gives us 7.

Damage = ((((7 + 0 + 0 + 1 + 2) - ((1 + 2)*1 + 1*1)) - 0)/(1 + 0*1))*3*1*1

Damage = Miss! (0)

...Wait, what?

Silly swordmaster! This is Paper Mario, not Fire Emblem!

So, technically speaking, missing is different than attacking and dealing zero damage (the latter may still have other effects such as inflicting Status Problems), but I'm demonstrating Arpeggio's version of a Paper Mario mechanic here: if the defending character is flying, then the attacking character needs to have a Platform field stat equal to or greater than that of the defending flyer in order to be able to jump up and land a melee attack, such as, y'know, a sword swing. So despite the Wyrmslayer and the street cred, Stefan, who I apparently gave a Platform stat of 6 back in Game 1, is a little helpless against this wyvern guy, who, as a flying character, has 9 Platform.

Okay, let's try that again, but this time we'll say that one of Stefan's teammates has granted him the Status Benefit of Flight, which boosts his Platform stat to the maximum of 9:
• 11.) Stefan, while under the Flying Status Benefit, uses a Wyrmslayer against a Wyvern Rider equipped with an Iron Axe whose Defense is Increased by 2 and gets a critical hit.

Everything's the same as before (including the critical hit that I'm trying to demonstrate being kind of illegal), except this time the attack will actually hit.

Damage = ((((7 + 0 + 0 + 1 + 2) - ((1 + 2)*1 + 1*1)) - 0)/(1 + 0*1))*3*1*1

There's the 7, and then we see a 1 for Stefan's sword being good against the Rider's axe, and a 2 for it being good against his dragon-type categorization. Then the Rider's Defense of 1 plus the Increase of 2, so that gives us 10 - 3 and we're back to 7 again. Subtract the 1 for the Light Armor and multiply by 3 for the critical hit, and we have 18—nearly as much as Ilyana did with her Rexbolt. That's the power of critical hits, and that's why they're so rare.

Do note though that, just like in Fire Emblem, the *3 happens after subtracting defenses, so if the initial power of the attack was zero, then the critical power will be 0*3, or still zilch.
• 12.) An Archer armed with an Iron Bow fires an arrow at a Pegasus Knight while his Attack is Increased by 3.

This is just to reiterate that projectile weapons ignore Attack Power Increases. So X = 0 despite the Increase of 3.

Here's the Archer and here's the Pegasus Knight; arrows do 4 damage when fired from an Iron Bow, and Bows do not have a Weapon Triangle advantage against anything that the Pegasus Knight can use.

We don't have to worry about that pesky Platform stat here because arrows are projectiles. Only melee attacks miss flying characters when the attacker has an insufficient Platform stat.

Damage = ((((4 + 0 + 0 + 0 + 2) - ((0 + 0)*1 + 0*1)) - 0)/(1 + 0*1))*1*1*1

That's 4 + 2 - 0, or 6. In Fire Emblem, the Pegasus Knight would probably be dead, but it's still high damage for an attacker who only has 1 Attack Power.
• 13.) Flying Stefan uses an Electrosword against a Wyvern Rider equipped with an Iron Axe and gets a critical hit while his Attack Power is Increased by 3 and he is Charged by 2 and Invincible and holding a Magnet during a Thunderstorm.

Electroswords don't have an automatic critical hit chance either. I'm just trying to see how much damage I can do here.

I gave Wyvern Riders a +2 weakness to Thunder as per Fire Emblem 10. I'll also keep the Defense Increase of 2, but the Electrosword deals [/] attacks anyway.

Damage = ((((7 + 15 + 2 + 1 + 4) - ((1 + 2)*0 + 1*1)) - 0)/(1 + 0*1))*3*1*1

So we take the WBAP of 7 and add a whopping 15, which is 10 (for being Invincible) plus the Increase of 3 and the Charge of 2. Then we add 7 more: 2 for the Elemental Modifier, 1 for the Weapon Triangle, 2 for the Thunderstorm bonus, and 2 for the Magnet (these last two both fall under the variable Z, hence it equaling 4). Then we subtract (1 + 2)*0, or 0. Then we subtract the armor defense of 1, giving us 28, and multiply by 3 for 84. Can you imagine doing 84 damage in Paper Mario? Well, you probably can, because you're probably one of those people who uses a bunch of Power Rush Badges to kill Bonetail in one hit. But this isn't using any Power Rush Badges. This is possible in Arpeggio. (In fact, a player could design a special attack that deals more than the Weapon Base Attack Power and has a critical hit chance, meaning, if the hit were critical, the attack would do even more than the 84 shown here.)

Note that if we make the Wyvern Rider Invincible as well as Stefan being Invincible . . .

Damage = ((((7 + 5 + 2 + 1 + 4) - ((1 + 2)*0 + 1*1)) - 0)/(1 + 0*1))*3*1*1

The only way to damage an Invincible character is to attack them with another Invincible character. Under these conditions, the +10 that Invincibility normally gives to physical attacks is not awarded, but it's still rewarding to be able to damage an Invincible character. The pre-critical damage before was 28, so if we subtract 10 from that we get 18, and then we multiply by 3 and get 54—still a ridiculously high amount of damage in Paper Mario terms.
• 14.) Oh, one more thing . . .

Let's give Magikarp an Attack Power Increase of 1 and have him use Splash on a Goomba. And, because the Pokémon games also feature critical hits, let's say that he got one.

Damage = ((((0 + 1 + 0 + 0 + 0) - ((0 + 0)*1 + 0*1)) - 0)/(1 + 0*1))*3*1*1

Damage = (1 - 0)*3

Damage = 3

MAGIKARP used SPLASH!
GOOMBA fainted!

If you don't like the idea of 0-power attacks gaining the ability to inflict damage when the character's stats are Increased, you can just have the attack do no damage. But sometimes it's funny to let it work. Generally, where I have marked the damage of an attack or weapon as 0 or n/a, this means that it should never do any damage even with Increases, but if I have marked it Attackx0 (or Magicx0 or Brainx0), then this means Increasing the stat will affect the attack. But this isn't a hard and fast rule.