feat: agregar comando de registro de muertes y penalizaciones; implementar ítem de purga de efectos y mejorar la documentación de creación de contenido

This commit is contained in:
2025-10-09 01:36:32 -05:00
parent ae12b50aa1
commit 33b768bbb2
6 changed files with 217 additions and 6 deletions

View File

@@ -451,7 +451,19 @@ export async function runMinigame(
});
}
}
const fatigueMagnitude = 0.15;
// Fatiga escalada: base 15%, +1% cada 5 de racha previa (cap +10%)
let previousStreak = 0;
try {
const ps = await prisma.playerStats.findUnique({
where: { userId_guildId: { userId, guildId } },
});
previousStreak = ps?.currentWinStreak || 0;
} catch {}
const extraFatigue = Math.min(
0.1,
Math.floor(previousStreak / 5) * 0.01
);
const fatigueMagnitude = 0.15 + extraFatigue;
const fatigueMinutes = 5;
await applyDeathFatigue(
userId,
@@ -632,7 +644,19 @@ export async function runMinigame(
});
}
}
const fatigueMagnitude = 0.15;
// Fatiga escalada
let previousStreak = 0;
try {
const ps = await prisma.playerStats.findUnique({
where: { userId_guildId: { userId, guildId } },
});
previousStreak = ps?.currentWinStreak || 0;
} catch {}
const extraFatigue = Math.min(
0.1,
Math.floor(previousStreak / 5) * 0.01
);
const fatigueMagnitude = 0.15 + extraFatigue;
const fatigueMinutes = 5;
await applyDeathFatigue(
userId,