summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorFrans Bongers <fransbongers@franss-mbp.home>2025-01-24 21:34:47 +0100
committerFrans Bongers <fransbongers@franss-mbp.home>2025-01-24 21:34:47 +0100
commit32c5d3a4b5bd208ba620ea336bc4b35835cf391b (patch)
tree9a2c8f9a2823f3097a0bf1fb44e1e349ee6d76f2 /rules.js
parentfe446f34e98f87dfc8e7bdce27b082b50a81a9ff (diff)
downloadland-and-freedom-32c5d3a4b5bd208ba620ea336bc4b35835cf391b.tar.gz
Disable button if icon cannot be resolvedHEADmaster
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 6920a5e..e85112a 100644
--- a/rules.js
+++ b/rules.js
@@ -516,6 +516,12 @@ function start_turn() {
}
next();
}
+function player_can_resolve_icon(icon) {
+ if (icon === 'teamwork_on' && game.bonuses[data_1.TEAMWORK_BONUS] === data_1.ON) {
+ return false;
+ }
+ return true;
+}
states.activate_icon = {
inactive: 'activate an icon',
prompt() {
@@ -524,6 +530,9 @@ states.activate_icon = {
const c = cards[game.played_card];
for (const i of c.icons) {
gen_action(i);
+ if (!player_can_resolve_icon(i)) {
+ view.actions[i] = 0;
+ }
}
},
spend_hp() {