mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Fix randbats allowing sets with no damaging moves
This commit is contained in:
parent
5823ca0bd6
commit
cc9d0b2711
|
|
@ -1142,8 +1142,8 @@ exports.BattleScripts = {
|
|||
if (j<moveKeys.length && moves.length === 4) {
|
||||
// Move post-processing:
|
||||
if (damagingMoves.length===0) {
|
||||
// Have a 60% chance of rejecting one move at random:
|
||||
if (Math.random()*1.66<1) moves.splice(Math.floor(Math.random()*moves.length),1);
|
||||
// A set shouldn't have no attacking moves
|
||||
moves.splice(Math.floor(Math.random()*moves.length),1);
|
||||
} else if (damagingMoves.length===1) {
|
||||
// Night Shade, Seismic Toss, etc. don't count:
|
||||
if (!damagingMoves[0].damage) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user