summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-11-19 18:25:39 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:37 +0100
commit16dde60a53bff582d7790d27ca327fcced2283c1 (patch)
tree3a106f6bfc397ed05436ab82932e0002d4f317b7 /rules.js
parent62c88c0090471d1442002078c5d1a2372dddbc72 (diff)
downloadnevsky-16dde60a53bff582d7790d27ca327fcced2283c1.tar.gz
Show events.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/rules.js b/rules.js
index 2382103..76d10eb 100644
--- a/rules.js
+++ b/rules.js
@@ -354,6 +354,8 @@ function is_levy_phase() {
}
function is_card_in_use(c) {
+ if (set_has(game.events, c))
+ return true
if (set_has(game.capabilities, c))
return true
if (game.lords.cards.includes(c))
@@ -1515,24 +1517,27 @@ exports.view = function(state, current) {
prompt: null,
actions: null,
log: game.log,
+
turn: game.turn,
lords: game.lords,
vassals: game.vassals,
- legate: game.legate,
- veche_vp: game.veche_vp,
- veche_coin: game.veche_coin,
+ events: game.events,
capabilities: game.capabilities,
conquered: game.conquered,
ravaged: game.ravaged,
castles: game.castles,
+ sieges: game.sieges,
+
+ legate: game.legate,
+ veche_vp: game.veche_vp,
+ veche_coin: game.veche_coin,
+
command: game.command,
plan: null,
who: game.who,
where: game.where,
}
- view.sieges = { 0: 3, [LOC_NOVGOROD]: 2, [LOC_PSKOV]: 1 }
-
if (game.state === 'game_over') {
view.prompt = game.victory
} else if (current === 'Observer' || (game.active !== current && game.active !== BOTH)) {