2024-01-13 17:24:24 +00:00
|
|
|
import { BattleSpec } from "./enums/battle-spec";
|
2024-03-01 01:08:50 +00:00
|
|
|
import Pokemon from "./field/pokemon";
|
2023-04-15 06:32:16 +01:00
|
|
|
|
|
|
|
export function getPokemonMessage(pokemon: Pokemon, content: string): string {
|
2024-04-09 17:42:18 +01:00
|
|
|
return `${getPokemonPrefix(pokemon)}${pokemon.name}${content}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getPokemonPrefix(pokemon: Pokemon): string {
|
2024-01-13 17:24:24 +00:00
|
|
|
let prefix: string;
|
|
|
|
switch (pokemon.scene.currentBattle.battleSpec) {
|
|
|
|
case BattleSpec.DEFAULT:
|
|
|
|
prefix = !pokemon.isPlayer() ? pokemon.hasTrainer() ? 'Foe ' : 'Wild ' : '';
|
|
|
|
break;
|
|
|
|
case BattleSpec.FINAL_BOSS:
|
2024-03-30 05:37:54 +00:00
|
|
|
prefix = !pokemon.isPlayer() ? 'Foe ' : '';
|
2024-01-13 17:24:24 +00:00
|
|
|
break;
|
|
|
|
}
|
2024-04-09 17:42:18 +01:00
|
|
|
return prefix;
|
2023-04-15 06:32:16 +01:00
|
|
|
}
|