The leagues, the plaque round: the meta speaks — the player plaque, the goal line, the way-up tag, the centred ceremony
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
787877bce6
commit
87ac3294bc
7 files changed
+124
-25
No files matched your search
+24
-9
@@ -107,7 +107,9 @@ const banner = (card, cls, last) => {
|
||||
b.style.backgroundImage =
|
||||
`linear-gradient(180deg, rgba(0,0,0,0) 34%, rgba(0,0,0,0.78)), url(assets/${card.art}.png?v=${SPRV})`;
|
||||
b.innerHTML = `<span class="cb"><b>${card.name}</b><i>${card.sub}</i></span>`
|
||||
+ (last ? '<u class="last">LAST</u>' : '');
|
||||
+ (last ? '<u class="last">LAST</u>' : '')
|
||||
// the standing answer to "how do I advance", worn by the poster it is true of (config MODES)
|
||||
+ (card.tag ? `<u class="way">${card.tag}</u>` : '');
|
||||
return b;
|
||||
};
|
||||
const pickMode = id => { pickedMode = id; try { localStorage.setItem('mode', id); } catch {} };
|
||||
@@ -512,10 +514,15 @@ function buildCard() {
|
||||
el.textContent = `LEAGUE ${lg.id} OF ${LEAGUES.length} — ${lg.name}`;
|
||||
el.style.color = lg.color;
|
||||
document.getElementById('cdLevel').textContent =
|
||||
'LEVEL ' + pr.level + (pr.need ? '' : ' · THE CAP');
|
||||
'LEVEL ' + pr.level + ' OF ' + profile.LEVEL_CAP;
|
||||
document.getElementById('cdFill').style.width = Math.round(pr.frac * 100) + '%';
|
||||
document.getElementById('cdXp').textContent = profile.prof.xp.toLocaleString('en-GB') + ' XP'
|
||||
+ (pr.need ? ' · ' + (pr.need - pr.into).toLocaleString('en-GB') + ' TO LEVEL ' + (pr.level + 1) : '');
|
||||
+ (pr.need ? ' · ' + (pr.need - pr.into).toLocaleString('en-GB') + ' TO LEVEL ' + (pr.level + 1)
|
||||
: ' · THE CAP');
|
||||
// the CAREER bar is the long form the splash deliberately does not carry: whole-curve progress,
|
||||
// honest about how far level 50 is
|
||||
document.getElementById('cdCareerFill').style.width =
|
||||
Math.min(100, Math.round(profile.prof.xp / profile.xpFor(profile.LEVEL_CAP) * 100)) + '%';
|
||||
const row = document.getElementById('cdBadges');
|
||||
row.innerHTML = '';
|
||||
for (const l of LEAGUES) {
|
||||
@@ -545,7 +552,7 @@ function buildCard() {
|
||||
+ fig('RUNS', (g.matches + z.matches + c.matches).toLocaleString('en-GB'));
|
||||
refreshLook();
|
||||
}
|
||||
document.getElementById('xpRow').addEventListener('click', () => { buildCard(); go('card'); });
|
||||
document.getElementById('plaque').addEventListener('click', () => { buildCard(); go('card'); });
|
||||
document.getElementById('cdBack').addEventListener('click', () => go('splash'));
|
||||
let playerReturn = null; // EDIT PLAYER borrows the identity screen and comes back to the card
|
||||
document.getElementById('cdEdit').addEventListener('click', () => {
|
||||
@@ -613,11 +620,19 @@ function summary() {
|
||||
// has just ended and the count has moved.
|
||||
function refreshSplash() {
|
||||
document.getElementById('mKills').textContent = stats.total().kills.toLocaleString('en-GB') + ' KILLS';
|
||||
// the level strip — the meta clock, re-read whenever the splash comes back because a run has
|
||||
// just moved it (same rule as the kill count above)
|
||||
const pr = profile.progress();
|
||||
document.getElementById('xpLv').textContent = 'LEVEL ' + pr.level;
|
||||
document.getElementById('xpFill').style.width = Math.round(pr.frac * 100) + '%';
|
||||
// THE PLAQUE — the meta identity, re-read whenever the splash comes back because a run has just
|
||||
// moved it (same rule as the kill count above). The goal line is the standing answer to "what
|
||||
// do I do to advance": win the CURRENT league's cup, become champion, or rest on the crown.
|
||||
const pr = profile.progress(), lg = leagueOf(profile.prof.lg);
|
||||
document.getElementById('plBadge').src = `assets/badge_l${lg.id}.png?v=${SPRV}`;
|
||||
document.getElementById('plName').textContent = stats.savedName() || 'YOUR PLAYER';
|
||||
document.getElementById('plLv').textContent = 'LEVEL ' + pr.level + ' · LEAGUE ' + lg.id;
|
||||
document.getElementById('plFill').style.width = Math.round(pr.frac * 100) + '%';
|
||||
document.getElementById('plGoal').textContent = profile.prof.ch
|
||||
? 'CHAMPION OF THE DEAD CLUB — DEFEND THE NAME'
|
||||
: profile.prof.lg >= LEAGUES.length
|
||||
? 'WIN THE ' + lg.name.replace('THE ', '') + ' CUP — BECOME CHAMPION'
|
||||
: 'WIN THE ' + lg.name.replace('THE ', '') + ' CUP TO ADVANCE';
|
||||
summary();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user