This commit is contained in:
2026-01-27 22:52:44 +03:00
parent dedc2635f2
commit 14d46962d4
5 changed files with 569 additions and 71 deletions

View File

@ -444,6 +444,7 @@
<div class="opponent-name ${isDead ? 'defeated-name' : ''}">${escapeHtml(name)}${isDead ? ' <span class="defeated-badge">✝</span>' : ''}</div>
<div class="opponent-stats ${isDead ? 'defeated-stats' : ''}">
<span class="opponent-health">❤ ${p.health ?? 30}</span>
${(p.armor || 0) > 0 ? `<span class="opponent-armor">🛡 ${p.armor}</span>` : ''}
<span>🔵 ${p.mana ?? 0}/${p.maxMana ?? 0}</span>
${p.deck && p.deck.length > 0 ? `<span>📚 ${p.deck.length}</span>` : ''}
</div>
@ -779,6 +780,18 @@
setTimeout(() => healthEl.classList.remove('health-changed'), 500);
}
}
// Отображение брони
const armorEl = $('your-armor');
const armorDisplayEl = $('armor-display');
if (armorEl && armorDisplayEl) {
const armor = state.isSpectator ? 0 : (state.yourArmor || you?.armor || 0);
armorEl.textContent = armor;
if (armor > 0) {
armorDisplayEl.style.display = 'inline-flex';
} else {
armorDisplayEl.style.display = 'none';
}
}
$('your-deck').textContent = state.yourDeckCount ?? you.deck?.length ?? 0;
const lastLog = state.log && state.log.length ? state.log[state.log.length - 1] : null;