mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-08-27 11:34:40 -05:00
Cross Evolution: Fix signature items
This commit is contained in:
@@ -774,6 +774,12 @@ export const Formats: FormatList = [
|
||||
`${species.name} cannot cross evolve into ${crossSpecies.name} because they are not consecutive evolution stages.`,
|
||||
];
|
||||
}
|
||||
const item = this.dex.items.get(set.item);
|
||||
if (item.itemUser?.length) {
|
||||
if (!item.itemUser.includes(crossSpecies.name) || crossSpecies.name !== species.name) {
|
||||
return [`${species.name} cannot use ${item.name} because it is cross evolved into ${crossSpecies.name}.`];
|
||||
}
|
||||
}
|
||||
const ability = this.dex.abilities.get(set.ability);
|
||||
if (!this.ruleTable.isRestricted(`ability:${ability.id}`) || Object.values(species.abilities).includes(ability.name)) {
|
||||
set.species = crossSpecies.name;
|
||||
|
||||
Reference in New Issue
Block a user