mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Fix formatting
This commit is contained in:
parent
e5b922a662
commit
297b5de145
@ -947,22 +947,22 @@ export class DownloadAbAttr extends PostSummonAbAttr {
|
|||||||
private stats: BattleStat[];
|
private stats: BattleStat[];
|
||||||
|
|
||||||
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||||
this.enemyDef = 0;
|
this.enemyDef = 0;
|
||||||
this.enemySpDef = 0;
|
this.enemySpDef = 0;
|
||||||
|
|
||||||
for (let opponent of pokemon.getOpponents()) {
|
for (let opponent of pokemon.getOpponents()) {
|
||||||
this.enemyDef += opponent.stats[BattleStat.DEF];
|
this.enemyDef += opponent.stats[BattleStat.DEF];
|
||||||
this.enemySpDef += opponent.stats[BattleStat.SPDEF];
|
this.enemySpDef += opponent.stats[BattleStat.SPDEF];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.enemyDef < this.enemySpDef)
|
if (this.enemyDef < this.enemySpDef)
|
||||||
this.stats = [BattleStat.ATK];
|
this.stats = [BattleStat.ATK];
|
||||||
else
|
else
|
||||||
this.stats = [BattleStat.SPATK];
|
this.stats = [BattleStat.SPATK];
|
||||||
|
|
||||||
if (this.enemyDef > 0 && this.enemySpDef > 0) { // only activate if there's actually an enemy to download from
|
if (this.enemyDef > 0 && this.enemySpDef > 0) { // only activate if there's actually an enemy to download from
|
||||||
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, this.stats, 1));
|
pokemon.scene.unshiftPhase(new StatChangePhase(pokemon.scene, pokemon.getBattlerIndex(), false, this.stats, 1));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user