mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-18 22:32:32 +02:00
just add swapping logic after calculation will fine
This commit is contained in:
parent
7cbcf6ee96
commit
68d268db53
@ -66,8 +66,6 @@ import { PlayerGender } from "#enums/player-gender";
|
||||
import { Species } from "#enums/species";
|
||||
import { UiTheme } from "#enums/ui-theme";
|
||||
import { TimedEventManager } from "#app/timed-event-manager.js";
|
||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||
import { Stat } from "./data/pokemon-stat";
|
||||
|
||||
export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
|
||||
|
||||
@ -2393,9 +2391,6 @@ export default class BattleScene extends SceneBase {
|
||||
Promise.allSettled(party.map(p => {
|
||||
if (p.scene) {
|
||||
p.calculateStats();
|
||||
if (p.getTag(BattlerTagType.POWER_TRICK)) {
|
||||
[p.stats[Stat.ATK], p.stats[Stat.DEF]] = [p.stats[Stat.DEF], p.stats[Stat.ATK]];
|
||||
}
|
||||
}
|
||||
return p.updateInfo(instant);
|
||||
})).then(() => resolve());
|
||||
|
@ -754,6 +754,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
this.stats[s] = value;
|
||||
}
|
||||
if (this.getTag(BattlerTagType.POWER_TRICK)) {
|
||||
[this.stats[Stat.ATK], this.stats[Stat.DEF]] = [this.stats[Stat.DEF], this.stats[Stat.ATK]];
|
||||
}
|
||||
}
|
||||
|
||||
getNature(): Nature {
|
||||
@ -2287,9 +2290,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
this.loadAssets().then(() => {
|
||||
this.calculateStats();
|
||||
this.scene.updateModifiers(this.isPlayer(), true);
|
||||
if (this.getTag(BattlerTagType.POWER_TRICK)) {
|
||||
[this.stats[Stat.ATK], this.stats[Stat.DEF]] = [this.stats[Stat.DEF], this.stats[Stat.ATK]];
|
||||
}
|
||||
Promise.all([ this.updateInfo(), this.scene.updateFieldScale() ]).then(() => resolve());
|
||||
});
|
||||
});
|
||||
@ -3302,9 +3302,6 @@ export class PlayerPokemon extends Pokemon {
|
||||
this.loadAssets().then(() => {
|
||||
this.calculateStats();
|
||||
this.scene.updateModifiers(true, true);
|
||||
if (this.getTag(BattlerTagType.POWER_TRICK)) {
|
||||
[this.stats[Stat.ATK], this.stats[Stat.DEF]] = [this.stats[Stat.DEF], this.stats[Stat.ATK]];
|
||||
}
|
||||
this.updateInfo(true).then(() => resolve());
|
||||
});
|
||||
};
|
||||
|
@ -4576,9 +4576,6 @@ export class LevelUpPhase extends PlayerPartyMemberPokemonPhase {
|
||||
this.scene.unshiftPhase(new EvolutionPhase(this.scene, pokemon as PlayerPokemon, evolution, this.lastLevel));
|
||||
}
|
||||
}
|
||||
if (pokemon.getTag(BattlerTagType.POWER_TRICK)) {
|
||||
[pokemon.stats[Stat.ATK], pokemon.stats[Stat.DEF]] = [pokemon.stats[Stat.DEF], pokemon.stats[Stat.ATK]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user