Damage Falloff

Damage Falloff is a mechanic that affects the damage of guns outside of their optimal range.

## Description

Every gun has two falloff ranges, *falloff start* and *falloff end*. When hitting an enemy within the weapon's *falloff start* range, the shot will experience no damage falloff and will simply deal the full amount of damage. Beyond the *falloff start* range, damage will fall linearly such that it would reach zero at the *falloff end* range - however, the damage can never fall below 10% of its initial value. Beyond the *falloff end* range the weapon will always just deal 10% of its initial damage.

## Formula

The formula for the damage a bullet does (

d
(
x
)

{\displaystyle d(x)}

) at a range

x

{\displaystyle x}

 is given by:

d
(
x
# )

{

d
,

if
x
≤
start

d

end
−
x

end
−
start

,

if
start
<
x
<

9
end
start

10

0.1
d
,

if
x
≥

9
end
start

10

{\displaystyle d(x) =
\begin{cases}
d, & \text{if } x \le \text{start} \\
d \frac{\text{end} - x}{\text{end} - \text{start}}, & \text{if } \text{start} < x < \frac{9 \text{end} + \text{start}}{10} \\
0.1 d, & \text{if } x \ge \frac{9 \text{end} + \text{start}}{10}
\end{cases}}

Where

start

{\displaystyle \text{start}}

 is the *falloff start* range,

end

{\displaystyle \text{end}}

 is the *falloff end* range, and

d

{\displaystyle d}

 is the initial damage of the bullet. Note the unusual terminals for where falloff ends, this is due to the fact that the linear falloff would reach zero by the *falloff end* range, but is not allowed below 10% of the initial value, thus falloff actually ends slightly before *falloff end*.

## Falloff Ranges by Weapon

Melee weapons never experience damage falloff.

## Example Calculations

### Range at which the Pistol stops three-shotting Strikers

Assuming this range is somewhere within the linear falloff region, we know that the total damage inflicted by a headshot and two bodyshots (

D
(
x
)

{\displaystyle D(x)}

) at some range

x

{\displaystyle x}

 is:

D
(
x
# )
d

(

Precision Multiplier(Pistol)
⋅
Headshot Multiplier(Striker)
2

)

end
−
x

end
−
start

{\displaystyle D(x) = d \left(\text{Precision Multiplier(Pistol)} \cdot \text{Headshot Multiplier(Striker)} + 2\right)\frac{\text{end} - x}{\text{end} - \text{start}}}

Rearranging for

x

{\displaystyle x}

 gives:

# x
end
−

D
(
x
)

d

(

Precision Multiplier(Pistol)
⋅
Headshot Multiplier(Striker)
2

)

(

end
−
start

)

{\displaystyle x = \text{end} - \frac{D(x)}{d \left(\text{Precision Multiplier(Pistol)} \cdot \text{Headshot Multiplier(Striker)} + 2\right)} \left(\text{end} - \text{start}\right)}

For the shots to exactly kill, we need

D
(
x
)

{\displaystyle D(x)}

 to be equal to the Striker's health (20). So substituting in all our values we have:

x

=
45
−

20

4.64

(

0.8667
⋅
3
2

)

(

45
−
9

)

=
11.27

{\displaystyle \begin{align}
x
&= 45 - \frac{20}{4.64 \left(0.8667 \cdot 3 + 2\right)} \left(45 - 9\right)\\
&= 11.27
\end{align}}

The Pistol will three-shot Strikers out to 11.27m. Any distance beyond this, and the damage will fall below this breakpoint.

As a quick sanity check, we could verify that one shot still breaks the head at this range. The damage of a single shot at this range is:

d
(
11.27
)

=
d

end
−
x

end
−
start

=
4.64

45
−
11.27

45
−
9

=
4.347

{\displaystyle \begin{align}
d(11.27)
&= d \frac{\text{end} - x}{\text{end} - \text{start}}\\
&= 4.64 \frac{45 - 11.27}{45 - 9}\\
&= 4.347
\end{align}}

Which, when headshotting a Striker, deals

4.347
⋅
0.8667
⋅
# 3
11.3

{\displaystyle 4.347 \cdot 0.8667 \cdot 3 = 11.3}

 damage, which is still enough to break the Striker's head (the head having 10HP).