User:Double Slap/Sandbox

There isn't a diminishing function with resistances in terms of damage, i.e. amror and magic resistance. It may very well seem like it, but there isn't. The reason there isn't a diminishing function is because the result of the function of armor is a percentage of damage taken--damage reduction.

Fortunately, we have a formula for the function of armor that results in the multiplier of all physical damage. That formula is:

$${\rm Damage\ multiplier}=\begin{cases} {100 \over 100+{\it Armor}}, & {\rm if\ }{\it Armor} \geq 0\\ 2 - {100 \over 100 - {\it Armor}}, & {\rm otherwise} \end{cases}$$

To obtain the % of damage decreased, all that needs to be done is: 100%(1-f(armor)). Now, looking at this function alone there is, in fact, diminishing returns. f'(armor) indeed does rapidly approach 0 as it reaches higher values of armor. Though, f'(armor) is meaningless without damage taken. The % of damage reduced is dependant on the damage taken. If there is no damage at all, then there is no damage to reduce. So this introduces another formula, calculating the amount of damage taken with armor. That formula is fairly simple.

$${\rm Initial\ damage}\times{f'(armor)}={Damage\ taken}$$

Normally the function is used to find the end product of damage, but what if we want to know how much initial damage it would take to reach a certain number of damage taken? This may be useful for say... killing someone? All that would need to be done is switching the formula around and bam! f'(armor) is the damage multiplier btw.

$${\rm Damage\ taken}\over{Damage\ multiplier}={Initial\ damage}$$

This allows us to determine how much initial damage it will take to reach the actual damage. Though this is most commonly known as Effective Health Points, EHP. While it is not entirely accurate to say that the initial damage is EHP alone, due to the fact that takes shields/sustain into account, the primary use of EHP is to show how much it takes to die and raw Health is the most basic form of that. What makes this important is that it shows how armor translates into damage. Damage from armor isn't calculated through f(armor), it is calculated through g(f(armor)).

Due to this taking 3 dimensions--health, armor, damage--a 3D graph is the most appropriate thing for this, but since we are looking at only 2 dimensions--armor, damage--I will place a constant in place of health. Perhaps, 100 health. So that would make our problem:

$${\rm If\ f(armor)}=\begin{cases} {100 \over 100+{\it Armor}}, & {\rm if\ }{\it Armor} \geq 0\\ 2 - {100 \over 100 - {\it Armor}}, & {\rm otherwise} \end{cases} {and\ g(armor)}={\rm Damage\ taken}\over{Damage\ multiplier}$$