Ignore unimplemented tms

This commit is contained in:
B1bbs 2023-10-20 20:49:04 -05:00
parent 5e08a5cf83
commit 327ad44923
1 changed files with 1 additions and 1 deletions

View File

@ -478,7 +478,7 @@ class TmModifierTypeGenerator extends ModifierTypeGenerator {
constructor(tier: ModifierTier) { constructor(tier: ModifierTier) {
super((party: Pokemon[]) => { super((party: Pokemon[]) => {
const partyMemberCompatibleTms = party.map(p => (p as PlayerPokemon).compatibleTms); const partyMemberCompatibleTms = party.map(p => (p as PlayerPokemon).compatibleTms);
const tierUniqueCompatibleTms = partyMemberCompatibleTms.flat().filter(tm => tmPoolTiers[tm] === tier).filter((tm, i, array) => array.indexOf(tm) === i); const tierUniqueCompatibleTms = partyMemberCompatibleTms.flat().filter(tm => tmPoolTiers[tm] === tier).filter(tm => !allMoves[tm].name.endsWith(' (N)')).filter((tm, i, array) => array.indexOf(tm) === i);
if (!tierUniqueCompatibleTms.length) if (!tierUniqueCompatibleTms.length)
return null; return null;
const randTmIndex = Utils.randSeedInt(tierUniqueCompatibleTms.length); const randTmIndex = Utils.randSeedInt(tierUniqueCompatibleTms.length);