mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
Update documentation
This commit is contained in:
parent
ce8bc325f6
commit
ab58381c50
@ -3081,7 +3081,7 @@ export class PostSummonUserFieldRemoveStatusEffectAbAttr extends PostSummonAbAtt
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const p of pokemon.getAlliedField()) {
|
for (const p of pokemon.getAlliesGenerator()) {
|
||||||
if (p.status && this.statusEffect.includes(p.status.effect)) {
|
if (p.status && this.statusEffect.includes(p.status.effect)) {
|
||||||
globalScene.phaseManager.queueMessage(getStatusEffectHealText(p.status.effect, getPokemonNameWithAffix(p)));
|
globalScene.phaseManager.queueMessage(getStatusEffectHealText(p.status.effect, getPokemonNameWithAffix(p)));
|
||||||
p.resetStatus(false);
|
p.resetStatus(false);
|
||||||
|
@ -1280,7 +1280,7 @@ class TailwindTag extends SerializableArenaTag {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const pokemon of source.getAlliedField()) {
|
for (const pokemon of source.getAlliesGenerator()) {
|
||||||
// Apply the CHARGED tag to party members with the WIND_POWER ability
|
// Apply the CHARGED tag to party members with the WIND_POWER ability
|
||||||
// TODO: This should not be handled here
|
// TODO: This should not be handled here
|
||||||
if (pokemon.hasAbility(AbilityId.WIND_POWER) && !pokemon.getTag(BattlerTagType.CHARGED)) {
|
if (pokemon.hasAbility(AbilityId.WIND_POWER) && !pokemon.getTag(BattlerTagType.CHARGED)) {
|
||||||
|
@ -860,7 +860,7 @@ export abstract class Move implements Localizable {
|
|||||||
aura.apply({pokemon: source, simulated, opponent: target, move: this, power});
|
aura.apply({pokemon: source, simulated, opponent: target, move: this, power});
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const p of source.getAlliedField()) {
|
for (const p of source.getAlliesGenerator()) {
|
||||||
applyAbAttrs("UserFieldMoveTypePowerBoostAbAttr", {pokemon: p, opponent: target, move: this, simulated, power});
|
applyAbAttrs("UserFieldMoveTypePowerBoostAbAttr", {pokemon: p, opponent: target, move: this, simulated, power});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2465,7 +2465,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!cancelledHolder.value) {
|
if (!cancelledHolder.value) {
|
||||||
for (const p of this.getAlliedField()) {
|
for (const p of this.getAlliesGenerator()) {
|
||||||
applyAbAttrs("FieldPriorityMoveImmunityAbAttr", {
|
applyAbAttrs("FieldPriorityMoveImmunityAbAttr", {
|
||||||
pokemon: p,
|
pokemon: p,
|
||||||
opponent: source,
|
opponent: source,
|
||||||
@ -3233,7 +3233,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the pokemon that oppose this one and are active
|
* Returns the pokemon that oppose this one and are active in non-speed order
|
||||||
*
|
*
|
||||||
* @param onField - whether to also check if the pokemon is currently on the field (defaults to true)
|
* @param onField - whether to also check if the pokemon is currently on the field (defaults to true)
|
||||||
*/
|
*/
|
||||||
@ -3243,6 +3243,9 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns A generator of pokemon that oppose this one in speed order
|
||||||
|
*/
|
||||||
public getOpponentsGenerator(): Generator<Pokemon, number> {
|
public getOpponentsGenerator(): Generator<Pokemon, number> {
|
||||||
return inSpeedOrder(this.isPlayer() ? ArenaTagSide.ENEMY : ArenaTagSide.PLAYER);
|
return inSpeedOrder(this.isPlayer() ? ArenaTagSide.ENEMY : ArenaTagSide.PLAYER);
|
||||||
}
|
}
|
||||||
@ -3256,11 +3259,9 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Pokémon on the allied field.
|
|
||||||
*
|
|
||||||
* @returns An generator of Pokémon on the allied field in speed order.
|
* @returns An generator of Pokémon on the allied field in speed order.
|
||||||
*/
|
*/
|
||||||
getAlliedField(): Generator<Pokemon, number> {
|
getAlliesGenerator(): Generator<Pokemon, number> {
|
||||||
return inSpeedOrder(this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY);
|
return inSpeedOrder(this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4025,7 +4026,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
const cancelled = new BooleanHolder(false);
|
const cancelled = new BooleanHolder(false);
|
||||||
applyAbAttrs("BattlerTagImmunityAbAttr", { pokemon: this, tag: stubTag, cancelled, simulated: true });
|
applyAbAttrs("BattlerTagImmunityAbAttr", { pokemon: this, tag: stubTag, cancelled, simulated: true });
|
||||||
|
|
||||||
for (const pokemon of this.getAlliedField()) {
|
for (const pokemon of this.getAlliesGenerator()) {
|
||||||
applyAbAttrs("UserFieldBattlerTagImmunityAbAttr", {
|
applyAbAttrs("UserFieldBattlerTagImmunityAbAttr", {
|
||||||
pokemon,
|
pokemon,
|
||||||
tag: stubTag,
|
tag: stubTag,
|
||||||
@ -4067,7 +4068,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const pokemon of this.getAlliedField()) {
|
for (const pokemon of this.getAlliesGenerator()) {
|
||||||
applyAbAttrs("UserFieldBattlerTagImmunityAbAttr", { pokemon, tag: newTag, cancelled, target: this });
|
applyAbAttrs("UserFieldBattlerTagImmunityAbAttr", { pokemon, tag: newTag, cancelled, target: this });
|
||||||
if (cancelled.value) {
|
if (cancelled.value) {
|
||||||
return false;
|
return false;
|
||||||
@ -4785,7 +4786,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const pokemon of this.getAlliedField()) {
|
for (const pokemon of this.getAlliesGenerator()) {
|
||||||
applyAbAttrs("UserFieldStatusEffectImmunityAbAttr", {
|
applyAbAttrs("UserFieldStatusEffectImmunityAbAttr", {
|
||||||
pokemon,
|
pokemon,
|
||||||
effect,
|
effect,
|
||||||
|
@ -1915,7 +1915,7 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier {
|
|||||||
// Remove the Pokemon's FAINT status
|
// Remove the Pokemon's FAINT status
|
||||||
pokemon.resetStatus(true, false, true, false);
|
pokemon.resetStatus(true, false, true, false);
|
||||||
|
|
||||||
for (const p of pokemon.getAlliedField()) {
|
for (const p of pokemon.getAlliesGenerator()) {
|
||||||
applyAbAttrs("CommanderAbAttr", { pokemon: p });
|
applyAbAttrs("CommanderAbAttr", { pokemon: p });
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -39,7 +39,7 @@ export class PostSummonPhase extends PokemonPhase {
|
|||||||
) {
|
) {
|
||||||
pokemon.lapseTag(BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON);
|
pokemon.lapseTag(BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON);
|
||||||
}
|
}
|
||||||
for (const p of pokemon.getAlliedField()) {
|
for (const p of pokemon.getAlliesGenerator()) {
|
||||||
applyAbAttrs("CommanderAbAttr", { pokemon: p });
|
applyAbAttrs("CommanderAbAttr", { pokemon: p });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user