mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
reduced whitespace
This commit is contained in:
parent
b084d1f400
commit
341dd834e3
@ -3307,12 +3307,9 @@ export class ReducePpMoveAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
// Null checks can be skipped due to condition function
|
// Null checks can be skipped due to condition function
|
||||||
|
|
||||||
const lastMove = target.getLastXMoves().find(() => true);
|
const lastMove = target.getLastXMoves().find(() => true);
|
||||||
|
|
||||||
if(lastMove === undefined)
|
if(lastMove === undefined)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const movesetMove = target.getMoveset().find(m => m.moveId === lastMove.move);
|
const movesetMove = target.getMoveset().find(m => m.moveId === lastMove.move);
|
||||||
const lastPpUsed = movesetMove.ppUsed;
|
const lastPpUsed = movesetMove.ppUsed;
|
||||||
movesetMove.ppUsed = Math.min(movesetMove.ppUsed + this.ppDrain, movesetMove.getMovePp());
|
movesetMove.ppUsed = Math.min(movesetMove.ppUsed + this.ppDrain, movesetMove.getMovePp());
|
||||||
|
Loading…
Reference in New Issue
Block a user