Removed bangs from getEnemyParty and getPlayerParty

This commit is contained in:
Bertie690 2025-07-30 18:08:14 -04:00
parent 17eeceb4f3
commit 5d4e93b009
3 changed files with 13 additions and 15 deletions

View File

@ -134,7 +134,7 @@ describe("Abilities - Disguise", () => {
}); });
await game.classicMode.startBattle([SpeciesId.FURRET, SpeciesId.MIMIKYU]); await game.classicMode.startBattle([SpeciesId.FURRET, SpeciesId.MIMIKYU]);
const mimikyu = game.scene.getPlayerParty()[1]!; const mimikyu = game.scene.getPlayerParty()[1];
expect(mimikyu.formIndex).toBe(bustedForm); expect(mimikyu.formIndex).toBe(bustedForm);
game.move.select(MoveId.SPLASH); game.move.select(MoveId.SPLASH);

View File

@ -64,11 +64,9 @@ describe("Boss Pokemon / Shields", () => {
it("should reduce the number of shields if we are in a double battle", async () => { it("should reduce the number of shields if we are in a double battle", async () => {
game.override.battleStyle("double").startingWave(150); // Floor 150 > 2 shields / 3 health segments game.override.battleStyle("double").startingWave(150); // Floor 150 > 2 shields / 3 health segments
await game.classicMode.startBattle([SpeciesId.MEWTWO]); await game.classicMode.startBattle([SpeciesId.MEWTWO]);
const boss1: EnemyPokemon = game.scene.getEnemyParty()[0]!; const [boss1, boss2] = game.scene.getEnemyParty();
const boss2: EnemyPokemon = game.scene.getEnemyParty()[1]!;
expect(boss1.isBoss()).toBe(true); expect(boss1.isBoss()).toBe(true);
expect(boss1.bossSegments).toBe(2); expect(boss1.bossSegments).toBe(2);
expect(boss2.isBoss()).toBe(true); expect(boss2.isBoss()).toBe(true);
@ -112,7 +110,7 @@ describe("Boss Pokemon / Shields", () => {
// In this test we want to break through 3 shields at once // In this test we want to break through 3 shields at once
const brokenShields = 3; const brokenShields = 3;
const boss1: EnemyPokemon = game.scene.getEnemyParty()[0]!; const boss1: EnemyPokemon = game.scene.getEnemyParty()[0];
const boss1SegmentHp = boss1.getMaxHp() / boss1.bossSegments; const boss1SegmentHp = boss1.getMaxHp() / boss1.bossSegments;
const requiredDamageBoss1 = boss1SegmentHp * (1 + Math.pow(2, brokenShields)); const requiredDamageBoss1 = boss1SegmentHp * (1 + Math.pow(2, brokenShields));
expect(boss1.isBoss()).toBe(true); expect(boss1.isBoss()).toBe(true);
@ -124,7 +122,7 @@ describe("Boss Pokemon / Shields", () => {
expect(boss1.bossSegmentIndex).toBe(1); expect(boss1.bossSegmentIndex).toBe(1);
expect(boss1.hp).toBe(boss1.getMaxHp() - toDmgValue(boss1SegmentHp * 3)); expect(boss1.hp).toBe(boss1.getMaxHp() - toDmgValue(boss1SegmentHp * 3));
const boss2: EnemyPokemon = game.scene.getEnemyParty()[1]!; const boss2: EnemyPokemon = game.scene.getEnemyParty()[1];
const boss2SegmentHp = boss2.getMaxHp() / boss2.bossSegments; const boss2SegmentHp = boss2.getMaxHp() / boss2.bossSegments;
const requiredDamageBoss2 = boss2SegmentHp * (1 + Math.pow(2, brokenShields)); const requiredDamageBoss2 = boss2SegmentHp * (1 + Math.pow(2, brokenShields));
@ -144,7 +142,7 @@ describe("Boss Pokemon / Shields", () => {
await game.classicMode.startBattle([SpeciesId.MEWTWO]); await game.classicMode.startBattle([SpeciesId.MEWTWO]);
const boss1: EnemyPokemon = game.scene.getEnemyParty()[0]!; const boss1: EnemyPokemon = game.scene.getEnemyParty()[0];
const boss1SegmentHp = boss1.getMaxHp() / boss1.bossSegments; const boss1SegmentHp = boss1.getMaxHp() / boss1.bossSegments;
const singleShieldDamage = Math.ceil(boss1SegmentHp); const singleShieldDamage = Math.ceil(boss1SegmentHp);
expect(boss1.isBoss()).toBe(true); expect(boss1.isBoss()).toBe(true);
@ -167,7 +165,7 @@ describe("Boss Pokemon / Shields", () => {
expect(getTotalStatStageBoosts(boss1)).toBe(totalStatStages); expect(getTotalStatStageBoosts(boss1)).toBe(totalStatStages);
} }
const boss2: EnemyPokemon = game.scene.getEnemyParty()[1]!; const boss2: EnemyPokemon = game.scene.getEnemyParty()[1];
const boss2SegmentHp = boss2.getMaxHp() / boss2.bossSegments; const boss2SegmentHp = boss2.getMaxHp() / boss2.bossSegments;
const requiredDamage = boss2SegmentHp * (1 + Math.pow(2, shieldsToBreak - 1)); const requiredDamage = boss2SegmentHp * (1 + Math.pow(2, shieldsToBreak - 1));

View File

@ -76,10 +76,10 @@ describe("Moves - Dragon Tail", () => {
game.override.battleStyle("double").enemyMoveset(MoveId.SPLASH).enemyAbility(AbilityId.ROUGH_SKIN); game.override.battleStyle("double").enemyMoveset(MoveId.SPLASH).enemyAbility(AbilityId.ROUGH_SKIN);
await game.classicMode.startBattle([SpeciesId.DRATINI, SpeciesId.DRATINI, SpeciesId.WAILORD, SpeciesId.WAILORD]); await game.classicMode.startBattle([SpeciesId.DRATINI, SpeciesId.DRATINI, SpeciesId.WAILORD, SpeciesId.WAILORD]);
const leadPokemon = game.scene.getPlayerParty()[0]!; const leadPokemon = game.scene.getPlayerParty()[0];
const enemyLeadPokemon = game.scene.getEnemyParty()[0]!; const enemyLeadPokemon = game.scene.getEnemyParty()[0];
const enemySecPokemon = game.scene.getEnemyParty()[1]!; const enemySecPokemon = game.scene.getEnemyParty()[1];
game.move.select(MoveId.DRAGON_TAIL, 0, BattlerIndex.ENEMY); game.move.select(MoveId.DRAGON_TAIL, 0, BattlerIndex.ENEMY);
game.move.select(MoveId.SPLASH, 1); game.move.select(MoveId.SPLASH, 1);
@ -105,11 +105,11 @@ describe("Moves - Dragon Tail", () => {
game.override.battleStyle("double").enemyMoveset(MoveId.SPLASH).enemyAbility(AbilityId.ROUGH_SKIN); game.override.battleStyle("double").enemyMoveset(MoveId.SPLASH).enemyAbility(AbilityId.ROUGH_SKIN);
await game.classicMode.startBattle([SpeciesId.DRATINI, SpeciesId.DRATINI, SpeciesId.WAILORD, SpeciesId.WAILORD]); await game.classicMode.startBattle([SpeciesId.DRATINI, SpeciesId.DRATINI, SpeciesId.WAILORD, SpeciesId.WAILORD]);
const leadPokemon = game.scene.getPlayerParty()[0]!; const leadPokemon = game.scene.getPlayerParty()[0];
const secPokemon = game.scene.getPlayerParty()[1]!; const secPokemon = game.scene.getPlayerParty()[1];
const enemyLeadPokemon = game.scene.getEnemyParty()[0]!; const enemyLeadPokemon = game.scene.getEnemyParty()[0];
const enemySecPokemon = game.scene.getEnemyParty()[1]!; const enemySecPokemon = game.scene.getEnemyParty()[1];
game.move.select(MoveId.DRAGON_TAIL, 0, BattlerIndex.ENEMY); game.move.select(MoveId.DRAGON_TAIL, 0, BattlerIndex.ENEMY);
// target the same pokemon, second move should be redirected after first flees // target the same pokemon, second move should be redirected after first flees