[Misc] Copy Encounter Phase logging to MEs (#5405)

This commit is contained in:
NightKev 2025-02-23 22:27:40 -08:00 committed by GitHub
parent 095634fe6d
commit 3ab75b297b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 2 deletions

View File

@ -47,6 +47,8 @@ import { StatusEffect } from "#enums/status-effect";
import { globalScene } from "#app/global-scene";
import { getPokemonSpecies } from "#app/data/pokemon-species";
import { Type } from "#app/enums/type";
import { getNatureName } from "#app/data/nature";
import { getPokemonNameWithAffix } from "#app/messages";
/**
* Animates exclamation sprite over trainer's head at start of encounter
@ -357,7 +359,31 @@ export async function initBattleWithEnemyConfig(partyConfig: EnemyPartyConfig):
loadEnemyAssets.push(enemyPokemon.loadAssets());
console.log(`Pokemon: ${enemyPokemon.name}`, `Species ID: ${enemyPokemon.species.speciesId}`, `Stats: ${enemyPokemon.stats}`, `Ability: ${enemyPokemon.getAbility().name}`, `Passive Ability: ${enemyPokemon.getPassiveAbility().name}`);
const stats: string[] = [
`HP: ${enemyPokemon.stats[0]} (${enemyPokemon.ivs[0]})`,
` Atk: ${enemyPokemon.stats[1]} (${enemyPokemon.ivs[1]})`,
` Def: ${enemyPokemon.stats[2]} (${enemyPokemon.ivs[2]})`,
` Spatk: ${enemyPokemon.stats[3]} (${enemyPokemon.ivs[3]})`,
` Spdef: ${enemyPokemon.stats[4]} (${enemyPokemon.ivs[4]})`,
` Spd: ${enemyPokemon.stats[5]} (${enemyPokemon.ivs[5]})`,
];
const moveset: string[] = [];
enemyPokemon.getMoveset().forEach((move) => {
moveset.push(move!.getName()); // TODO: remove `!` after moveset-null removal PR
});
console.log(
`Pokemon: ${getPokemonNameWithAffix(enemyPokemon)}`,
`| Species ID: ${enemyPokemon.species.speciesId}`,
`| Nature: ${getNatureName(enemyPokemon.nature, true, true, true)}`,
);
console.log(`Stats (IVs): ${stats}`);
console.log(
`Ability: ${enemyPokemon.getAbility().name}`,
`| Passive Ability${enemyPokemon.hasPassive() ? "" : " (inactive)"}: ${enemyPokemon.getPassiveAbility().name}`,
`${enemyPokemon.isBoss() ? `| Boss Bars: ${enemyPokemon.bossSegments}` : ""}`
);
console.log("Moveset:", moveset);
});
globalScene.pushPhase(new MysteryEncounterBattlePhase(partyConfig.disableSwitch));

View File

@ -167,7 +167,7 @@ export class EncounterPhase extends BattlePhase {
];
const moveset: string[] = [];
enemyPokemon.getMoveset().forEach((move) => {
moveset.push(move!.getName());
moveset.push(move!.getName()); // TODO: remove `!` after moveset-null removal PR
});
console.log(