mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 13:59:27 +02:00
Use selectWithTera
This commit is contained in:
parent
76cc1344a0
commit
2786efe57c
@ -7824,8 +7824,8 @@ export function initAbilities() {
|
|||||||
new Ability(AbilityId.TOXIC_CHAIN, 9)
|
new Ability(AbilityId.TOXIC_CHAIN, 9)
|
||||||
.attr(PostAttackApplyStatusEffectAbAttr, false, 30, StatusEffect.TOXIC),
|
.attr(PostAttackApplyStatusEffectAbAttr, false, 30, StatusEffect.TOXIC),
|
||||||
new Ability(AbilityId.EMBODY_ASPECT_TEAL, 9)
|
new Ability(AbilityId.EMBODY_ASPECT_TEAL, 9)
|
||||||
.attr(PostSummonStatStageChangeAbAttr, [ Stat.SPD ], 1, true) //Activiates on switch in when tera'd
|
.attr(PostSummonStatStageChangeAbAttr, [ Stat.SPD ], 1, true) //Activiates on switch in when Terastallized
|
||||||
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.SPD ], 1) //Activates mid round when tera'd
|
.attr(PostTeraFormChangeStatChangeAbAttr, [ Stat.SPD ], 1) //Activates mid round when Terastallized
|
||||||
.uncopiable()
|
.uncopiable()
|
||||||
.unreplaceable() // TODO is this true?
|
.unreplaceable() // TODO is this true?
|
||||||
.attr(NoTransformAbilityAbAttr)
|
.attr(NoTransformAbilityAbAttr)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { Stat } from "#enums/stat";
|
import { Stat } from "#enums/stat";
|
||||||
|
import { QuietFormChangePhase } from "#phases/quiet-form-change-phase";
|
||||||
import { GameManager } from "#test/test-utils/game-manager";
|
import { GameManager } from "#test/test-utils/game-manager";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
@ -11,7 +11,7 @@ describe("Ability - Embody Aspect", () => {
|
|||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
|
||||||
// const teraForm = 4;
|
const teraForm = 4;
|
||||||
const baseForm = 0;
|
const baseForm = 0;
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
@ -27,6 +27,7 @@ describe("Ability - Embody Aspect", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
game = new GameManager(phaserGame);
|
game = new GameManager(phaserGame);
|
||||||
game.override
|
game.override
|
||||||
|
.moveset([MoveId.SPLASH])
|
||||||
.ability(AbilityId.EMBODY_ASPECT_TEAL)
|
.ability(AbilityId.EMBODY_ASPECT_TEAL)
|
||||||
.battleStyle("single")
|
.battleStyle("single")
|
||||||
.criticalHits(false)
|
.criticalHits(false)
|
||||||
@ -40,15 +41,13 @@ describe("Ability - Embody Aspect", () => {
|
|||||||
const Ogerpon = game.scene.getPlayerParty()[0];
|
const Ogerpon = game.scene.getPlayerParty()[0];
|
||||||
expect(Ogerpon.formIndex).toBe(baseForm);
|
expect(Ogerpon.formIndex).toBe(baseForm);
|
||||||
|
|
||||||
game.field.forceTera(Ogerpon, PokemonType.GRASS);
|
//Also terastallizes Ogerpon
|
||||||
game.move.use(MoveId.SPLASH);
|
game.move.selectWithTera(MoveId.SPLASH);
|
||||||
|
|
||||||
// todo: add helper function to activiate tera related abilities
|
|
||||||
// await game.phaseInterceptor.to(QuietFormChangePhase);
|
|
||||||
// expect(Ogerpon.formIndex).toBe(teraForm);
|
|
||||||
// expect(Ogerpon.getStatStage(Stat.SPD)).toBe(1);
|
|
||||||
|
|
||||||
|
await game.phaseInterceptor.to(QuietFormChangePhase);
|
||||||
|
expect(Ogerpon.formIndex).toBe(teraForm);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
expect(Ogerpon.getStatStage(Stat.SPD)).toBe(1);
|
||||||
|
|
||||||
//Switch Ogerpon out
|
//Switch Ogerpon out
|
||||||
game.doSwitchPokemon(1);
|
game.doSwitchPokemon(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user