Add Alphabet Cup Move Legality (#7628)

This commit is contained in:
Kris Johnson 2020-11-02 15:42:34 -07:00 committed by GitHub
parent 7406821327
commit e1c96f8a74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1007,6 +1007,18 @@ export const Formats: {[k: string]: FormatData} = {
return this.checkLearnset(move, species, setSources, set);
},
},
alphabetcupmovelegality: {
effectType: 'ValidatorRule',
name: 'Alphabet Cup Move Legality',
desc: "Allows Pokémon to use any move that shares the same first letter as their name or a previous evolution's name.",
checkLearnset(move, species, setSources, set) {
const nonstandard = move.isNonstandard === 'Past' && !this.ruleTable.has('standardnatdex');
if (!nonstandard && !move.isZ && !move.isMax && !this.ruleTable.isRestricted(`move:${move.id}`)) {
if (move.id.startsWith(species.id[0])) return null;
}
return this.checkLearnset(move, species, setSources, set);
},
},
allowtradeback: {
effectType: 'ValidatorRule',
name: 'Allow Tradeback',