Difference between revisions of "Hit chance"
From Cassette Beasts
m (Change some frac to dfrac and use text for variables to improve readability) |
(Rewritten some formulas) |
||
Line 3: | Line 3: | ||
== General Formulas == | == General Formulas == | ||
<!-- Relevant code in global/BattleFormulas.gd and battle/fighter/StatusNode.gd --> | <!-- Relevant code in global/BattleFormulas.gd and battle/fighter/StatusNode.gd --> | ||
+ | If the attacker has the [[Locked On]] status, the hit chance is set to 100%. Otherwise, if the defender has the [[Cottoned On]] status, then the hit chance is set to 0%. When neither [[Status Effects|status effects]] are present, the hit chance is | ||
<math>\text{HitChance} = \begin{cases} | <math>\text{HitChance} = \begin{cases} | ||
− | \dfrac{\text{MoveAccuracy} + \text{AttackerAccuracy} - 100}{\text{DefenderEvasion}}, & | + | \dfrac{\text{MoveAccuracy} + \text{AttackerAccuracy} - 100}{\text{DefenderEvasion}}, & \text{AttackerAccuracy} > 100 \\[1em] |
− | \dfrac{\text{MoveAccuracy} \times \text{AttackerAccuracy}}{100 \times \text{DefenderEvasion}}, & | + | \dfrac{\text{MoveAccuracy} \times \text{AttackerAccuracy}}{100 \times \text{DefenderEvasion}}, & \text{otherwise} |
\end{cases}</math> | \end{cases}</math> | ||
+ | ===Accuracy and Evasion=== | ||
+ | {{Main|Stat}} | ||
+ | The base values for the accuracy and evasion of tapes and characters are 100, so the formulas can be simplified as such: | ||
− | + | <math>\text{AttackerAccuracy} = 100 \times \prod_{ \text{m} \in \text{stickers} }\left(\frac{\text{AccuracyAttribute}_\text{m} + 100}{100}\right) \times \text{AccuracyStageMultiplier}</math> | |
− | + | *<math>\text{AccuracyAttribute}</math> accounts for the ''Passive: +x% Accuracy'' and ''Passive: +% Accuracy per empty slot'' attributes. | |
+ | *<math>\text{AccuracyStageMultiplier}</math> is the multiplier from all present [[Stat Stages|stat stages]] that affect accuracy. | ||
− | + | <math>\text{MoveAccuracy} = \text{BaseMoveAccuracy} \times \prod_{\text{m} \in \text{stickers}} \left( \frac{ \text{MoveAccuracyAttribute}_\text{m} + 100 }{100} \right)</math> | |
− | |||
− | <math>\ | ||
− | \text{ | ||
− | |||
− | |||
− | + | *<math>\text{MoveAccuracyAttribute}</math> accounts for the ''+x% Move accuracy'' and ''+x% Move accuracy per empty slot'' attributes. | |
− | <math>\text{ | + | *If the user has the [[Unitarget]] status, <math>\text{MoveAccuracy}</math> is halved. |
− | + | *When [[Fog (status effect)|Fog]] is in effect and the move's type is not in the list of exempted moves, <math>\text{MoveAccuracy}</math> is set to 0. | |
− | |||
− | |||
− | + | <math>\text{DefenderEvasion} = 100 \times \prod_{ \text{m} \in \text{stickers} } \left(\frac{\text{EvasionAttribute}_\text{m} + 100}{100} \times \text{EvasionStatModifier} \right) \times \text{EvasionStageMultiplier} \times \text{EvasionStatusMultiplier}</math> | |
− | { | + | *<math>\text{EvasionAttribute}</math> accounts for the ''Passive: +x% Evasion'' and ''Passive: +% Evasion per empty slot'' attributes. |
− | + | *<math display="inline">\text{EvasionStatModifier}</math> uses the multiplier from [[Shear Luck]] if present. | |
− | + | *<math>\text{EvasionStageMultiplier}</math> is the multiplier from all present [[Stat Stages|stat stages]] that affect evasion | |
− | + | *<math>\text{EvasionStatusMultiplier}</math> is a separate multiplier used by certain status effects. | |
− | + | **[[Evasion Nullified]] gives a multiplier of 1/100.<!-- global/BattleFormulas.gd:get_stat_stage_multiplier --> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ==== Accuracy Statuses ==== | + | ====Accuracy Statuses==== |
+ | {{Main|Stat Stages}} | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! Icon | + | !Icon |
− | ! Name | + | !Name |
− | ! Stages | + | !Stages |
|- | |- | ||
− | | [[File:Status Accuracy Up.png|42x42px]] | + | |[[File:Status Accuracy Up.png|42x42px]] |
− | | [[Accuracy Up]] | + | |[[Accuracy Up]] |
| align="center" | +2 | | align="center" | +2 | ||
|- | |- | ||
− | | [[File:Status Accuracy Down.png|42x42px]] | + | |[[File:Status Accuracy Down.png|42x42px]] |
− | | [[Accuracy Down]] | + | |[[Accuracy Down]] |
| align="center" | -2 | | align="center" | -2 | ||
|- | |- | ||
− | | [[File:Status Gambit.png|42x42px]] | + | |[[File:Status Gambit.png|42x42px]] |
− | | [[Gambit (status effect)|Gambit]] | + | |[[Gambit (status effect)|Gambit]] |
| align="center" | +4 | | align="center" | +4 | ||
|} | |} | ||
− | ==== Evasion Statuses ==== | + | ====Evasion Statuses==== |
+ | {{Main|Stat Stages}} | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! Icon | + | !Icon |
− | ! Name | + | !Name |
− | ! Stages | + | !Stages |
|- | |- | ||
− | | [[File:Status Evasion Up.png|42x42px]] | + | |[[File:Status Evasion Up.png|42x42px]] |
− | | [[Evasion Up]] | + | |[[Evasion Up]] |
| align="center" | +4 | | align="center" | +4 | ||
|- | |- | ||
− | | [[File:Status Evasion Down.png|42x42px]] | + | |[[File:Status Evasion Down.png|42x42px]] |
− | | [[Evasion Down]] | + | |[[Evasion Down]] |
| align="center" | -4 | | align="center" | -4 | ||
|- | |- | ||
− | | [[File:Status Evasion Nullified.png|42x42px]] | + | |[[File:Status Evasion Nullified.png|42x42px]] |
− | | [[Evasion Nullified]] | + | |[[Evasion Nullified]] |
− | | align="center" | {{tt|*|Multiplies the defender evasion by 1%, accounted for in StatusesEvasionMultiplier}} | + | | align="center" |{{tt|*|Multiplies the defender evasion by 1%, accounted for in StatusesEvasionMultiplier}} |
|} | |} | ||
Revision as of 11:51, 24 January 2024
Hit chance determines the chance that a move will hit.
General Formulas
If the attacker has the Locked On status, the hit chance is set to 100%. Otherwise, if the defender has the Cottoned On status, then the hit chance is set to 0%. When neither status effects are present, the hit chance is
Accuracy and Evasion
- Main article: Stat
The base values for the accuracy and evasion of tapes and characters are 100, so the formulas can be simplified as such:
- accounts for the Passive: +x% Accuracy and Passive: +% Accuracy per empty slot attributes.
- is the multiplier from all present stat stages that affect accuracy.
- accounts for the +x% Move accuracy and +x% Move accuracy per empty slot attributes.
- If the user has the Unitarget status, is halved.
- When Fog is in effect and the move's type is not in the list of exempted moves, is set to 0.
- accounts for the Passive: +x% Evasion and Passive: +% Evasion per empty slot attributes.
- uses the multiplier from Shear Luck if present.
- is the multiplier from all present stat stages that affect evasion
- is a separate multiplier used by certain status effects.
- Evasion Nullified gives a multiplier of 1/100.
Accuracy Statuses
- Main article: Stat Stages
Icon | Name | Stages |
---|---|---|
Accuracy Up | +2 | |
Accuracy Down | -2 | |
Gambit | +4 |
Evasion Statuses
- Main article: Stat Stages
Icon | Name | Stages |
---|---|---|
Evasion Up | +4 | |
Evasion Down | -4 | |
Evasion Nullified | * |
Mechanics | ||||
|