mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 00:06:18 +00:00
[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,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user