feat: implement elite fighter compression for large battles with randomized scaling and percentage-based damage

This commit is contained in:
2026-05-28 10:17:07 +09:00
parent 30d7be41be
commit a7eec730d2
21 changed files with 660 additions and 77 deletions
+6 -4
View File
@@ -24,11 +24,13 @@ export function updateScoreboard(
teams.forEach((team, index) => {
const teamEl = containerLeft.children[index];
const aliveCount = fighters.filter(
const livingFighters = fighters.filter(
(fighter) => fighter.team.id === team.id && !fighter.isDead,
).length;
);
const eliteCount = livingFighters.filter((fighter) => fighter.isElite).length;
const normalCount = livingFighters.length - eliteCount;
teamEl.disabled = aliveCount === 0;
teamEl.disabled = livingFighters.length === 0;
teamEl.setAttribute("aria-label", `${team.label} 생존 캐릭터 무작위 시점 고정`);
teamEl.style.setProperty("--team-color", team.color);
teamEl.style.backgroundColor = `${team.color}33`;
@@ -39,7 +41,7 @@ export function updateScoreboard(
labelEl.textContent = team.label;
const countEl = teamEl.querySelector(".team-score-count");
countEl.textContent = `${aliveCount}`;
countEl.textContent = `E : ${eliteCount} | N : ${normalCount}`;
teamEl.onclick = () => {
onTeamClick(team.id);