Sub topic 6
Damage formulas and armor mitigation
This chapter assumes you can build a parameter sheet, use absolute references such as Params!$B$2, and fill formulas down a column. It also assumes you have a stat table with health, damage and armor per level, as built in the earlier chapters. Here you will turn raw damage and armor into the damage a target actually takes, and you will check that the formula behaves sensibly at the extremes.
What a damage formula has to do
A damage formula takes an attacker's raw damage and a defender's mitigation stat and returns the damage that lands. Designers usually want four properties from it:
- Damage never drops below zero, and ideally never reaches zero.
- Each extra point of armor helps, but helps a little less than the previous point.
- Armor values stay readable. A player should be able to tell whether 50 armor is a lot.
- The formula is cheap to explain in a tooltip.
Two families of formula cover most games: subtractive (flat) and proportional (percentage). Each has failure modes you can find in a spreadsheet before a player finds them in the game.
Flat subtraction
The simplest model subtracts armor from damage and clamps the result at a floor.
=MAX(1, B2 - C2)Here B2 is raw damage and C2 is armor. The MAX(1, ...) clamp stops damage from going negative, which would heal the target.
Flat subtraction has a sharp cliff. If armor equals damage, the attacker deals the minimum and the armor is suddenly worth far more than the points below it. A weapon doing 20 damage against 19 armor deals 1. Against 10 armor it deals 10. The relationship is linear until the clamp, then flat.
It also punishes small hits. A 5-damage attack is useless against 5 armor, while a 50-damage attack barely notices it. This makes multi-hit weapons and damage-over-time effects weak against armored targets, which may or may not be what you want.
Proportional mitigation with diminishing returns
The formula in the topic spine is the common alternative:
=B2 * 100 / (100 + C2)B2 is raw damage and C2 is armor. The fraction 100 / (100 + C2) is the share of damage that gets through. The constant 100 is a tuning value, so move it to the parameter sheet.
=B2 * Params!$B$6 / (Params!$B$6 + C2)Here Params!B6 is the armor constant. Call it K. The formula then reads damage times K over (K plus armor).
The share of damage taken is K / (K + armor). The share blocked is armor / (K + armor). Armor equal to K blocks exactly 50 percent. That gives you an easy way to read the scale: K is the armor value that halves incoming damage.
Build a small table to see the curve. Put armor values in column A and use these formulas in B and C:
=A2 / (Params!$B$6 + A2)=1 - B2With K = 100:
| Armor | Damage blocked | Damage taken |
|---|---|---|
| 0 | 0% | 100% |
| 50 | 33.3% | 66.7% |
| 100 | 50% | 50% |
| 200 | 66.7% | 33.3% |
| 300 | 75% | 25% |
| 900 | 90% | 10% |
Damage taken is never zero because the denominator always exceeds the numerator. Blocked damage approaches 100 percent but never reaches it. Going from 0 to 100 armor removes half the damage. Going from 100 to 200 removes only another 16.7 percentage points.
The marginal value of armor
Designers often want to know what one more armor point is worth. In a spreadsheet, compute the difference between adjacent rows:
=B3 - B2This gives the extra percentage of damage blocked per step. It shrinks as armor grows, and that shrinking is what players mean by diminishing returns. If your armor steps are uneven, divide by the armor difference so the figures are comparable per point.
Effective health
Armor is easier to compare with health if you convert it. Effective health is the amount of raw damage a target can absorb before dying. For the proportional formula, damage taken is multiplied by K / (K + armor), so the target survives K-plus-armor-over-K times as much raw damage:
=Targets!B2 * (Params!$B$6 + C2) / Params!$B$6Targets!B2 is health and C2 is armor. With 1,000 health and 100 armor at K = 100, effective health is 2,000. At 300 armor it is 4,000.
Notice that effective health grows linearly with armor even though damage reduction flattens out. This is the most useful fact in this chapter. A designer who looks only at the damage-blocked percentage will think armor is saturating. A designer who looks at effective health sees that every armor point adds the same amount of survivability: health divided by K. The two views describe the same formula.
This matters for itemization. If one armor point adds Health / K effective health, you can compare it directly with a point of health. When health is 1,000 and K is 100, one armor point equals 10 health. If an item offers either +10 armor or +100 health at the same cost, they are equal at that health level. They stop being equal as health grows, because armor scales with the health it multiplies.
Choosing the constant K
K controls how fast armor saturates. A small K makes armor strong early and flat late. A large K makes armor feel weak at first and keeps it useful longer.
A practical way to pick K is to set a target. Decide the armor value a typical late-game character will have, then choose how much damage reduction you want there. If you want 60 percent reduction at 300 armor, solve:
=Params!$B$7 * (1 - Params!$B$8) / Params!$B$8Here B7 is the target armor (300) and B8 is the target damage taken (0.4). The result is K = 450. Check it: 450 / (450 + 300) = 0.6 taken, which is not 0.4. Go back and read the formula carefully: the share taken is K / (K + armor), so for 40 percent taken you need K = armor × taken / (1 − taken), which is 300 × 0.4 / 0.6 = 200. Use this form instead:
=Params!$B$7 * Params!$B$8 / (1 - Params!$B$8)Check: 200 / (200 + 300) = 0.4. Verifying a solved constant by plugging it back into the original formula is a habit worth keeping, since swapping the ratio is an easy mistake.
Armor that scales with level
A fixed K makes armor lose value as levels rise if armor does not grow. A character with 100 armor at level 1 is well protected. At level 60, where enemies deal far more damage, the same 100 armor means the same 50 percent reduction, which is fine, but players expect armor to keep pace. Many games make K depend on the attacker's level:
=B2 * (Params!$B$6 * D2) / (Params!$B$6 * D2 + C2)D2 is the attacker's level. With K scaled by level, a given armor value blocks less damage against higher-level enemies. This keeps armor items from becoming permanent solutions and forces ongoing upgrades. Keep the scaling simple. A linear multiplier by level is easy to explain, and you can swap in a curve from the growth-curve chapter if you need something steeper.
Other mitigation models
Several variants are common. Each can be built with a single formula, and each has trade-offs.
| Model | Formula | Behavior | Risk |
|---|---|---|---|
| Flat subtraction | `=MAX(1, B2-C2)` | Linear, then clamped | Cliff; weak against small hits |
| Hyperbolic | `=B2*K/(K+C2)` | Smooth diminishing returns | Armor never caps |
| Percentage with cap | `=B2*(1-MIN(C2,cap))` | Armor is a direct percentage | Hard cap makes extra armor dead |
| Exponential | `=B2*0.5^(C2/K)` | Each K armor halves damage | Very large armor trivializes damage |
The percentage-with-cap model is easy for players to read, but the cap creates a wall. Once players reach it, further armor is wasted, so you must add other stats that remain useful. The exponential model has the same halving rule at every step, which is elegant, but it compounds quickly. Two sources of armor stack multiplicatively and can overshoot your budget.
Stacking multiple sources of mitigation
When several effects reduce damage, the order of operations changes the result. Suppose a target has armor and also a 20 percent damage reduction buff.
Additive stacking adds the percentages. Combining a 50 percent armor reduction with a 20 percent buff gives 70 percent blocked. Multiplicative stacking applies each in turn:
=B2 * (1 - armor_pct) * (1 - buff_pct)In real cells, replace armor_pct and buff_pct with references to the cells holding them. With the values above, damage taken is 0.5 × 0.8 = 0.4, so 60 percent blocked, not 70. Multiplicative stacking never reaches 100 percent, which is safer. Additive stacking can, so it needs a cap.
State the rule in the parameter sheet in plain words and use it consistently. Mixed rules are a common source of mismatch between the spreadsheet and the game.
Connecting to the rest of the model
Once the mitigation formula is settled, feed it into the metrics from the next chapter. Expected damage per attack, from the earlier probability chapter, gets multiplied by the mitigation fraction:
=B2 * Params!$B$6 / (Params!$B$6 + C2) * Hit * (1 + Crit * (CritMult - 1))In practice, name the intermediate columns so each step is visible: raw damage, mitigated damage, expected damage. A single long formula is hard to audit and hard to debug.
Edge cases to test
Build a short test block with known answers and check it whenever you change the formula.
- Armor of 0 returns raw damage.
- Armor equal to K returns half the damage.
- Negative armor, from a debuff, returns more than raw damage. The formula gives
K / (K + C2)greater than 1 when C2 is negative. If armor drops to -K, the denominator is zero and the sheet shows#DIV/0!. Clamp armor withMAX(C2, -K/2)or a similar floor. - Raw damage of 0 returns 0, unless a minimum-damage rule says otherwise.
- Very large armor values still return a positive number.
Rounding is another edge case. Most games round damage to whole numbers. Rounding after each step can change results, particularly for small hits. Round only the final value, and apply MAX(1, ...) after rounding if you want a one-damage floor:
=MAX(1, ROUND(B2 * Params!$B$6 / (Params!$B$6 + C2), 0))Exercise
A target has 800 health and 150 armor. The armor constant K is 100. (a) What fraction of raw damage does the target take? (b) What is its effective health? (c) How much raw armor would you need to double the effective health of the original target?
Show answer
(a) The target takes K / (K + armor) = 100 / 250 = 0.4, or 40 percent. (b) Effective health is health times (K + armor) / K = 800 × 250 / 100 = 2,000. (c) Doubling means effective health of 4,000, so (K + armor) / K must equal 5. That gives K + armor = 500, so armor = 400.
Exercise
You want a target with 200 armor to take 25 percent of raw damage. Using the hyperbolic formula, what value of K do you need, and what formula in a spreadsheet would calculate it from the target armor and target damage taken?
Show answer
Solve taken = K / (K + armor) for K, which gives K = armor × taken / (1 − taken). With armor 200 and taken 0.25, K = 200 × 0.25 / 0.75 = 66.67. In a spreadsheet, with armor in B7 and taken in B8, use =B7 * B8 / (1 - B8). Check it: 66.67 / (66.67 + 200) = 0.25.