Remove unnecessary Math.floor()

This commit is contained in:
NightKev 2024-09-02 20:40:54 -07:00 committed by GitHub
parent c4929c3080
commit 07db30e112
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2613,7 +2613,7 @@ export default class BattleScene extends SceneBase {
if (mods.length < 1) { if (mods.length < 1) {
return mods; return mods;
} }
const rand = Math.floor(Utils.randSeedInt(mods.length)); // Why is there a floor() call around a number that can only be an integer? const rand = Utils.randSeedInt(mods.length);
return [mods[rand], ...shuffleModifiers(mods.filter((_, i) => i !== rand))]; return [mods[rand], ...shuffleModifiers(mods.filter((_, i) => i !== rand))];
}; };
modifiers = shuffleModifiers(modifiers); modifiers = shuffleModifiers(modifiers);