Merge pull request #163 from AWConant/main

Use proper "Exile" terminology for exile
This commit is contained in:
Steffen 2021-05-09 22:00:55 +02:00 committed by GitHub
commit ccb48f16fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# Release Notes
- use "Exile" rather than "Banishment" for exiles
- added global animation toggle for better performance
- added record vote history toggle to session menu, and clear vote history button
- add support for custom Fabled characters

View File

@ -74,14 +74,14 @@ const mutations = {
addHistory(state, players) {
if (!state.isVoteHistoryAllowed && state.isSpectator) 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({
timestamp: new Date(),
nominator: players[state.nomination[0]].name,
nominee: players[state.nomination[1]].name,
type: isBanishment ? "Banishment" : "Execution",
type: isExile ? "Exile" : "Execution",
majority: Math.ceil(
players.filter(player => !player.isDead || isBanishment).length / 2
players.filter(player => !player.isDead || isExile).length / 2
),
votes: players
.filter((player, index) => state.votes[index])