Skip to content

Commit

Permalink
Don't guess spreads when there are empty moves (smogon#2267)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaWoblefet authored Jul 24, 2024
1 parent ef9feeb commit ed3f8f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion play.pokemonshowdown.com/src/battle-tooltips.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2612,9 +2612,10 @@ class BattleStatGuesser {

if (set.moves.length < 1) return '?';
let needsFourMoves = !['unown', 'ditto'].includes(species.id);
let hasFourValidMoves = set.moves.length >= 4 && !set.moves.includes('');
let moveids = set.moves.map(toID);
if (moveids.includes('lastresort' as ID)) needsFourMoves = false;
if (set.moves.length < 4 && needsFourMoves && !this.formatid.includes('metronomebattle')) {
if (!hasFourValidMoves && needsFourMoves && !this.formatid.includes('metronomebattle')) {
return '?';
}

Expand Down

0 comments on commit ed3f8f7

Please sign in to comment.