|
|
|
@ -1232,11 +1232,16 @@ function getEnemyType(enemyId) { |
|
|
|
|
|
|
|
|
|
|
|
export function renderRelicSelection(root) { |
|
|
|
export function renderRelicSelection(root) { |
|
|
|
import("../data/relics.js").then(({ RELICS, START_RELIC_CHOICES }) => { |
|
|
|
import("../data/relics.js").then(({ RELICS, START_RELIC_CHOICES }) => { |
|
|
|
|
|
|
|
import("../data/messages.js").then(({ getAllMessages }) => { |
|
|
|
const relicChoices = START_RELIC_CHOICES.slice(0, 3); // Show first 3 relics
|
|
|
|
const relicChoices = START_RELIC_CHOICES.slice(0, 3); // Show first 3 relics
|
|
|
|
|
|
|
|
|
|
|
|
root.app.innerHTML = ` |
|
|
|
root.app.innerHTML = ` |
|
|
|
<div class="game-screen relic-select"> |
|
|
|
<div class="game-screen relic-select"> |
|
|
|
<div class="game-header"> |
|
|
|
<div class="game-header"> |
|
|
|
|
|
|
|
<button class="messages-button" data-action="show-messages"> |
|
|
|
|
|
|
|
Inbox |
|
|
|
|
|
|
|
<span class="message-count-badge">${getAllMessages().length}</span> |
|
|
|
|
|
|
|
</button> |
|
|
|
<div class="game-logo relic-title-logo"> |
|
|
|
<div class="game-logo relic-title-logo"> |
|
|
|
<svg width="600" height="240" viewBox="0 0 600 240" xmlns="http://www.w3.org/2000/svg"> |
|
|
|
<svg width="600" height="240" viewBox="0 0 600 240" xmlns="http://www.w3.org/2000/svg"> |
|
|
|
<defs> |
|
|
|
<defs> |
|
|
|
@ -1300,12 +1305,20 @@ export function renderRelicSelection(root) { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
`;
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Set up relic selection event listeners
|
|
|
|
root.app.querySelectorAll("[data-relic]").forEach(btn => { |
|
|
|
root.app.querySelectorAll("[data-relic]").forEach(btn => { |
|
|
|
btn.addEventListener("click", () => { |
|
|
|
btn.addEventListener("click", () => { |
|
|
|
const relicId = btn.dataset.relic; |
|
|
|
const relicId = btn.dataset.relic; |
|
|
|
root.selectStartingRelic(relicId); |
|
|
|
root.selectStartingRelic(relicId); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add Messages button event listener
|
|
|
|
|
|
|
|
const messagesBtn = root.app.querySelector("[data-action='show-messages']"); |
|
|
|
|
|
|
|
if (messagesBtn) { |
|
|
|
|
|
|
|
messagesBtn.addEventListener("click", () => showMessagesModal()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|