mirror of https://github.com/bra1n/townsquare.git
add minion / demon info to night order sheet (closes #53)
This commit is contained in:
parent
8149feb7e3
commit
896208d1e6
|
@ -74,8 +74,29 @@ export default {
|
||||||
},
|
},
|
||||||
rolesFirstNight: function() {
|
rolesFirstNight: function() {
|
||||||
const rolesFirstNight = [];
|
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 => {
|
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);
|
rolesFirstNight.push(role);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -85,7 +106,11 @@ export default {
|
||||||
rolesOtherNight: function() {
|
rolesOtherNight: function() {
|
||||||
const rolesOtherNight = [];
|
const rolesOtherNight = [];
|
||||||
this.roles.forEach(role => {
|
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);
|
rolesOtherNight.push(role);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue