Combat/Accuracy and Evasion

Accuracy and Evasion
During sorties, whether an attack connects or not is heavily dependent on the attacker's accuracy and the opponent's evasion:
 * : The accuracy of a ship, which determines how accurate your shots are. Keep in mind that this stat is hidden and there is no in-game way to see how much accuracy your ship has.
 * : The evasion of a ship, which determines how high the chances are that you will evade an attack. Each attack calculates the evasion differently, but in all cases, evasion stat will suffer from diminishing returns past a certain point. Attacks that are evaded will be displayed as miss.

The following formulas are subject to change as further research is published.

Hit Rate
The actual hit rate can be calculated as follows:

First, the Base Hit Rate is calculated. This takes into account the attacker's Accuracy Value against the target's Evasion Value. Each type of attack (e.g. shelling, torpedo, airstrike) has its own formula for calculating its Accuracy Value.

$$\text{Base Hit Rate} = \text{Accuracy Value} - \text{Evasion Value}$$

Afterwards, the Base Hit Rate undergoes through two caps, which prevents it from exceeding or falling lower than certain thresholds. This is determined by:

$$\text{Capped Hit Rate} = \operatorname{cap_{2}} \Big ( \operatorname{cap_{1}} \left ( \text{Base Hit Rate} \right ) \cdot \text{Morale Modifier} \Big )$$

Observations:
 * The Morale Modifier is a value depending on the target's morale state:
 * $$\text{Morale Modifier} = \begin{cases} 0.7, & \text{ if Morale} \geq 53 \\ 1.0, & \text{ if } 32 < \text{Morale} < 53 \\ 1.2, & \text{ if } 20 < \text{Morale} \leq 32 \\ 1.4, & \text{ if Morale} \leq 20 \end{cases}$$
 * $$\operatorname{cap_{1}} \left ( x \right ) = \begin{cases} 10, & \text{ if } x < 10 \\ x, & \text{ otherwise } \end{cases}$$
 * $$\operatorname{cap_{2}} \left ( x \right ) = \begin{cases} 96, & \text{ if } x > 96 \\ x, & \text{ otherwise } \end{cases}$$

Finally, the Final Hit Rate can be calculated, which is directly used to determine the likelihood of that attack hitting or missing:

$$\text{Final Hit Rate} = \Big ( \big \lfloor \text{Capped Hit Rate} \big \rfloor + \text{Proficiency Bonus} + 1 \Big ) \%$$

Critical Hit Rate
Abbreviating Capped Hit Rate as $$H$$;

$$\text{Critical Hit Rate}(\%) = \begin{cases} \big \lfloor 1.3\sqrt{H} \big \rfloor + \text{Proficiency Bonus} + 1, & \text{ for Shelling } \\ \big \lfloor 1.5\sqrt{H} \big \rfloor + 1, & \text{ for Torpedo } \\ \big \lfloor 0.2\sqrt{H} \big \rfloor + \text{Proficiency Bonus} + 1, & \text{ for Airstrike } \\ \big \lfloor (1.5 + \text{Night Contact})\sqrt{H} \big \rfloor + 1, & \text{ for Night Battle } \\ \big \lfloor 1.3\sqrt{H} \big \rfloor + 1, & \text{ for Shelling (Support) } \\ \big\lfloor 0.2\sqrt{H} \big \rfloor + 1, & \text{ for Aistrike (Support) } \end{cases}$$

Observations:
 * Critical Hits will never miss, as the Critical Hit Rate is rolled before the Final Hit Rate.
 * Night Contact refers to the bonus provided by the Type 98 Reconnaissance Seaplane (Night Recon), if it successfully triggers during Night Battle.

Shelling Attacks
The shelling formula determines the hit rate and the evasion of shelling attacks. Note that this applies to both regular shelling and carrier shelling, but it does not apply to night battles.

$$\text{Accuracy Value} = \Big \lfloor \left ( \left ( 90 + 2\sqrt{N_{s}} + \sqrt{1.5L_{s}} + E_{s} \right ) \cdot F C + W_{s} \right ) \cdot B_{1}B_{2} \Big \rfloor$$

Where:
 * $$N_{s}$$ is the ship's level
 * $$L_{s}$$ is the ship's luck
 * $$E_{s} = \sum^{\text{All Slots}} E_{acc} + E_{m} \sqrt{\bigstar}$$
 * $$E_{s}$$ is the total accuracy provided by the ship's equipment
 * $$E_{acc}$$ is the equipment's displayed accuracy stat
 * $$E_{m}$$ is the equipment's improvement modifier for shelling accuracy
 * $$W_{s}$$ is the ship's fit bonus or overweight penalty
 * Check out this page for more info.
 * $$F$$ is the fleet's formation modifier:
 * $$F = \begin{cases} 1.0, & \text{ for Line Ahead, Diamond} \\ 1.2, & \text{ for Double Line, Echelon, Line Abreast } \\ ???, & \text{ for Cruising Formation 1 (Anti-Sub)} \\ ???, & \text{ for Cruising Formation 2 (Forward) } \\ ???, & \text{ for Cruising Formation 3 (Ring) } \\ ???, & \text{ for Cruising Formation 4 (Battle) } \end{cases}$$
 * $$C$$ is the ship's morale modifier:
 * $$C = \begin{cases} 1.2, & \text{ if Morale} \geq 53 \\ 1.0, & \text{ if } 32 < \text{Morale} < 53 \\ 0.8, & \text{ if } 20 < \text{Morale} \leq 32 \\ 0.5, & \text{ if Morale} \leq 20 \end{cases}$$
 * $$B_{1}$$ is the Artillery Spotting accuracy modifier. Applies only when an Artillery Spotting attack is triggered.
 * $$B_{1} = \begin{cases} 1.1, & \text{ for Double Attack } \\ 1.3, & \text{ for Secondary CI } \\ 1.5, & \text{ for Secondary CI (Radar) } \\ 1.2, & \text{ for AP CI } \\ 1.3, & \text{ for AP CI (Secondary) } \end{cases}$$
 * $$B_{2}$$ is the AP Shell accuracy modifier. Applies according to certain equipment combinations:
 * $$B_{2} = \begin{cases} 1.1, & \text{ for AP + Main } \\ 1.25, & \text{ for AP + Main + Radar } \\ 1.2, & \text{ for AP + Main + Secondary } \\ 1.3, & \text{ for AP + Main + Secondary + Radar } \end{cases}$$

Additional notes:
 * Combined Fleet modifiers appear to be flat penalties but are still subject to further investigation.
 * Incomplete: Combined Fleet modifiers are missing.

Torpedo Attacks
The formula which determines the hit rate and evasion of all forms of torpedo attacks during the day. This formula does not apply during night battle.

$$\text{Accuracy Value} = \left ( 85 + 2\sqrt{N_{s}} + \sqrt{1.5L_{s}} + E_{s} + \frac{P_{s}}{5} + B_{s} \right ) \cdot F C$$

Where:
 * $$N_{s}$$ is the ship's level
 * $$L_{s}$$ is the ship's luck
 * $$E_{s} = \sum^{\text{All Slots}} E_{acc} + E_{m} \sqrt{\bigstar}$$
 * $$E_{s}$$ is the total accuracy provided by the ship's equipment
 * $$E_{acc}$$ is the equipment's displayed accuracy stat
 * $$E_{m}$$ is the equipment's improvement modifier for torpedo accuracy
 * $$F$$ and $$C$$ (formation and morale modifiers) assume the same values as in the Shelling Attack formula.
 * $$P_{s}$$ is the ship's effective torpedo power, or in other words, the ship's Basic Attack Power for torpedo attacks after the attack power cap and all pre-cap modifiers have been applied.
 * For more information, visit this page
 * Of note is that due to this, factors such as the ship's health state and the current battle's engagement form will have an effect on torpedo accuracy.
 * $$B_{s}$$ is the ship's innate torpedo accuracy. All player ships have 0 innate torpedo accuracy, but certain enemy vessels may have values above 0.

Anti-Submarine Warfare
The formula which determines the hit rate and evasion of attacks performed against submarines. It can be a depth charge attack or an aerial attack, as long as the target is a submarine.

$$\text{Accuracy Value} = \left ( 80 + 2\sqrt{N_{s}} + \sqrt{1.5L_{s}} + E_{s} + 2A_{sonar} \right ) \cdot F C$$

Where:
 * $$N_{s}$$ is the ship's level
 * $$L_{s}$$ is the ship's luck
 * $$E_{s} = \sum^{\text{All Slots}} E_{acc} + E_{m} \sqrt{\bigstar}$$
 * $$E_{s}$$ is the total accuracy provided by the ship's equipment
 * $$E_{acc}$$ is the equipment's displayed accuracy stat
 * $$E_{m}$$ is the equipment's improvement modifier for ASW accuracy
 * $$F$$ and $$C$$ (formation and morale modifiers) assume the same values as in the Shelling Attack formula.
 * $$A_{sonar}$$ is the sum of the ASW stats of every Sonar that the ship is equipping. Improvements are not considered here.
 * In other words, this means that every Sonar offers a hidden, ASW-specific accuracy boost equal to double of its displayed ASW stat.

Opening Airstrike
The formula which determines the accuracy and the evasion against the Opening Airstrike that is performed by bombers during the opening phase. Unlike other attacks, the accuracy of airstrikes is not affected by morale.

$$\text{Accuracy Value} = 95$$

Night Battle
The formula which determines the hit rate and evasion during a night battle. During a night battle, all attacks are treated the same, regardless of shelling or torpedo attacks.

$$\text{Accuracy Value} = \left ( N_{1} \left ( 69 + E_{a} \right ) + 2\sqrt{N_{s}} + \sqrt{1.5L_{s}} + E_{s} \right ) \cdot F C M + E_{b} + N_{2} + W_{s}$$

Where:
 * $$N_{s}$$ is the ship's level
 * $$L_{s}$$ is the ship's luck
 * $$E_{s} = \sum^{\text{All Slots}} E_{acc} + E_{m} \sqrt{\bigstar}$$
 * $$E_{s}$$ is the total accuracy provided by the ship's equipment
 * $$E_{acc}$$ is the equipment's displayed accuracy stat
 * $$E_{m}$$ is the equipment's improvement modifier for night battle accuracy
 * $$W_{s}$$ is the ship's fit bonus or overweight penalty. The values used here are those applying specifically to night battle.
 * $$F$$ and $$C$$ (formation and morale modifiers) assume the same values as in the Shelling Attack formula.
 * $$M$$ is the night battle special attack modifier.
 * $$E_{a}$$ is the Star Shell bonus. Assumes a value of 5 if the Star Shell activates; is 0 otherwise.
 * $$E_{b}$$ is the Searchlight bonus. Assumes a value of 7 if a Searchlight is active; is 0 otherwise.
 * $$N_{1}$$ is the Nightscout modifier. Assumes a value of 1.1 if Night Contact has occurred; is 1.0 otherwise.
 * $$N_{2}$$ is the Heavy Cruiser night battle bonus, as follows:
 * If equipped with a 20.3cm Twin Gun Mount: $$N_{2} = 10$$
 * If equipped with a 20.3cm (no.3) Twin Gun Mount: $$N_{2} = 15$$
 * Bonus is applied only once regardless of the amount of applicable guns equipped on the ship.
 * Notably, the lower 20.3cm bonus overrides the higher 20.3cm no.3 bonus if both are equipped on a ship, resulting in only +10. Therefore, equipping a 20.3cm plus a 20.3cm no.3 should be avoided.

Evasion Value
$$\text{Base Evasion Value} = \left \lfloor \left ( V_{s} + \sqrt{2L_{s}} \right ) \cdot F \right \rfloor$$

Where:
 * $$V_{s}$$ is the ship's displayed evasion (including equipment)
 * $$L_{s}$$ is the ship's luck
 * $$F$$ is the fleet's formation modifier. Refer to this table for a list of applicable formation modifiers according to the respective combat phases.

Abbreviating Base Evasion Value as $$E$$;

$$\text{Capped Evasion Value} = \begin{cases} E, & \text{ if } E < 40 \\ \left \lfloor 40 + 3\sqrt{E - 40}\right \rfloor, & \text{ if } 40 \leq E < 65 \\ \left \lfloor 55 + 2\sqrt{E - 65} \right \rfloor, & \text{ if } E \geq 65 \end{cases}$$

$$\text{Final Evasion Value} = S \left ( \text{Capped Evasion Value} \right ) - \text{Fuel Penalty}$$

Where:
 * $$S$$ is the Searchlight evasion penalty. Becomes 0.2 if it is night battle and the ship is equipping a Searchlight (disregarding whether it is active or not); otherwise assume 1.0.
 * $$\text{Fuel Penalty} = \begin{cases} 75 - R, & \text{ if } R < 75 \\ 0, & \text{ otherwise } \end{cases}$$
 * $$R$$ is the ship's remaining fuel percentage, expressed as an integer (e.g. 60% fuel remaining equals 60)

List of Factors affecting Accuracy or Evasion
This list displays factors that have an effect on accuracy and evasion of your ships in general. Due to the complexity of accuracy and its factors, it will be using the following format to list them:
 * Factor: The factor which influences the accuracy or evasion in some way.
 * Affected Type: Here, it is noted, which form of attack is affected:
 * Shelling: Shelling attacks during the day, including carrier shelling.
 * Torpedo: All forms of torpedo attacks during the day.
 * ASW: Anti-Submarine Warfare attacks during the day.
 * Airstrike: Opening Airstrike attacks performed by bombers during the opening phase.
 * Night: All forms of attacks that take place during the night.
 * ALL: The factor affects all forms of attack.
 * ?: In case it is still unknown which attack that the factor affects, or if there is a suspicion that it affects phases other than what is currently displayed, a question mark will be used.
 * Description: A brief explanation as to how the factor affects the accuracy or evasion.

The evasion list will only contain the Factor and Description headers in its table, due to it being less complex than the accuracy formula.

The list is only a summary of factors with a brief explanation of their effects, it will not contain any in-depth explanations regarding their application in the actual formulas. In case that is what you're looking for, you are recommended to check out the formulas above instead.

Note:  Keep in mind that the list might not be complete, this will be updated in due time if more is known about the factors.