mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-12 11:41:24 -05:00
80d27e1: Use find instead of filter
And remove unneeded parentheses from df66184.
This commit is contained in:
parent
80d27e1276
commit
de04698b7f
|
|
@ -1388,7 +1388,7 @@ exports.BattleScripts = {
|
|||
break;
|
||||
case 'thunderbolt':
|
||||
if (hasMove['discharge'] || (hasMove['raindance'] || hasMove['thunder']) || (hasMove['voltswitch'] && hasMove['wildcharge'])) rejected = true;
|
||||
if (hasMove['voltswitch'] && template.types.length > 1 && !counter[template.types.filter(type => type !== 'Electric')[0]]) rejected = true;
|
||||
if (hasMove['voltswitch'] && template.types.length > 1 && !counter[template.types.find(type => type !== 'Electric')) rejected = true;
|
||||
break;
|
||||
case 'dazzlinggleam':
|
||||
if (hasMove['playrough'] && counter.setupType !== 'Special') rejected = true;
|
||||
|
|
@ -1489,7 +1489,7 @@ exports.BattleScripts = {
|
|||
if (counter.setupType !== 'Physical' && hasMove['vacuumwave']) rejected = true;
|
||||
break;
|
||||
case 'hiddenpower':
|
||||
if ((counter.damagingMoves.length < 2 && !counter.stab) || hasMove['rest']) rejected = true;
|
||||
if (hasMove['rest'] || !counter.stab && counter.damagingMoves.length < 2) rejected = true;
|
||||
break;
|
||||
case 'hypervoice':
|
||||
if (hasMove['naturepower'] || hasMove['return']) rejected = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user