Skip to content

Commit

Permalink
Updated info popup text to reflect current rules and cards better, th…
Browse files Browse the repository at this point in the history
…ough they are still brief. Changed SideObjectives to update when a turn ends to show your new side objectives score close to when you play a card.
  • Loading branch information
strinsberg committed Jun 26, 2020
1 parent ebf42d6 commit 647af17
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
13 changes: 6 additions & 7 deletions src/components/game/PlayField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@
<p>Group cards can be used to group stacks with total points equal to the group
card's value. The group card will replace all cards that are grouped in a single
new stack.</p>
<p>Hack cards can be dragged onto any opponent stack that is highlighted red
to remove that stack from the opponents Playfield.</p>
<p>The scores from each stack are added up to help the player reach the score total.
If the player or the stack is affected by a negative effect the stack score
will change to red. This means the stacks is not contributing it's full score.
An example is the Malware card which reduces the players total score to 75% of
its actual value.</p>
<p>Virus cards can be dragged onto any opponent stack that is highlighted red.
Stacks with a Virus card on top will not be able to be added to. Those
started with instructions cards will be worth 0 points and those started with
Group cards will be woth 50%. Virus cards can be removed with Antivirus and
Scan cards to restore your stacks full value</p>
<p>The scores from each stack are added up to help the player reach the score total.</p>
</info-popup>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/components/game/PlayerInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
<p>Threat prevention shows all the safety and remedy cards that are active on the
player. You can mouse over them to be reminded of what their effect is.</p>
<p>Active Threats shows all the cyber attack cards that are active on the player.
These effects can be removed or prevented by different remedy and safety cards.
eg) Malware can be removed or prevented by Overclock and Anti-Virus cards.</p>
These effects can be removed or prevented by safety cards.
eg) Antivirus removes all malware effects.</p>
</info-popup>
</div>

Expand Down
27 changes: 17 additions & 10 deletions src/components/game/SideObjectives.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div id="side-objectives">
<div id="side-objectives" :key="bonuses.total">
<h3 id="title-text">bonus_points = {{ bonuses.total }}</h3>

<!-- The small divisions give simple syntax higlighting to objective text -->
Expand Down Expand Up @@ -35,6 +35,7 @@

<script>
import InfoPopup from '@/components/shared/InfoPopup'
import {bus} from '@/components/shared/Bus'
import {mapState} from 'vuex'
/**
Expand All @@ -57,14 +58,6 @@ export default {
'stacks',
'hands'
]),
/**
* Get an object with all the player's bonus scores.
*/
getBonuses () {
let stacks = this.stacks.filter(s => s.playerId === this.player.id)
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.
* Each item text for in the if statement, text for in the body,
Expand All @@ -89,8 +82,22 @@ export default {
return conds
}
},
methods: {
/**
* Get an object with all the player's bonus scores.
*/
getBonuses () {
let stacks = this.stacks.filter(s => s.playerId === this.player.id)
let hand = this.hands.find(h => h.playerId === this.player.id)
return this.player.objectives.getBonuses(hand, stacks)
}
},
created () {
this.bonuses = this.getBonuses
this.bonuses = this.getBonuses()
bus.$on('end-turn', () => {
this.bonuses = this.getBonuses()
})
}
}
</script>
Expand Down

0 comments on commit 647af17

Please sign in to comment.