Health

Like in many other video games, most characters and objects in Sanctum 2 that can be attacked by other characters have a given amount of health. Attacks reduce this amount by inflicting damage. When a character's or object's health falls to or below zero, it will be killed or destroyed. Since the players' objective is to kill enemies before they destroy the cores, it can be useful to know on the one hand how much enemy damage the cores and player characters can withstand, and on the other hand exactly how much damage is actually necessary to kill the enemies.

## Enemy Health

The health of enemies is influenced by the following factors:

* base health of the enemy in question
* current number of players in the match
* total resources payed out to the players during the match (varies if the number of players has changed)
* rank of the enemy, as indicated by a number of '+' symbols below its health bar
* the feat of strength Titan Slayer
* Survival only: the current wave number (both directly and indirectly through ranks)
* Survival only: length of the wave cycle of the current map (indirectly through ranks only)

The complete formula to calculate the health is given below:

# H
B
∗
(
1.25
∗
P
−
0.25
)
∗
(
1
R
)
∗
(
C
∗

1.5

T
?

S
?
∗
0.02
∗
(
W
−
1
)
∗
R
)

{\displaystyle H = B \* (1.25\*P-0.25) \* (1+R) \* (C\*1.5^{T?} +S? \* 0.02 \* (W-1) \* R)}

Where

* **H** is the total **health** of the enemy
* **B** is its **base** health, as can be looked up in the article Enemies
* **P** is the number of **players** currently in the match, i.e. from 1 to 4
* **R** is the **rank** of the enemy, its default is 0. It can be increased by Mutators and in Survival also grows with wave at a speed dependent on wave cycle length.
* **C** is a resource **compensation** factor accounting for a changed number of players through the session. It can take on values from 0.625 to 2.5, but if the number of players has remained constant throughout the session, it will be 1.
* **T?** is 1 if **Titan Slayer** is active, 0 otherwise
* **S?** is 1 if the current game mode is **Survival**, 0 otherwise
* **W** is the current **wave** number

Some of these variables require further elaboration.

### Dependence on number of players

The term in the first bracket in the formula expresses the majority of how health is affected by the number of players in that match. Here are its values in a lookup table:

 2
 3
 4

The dependence is affinely linear but not proportional. That means that the value added to the multiplier (and hence to monster health) for each successive player is constant, but multiplier (and hence health) per player is not, due to an offset. Since the offset is negative, the monster health per player actually increases slightly, up to at most +18.75% more than the basic singleplayer value at four players. This means that for example a twice as large party will need to deal more than twice as much damage to beat the same level, all other things equal. The players therefore have to work together synergistically to overcome this.

If the number of players remains constant throughout the entire session, then this is indeed the only way in which the player number influences enemy health. If the number changes during the session however, the resource compensation factor comes into play.

### Resource Compensation Factor

#### Motivation

Damage to enemies comes from two main sources: the player characters' weapons, and towers bought and upgraded by the players' resources. The former depends only on how many players are currently in the match, but the latter is also influenced by how many there were previously. If the game accounted for only the current number of players through the multiplier treated in the previous chapter, then this would create unfair situations when the player number changes during a match, as it wouldn't properly account for the resources granted to the players and hence tower damage. On the one hand, if one player did almost the entire match on his own and then suddenly three more players join on the last round, if health just instantly increased to the full value for four players throughout then it would be unfairly hard, as there are essentially only towers on the field as could be afforded from the resources from one player. On the other hand, if a full group of four players did the mission until before the last wave because that one is harder and then three of them leave, it would be unfairly easy for the remaining player since he still has tower value worth from four players at his disposal. To balance out this issue is the purpose of the Resource Compensation Factor C.

#### Calculation

Here is how it works: throughout the match, the game keeps track of the total amount of resources that has actually been paid out to players, as well as the maximum amount that could have potentially been paid out up to that same point if there had always been four players. The resource compensation factor C is then calculated as:

# C
(
1
0.5
∗
(

4
∗
R
e

s

p
a
i
d

P
∗
R
e

s

m
a
x

−
1
)
)

{\displaystyle C = (1 + 0.5 \* (\frac{4 \* Res\_{paid}}{P \* Res\_{max}} - 1))}

P here is the current number of players, as used in the complete formula above. Assuming that the same amount of resources are paid out to each player each wave, this formula can also be interpreted as:

# C
(
1
0.5
∗
(

P

a
v
e
r
a
g
e

P

n
o
w

−
1
)
)

{\displaystyle C = (1 + 0.5 \* (\frac{P\_{average}}{P\_{now}} - 1))}

This means it will assume values greater than one if the current number of players is smaller than the match average (increasing monster health, partially compensating the drop due to the player dependent multiplier), and values smaller than one if the current number is larger than the match average (decreasing monster health, partially compensating the increase due to the player dependent multiplier). This achieves the desired fairness compensation.

By inserting opposite extremal player numbers for the average and current number, we obtain the value range of the resource compensation factor:

0.625
≤
C
≤
2.5

{\displaystyle 0.625 \leq C \leq 2.5}

. If the average and current player count are equal, e.g. if it has been constant throughout the match, then the value will always be 1 irrespective of what that count is.

#### Implication

The factor operates on the assumption that the player characters themselves through their weapons are responsible for roughly half of the total damage being dealt to enemies, with the other half coming from towers and thus being rightly subjected to resource compensation. When this assumption is roughly met, the factor is successful at disincentivizing changing player counts during the session for the sake of manipulating enemy health. Arguably, this is mostly the case throughout the campaign, as weapons and towers are balanced under that premise. But the exact portions of player versus tower damage obviously depend on some factors, most notably the choice of perks the players have made (focusing either on their own damage or on enabling their towers to do more) and the amount of resources that are actually dealt out per wave, which can vary quite a bit between different maps. Still, although not perfect, in Campaign mode it quite successfully ensures that players don't need to worry about fellow players dropping out or joining in later during the match all that much.

However, where the objective of this factor is missed completely is in Survival mode. First, the assumption that tower damage only accounts for half the total here is seriously violated. As tower damage scales up with the infinite supply of resources while player weapon damage does not, almost all of the damage during higher waves comes from towers, so the compensation should be a lot stronger. Second, the majority of health during high waves of survival comes from the right summand in the last parantheses of the complete formula, which includes the S? variable, and this ever-growing portion is completely unaffected by C, which only occurs in the left summand. The higher the wave number is during a survival match, the less noticible resource compensation becomes, to the point where it is eventually negligible. Health is then fully and instantenously affected by a change in current player number according to the player factor (table above) without any noticible compensation. As a result of this, individual players dropping out deep into a survival match can be a huge relief in pressure for the remaining players and enable them to go much further than they could have either if they started like that or if that player stayed in, and conversely new players joining late into a survival match most likely means an instant defeat.

### Enemy Rank

The rank of the enemy shows up in two places in the health formula: Once in the independent multiplier (1+R), and once again as another multiplier in the survival summand. This means that enemy health scales with rank linearly during campaign and quadratically during survival. The default rank of all enemies is 0, and this is visibly indicated by the absence of any orange '**+**' symbols below their health bar. Higher ranks are indicated by a number of such pluses equal to the rank. Rank can not be a negative number.

There are only two sources of enemy rank in the game:

* In Survival only, enemies can spawn with a nonzero starting rank according to the following formula:

# R
⌊

W
−
1

L

⌋

{\textstyle R = \lfloor \frac{W-1}{L} \rfloor}

, where R is the starting rank as a result of the current wave number W and the wave cycle length L of the map (which is equal to the total number of waves of the same map in campaign mode). The lower Gaussian brackets symbolize the floor function, which means that the contained ratio is to be rounded down to the next integer (the largest integer less than or equal to the contained ratio). An equivalent way of verabilizing this relation is that every time the wave cycle starts over, starting rank increases by one.
* Rank can be increased beyond starting rank both in campaign and survival mode by a special support enemy type, the Mutator.

### Asymptotic Growth in Survival

The combined contributions of the wave number to enemy health in survival might not be obvious at first glance at the complete formula, but are of immense importance to gameplay in this mode, so they deserve special highlighting here. Inserting the starting rank in the complete formula yields the following graphs for the product of tha rank factor and the factor which includes resource compensation, Titan Slayer and Survival:

Base health and the player factor are not included in this as they are independent. The multipliers as yielded by the graph applicable to a given map may be applied to any base health values and player counts in question, since the multipliers are universal.

The asymptotic growth of health with wave can be described in Landau notation as

H
(
W
)
∈
Θ
(

W
3

)

{\displaystyle H(W) \in \Theta (W^3)}

. In other words, health in the long term grows cubically with the wave number. Comparing this to the growth of tower damage with wave through total resources, which can at most be quadratic under optimal allocation on Amp Spire and damage towers, confirms that monster health inevitably outgrows tower damage in the long term in Survival. Regardless how good the used strategy is, time required to kill the enemies will inevitably go up until it eventually reaches a point where the strategy can't deal with it anymore, which ends the match with the destruction of a core.

### Regeneration

There are two means by which damaged enemies may regenerate their health:

* The feat of strength Hydra Hunter provides a flat amount of 150 health points regenerated per second, independent of the maximum or missing health of the damaged enemy. This regeneration effect can be halved by Sweet Autumn's passive incendiary rounds effect, to 75 hps.
* Enemies can also be healed by a special support enemy type, the Healer.

Along with armor, regeneration causes the actual gross amount of damage necessary to kill an enemy to exceed its maximum health. In the case of regeneration specifically, how much more depends where sensitively on how quickly the damage is inflicted. If it is all dealt instantaneously, no damage beyond the maximum health is required. In contrast, assuming a constant damage rate means more damage needs to be done, the more in total the lower this damage rate is. As the damage rate approaches the regeneration rate, this amount diverges to infinity, so by any means the damage rate must be higher than the regeneration rate to be able to kill an enemy at all.

## Player Health

* The maximum health of the player is 150 for Sweet, Skye, TSYGAN & SiMo, and 225 for Haigen.
* Random factors may drain the health throughout the game
	+ Enemy lumes - most lumes in the game can damage the player one way or another. While the damage of some lumes like Walker Pups is low and the damage,taken by most agressive/semi-aggressive lumes is moderate, the damage of other lumes can be extreme - the Screamer Matriarch can kill the player in just three hits, while the Super Heavy would kill the player instantly if being is caught in the powered beam and an accelerated Rhino would drain the player's health bar extremely quickly up to knocking him down instantly, despite innately not being an aggressive lume.
	+ Environmental factors
		- Fire damage - this is present in 3-2: Canopy, where fire goes through an exhaust vent and deals damage to both players and lumes.
		- Explosion damage - the player would suffer such from such if he triggers the timed explosives in 2-2: Com Tower, regardless of whether they are activated in- or out- of wave. Both these times explosives could easily drain the player's health to 1 or knock him out instantly if too close when the explosion deals its area-of-effect damage. Nearby lumes would take damage as well.
			* Explosive barrels usually don't do damage to the player, but in rare occasions,e.g. if the player is very close to such, like those in 3-1: Train Station, this might sometimes lead to him taking similar amount of damage.
		- Falling below the map from cliffs or else or drowning into waters (if the water's above the player's head) would instantly kill the player.
		- Toxic grounds and air - such are present in the 4 maps of the 4th region (Swamp), where the player would take damage if going too deep into them. Most times these are rather close to the enemy spawn points.
		- Going closer to the enemy spawn points or even inside/into them would lead to slowly losing health.
		- Toxic(waste) waters appear in 6-2: The Slums, being present after triggering wave 3 (in solo) or earlier on (in coop). They would drain the player's health at an average rate.
	+ While there is no friendly damage and if a player shoots at another player or friendly AI, the damage "dealt" will be displayed as zero, the player might inadvertendly or intentionally hit an allied character/friendlyAI with one of 4 weapons - Battle Rifle, Grenade launcher, REX (primary fire), Assault Rifle (secondary fire). If being hit by an explosive projectile or a nearby explosion, the player/friendly AI would be displaced at a random degree, which could even randomly lead to pushing them in harm's way or out of bounds, leading to a player fainted, or friendly AI killed. It is possible that one or both of the two perks Zeus module or Thor module might deal damage to other players and friendly AI.
* Health regeneration
	+ When the character hasn't taken damage for a while but the current health is below the max due to having taken damage beforehand, he would start to restore his health over time to the maximum amount.
	+ Regenerative sides are present for three perks - Hydra blood, Blaze of Glory and The Doctor is In.
	+ While not being exactly a regeneration, the Phoenix perk can bring a fainted player back instantly, or, if the Hardcore feat is enabled, after 10 seconds.

## Core health

* The base (and maximum) core health is 4000 for all maps in the game, regardless of whether there is one or two on the map.
* The core can be damaged only by lumes, in a random degree
	+ While smaller lumes like Runners & Walker Pups would deal 20 damage to the core per hit and the average ones would do moderate amount of damage, the dmg dealt to the core is generally bigger for the average lumes and higher for the heavier ones, although the heaviest enemies tend to damage the core at a slow rate.
	+ The biggest one-hit amount of health that a lume can inflict to the core is 500, dealt by the destructive beam of the Super Heavy, although he would fire a beam into the core only if provoked to fire in its direction (otherwise he simply deals 200 melee damage, at a slow attack rate).
	+ Almost all lumes inflict different amounts of damage, each of which is mentioned in the corresponding lume pages. Only the two support-lumes in the game (Mutators & Healers) don't deal damage to it.
* If the core takes damage, the current health remains same for the remaining duration of the game. It can be regenerated one way - by the Resilient core perk, 10% (400) per wave, up to the maximum amount (4000).
* If the health of the core (or "a" core in case there are two) goes to zero, this means the game(map) is lost.