From 8cb7cff3727f9ce478cf475f81db87f179a8d10f Mon Sep 17 00:00:00 2001 From: Luc Date: Fri, 19 Apr 2024 00:35:22 -0400 Subject: [PATCH] refactored payback + now doubles on item usage --- src/data/move.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index a7b9a9f6aef..c4efa730852 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1783,18 +1783,6 @@ export class FirstAttackDoublePowerAttr extends VariablePowerAttr { } } -export class LastAttackDoublePowerAttr extends VariablePowerAttr { - apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - console.log(target.getLastXMoves(1), target.scene.currentBattle.turn); - if (target.getLastXMoves(1).find(m => m.turn === target.scene.currentBattle.turn)) { - (args[0] as Utils.NumberHolder).value *= 2; - return true; - } - - return false; - } -} - export class TurnDamagedDoublePowerAttr extends VariablePowerAttr { apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { if (user.turnData.attacksReceived.find(r => r.damage && r.sourceId === target.id)) { @@ -4564,7 +4552,7 @@ export function initMoves() { new AttackMove(Moves.CLOSE_COMBAT, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 4) .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true), new AttackMove(Moves.PAYBACK, Type.DARK, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 4) - .attr(LastAttackDoublePowerAttr), + .attr(MovePowerMultiplierAttr, (user, target, move) => target.getLastXMoves(1).find(m => m.turn === target.scene.currentBattle.turn) || user.scene.currentBattle.turnCommands[target.getBattlerIndex()].command === Command.BALL ? 2 : 1), new AttackMove(Moves.ASSURANCE, Type.DARK, MoveCategory.PHYSICAL, 60, 100, 10, -1, 0, 4) .partial(), new StatusMove(Moves.EMBARGO, Type.DARK, 100, 15, -1, 0, 4)