Fix Duplicate Egg Moves (#736)
Fixes an issue where egg moves could get duplicated onto a starter Pokémon's moveset.pull/799/head
parent
2176d5854d
commit
512cc5b965
|
@ -1576,6 +1576,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
if (this.starterMoveset.length < 4 && this.starterMoveset.length < availableStarterMoves.length)
|
||||
this.starterMoveset.push(...availableStarterMoves.filter(sm => this.starterMoveset.indexOf(sm) === -1).slice(0, 4 - this.starterMoveset.length));
|
||||
|
||||
// Remove duplicate moves
|
||||
this.starterMoveset = this.starterMoveset.filter(
|
||||
(move, i) => {
|
||||
return this.starterMoveset.indexOf(move) === i;
|
||||
}) as StarterMoveset;
|
||||
|
||||
const speciesForm = getPokemonSpeciesForm(species.speciesId, formIndex);
|
||||
|
||||
const formText = species?.forms[formIndex]?.formKey.split('-');
|
||||
|
|
Loading…
Reference in New Issue