mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 15:52:18 +02:00
Add documentation
This commit is contained in:
parent
d7d326b5a7
commit
639f615971
@ -2045,6 +2045,9 @@ export class PostSummonRemoveArenaTagAbAttr extends PostSummonAbAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic class to add an arena tag upon switching in
|
||||||
|
*/
|
||||||
export class PostSummonAddArenaTagAbAttr extends PostSummonAbAttr {
|
export class PostSummonAddArenaTagAbAttr extends PostSummonAbAttr {
|
||||||
private tagType: ArenaTagType;
|
private tagType: ArenaTagType;
|
||||||
private turnCount: number;
|
private turnCount: number;
|
||||||
@ -2779,6 +2782,9 @@ export class PreLeaveFieldClearWeatherAbAttr extends PreLeaveFieldAbAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates the active {@linkcode SuppressAbilitiesTag} when a pokemon with {@linkcode Abilities.NEUTRALIZING_GAS} leaves the field
|
||||||
|
*/
|
||||||
export class PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr extends PreLeaveFieldAbAttr {
|
export class PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr extends PreLeaveFieldAbAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super(false);
|
super(false);
|
||||||
@ -2789,10 +2795,10 @@ export class PreLeaveFieldRemoveSuppressAbilitiesSourceAbAttr extends PreLeaveFi
|
|||||||
const suppressTag = globalScene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS) as SuppressAbilitiesTag;
|
const suppressTag = globalScene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS) as SuppressAbilitiesTag;
|
||||||
if (suppressTag) {
|
if (suppressTag) {
|
||||||
suppressTag.onSourceLeave(globalScene.arena);
|
suppressTag.onSourceLeave(globalScene.arena);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1221,6 +1221,13 @@ export class FairyLockTag extends ArenaTag {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Arena tag class for {@link https://bulbapedia.bulbagarden.net/wiki/Neutralizing_Gas_(Ability) Neutralizing Gas}
|
||||||
|
*
|
||||||
|
* Keeps track of the number of pokemon on the field with Neutralizing Gas - If it drops to zero, the effect is ended and abilities are reactivated
|
||||||
|
*
|
||||||
|
* Additionally ends onLose abilities when it is activated
|
||||||
|
*/
|
||||||
export class SuppressAbilitiesTag extends ArenaTag {
|
export class SuppressAbilitiesTag extends ArenaTag {
|
||||||
sourceCount: number;
|
sourceCount: number;
|
||||||
|
|
||||||
|
@ -55,8 +55,7 @@ describe("Abilities - Neutralizing Gas", () => {
|
|||||||
expect(game.scene.getPlayerPokemon()?.getStatStage(Stat.ATK)).toBe(1);
|
expect(game.scene.getPlayerPokemon()?.getStatStage(Stat.ATK)).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Note - this passes right now because ability order doesn't consider speed at all
|
it.todo("should activate before other abilities", async () => {
|
||||||
it("should activate before other abilities", async () => {
|
|
||||||
game.override.enemySpecies(Species.ACCELGOR)
|
game.override.enemySpecies(Species.ACCELGOR)
|
||||||
.enemyLevel(100)
|
.enemyLevel(100)
|
||||||
.enemyAbility(Abilities.INTIMIDATE);
|
.enemyAbility(Abilities.INTIMIDATE);
|
||||||
|
Loading…
Reference in New Issue
Block a user