[Balance] Disable King's Rock for moves that can already flinch (#4860)

This commit is contained in:
innerthunder 2024-11-12 18:42:47 -08:00 committed by GitHub
parent b6b756a162
commit e45cb42f7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -26,6 +26,7 @@ import {
applyMoveAttrs,
AttackMove,
DelayedAttackAttr,
FlinchAttr,
HitsTagAttr,
MissEffectAttr,
MoveAttr,
@ -502,6 +503,10 @@ export class MoveEffectPhase extends PokemonPhase {
*/
protected applyHeldItemFlinchCheck(user: Pokemon, target: Pokemon, dealsDamage: boolean) : () => void {
return () => {
if (this.move.getMove().hasAttr(FlinchAttr)) {
return;
}
if (dealsDamage && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && !this.move.getMove().hitsSubstitute(user, target)) {
const flinched = new BooleanHolder(false);
user.scene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched);