move prankster to ABILITYEFFECT_MOVES_BLOCK

This commit is contained in:
ghoulslash 2021-10-16 10:15:15 -04:00
parent df2223a5bc
commit 611076c24d
2 changed files with 10 additions and 14 deletions

View File

@ -6642,7 +6642,6 @@ static void Cmd_jumptocalledmove(void)
else else
gChosenMove = gCurrentMove = gCalledMove; gChosenMove = gCurrentMove = gCalledMove;
gBattleStruct->atkCancellerTracker = 0;
gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect];
} }

View File

@ -3130,7 +3130,6 @@ enum
CANCELLER_POWDER_MOVE, CANCELLER_POWDER_MOVE,
CANCELLER_POWDER_STATUS, CANCELLER_POWDER_STATUS,
CANCELLER_THROAT_CHOP, CANCELLER_THROAT_CHOP,
CANCELLER_PRANKSTER,
CANCELLER_END, CANCELLER_END,
CANCELLER_PSYCHIC_TERRAIN, CANCELLER_PSYCHIC_TERRAIN,
CANCELLER_END2, CANCELLER_END2,
@ -3459,18 +3458,6 @@ u8 AtkCanceller_UnableToUseMove(void)
} }
gBattleStruct->atkCancellerTracker++; gBattleStruct->atkCancellerTracker++;
break; break;
case CANCELLER_PRANKSTER:
if (BlocksPrankster(gCurrentMove, gBattlerAttacker, gBattlerTarget, TRUE)
&& !(IS_MOVE_STATUS(gCurrentMove) && GetBattlerAbility(gBattlerTarget) == ABILITY_MAGIC_BOUNCE))
{
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(gBattleMoves[gCurrentMove].target & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)))
CancelMultiTurnMoves(gBattlerAttacker); // Don't cancel moves that can hit two targets bc one target might not be protected
gBattleScripting.battler = gBattlerAbility = gBattlerTarget;
gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster;
effect = 1;
}
gBattleStruct->atkCancellerTracker++;
break;
case CANCELLER_END: case CANCELLER_END:
break; break;
} }
@ -4572,6 +4559,16 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
gBattlescriptCurrInstr = BattleScript_DazzlingProtected; gBattlescriptCurrInstr = BattleScript_DazzlingProtected;
effect = 1; effect = 1;
} }
else if (BlocksPrankster(move, gBattlerAttacker, gBattlerTarget, TRUE)
&& !(IS_MOVE_STATUS(move) && GetBattlerAbility(gBattlerTarget) == ABILITY_MAGIC_BOUNCE))
{
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(gBattleMoves[move].target & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)))
CancelMultiTurnMoves(gBattlerAttacker); // Don't cancel moves that can hit two targets bc one target might not be protected
gBattleScripting.battler = gBattlerAbility = gBattlerTarget;
gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster;
effect = 1;
}
break; break;
case ABILITYEFFECT_ABSORBING: // 3 case ABILITYEFFECT_ABSORBING: // 3
if (move != MOVE_NONE) if (move != MOVE_NONE)