mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 20:32:17 +02:00
Add Pressure consequences
This commit is contained in:
parent
e5b5448606
commit
3b17136b03
@ -1915,8 +1915,15 @@ export class LessPPMorePowerAttr extends VariablePowerAttr {
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const ppMax = move.pp;
|
||||
const ppUsed = user.moveset.find((m) => m.moveId === move.id).ppUsed;
|
||||
const ppRemains = ppMax - ppUsed;
|
||||
let ppUsed = user.moveset.find((m) => m.moveId === move.id).ppUsed;
|
||||
|
||||
if(target.hasAbility(Abilities.PRESSURE)) {
|
||||
ppUsed += 1;
|
||||
}
|
||||
|
||||
let ppRemains = ppMax - ppUsed;
|
||||
if(ppRemains < 0) ppRemains = 0;
|
||||
|
||||
const power = args[0] as Utils.NumberHolder;
|
||||
|
||||
switch (ppRemains) {
|
||||
|
Loading…
Reference in New Issue
Block a user