# Death Ward/Analysis

Let the player's current life points be defined as ${\text{LP}}_{\text{current}}$ , the player's maximum life points be ${\text{LP}}_{\text{max}}$ , and the base damage taken by the player be $D$ . Define the half life point threshold as ${\text{LP}}_{50\%}=\lfloor {\text{LP}}_{\text{max}}/2\rfloor$ and the quarter life point threshold as ${\text{LP}}_{25\%}=\lfloor {\text{LP}}_{\text{max}}/4\rfloor$ . The damage taken by the player due to the Death Ward relic power, $D_{\text{DW}}$ , is then
{\begin{aligned}D_{\text{DW}}&=H\left({\text{LP}}_{\text{current}}-{\text{LP}}_{50\%}\right){\text{min}}\left({\text{LP}}_{\text{current}}-{\text{LP}}_{50\%},D\right)\\&+H\left({\text{LP}}_{\text{current}}-{\text{LP}}_{25\%}\right)\times \\&\qquad \qquad {\bigg \lceil }{\text{min}}{\bigg [}{\text{min}}\left({\text{LP}}_{\text{current}},{\text{LP}}_{50\%}\right)-{\text{LP}}_{25\%},{\text{min}}{\bigg (}D,{\text{max}}{\big (}0,D-\left({\text{LP}}_{\text{current}}-{\text{LP}}_{50\%}\right){\big )}{\bigg )}{\bigg ]}\cdot 0.95{\bigg \rceil }\\&+{\text{max}}{\bigg (}0,{\bigg \lceil }{\big (}D-{\text{max}}\left(0,{\text{LP}}_{\text{current}}-{\text{LP}}_{25\%}\right){\big )}\cdot 0.90{\bigg \rceil }{\bigg )}\end{aligned}} where $H(x-a)$ is the Heaviside step function with the step occurring at $a$ , with
$H(x-a)={\begin{cases}0&{\text{for}}~x 