diff --git a/client/src/images/roles/ParityHunter.png b/client/src/images/roles/ParityHunter.png
new file mode 100644
index 0000000..c4251e3
Binary files /dev/null and b/client/src/images/roles/ParityHunter.png differ
diff --git a/client/src/modules/GameCreationStepManager.js b/client/src/modules/GameCreationStepManager.js
index 1a9f681..2ee447e 100644
--- a/client/src/modules/GameCreationStepManager.js
+++ b/client/src/modules/GameCreationStepManager.js
@@ -192,7 +192,8 @@ function renderRoleSelectionStep(game, containerId, step, deckManager) {
const stepContainer = document.createElement("div");
setAttributes(stepContainer, {'id': 'step-' + step, 'class': 'flex-row-container-left-align step'});
- stepContainer.innerHTML =templates.CREATE_GAME_CUSTOM_ROLES;
+ stepContainer.innerHTML = templates.CREATE_GAME_CUSTOM_ROLES;
+ stepContainer.innerHTML += templates.CREATE_GAME_DECK_STATUS;
stepContainer.innerHTML += templates.CREATE_GAME_DECK;
document.getElementById(containerId).appendChild(stepContainer);
@@ -213,6 +214,7 @@ function renderRoleSelectionStep(game, containerId, step, deckManager) {
loadCustomRoles(deckManager);
+ updateDeckStatus(deckManager);
initializeRemainingEventListeners(deckManager);
}
@@ -399,14 +401,14 @@ function constructCompactDeckBuilderElement(card, deckManager) {
cardContainer.innerHTML =
"
" +
"" +
"";
cardContainer.querySelector('.card-role').innerText = card.role;
@@ -419,6 +421,7 @@ function constructCompactDeckBuilderElement(card, deckManager) {
cardContainer.querySelector('.compact-card-right').addEventListener('click', () => {
deckManager.addCopyOfCard(card.role);
+ updateDeckStatus(deckManager);
cardContainer.querySelector('.card-quantity').innerText = deckManager.getCard(card.role).quantity;
if (deckManager.getCard(card.role).quantity > 0) {
document.getElementById('card-' + card.role.replaceAll(' ', '-')).classList.add('selected-card')
@@ -426,6 +429,7 @@ function constructCompactDeckBuilderElement(card, deckManager) {
});
cardContainer.querySelector('.compact-card-left').addEventListener('click', () => {
deckManager.removeCopyOfCard(card.role);
+ updateDeckStatus(deckManager);
cardContainer.querySelector('.card-quantity').innerText = deckManager.getCard(card.role).quantity;
if (deckManager.getCard(card.role).quantity === 0) {
document.getElementById('card-' + card.role.replaceAll(' ', '-')).classList.remove('selected-card')
@@ -490,6 +494,24 @@ function addOptionsToList(options, selectEl) {
}
}
+function updateDeckStatus(deckManager) {
+ document.querySelectorAll('.deck-role').forEach((el) => el.remove());
+ document.getElementById("deck-count").innerText = deckManager.getDeckSize() + " Players";
+ for (let card of deckManager.getCurrentDeck()) {
+ if (card.quantity > 0) {
+ let roleEl = document.createElement("div");
+ roleEl.classList.add('deck-role');
+ if (card.team === globals.ALIGNMENT.GOOD) {
+ roleEl.classList.add(globals.ALIGNMENT.GOOD);
+ } else {
+ roleEl.classList.add(globals.ALIGNMENT.EVIL);
+ }
+ roleEl.innerText = card.quantity + 'x ' + card.role;
+ document.getElementById("deck-list").appendChild(roleEl);
+ }
+ }
+}
+
function hasTimer(hours, minutes) {
return (!isNaN(hours) || !isNaN(minutes));
}
diff --git a/client/src/modules/Templates.js b/client/src/modules/Templates.js
index 2874ac4..c3b69b3 100644
--- a/client/src/modules/Templates.js
+++ b/client/src/modules/Templates.js
@@ -153,7 +153,7 @@ export const templates = {
"" +
"",
GAME_PLAYER:
"" +
@@ -253,6 +253,12 @@ export const templates = {
'' +
'' +
'' +
+ '
',
+ CREATE_GAME_DECK_STATUS:
+ '' +
+ '
0 Players
' +
+ '
' +
+ '
' +
'
'
}
diff --git a/client/src/styles/GLOBAL.css b/client/src/styles/GLOBAL.css
index ebf29c6..d8537b0 100644
--- a/client/src/styles/GLOBAL.css
+++ b/client/src/styles/GLOBAL.css
@@ -395,11 +395,11 @@ input {
}
.good-players, #deck-good {
- background-color: #1c1a36;
+ background-color: #26244a;
}
.evil-players, #deck-evil {
- background-color: #361a1a;
+ background-color: #4a2424;
}
.evil, .compact-card.evil .card-role {
diff --git a/client/src/styles/create.css b/client/src/styles/create.css
index 5dbd0a1..67aa635 100644
--- a/client/src/styles/create.css
+++ b/client/src/styles/create.css
@@ -4,7 +4,7 @@
cursor: pointer;
position: relative;
margin: 0.3em;
- background-color: #393a40;
+ background-color: #191920;
color: gray;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
border-radius: 3px;
@@ -83,8 +83,16 @@
width: fit-content;
}
-#custom-roles-container {
- margin: 1em 0;
+.deck-role {
+ border-radius: 3px;
+ margin: 0.25em 0;
+ padding: 0 5px;
+ font-size: 18px;
+}
+
+#custom-roles-container, #deck-status-container {
+ color: #d7d7d7;
+ margin: 1em 0.5em;
background-color: #191920;
padding: 10px;
border-radius: 3px;
@@ -92,6 +100,28 @@
position: relative;
}
+#deck-status-container {
+ min-width: 15em;
+ height: 13em;
+ overflow-y: auto;
+ position: relative;
+}
+
+#deck-count {
+ font-size: 30px;
+ position: sticky;
+ top: 0;
+ left: 5px;
+ background-color: #333243;
+ width: fit-content;
+ padding: 0 5px;
+ border-radius: 3px;
+}
+
+#deck-list {
+ margin-top: 0.5em;
+}
+
#custom-role-hamburger .hamburger-inner, #custom-role-hamburger .hamburger-inner::before, #custom-role-hamburger .hamburger-inner::after {
background-color: whitesmoke;
width: 28px;
@@ -360,13 +390,17 @@ input[type="number"] {
padding: 10px 20px;
}
+#step-forward-button, #step-back-button {
+ background-color: #66666657 !important;
+}
+
#step-forward-button, #create-game {
right: 15%;
}
#step-back-button {
left: 15%;
- background-color: #762323 !important;
+ background-color: #762323;
}
#step-1 div {
diff --git a/client/src/styles/game.css b/client/src/styles/game.css
index f69fad6..f53a7ae 100644
--- a/client/src/styles/game.css
+++ b/client/src/styles/game.css
@@ -512,7 +512,6 @@ label[for='moderator'] {
.kill-player-button, .reveal-role-button {
font-family: 'signika-negative', sans-serif !important;
- padding: 5px;
border-radius: 3px;
color: whitesmoke;
font-size: 16px;
@@ -529,7 +528,6 @@ label[for='moderator'] {
.placeholder-button {
font-family: 'signika-negative', sans-serif !important;
- padding: 5px;
display: flex;
justify-content: center;
border-radius: 3px;
@@ -538,7 +536,7 @@ label[for='moderator'] {
font-size: 16px;
border: 2px solid transparent;
text-shadow: 0 3px 4px rgb(0 0 0 / 55%);
- margin: 5px 0 5px 25px;
+ margin: 5px 0 5px 35px;
width: 103px;
}
@@ -613,7 +611,7 @@ label[for='moderator'] {
#game-player-list {
overflow-y: auto;
overflow-x: hidden;
- padding: 0;
+ padding: 0 10px 10px 0;
max-height: 37em;
}