mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-29 10:16:14 +00:00
15 lines
482 B
TypeScript
15 lines
482 B
TypeScript
import { BattleSpec } from "./enums/battle-spec";
|
|
import Pokemon from "./pokemon";
|
|
|
|
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}`;
|
|
} |