mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-20 16:42:45 +02:00
Merge fb11f7377b
into 4b70fab608
This commit is contained in:
commit
4eab8a9769
@ -3903,7 +3903,12 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr {
|
||||
const targets = pokemon.getOpponents();
|
||||
const target = this.getTarget(targets);
|
||||
|
||||
if (target.summonData.illusion) {
|
||||
//Prevents Imposter from triggering on a transformed target or if the user is already transformed
|
||||
if (pokemon?.isTransformed() || target?.isTransformed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target?.summonData?.illusion) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -7616,7 +7616,6 @@ export class TransformAttr extends MoveEffectAttr {
|
||||
|
||||
globalScene.phaseManager.unshiftNew("PokemonTransformPhase", user.getBattlerIndex(), target.getBattlerIndex());
|
||||
|
||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:transformedIntoTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) }));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1062,6 +1062,10 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
return species;
|
||||
}
|
||||
|
||||
isTransformed(): boolean {
|
||||
return this.summonData.speciesForm !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {boolean} useIllusion - Whether we want the fusionSpeciesForm of the illusion or not.
|
||||
*/
|
||||
|
@ -339,6 +339,17 @@ export class MovePhase extends BattlePhase {
|
||||
this.showMoveText();
|
||||
}
|
||||
|
||||
if (
|
||||
//Prevent using Transform if either the user or target is already transformed
|
||||
this.move.getMove().id === MoveId.TRANSFORM &&
|
||||
(targets[0].isTransformed() || this.pokemon.isTransformed())
|
||||
) {
|
||||
this.showMoveText();
|
||||
this.showFailedText();
|
||||
this.end();
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear out any two turn moves once they've been used.
|
||||
// TODO: Refactor move queues and remove this assignment;
|
||||
// Move queues should be handled by the calling `CommandPhase` or a manager for it
|
||||
|
Loading…
Reference in New Issue
Block a user