[Balance] Disable King's Rock for moves that can already flinch (#4860)
This commit is contained in:
parent
b6b756a162
commit
e45cb42f7e
|
@ -26,6 +26,7 @@ import {
|
||||||
applyMoveAttrs,
|
applyMoveAttrs,
|
||||||
AttackMove,
|
AttackMove,
|
||||||
DelayedAttackAttr,
|
DelayedAttackAttr,
|
||||||
|
FlinchAttr,
|
||||||
HitsTagAttr,
|
HitsTagAttr,
|
||||||
MissEffectAttr,
|
MissEffectAttr,
|
||||||
MoveAttr,
|
MoveAttr,
|
||||||
|
@ -502,6 +503,10 @@ export class MoveEffectPhase extends PokemonPhase {
|
||||||
*/
|
*/
|
||||||
protected applyHeldItemFlinchCheck(user: Pokemon, target: Pokemon, dealsDamage: boolean) : () => void {
|
protected applyHeldItemFlinchCheck(user: Pokemon, target: Pokemon, dealsDamage: boolean) : () => void {
|
||||||
return () => {
|
return () => {
|
||||||
|
if (this.move.getMove().hasAttr(FlinchAttr)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (dealsDamage && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && !this.move.getMove().hitsSubstitute(user, target)) {
|
if (dealsDamage && !target.hasAbilityWithAttr(IgnoreMoveEffectsAbAttr) && !this.move.getMove().hitsSubstitute(user, target)) {
|
||||||
const flinched = new BooleanHolder(false);
|
const flinched = new BooleanHolder(false);
|
||||||
user.scene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched);
|
user.scene.applyModifiers(FlinchChanceModifier, user.isPlayer(), user, flinched);
|
||||||
|
|
Loading…
Reference in New Issue