Crystal Shield

Crystal Shield is a defensive Invention perk that, upon activation, will add a percentage of all damage taken for 10 seconds into a pool of life points. This also includes typeless damage. For the following 30 seconds, damage taken will reduce this storage of life points rather than the player's actual life points, until the separate pool is depleted or the 30 seconds have passed. It can be created in armour gizmos.

The perk has a 10% chance of activating (11% on a level 20 item), and 5% damage per rank is converted into the pool of life points for the duration of 10 seconds. The hit that activates the Crystal Shield will also be added to the life point pool. This perk has a 1 minute cooldown after it has activated.

If the player would die to any "hard" typeless hit (typeless damage that cannot be reduced by defensive abilities, e.g. Vorago's TeamSplit), the player will not die; they are instead left with however many life points that were stored in Crystal Shield.

When the perk triggers, it prompts the message: When the stored life points deplete, it prompts the message: Your crystal shield lifepoints have been depleted! When the timer ends before the stored life points deplete, it prompts the message: Your crystal shield perk has run out! When the player doesn’t receive significant damage during the perk’s activation period, it prompts the message: You did not absorb enough damage to generate a crystal shield.

Any self-inflicted damage is also added to the life point pool. These include:
 * Nitroglycerine/Unidentified liquid
 * Super Zamorak brew/Zamorak brew
 * Self-damaging abilities, e.g. blood tendrils
 * Rock cake

Calculations

 * The ratio of average damage taken, $$r_{avg}$$, from Crystal Shield to that of without Crystal Shield is
 * $$r_{avg} = \frac{\sum\limits_{n=0}^{\infty}\left(1-p\right)^{n}p\left[\sum\limits_{i=1}^{n}d_{i} + (1-.05 \times R)\sum\limits_{i=1}^{\lceil{\frac{t_{abs}}{t_{AS}}}\rceil}d_{i} + \sum\limits_{i=1}^{\lceil{\frac{t_{cd}-t_{abs}}{t_{AS}}}\rceil}d_{i} \right]}{\sum\limits_{n=0}^{\infty}\left(1-p\right)^{n}p\left[\sum\limits_{i=1}^{n}d_{i} + \sum\limits_{i=1}^{\lceil{\frac{t_{abs}}{t_{AS}}}\rceil}d_{i} + \sum\limits_{i=1}^{\lceil{\frac{t_{cd}-t_{abs}}{t_{AS}}}\rceil}d_{i} \right]}$$


 * The average damage reduction is then
 * $$\left(1-r_{avg}\right)$$


 * The ratio of damage taken between procs (BP), $$r_{BP}$$, from Crystal Shield to that of without Crystal Shield is
 * $$r_{BP} = \sum\limits_{n=0}^{\infty}\left(1-p\right)^{n}p \frac{\left[\sum\limits_{i=1}^{n}d_{i} + (1-.05 \times R)\sum\limits_{i=1}^{\lceil{\frac{t_{abs}}{t_{AS}}}\rceil}d_{i} + \sum\limits_{i=1}^{\lceil{\frac{t_{cd}-t_{abs}}{t_{AS}}}\rceil}d_{i} \right]}{\left[\sum\limits_{i=1}^{n}d_{i} + \sum\limits_{i=1}^{\lceil{\frac{t_{abs}}{t_{AS}}}\rceil}d_{i} + \sum\limits_{i=1}^{\lceil{\frac{t_{cd}-t_{abs}}{t_{AS}}}\rceil}d_{i} \right]}$$


 * The average damage reduction between procs is then
 * $$\left(1-r_{BP}\right)$$


 * Notes
 * A calculator for this is at the top of this page.
 * The pool of life points for this is always assumed to be depleted.
 * $$p$$ is the proc chance of Crystal Shield to activate (.10 normally, .11 if the Crystal Shield perk is on level 20 gear).
 * $$\sum_{n=0}^{\infty}\left(1-p\right)^{n}p = 1$$ when $$0 \leq p < 1$$. The lone $$p$$ in this term has been left in the calculation for $$r_{avg}$$ to show this.
 * $$d_{i}$$ is a random value uniformly sampled between the enemy's minimum hit and maximum hit. In general, each time it is used, it will be a different value.
 * $$R$$ is the rank of the Crystal Shield perk.
 * $$t_{abs}$$ is the time of the absorption phase of Crystal Shield. This is taken to be 16 game ticks.
 * $$t_{cd}$$ is the cooldown time of Crystal Shield. This is taken to be 100 game ticks.
 * $$t_{AS}$$ is the attack speed of the enemy in game ticks.


 * Simplifications
 * This can be simplified if the assumption is that every value of $$d_{i}$$ is taken to be the same. In this scenario, there is no random element and the above $$r_{avg}$$ and $$r_{BP}$$ are then only dependent on the proc chance and the attack speed of the enemy. Two examples are provided, both of which look at a proc chance of $$.1$$, and one will be for $$t_{AS} = 4$$ (a common boss attack speed) and the other will be $$t_{AS} = 3$$ (the attack speed of the player).