feat: implement elite fighter compression for large battles with randomized scaling and percentage-based damage
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user