mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Move if check in acupressure up
This commit is contained in:
parent
fcce5998ed
commit
b17539c475
@ -1482,8 +1482,8 @@ export class AcupressureStatChangeAttr extends MoveEffectAttr {
|
|||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise<boolean> {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean | Promise<boolean> {
|
||||||
let randStats = [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD, BattleStat.ACC, BattleStat.EVA ];
|
let randStats = [ BattleStat.ATK, BattleStat.DEF, BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD, BattleStat.ACC, BattleStat.EVA ];
|
||||||
randStats = randStats.filter(s => target.summonData.battleStats[s] < 6);
|
randStats = randStats.filter(s => target.summonData.battleStats[s] < 6);
|
||||||
let boostStat = [randStats[Utils.randInt(randStats.length)]];
|
if (randStats.length > 0) {
|
||||||
if (boostStat.length > 0) {
|
let boostStat = [randStats[Utils.randInt(randStats.length)]];
|
||||||
user.scene.unshiftPhase(new StatChangePhase(user.scene, target.getBattlerIndex(), this.selfTarget, boostStat, 2));
|
user.scene.unshiftPhase(new StatChangePhase(user.scene, target.getBattlerIndex(), this.selfTarget, boostStat, 2));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user