Magic penetration

Magic Penetration is the statistic of a Champion which allows the magical damage done from their abilities, enhanced attacks, etc. to ignore some or all of a target's magic resistance. All champions have 0 base magic penetration but can increase it with items, runes or abilities for a few champions.

Magic Reduction is the effect of some champions' abilities that reduce the magic resistance of the target unit for a few seconds. This allow ally units to benefit from the reduction of magic resistance.

Calculations
Magic penetration and magic resistance reduction are applied in the following order:
 * 1) Percentage Magic Resistance Reduction
 * 2) Flat Magic Resistance Reduction
 * 3) Flat Magic Penetration
 * 4) Percentage Magic Penetration

Percentage Magic Resistance Reduction

 * The target's Magic Resistance is reduced by a percentage.
 * If the target has 30 magic resist and then has its magic resistance reduced by 20%, the target will take damage as if it had only 24 magic resist.
 * 30 * (1.0 - 0.2) == 30 * 0.8 == 24
 * Percentage Magic-Resistance Reduction can reduce a target's resistance below zero, if stacked beyond 100%. However, this is currently not possible since the greatest amount of percent magic reduction is 70% with both  and   (stacking multiplicatively).

Flat Magic Resistance Reduction

 * The target's Magic Resistance is reduced by a certain amount.
 * If the target has 30 magic resist and then has its magic resistance reduced by 20, the target will take damage as if it had only 10 magic resistance.
 * 30 - 20 == 10
 * Flat Magic-Resistance Reduction can reduce a target's resistance below zero.
 * The target will take additional bonus magic damage with negative resistance.

Flat Magic Penetration

 * Some of the target's magic resistance is ignored when dealing magic damage.
 * If the target has 30 magic resist and you have 10 magic penetration, the target will take damage as if it had only 20 magic resist.
 * 30 - 10 == 20

Percentage Magic Penetration

 * A percentage of the target's magic resistance ignored when dealing magic damage.
 * If the target has 30 magic resist and you have 20% magic penetration, the target will take damage as if it had only 24 magic resist.
 * 30 * (1.0 - 0.2) == 30 * 0.8 == 24
 * Percentage magic penetration has a bigger impact on targets with higher resistance.
 * For 40% penetration, a target with 200 magic resist will lose 80.
 * For 40% penetration, a target with 40 magic resist will lose 16.
 * Percentage magic penetration cannot reduce a target's resistance below zero.
 * Multiple sources of percentage magic penetration stack multiplicatively.
 * If you have an item with 40% magic penetration and a mastery with 15% magic penetration, you have 49% magic penetration.
 * (1.0 - 0.4) * (1.0 - 0.15) == 0.6 * 0.85 == 0.51 == 51% of original resist == 49% penetration
 * Because the percentage magic penetration is applied last, its effectiveness is reduced the more flat magic penetration you already have or the more magic resistance reduction has been applied to the target.
 * For example, if the target has 100 magic resist and you only have 20% magic penetration, you will penetrate 20 of the target's magic resistance. If you also have 20 magic resistance reduction, the same 20% magic penetration will only penetrate 16 of the target's magic resistance.

Examples
You have 10% magic resist reduction, 20 flat magic resist reduction, 29 flat magic penetration, and 15% magic penetration.
 * Target A has 80 magic resist.
 * The 80 is reduced to 72 by your 10% magic resist reduction.
 * The 72 is reduced to 52 by your 20 magic resist reduction.
 * Your magic penetration makes you ignore 29 of the remaining 52 magic resistance, 23 is left.
 * Your magic penetration makes you ignore 15% of the remaining 23 magic resistance, 19.55.
 * The 23 is reduced to 19.55 by your 15% magic penetration.
 * 23 * (1.0 - 0.15) == 23 * 0.85 == 19.55
 * Target A takes damage as if it has 19.55 magic resist.
 * Target B has 15 magic resist.
 * The 15 is reduced to 13.5 by your 10% magic resist reduction.
 * The 13.5 is reduced to -6.5 by your 20 magic resist reduction.
 * The -6.5 is not reduced by your 29 magic penetration (cannot penetrate below 0).
 * The -6.5 is not reduced by your 15% magic penetration (cannot penetration below 0).
 * Target B takes damage as if it has -6.5 magic resist.

Negative Resistance
If a target has negative magic resistance, the amount of bonus damage is equal to the amount of damage reduction caused by that positive amount of magic resist. This sounds confusing and is better illustrated with an example.
 * If a target has 10 magic resistance, they take take 9.1% reduced damage (formula from Magic Resistance).
 * Therefore a target with -10 magic resistance would take 9.1% bonus damage.
 * So if you cast a spell that does 100 magic damage on the target, it would take 109.1 damage instead.
 * If a target has 20 magic resistance, they would take 16.7% reduced damage.
 * Therefore a target with -20 magic resistance would take 16.7% bonus damage.
 * So if you cast a spell that does 250 magic damage on the target, it would take 291.7 damage instead.

Items

 * : UNIQUE Passive: +20 Magic Penetration, +25 AP, +200 Health. 1485 Gold.
 * : +20 Magic Penetration
 * : UNIQUE Passive: Spells penetrate 40% of the defender's magic resist, +70 AP. 2295 Gold.

Masteries

 * : Your magical spells penetrate 15% of the target's magic resistance.

Runes

 * runes provide flat magic penetration.

Items

 * UNIQUE Aura: Reduces the Magic Resist of nearby enemy champions by 20, +70 AP, +57 Magic Resistance. 2650 Gold.
 * UNIQUE: Your physical attacks shred your target doing 20 magic damage and reducing their magic resistance by 6. Stacks up to 4 times. +25 AP, 50% Attack Speed. 1825 Gold.

Champion Abilities

 * Passive Abilities
 * 15 / 25 / 35 Magic Resistance Reduction on hit for 4 seconds.
 * +10 Magic Resistance Reduction to nearby enemy champions.


 * Active Abilities
 * 10 / 14 / 18 / 22 / 26 Magic Resistance Reduction for 5 seconds.
 * From rank 2 and onward the turrets attacks reduce armor and magic resist by 1 per hit stacking up to 50 times.
 * 15 / 20 / 25 / 30 / 35 Magic Resistance Reduction for 5 seconds.
 * 5 / 10 / 15 / 20 / 25 Magic Resistance Reduction got 4 seconds.
 * 4 / 5 / 6 / 7 / 8 Magic Resistance Reduction each second for 5 seconds.
 * 20% / 25% / 30% / 35% / 40% Magic Resistance Reduction for 12 seconds.
 * 12 / 15 / 18 / 21 / 24 Magic Resistance Reduction for 5 seconds.
 * 8 Magic Resistance Reduction each hit for 8 seconds (maximum 20 stacks).
 * 15 / 20 / 25 % Magic Resistance Reduction upfront, doubles over the next 6 seconds.