mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-19 06:42:20 +02:00
Power Trick Interaction with transfer summon
& changeForm
This commit is contained in:
parent
8becfdfc4e
commit
8a5a8ebd2c
@ -2247,6 +2247,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6)) {
|
if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6)) {
|
||||||
this.scene.validateAchv(achvs.TRANSFER_MAX_BATTLE_STAT);
|
this.scene.validateAchv(achvs.TRANSFER_MAX_BATTLE_STAT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.getTag(BattlerTagType.POWER_TRICK)) {
|
||||||
|
[this.stats[Stat.ATK], this.stats[Stat.DEF]] = [this.stats[Stat.DEF], this.stats[Stat.ATK]];
|
||||||
|
}
|
||||||
|
|
||||||
this.updateInfo();
|
this.updateInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2292,6 +2297,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
this.loadAssets().then(() => {
|
this.loadAssets().then(() => {
|
||||||
this.calculateStats();
|
this.calculateStats();
|
||||||
this.scene.updateModifiers(this.isPlayer(), true);
|
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());
|
Promise.all([ this.updateInfo(), this.scene.updateFieldScale() ]).then(() => resolve());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -3303,6 +3313,11 @@ export class PlayerPokemon extends Pokemon {
|
|||||||
this.loadAssets().then(() => {
|
this.loadAssets().then(() => {
|
||||||
this.calculateStats();
|
this.calculateStats();
|
||||||
this.scene.updateModifiers(true, true);
|
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());
|
this.updateInfo(true).then(() => resolve());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user