fix: fk target number + update passion default

This commit is contained in:
ethanf 2024-02-02 01:27:11 -06:00
parent ae3a1be106
commit c42e315a45

View File

@ -101,7 +101,7 @@ const avgDiff = (arr) => {
// FUN value: Fluctuating Unfairness Normalization value
// PASSION: Player Ability/Skill Separation Index Offset Number
let funInput = 4; // 1-10
let passionInput = 2; // 1-5
let passionInput = 1; // 1-5
// balance attempt counter, not modifiable
let attempts = 0;
@ -428,7 +428,7 @@ client.on("interactionCreate", async (interaction) => {
);
}
const targetPlayerCount = 3;
const targetPlayerCount = 18;
if (pickingPlayers.length + addupPlayers.length < targetPlayerCount) {
return await interaction.followUp(
`Can't find enough total players, expected ${targetPlayerCount} (found ${
@ -468,13 +468,13 @@ client.on("interactionCreate", async (interaction) => {
}
fkAttempts++;
const idx = Math.floor(Math.random() * pickingPlayers.length);
let fk = await pickingPlayers.splice(idx, 1)[0];
let fk = pickingPlayers[idx]
if (protectedFk.includes(fk.id)) {
protectedStr += `${fk.id}, `;
pickingPlayers.push(fk);
continue;
} else {
pickingPlayers.splice(idx, 1);
fatkids.push(fk);
}
fatkids.push(fk);
}
if (protectedStr.length > 0) {
console.log(`Protected fks: ${protectedStr}`);