Difference between revisions of "Hit chance"
(Added Mechanics template) |
m (Fixed spacing with equations and text) |
||
(6 intermediate revisions by 2 users not shown) | |||
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>HitChance = \begin{cases} | + | <math>\text{HitChance} = \begin{cases} |
− | \ | + | \dfrac{\text{MoveAccuracy} + \text{AttackerAccuracy} - 100}{\text{DefenderEvasion}}, & \text{AttackerAccuracy} > 100 \\[1em] |
− | \ | + | \dfrac{\text{MoveAccuracy} \times \text{AttackerAccuracy}}{100 \times \text{DefenderEvasion}}, & \text{otherwise} |
\end{cases}</math> | \end{cases}</math> | ||
− | If the | + | If the hit chance is greater than 1 (100%), the attack has an increased [[Critical hit|critical hit chance]]. In general, the accuracy term in the numerator is multiplicative, but if the user has a boosted accuracy stat, the accuracy term instead becomes added based on how large <math>\text{AttackerAccuracy}</math> is compared to the default value of 100. |
+ | ===Accuracy and Evasion=== | ||
+ | {{Main|Stat}} | ||
− | If the | + | ==== Attacker Accuracy ==== |
+ | As a consequence of the different equation being used when attacker accuracy goes above 100 (100%), the move's accuracy gets increased by an amount based directly on the attacker's excess accuracy. For example, if the target has an unmodified evasion stat, [[Hypnotise]] has a move accuracy of 50%. If the user has [[Accuracy Up]] active, the +50% accuracy boost is effectively added to the move accuracy, meaning the move now has an accuracy of 100%. Similarly, [[Sleep Talk]] goes from 1% to 51% after accounting for stat stages. | ||
− | + | The base values for the accuracy of tapes and characters are 100, so the formula 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>AccuracyStageMultiplier = \ | + | |
− | \frac{ | + | *<math>\text{AccuracyAttribute}</math> accounts for the ''Passive: +x% Accuracy'' and ''Passive: +% Accuracy per empty slot'' attributes across all stickers in the tape, which are multiplied together instead of being additive. |
− | \frac{ | + | *<math>\text{AccuracyStageMultiplier}</math> is the multiplier from all present [[Stat Stages|stat stages]] that affect accuracy. |
− | \end{ | + | Some examples: |
+ | |||
+ | * With no attributes present or stat stages in play, attacker accuracy is 100. | ||
+ | * A monster tape with a ''Passive: +5% Accuracy'' attribute in their stickers will have <math>\text{AttackerAccuracy} = 100 \times 1.05 = 105</math>. | ||
+ | * With [[Accuracy Up]], it has a stat stage of +2 so<math display="inline">\text{AccuracyStageMultiplier} = 6/4 = 1.5,</math>and <math>\text{AttackerAccuracy} = 100 \times 1.5 = 150</math>. | ||
+ | * With [[Gambit (status effect)|Gambit]] and a monster tape having a sticker with the ''Passive: +5% Accuracy'' attribute a sticker with the ''Passive: +2% Accuracy per empty slot'' with 3 empty slots, the total contribution from attributes is <math display="inline">1.05 \times (1 + 0.02 \times 3) = 1.113</math>; since Gambit gives a +4 (+100%) stat stage to accuracy, <math>\text{AccuracyStageMultiplier} = 8/4 = 2</math>. Combining them all, <math>\text{AttackerAccuracy} = 100 \times 1.113 \times 2 = 222</math> after rounding down. | ||
+ | |||
+ | ==== Move 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{MoveAccuracyAttribute}</math> accounts for the ''+x% Move accuracy'' and ''+x% Move accuracy per empty slot'' attributes across all stickers in the tape, which are multiplied together instead of being additive. | ||
+ | *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. | ||
+ | Some examples: | ||
+ | |||
+ | * [[Sticky Tongue]] has 75% accuracy so <math>\text{MoveAccuracy} = 75</math>. | ||
+ | * If this sticker also had the ''+20% Accuracy'' attribute, <math>\text{MoveAccuracy} = 75 \times 1.20 = 90</math> so an effective 90% accuracy. | ||
+ | * If the user of this sticker had also been afflicted with [[Unitarget]], <math>\text{MoveAccuracy} = 90/2 = 45</math> resulting in an effective 45% accuracy. | ||
+ | |||
+ | ==== Defender Evasion ==== | ||
+ | Doubling the defender's evasion such as via [[Evasion Up]] results in attacks only landing half the time, as they are now twice as difficult to hit. In general, if the defender's evasion is multiplied by some number <math display="inline">x</math>, attacks will only land <math display="inline">1/x</math> of the time on average compared to normal; <math display="inline">x > 1</math> for evasion-boosting statuses and attributes while <math display="inline">0 < x < 1</math> for evasion-lowering statuses. As such, if <math>x = 1/100</math> which can be achieved via inflicting the [[Evasion Nullified]] status effect, all attacks are guaranteed to land if there are no other modifiers present. | ||
+ | |||
+ | The base values for the evasion of tapes and characters are 100, so the formula can be simplified as such: | ||
+ | |||
+ | <math>\begin{align} \text{DefenderEvasion} & = 100 \times \prod_{ \text{m} \in \text{stickers} } \left(\frac{\text{EvasionAttribute}_\text{m} + 100}{100} \times \text{EvasionStatModifier} \right) \\ | ||
+ | & \quad \times \text{EvasionStageMultiplier} \times \text{EvasionStatusMultiplier} | ||
+ | \end{align}</math> | ||
− | + | *<math display="inline">\text{EvasionAttribute}</math> accounts for the ''Passive: +x% Evasion'' and ''Passive: +% Evasion per empty slot'' attributes across all stickers in the tape, which are multiplied together instead of being additive. | |
+ | *<math display="inline">\text{EvasionStatModifier}</math> uses the multiplier from [[Shear Luck]] if present. | ||
+ | *<math display="inline">\text{EvasionStageMultiplier}</math> is the multiplier from all present [[Stat Stages|stat stages]] that affect evasion. | ||
+ | *<math display="inline">\text{EvasionStatusMultiplier}</math> is a separate multiplier used by certain status effects. | ||
+ | **[[Evasion Nullified]] has a multiplier of 1/100.<!-- global/BattleFormulas.gd:get_stat_stage_multiplier --> | ||
+ | Some examples: | ||
− | { | + | * With no attributes present or stat stages in play, defender evasion is 100, similar to attacker accuracy. |
− | + | * A [[Bansheep]] tape at 20% HP with one [[Shear Luck]] sticker has <math>\text{EvasionStatModifier} = 1 + 0.8/2 = 1.4</math> and so<math display="inline">\text{DefenderEvasion} = 100 \times 1.4 = 140.</math> | |
− | + | * With 2 [[Shear Luck]] stickers instead, at 20% HP this tape will have <math display="inline">\text{DefenderEvasion} = 100 \times (1.4)^2 = 196.</math> | |
− | + | * If a target has been afflicted with the [[Evasion Nullified]] status effect, <math>\text{EvasionStatusMuliplier} = 1/100</math> so <math>\text{DefenderEvasion} = 100 \times (1/100) = 1.</math> | |
− | + | * If a target has both [[Evasion Up]] and [[Evasion Nullified]], the former has a +4 (+100%) stat stage giving <math>\text{EvasionStatMultiplier} = 8/4 = 2</math>. Meanwhile, the latter amounts to setting <math>\text{EvasionStatusMuliplier} = 1/100</math> so the end result is <math display="inline">\text{DefenderEvasion} = 100 \times 2 \times (1/100) = 2.</math> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | ==== Accuracy Statuses ==== | + | ====Accuracy Statuses==== |
+ | {{Main|Stat Stages}} | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! Icon | + | !Icon |
− | ! Name | + | !Name |
− | ! Stages | + | ! colspan="2" |Stages |
|- | |- | ||
− | | [[File:Status Accuracy Up.png|42x42px]] | + | |[[File:Status Accuracy Up.png|42x42px]] |
− | | [[Accuracy Up]] | + | |[[Accuracy Up]] |
| align="center" | +2 | | align="center" | +2 | ||
+ | | +50% | ||
|- | |- | ||
− | | [[File:Status Accuracy Down.png|42x42px]] | + | |[[File:Status Accuracy Down.png|42x42px]] |
− | | [[Accuracy Down]] | + | |[[Accuracy Down]] |
| align="center" | -2 | | align="center" | -2 | ||
+ | | -33% | ||
|- | |- | ||
− | | [[File:Status Gambit.png|42x42px]] | + | |[[File:Status Gambit.png|42x42px]] |
− | | [[Gambit (status effect)|Gambit]] | + | |[[Gambit (status effect)|Gambit]] |
| align="center" | +4 | | align="center" | +4 | ||
+ | | +100% | ||
|} | |} | ||
− | ==== Evasion Statuses ==== | + | ====Evasion Statuses==== |
+ | {{Main|Stat Stages}} | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | ! Icon | + | !Icon |
− | ! Name | + | !Name |
− | ! Stages | + | ! colspan="2" |Stages |
|- | |- | ||
− | | [[File:Status Evasion Up.png|42x42px]] | + | |[[File:Status Evasion Up.png|42x42px]] |
− | | [[Evasion Up]] | + | |[[Evasion Up]] |
| align="center" | +4 | | align="center" | +4 | ||
+ | | +100% | ||
|- | |- | ||
− | | [[File:Status Evasion Down.png|42x42px]] | + | |[[File:Status Evasion Down.png|42x42px]] |
− | | [[Evasion Down]] | + | |[[Evasion Down]] |
| align="center" | -4 | | align="center" | -4 | ||
+ | | -50% | ||
|- | |- | ||
− | | [[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}} | + | | colspan="2" align="center" |{{tt|*|Multiplies the defender evasion by 1%, accounted for in StatusesEvasionMultiplier}} |
|} | |} | ||
− | |||
[[Category:Mechanics]] | [[Category:Mechanics]] | ||
{{Mechanics}} | {{Mechanics}} |
Latest revision as of 06:41, 21 August 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
If the hit chance is greater than 1 (100%), the attack has an increased critical hit chance. In general, the accuracy term in the numerator is multiplicative, but if the user has a boosted accuracy stat, the accuracy term instead becomes added based on how large is compared to the default value of 100.
Accuracy and Evasion
- Main article: Stat
Attacker Accuracy
As a consequence of the different equation being used when attacker accuracy goes above 100 (100%), the move's accuracy gets increased by an amount based directly on the attacker's excess accuracy. For example, if the target has an unmodified evasion stat, Hypnotise has a move accuracy of 50%. If the user has Accuracy Up active, the +50% accuracy boost is effectively added to the move accuracy, meaning the move now has an accuracy of 100%. Similarly, Sleep Talk goes from 1% to 51% after accounting for stat stages.
The base values for the accuracy of tapes and characters are 100, so the formula can be simplified as such:
- accounts for the Passive: +x% Accuracy and Passive: +% Accuracy per empty slot attributes across all stickers in the tape, which are multiplied together instead of being additive.
- is the multiplier from all present stat stages that affect accuracy.
Some examples:
- With no attributes present or stat stages in play, attacker accuracy is 100.
- A monster tape with a Passive: +5% Accuracy attribute in their stickers will have .
- With Accuracy Up, it has a stat stage of +2 soand .
- With Gambit and a monster tape having a sticker with the Passive: +5% Accuracy attribute a sticker with the Passive: +2% Accuracy per empty slot with 3 empty slots, the total contribution from attributes is ; since Gambit gives a +4 (+100%) stat stage to accuracy, . Combining them all, after rounding down.
Move Accuracy
- accounts for the +x% Move accuracy and +x% Move accuracy per empty slot attributes across all stickers in the tape, which are multiplied together instead of being additive.
- 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.
Some examples:
- Sticky Tongue has 75% accuracy so .
- If this sticker also had the +20% Accuracy attribute, so an effective 90% accuracy.
- If the user of this sticker had also been afflicted with Unitarget, resulting in an effective 45% accuracy.
Defender Evasion
Doubling the defender's evasion such as via Evasion Up results in attacks only landing half the time, as they are now twice as difficult to hit. In general, if the defender's evasion is multiplied by some number , attacks will only land of the time on average compared to normal; for evasion-boosting statuses and attributes while for evasion-lowering statuses. As such, if which can be achieved via inflicting the Evasion Nullified status effect, all attacks are guaranteed to land if there are no other modifiers present.
The base values for the evasion of tapes and characters are 100, so the formula can be simplified as such:
- accounts for the Passive: +x% Evasion and Passive: +% Evasion per empty slot attributes across all stickers in the tape, which are multiplied together instead of being additive.
- 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 has a multiplier of 1/100.
Some examples:
- With no attributes present or stat stages in play, defender evasion is 100, similar to attacker accuracy.
- A Bansheep tape at 20% HP with one Shear Luck sticker has and so
- With 2 Shear Luck stickers instead, at 20% HP this tape will have
- If a target has been afflicted with the Evasion Nullified status effect, so
- If a target has both Evasion Up and Evasion Nullified, the former has a +4 (+100%) stat stage giving . Meanwhile, the latter amounts to setting so the end result is
Accuracy Statuses
- Main article: Stat Stages
Icon | Name | Stages | |
---|---|---|---|
Accuracy Up | +2 | +50% | |
Accuracy Down | -2 | -33% | |
Gambit | +4 | +100% |
Evasion Statuses
- Main article: Stat Stages
Icon | Name | Stages | |
---|---|---|---|
Evasion Up | +4 | +100% | |
Evasion Down | -4 | -50% | |
Evasion Nullified | * |
Mechanics | ||||
|