pokerogue/src/messages.ts

15 lines
488 B
TypeScript
Raw Normal View History

import { BattleSpec } from "./enums/battle-spec";
2024-02-29 20:08:50 -05:00
import Pokemon from "./field/pokemon";
2023-04-15 01:32:16 -04:00
export function getPokemonMessage(pokemon: Pokemon, content: string): string {
let prefix: string;
switch (pokemon.scene.currentBattle.battleSpec) {
case BattleSpec.DEFAULT:
prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() ? 'Foe ' : 'Wild ' : '';
break;
case BattleSpec.FINAL_BOSS:
prefix = 'Foe ';
break;
}
return `${prefix}${pokemon.name}${content}`;
2023-04-15 01:32:16 -04:00
}