mirror of https://github.com/bra1n/townsquare.git
Use proper "Exile" terminology for exile
This commit is contained in:
parent
fb87f6f8cb
commit
81c449e149
|
@ -71,14 +71,14 @@ const mutations = {
|
||||||
*/
|
*/
|
||||||
addHistory(state, players) {
|
addHistory(state, players) {
|
||||||
if (!state.nomination || state.lockedVote <= players.length) return;
|
if (!state.nomination || state.lockedVote <= players.length) return;
|
||||||
const isBanishment = players[state.nomination[1]].role.team === "traveler";
|
const isExile = players[state.nomination[1]].role.team === "traveler";
|
||||||
state.voteHistory.push({
|
state.voteHistory.push({
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
nominator: players[state.nomination[0]].name,
|
nominator: players[state.nomination[0]].name,
|
||||||
nominee: players[state.nomination[1]].name,
|
nominee: players[state.nomination[1]].name,
|
||||||
type: isBanishment ? "Banishment" : "Execution",
|
type: isExile ? "Exile" : "Execution",
|
||||||
majority: Math.ceil(
|
majority: Math.ceil(
|
||||||
players.filter(player => !player.isDead || isBanishment).length / 2
|
players.filter(player => !player.isDead || isExile).length / 2
|
||||||
),
|
),
|
||||||
votes: players
|
votes: players
|
||||||
.filter((player, index) => state.votes[index])
|
.filter((player, index) => state.votes[index])
|
||||||
|
|
Loading…
Reference in New Issue