diff --git a/data/text.js b/data/text.js index b01113eb2..3b52acdcc 100644 --- a/data/text.js +++ b/data/text.js @@ -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!", diff --git a/src/battle-text-parser.ts b/src/battle-text-parser.ts index f97a96a40..125971b7e 100644 --- a/src/battle-text-parser.ts +++ b/src/battle-text-parser.ts @@ -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); }