mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
stat change phase: only display comma before and if there are 3 or more stats
This commit is contained in:
parent
b076dec346
commit
e4b8bffdec
@ -2839,7 +2839,7 @@ export class StatChangePhase extends PokemonPhase {
|
||||
if (relLevelStats.length > 1) {
|
||||
statsFragment = relLevelStats.length >= 5
|
||||
? 'stats'
|
||||
: `${relLevelStats.slice(0, -1).map(s => getBattleStatName(s)).join(', ')}, and ${getBattleStatName(relLevelStats[relLevelStats.length - 1])}`;
|
||||
: `${relLevelStats.slice(0, -1).map(s => getBattleStatName(s)).join(', ')}${relLevelStats.length > 2 ? ',' : ''} and ${getBattleStatName(relLevelStats[relLevelStats.length - 1])}`;
|
||||
} else
|
||||
statsFragment = getBattleStatName(relLevelStats[0]);
|
||||
messages.push(getPokemonMessage(this.getPokemon(), `'s ${statsFragment} ${getBattleStatLevelChangeDescription(Math.abs(parseInt(rl)), levels >= 1)}!`));
|
||||
|
Loading…
Reference in New Issue
Block a user