[Bug] Fix ability Download switch in (1669) (#1679)
* Update ability Dowbload * Remove whitespace * Update ability.ts
This commit is contained in:
parent
bb1dde5b0c
commit
fb21caa769
|
@ -1693,7 +1693,6 @@ export class DownloadAbAttr extends PostSummonAbAttr {
|
||||||
this.enemySpDef = 0;
|
this.enemySpDef = 0;
|
||||||
this.enemyCountTally = 0;
|
this.enemyCountTally = 0;
|
||||||
|
|
||||||
if (pokemon.getOpponents()[0].summonData !== undefined) {
|
|
||||||
for (const opponent of pokemon.getOpponents()) {
|
for (const opponent of pokemon.getOpponents()) {
|
||||||
this.enemyCountTally++;
|
this.enemyCountTally++;
|
||||||
this.enemyDef += opponent.getBattleStat(Stat.DEF);
|
this.enemyDef += opponent.getBattleStat(Stat.DEF);
|
||||||
|
@ -1701,7 +1700,6 @@ export class DownloadAbAttr extends PostSummonAbAttr {
|
||||||
}
|
}
|
||||||
this.enemyDef = Math.round(this.enemyDef / this.enemyCountTally);
|
this.enemyDef = Math.round(this.enemyDef / this.enemyCountTally);
|
||||||
this.enemySpDef = Math.round(this.enemySpDef / this.enemyCountTally);
|
this.enemySpDef = Math.round(this.enemySpDef / this.enemyCountTally);
|
||||||
}
|
|
||||||
|
|
||||||
if (this.enemyDef < this.enemySpDef) {
|
if (this.enemyDef < this.enemySpDef) {
|
||||||
this.stats = [BattleStat.ATK];
|
this.stats = [BattleStat.ATK];
|
||||||
|
|
Loading…
Reference in New Issue