diff --git a/play.pokemonshowdown.com/src/battle-team-editor.tsx b/play.pokemonshowdown.com/src/battle-team-editor.tsx index 0e6209822..95044874f 100644 --- a/play.pokemonshowdown.com/src/battle-team-editor.tsx +++ b/play.pokemonshowdown.com/src/battle-team-editor.tsx @@ -2766,12 +2766,41 @@ class DetailsForm extends preact.Component<{ )}

} - {species.cosmeticFormes &&

- -

} + {species.cosmeticFormes &&
+

Form:

+
+ {(() => { + const baseId = toID(species.baseSpecies); + const forms = species.cosmeticFormes?.length ? [baseId, ...species.cosmeticFormes.map(toID)] : [baseId]; + return forms.map(id => { + const sp = editor.dex.species.get(id); + const iconStyle = Dex.getPokemonIcon({ species: sp.name } as Dex.PokemonSet); + const isCur = toID(set.species) === id; + return ; + }); + })()} +
+
} ; } + + selectSprite = (ev: Event) => { + const target = ev.currentTarget as HTMLButtonElement; + const formId = target.value; + const { editor, set } = this.props; + const species = editor.dex.species.get(formId); + if (!species.exists) return; + editor.changeSpecies(set, species.name); + this.props.onChange(); + this.forceUpdate(); + }; }