From 1699cd39037bcce904cbbc1924e923e9e9e6f2cd Mon Sep 17 00:00:00 2001 From: Kris Johnson <11083252+KrisXV@users.noreply.github.com> Date: Sun, 6 Mar 2022 07:10:33 -0700 Subject: [PATCH] Cross Evolution: Fix signature items --- config/formats.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/formats.ts b/config/formats.ts index 50e40f3071..d6f338fd79 100644 --- a/config/formats.ts +++ b/config/formats.ts @@ -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;