mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
implemented payback
This commit is contained in:
parent
c76f8c5e7e
commit
2587b23635
@ -1783,6 +1783,18 @@ 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 {
|
export class TurnDamagedDoublePowerAttr extends VariablePowerAttr {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
if (user.turnData.attacksReceived.find(r => r.damage && r.sourceId === target.id)) {
|
if (user.turnData.attacksReceived.find(r => r.damage && r.sourceId === target.id)) {
|
||||||
@ -4552,7 +4564,7 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.CLOSE_COMBAT, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 4)
|
new AttackMove(Moves.CLOSE_COMBAT, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 100, 5, 100, 0, 4)
|
||||||
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true),
|
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true),
|
||||||
new AttackMove(Moves.PAYBACK, Type.DARK, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 4)
|
new AttackMove(Moves.PAYBACK, Type.DARK, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 4)
|
||||||
.partial(),
|
.attr(LastAttackDoublePowerAttr),
|
||||||
new AttackMove(Moves.ASSURANCE, Type.DARK, MoveCategory.PHYSICAL, 60, 100, 10, -1, 0, 4)
|
new AttackMove(Moves.ASSURANCE, Type.DARK, MoveCategory.PHYSICAL, 60, 100, 10, -1, 0, 4)
|
||||||
.partial(),
|
.partial(),
|
||||||
new StatusMove(Moves.EMBARGO, Type.DARK, 100, 15, -1, 0, 4)
|
new StatusMove(Moves.EMBARGO, Type.DARK, 100, 15, -1, 0, 4)
|
||||||
|
Loading…
Reference in New Issue
Block a user