summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-01-04 20:52:31 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 13:02:38 +0100
commit4dd7cdbe88a123574e9aa5636159d66c3ee942aa (patch)
treed3e70530cf5edbdaa79a9037c6a07d1a78783e7e
parentaf993cfd85759c5b118657436f555395887626e4 (diff)
downloadnevsky-4dd7cdbe88a123574e9aa5636159d66c3ee942aa.tar.gz
Torzhok.
-rw-r--r--rules.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 13e6da2..f069b9b 100644
--- a/rules.js
+++ b/rules.js
@@ -2104,13 +2104,18 @@ function action_torzhok(lord, asset) {
states.torzhok = {
prompt() {
- view.prompt = "Torzhok: Remove up to 3 Assets from Domash or up to 3 Coin from Veche."
if (game.count > 0) {
+ if (game.count === 3)
+ view.prompt = "Torzhok: Remove up to 3 Assets from Domash or up to 3 Coin from Veche."
if (game.count === 3 || game.who === NOBODY) {
+ if (game.count < 3)
+ view.prompt = `Torzhok: Remove up to ${game.count} Coin from Veche.`
if (game.pieces.veche_coin > 0)
view.actions.veche_coin = 1
}
if (game.count === 3 || game.who === LORD_DOMASH) {
+ if (game.count < 3)
+ view.prompt = `Torzhok: Remove up to ${game.count} Assets from Domash.`
if (get_lord_assets(LORD_DOMASH, PROV) > 0)
gen_action_prov(LORD_DOMASH)
if (get_lord_assets(LORD_DOMASH, COIN) > 0)
@@ -2126,6 +2131,8 @@ states.torzhok = {
if (get_lord_assets(LORD_DOMASH, SHIP) > 0)
gen_action_ship(LORD_DOMASH)
}
+ } else {
+ view.prompt = "Torzhok: All done."
}
view.actions.done = 1
},
@@ -2139,7 +2146,8 @@ states.torzhok = {
veche_coin() {
push_undo()
logi(`Removed Coin from Veche.`)
- view.actions.veche_coin -= 1
+ game.pieces.veche_coin -= 1
+ game.who = NOBODY
game.count--
},
done() {