diff --git a/CHANGELOG.md b/CHANGELOG.md index f3d0483a..dd01cb5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Release Notes +### Version 3.2.0 + +- Adding Squid +- ST can now change the maximum number of votes a player can use to vote with +- A player with a non-one maximum vote can select how many votes to add to a vote. +- Fixed return to townsquare gong +- Also added Banshee + ### Version 3.1.1 - Adding Summoner diff --git a/src/App.vue b/src/App.vue index 46341955..81930a97 100644 --- a/src/App.vue +++ b/src/App.vue @@ -150,7 +150,7 @@ export default { break; case "t": if (this.session.isSpectator) return; - this.$refs.menu.returnToTown(); + this.$refs.menu.toggleReturnToTown(); break; case "v": if (this.session.voteHistory.length || !this.session.isSpectator) { diff --git a/src/assets/icons/classic/banshee.png b/src/assets/icons/classic/banshee.png new file mode 100644 index 00000000..c157856f Binary files /dev/null and b/src/assets/icons/classic/banshee.png differ diff --git a/src/assets/icons/classic/squid.png b/src/assets/icons/classic/squid.png new file mode 100644 index 00000000..0f22492c Binary files /dev/null and b/src/assets/icons/classic/squid.png differ diff --git a/src/assets/icons/modern/banshee.webp b/src/assets/icons/modern/banshee.webp new file mode 100644 index 00000000..ea2b9fe2 Binary files /dev/null and b/src/assets/icons/modern/banshee.webp differ diff --git a/src/assets/icons/modern/squid.png b/src/assets/icons/modern/squid.png new file mode 100644 index 00000000..0f22492c Binary files /dev/null and b/src/assets/icons/modern/squid.png differ diff --git a/src/assets/icons/modern/squid.webp b/src/assets/icons/modern/squid.webp new file mode 100644 index 00000000..e0f198c4 Binary files /dev/null and b/src/assets/icons/modern/squid.webp differ diff --git a/src/components/Player.vue b/src/components/Player.vue index f816b284..718a747e 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -56,6 +56,7 @@
+ {{session.votes[index]}}
@@ -159,6 +160,18 @@ Nomination +
  • + Change vote count + + + + + {{ player.maxVoteCount }} + + + + +
  • !
    - {{ voters.length }} vote{{ voters.length !== 1 ? "s" : "" }} + {{ voters }} vote{{ voters !== 1 ? "s" : "" }} in favor @@ -79,19 +79,29 @@
    Hand DOWN
    Hand UP
    +
    + Vote Count: + + + + {{ playerCurrentVoteCount }} + + + +
    Please claim a seat to vote.
  • @@ -159,6 +169,7 @@ export default { if (!this.player) return false; if (this.player.isVoteless && this.nominee.role.team !== "traveler") return false; + //TODO: Add logic here for banshee const session = this.session; const players = this.players.length; const index = this.players.indexOf(this.player); @@ -168,25 +179,23 @@ export default { }, voters: function () { const nomination = this.session.nomination[1]; - const voters = Array(this.players.length) - .fill("") - .map((x, index) => - this.session.votes[index] ? this.players[index].name : "" - ); + const reorder = [ - ...voters.slice(nomination + 1), - ...voters.slice(0, nomination + 1), + ...this.session.votes.slice(nomination + 1), + ...this.session.votes.slice(0, nomination + 1), ]; return ( this.session.lockedVote ? reorder.slice(0, this.session.lockedVote - 1) : reorder - ).filter((n) => !!n); + ).filter((n) => !!n) + .reduce((acc, cur) => acc + cur, 0); }, }, data() { return { voteTimer: null, + playerCurrentVoteCount: 1, }; }, methods: { diff --git a/src/components/modals/VoteHistoryModal.vue b/src/components/modals/VoteHistoryModal.vue index 1264df98..4cbd0fe2 100644 --- a/src/components/modals/VoteHistoryModal.vue +++ b/src/components/modals/VoteHistoryModal.vue @@ -67,7 +67,7 @@ {{ vote.nominee }} {{ vote.type }} - {{ vote.votes.length }} + {{ vote.votes.reduce((acc, curr) => acc + curr.voteCount, 0) }} @@ -80,7 +80,12 @@ /> - {{ vote.votes.join(", ") }} + {{ vote.votes.map(({ name, voteCount }) => { + if (voteCount !== 1) { + return `${name} (${voteCount})` + } + return name; + }).join(", ") }} diff --git a/src/roles.json b/src/roles.json index b7243b87..4b5022b0 100644 --- a/src/roles.json +++ b/src/roles.json @@ -2248,6 +2248,22 @@ "name": "Summoner", "team": "minion", "ability": "You get 3 bluffs. On the 3rd night, choose a player: they become an evil Demon of your choice. [No Demon]" +}, +{ + "id": "banshee", + "otherNight": 42.1, + "otherNightReminder": "Announce that the Banshee has died.", + "reminders": ["Has Ability"], + "name": "Banshee", + "team": "townsfolk", + "ability": "If the Demon kills you, all players learn this. From now on, you may nominate twice per day and vote twice per nomination." +}, +{ + "id": "squid", + "name": "Squid", + "team": "Traveler", + "reminders": [], + "ability": "You can vote with as many limbs as you can raise." } ] diff --git a/src/store/modules/players.js b/src/store/modules/players.js index 5d39f5a8..d1b4db73 100644 --- a/src/store/modules/players.js +++ b/src/store/modules/players.js @@ -8,6 +8,8 @@ const NEWPLAYER = { pronouns: "", isEmote: false, emoteType: "hand", + maxVoteCount: 1, + isVoteCountHidden: false, }; const state = () => ({ diff --git a/src/store/modules/session.js b/src/store/modules/session.js index de425c0b..b4699fe2 100644 --- a/src/store/modules/session.js +++ b/src/store/modules/session.js @@ -89,8 +89,11 @@ const mutations = { players.filter((player) => !player.isDead || isExile).length / 2 ), votes: players - .filter((player, index) => state.votes[index]) - .map(({ name }) => name), + .map((player, index) => { + const votes = state.votes[index]; + return { name: player.name, voteCount: votes }; + }) + .filter(({ voteCount }) => voteCount), }); }, clearVoteHistory(state) {