mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-08-20 01:51:42 -05:00
Fix Mega evolution message in Let's Go
This commit is contained in:
@@ -24,6 +24,7 @@ exports.BattleText = {
|
||||
abilityActivation: " [[POKEMON]'s [ABILITY]]",
|
||||
|
||||
mega: " [POKEMON]'s [ITEM] is reacting to the Key Stone!",
|
||||
megaNoItem: " [POKEMON] is reacting to [TRAINER]'s Key Stone!",
|
||||
megaGen6: " [POKEMON]'s [ITEM] is reacting to [TRAINER]'s Mega Bracelet!",
|
||||
transformMega: "[POKEMON] has Mega Evolved into Mega [SPECIES]!",
|
||||
primal: "[POKEMON]'s Primal Reversion! It reverted to its primal state!",
|
||||
@@ -405,7 +406,7 @@ exports.BattleText = {
|
||||
activate: " [TARGET] took the Doom Desire attack!",
|
||||
},
|
||||
dragonascent: {
|
||||
mega: "[TRAINER]'s fervent wish has reached [POKEMON]!\n[POKEMON] has Mega Evolved into [SPECIES]!",
|
||||
megaNoItem: " [TRAINER]'s fervent wish has reached [POKEMON]!",
|
||||
},
|
||||
electrify: {
|
||||
start: " [POKEMON]'s moves have been electrified!",
|
||||
|
||||
@@ -852,12 +852,17 @@ class BattleTextParser {
|
||||
case '-mega': case '-primal': {
|
||||
const [, pokemon, species, item] = args;
|
||||
let id = '';
|
||||
if (species === 'Rayquaza') id = 'dragonascent';
|
||||
if (!id && cmd === '-mega' && this.gen < 7) cmd = '-megaGen6';
|
||||
let template = this.template(cmd.slice(1));
|
||||
let templateId = cmd.slice(1);
|
||||
if (species === 'Rayquaza') {
|
||||
id = 'dragonascent';
|
||||
templateId = 'megaNoItem';
|
||||
}
|
||||
if (!id && cmd === '-mega' && this.gen < 7) templateId = 'megaGen6';
|
||||
if (!item && cmd === '-mega') templateId = 'megaNoItem';
|
||||
let template = this.template(templateId);
|
||||
const side = pokemon.slice(0, 2);
|
||||
const pokemonName = this.pokemon(pokemon);
|
||||
if (cmd.startsWith('-mega')) {
|
||||
if (cmd === '-mega') {
|
||||
const template2 = this.template('transformMega');
|
||||
template += template2.replace('[POKEMON]', pokemonName).replace('[SPECIES]', species);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user