mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 12:52:20 +02:00
Update comments to adjust ways of working
This commit is contained in:
parent
d94e7134d1
commit
eb49ebe4e9
@ -2036,10 +2036,10 @@ export class VariablePowerAttr extends MoveAttr {
|
|||||||
export class LessPPMorePowerAttr extends VariablePowerAttr {
|
export class LessPPMorePowerAttr extends VariablePowerAttr {
|
||||||
/**
|
/**
|
||||||
* Power up moves when less PP user has
|
* Power up moves when less PP user has
|
||||||
* @param user Pokemon that used the move
|
* @param user {@linkcode Pokemon} using this move
|
||||||
* @param target The target of the move
|
* @param target {@linkcode Pokemon} target of this move
|
||||||
* @param move Move with this attribute
|
* @param move {@linkcode Move} being used
|
||||||
* @param args Utils.NumberHolder for calculating power
|
* @param args [0] {@linkcode Utils.NumberHolder} of power
|
||||||
* @returns true if the function succeeds
|
* @returns true if the function succeeds
|
||||||
*/
|
*/
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
@ -2047,6 +2047,7 @@ export class LessPPMorePowerAttr extends VariablePowerAttr {
|
|||||||
let ppUsed = user.moveset.find((m) => m.moveId === move.id).ppUsed;
|
let ppUsed = user.moveset.find((m) => m.moveId === move.id).ppUsed;
|
||||||
|
|
||||||
let ppRemains = ppMax - ppUsed;
|
let ppRemains = ppMax - ppUsed;
|
||||||
|
/** Reduce to 0 to avoid negative numbers if user has 1PP before attack and target has Ability.PRESSURE */
|
||||||
if(ppRemains < 0) ppRemains = 0;
|
if(ppRemains < 0) ppRemains = 0;
|
||||||
|
|
||||||
const power = args[0] as Utils.NumberHolder;
|
const power = args[0] as Utils.NumberHolder;
|
||||||
|
Loading…
Reference in New Issue
Block a user