From 896208d1e6f00faaa19e65f048ed4471e0487da1 Mon Sep 17 00:00:00 2001 From: Steffen Date: Thu, 17 Sep 2020 09:42:19 +0200 Subject: [PATCH] add minion / demon info to night order sheet (closes #53) --- src/components/modals/NightOrderModal.vue | 29 +++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/components/modals/NightOrderModal.vue b/src/components/modals/NightOrderModal.vue index 5357ed6..91bcd52 100644 --- a/src/components/modals/NightOrderModal.vue +++ b/src/components/modals/NightOrderModal.vue @@ -74,8 +74,29 @@ export default { }, rolesFirstNight: function() { const rolesFirstNight = []; + // add minion / demon infos to night order sheet + if (this.players.length > 6) { + rolesFirstNight.push( + { + id: "evil", + name: "Minion info", + firstNight: 2, + team: "minion" + }, + { + id: "evil", + name: "Demon info & bluffs", + firstNight: 4, + team: "demon" + } + ); + } this.roles.forEach(role => { - if (role.firstNight) { + if ( + role.firstNight && + (role.team !== "traveler" || + this.players.some(p => p.role.id === role.id)) + ) { rolesFirstNight.push(role); } }); @@ -85,7 +106,11 @@ export default { rolesOtherNight: function() { const rolesOtherNight = []; this.roles.forEach(role => { - if (role.otherNight) { + if ( + role.otherNight && + (role.team !== "traveler" || + this.players.some(p => p.role.id === role.id)) + ) { rolesOtherNight.push(role); } });