From ebf42d66e875830e39552d2c7bcdf4f751cf8eee Mon Sep 17 00:00:00 2001 From: strinsberg Date: Fri, 26 Jun 2020 15:43:37 -0600 Subject: [PATCH] Fixed bug not showing bonus tab. Updated it's text to match current scoring --- src/components/game/SideObjectives.vue | 16 +++++++++------- src/components/modals/WinnerModal.vue | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/game/SideObjectives.vue b/src/components/game/SideObjectives.vue index f2d75a7c..cd6b056a 100644 --- a/src/components/game/SideObjectives.vue +++ b/src/components/game/SideObjectives.vue @@ -54,14 +54,16 @@ export default { }, computed: { ...mapState([ - 'stacks' + 'stacks', + 'hands' ]), /** * Get an object with all the player's bonus scores. */ getBonuses () { let stacks = this.stacks.filter(s => s.playerId === this.player.id) - return this.player.objectives.getBonuses(stacks) + let hand = this.hands.find(h => h.playerId === this.player.id) + return this.player.objectives.getBonuses(hand, stacks) }, /** * Returns a list of all the condition data. @@ -72,17 +74,17 @@ export default { let conds = [] conds.push({if: "group_card_played", reward: "+5 pts/card", val: this.bonuses.group}) - conds.push({if: "repeat_card_played", reward: "+2 pts/card", + conds.push({if: "repeat_card_played", reward: "+3 pts/card", val: this.bonuses.repeat}) - conds.push({if: "variable_card_played", reward: "+3 pts/card", + conds.push({if: "variable_card_played", reward: "+2 pts/card", val: this.bonuses.variable}) - conds.push({if: "safety_card_played", reward: "+10 pts/card", + conds.push({if: "safety_card_played", reward: "+3 pts/card", val: this.bonuses.safety}) - conds.push({if: "all_safeties", reward: "+10 pts", + conds.push({if: "defensive_bonus", reward: "Antivirus +10 || Firewall +5", val: this.bonuses.defensive}) conds.push({if: "no_malware", reward: "+10 pts", val: this.bonuses.clean}) - conds.push({if: "complete_program", reward: "+10 pts", + conds.push({if: "nested_loops", reward: "+5 pts/per nested loop", val: this.bonuses.complete}) return conds } diff --git a/src/components/modals/WinnerModal.vue b/src/components/modals/WinnerModal.vue index 4b0c3280..9387960d 100644 --- a/src/components/modals/WinnerModal.vue +++ b/src/components/modals/WinnerModal.vue @@ -47,7 +47,7 @@ Nested Loops {{ playerScore(player.id).bonuses.complete }} - Defensive Programmer (AntiVirus) + Defensive Programmer {{ playerScore(player.id).bonuses.defensive }} Clean System (No Malware)