From bdae9efbc9fd4937eddcfc3dfbf20ce9544592b9 Mon Sep 17 00:00:00 2001 From: The Immortal Date: Sat, 28 Nov 2020 15:13:18 +0400 Subject: [PATCH] Balanced Hackmons: Ban Intrepid Sword --- config/formats.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config/formats.ts b/config/formats.ts index e4e3911804..f7abfa8909 100644 --- a/config/formats.ts +++ b/config/formats.ts @@ -790,10 +790,15 @@ export const Formats: FormatList = [ 'Arena Trap', 'Contrary', 'Gorilla Tactics', 'Huge Power', 'Illusion', 'Innards Out', 'Libero', 'Magnet Pull', 'Moody', 'Neutralizing Gas', 'Parental Bond', 'Protean', 'Pure Power', 'Shadow Tag', 'Stakeout', 'Water Bubble', 'Wonder Guard', ], + restricted: ['Zacian-Crowned'], onValidateSet(set) { - if (set.species === 'Zacian-Crowned' && - (this.dex.toID(set.item) !== 'rustedsword' || this.dex.toID(set.ability) !== 'intrepidsword')) { - return [set.species + " is banned."]; + const ability = this.dex.getAbility(set.ability); + if (set.species === 'Zacian-Crowned') { + if (this.dex.toID(set.item) !== 'rustedsword' || ability.id !== 'intrepidsword') { + return [`${set.species} is banned.`]; + } + } else if (ability.id === 'intrepidsword') { + return [`${set.name}'s ability ${ability.name} is banned.`]; } }, onChangeSet(set) {