summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-04-13 11:27:42 +0200
committerTor Andersson <tor@ccxvii.net>2025-04-13 11:27:42 +0200
commit8b8e940e42b6e8088eecd8f9a3bb004143e8ac62 (patch)
tree6fd93a758fdfa184d105961aa8abd5f0a5cef24a
parent6a7570a6a4a73914fbc82b041f6296a2ec7bb314 (diff)
downloadvijayanagara-8b8e940e42b6e8088eecd8f9a3bb004143e8ac62.tar.gz
Add confirmation step for Mongol Invasion cards.
-rw-r--r--info/cards.html2
-rw-r--r--play.css2
-rw-r--r--rules.js25
3 files changed, 20 insertions, 9 deletions
diff --git a/info/cards.html b/info/cards.html
index 43809b7..4fb5ff9 100644
--- a/info/cards.html
+++ b/info/cards.html
@@ -12,7 +12,7 @@ img {
margin: 24px;
width: 250px;
height: 350px;
- border-radius: 16px;
+ border-radius: 10px;
box-shadow: 1px 1px 4px #0008;
background-color: darkgreen;
background-size: cover;
diff --git a/play.css b/play.css
index 08b82eb..8f6f8a0 100644
--- a/play.css
+++ b/play.css
@@ -391,7 +391,7 @@ path.campaign { stroke: black; stroke-dasharray: 4 4; }
.card {
width: 250px;
height: 350px;
- border-radius: 16px;
+ border-radius: 10px;
background-color: #c6bb8d;
background-size: cover;
background-repeat: no-repeat;
diff --git a/rules.js b/rules.js
index ca7dcf0..3d9fc37 100644
--- a/rules.js
+++ b/rules.js
@@ -564,7 +564,7 @@ function end_cavalry() {
function goto_compromising_gifts() {
if (game.inf[game.current] === 0)
- end_card()
+ game.state = "end_mongol_invasion"
else
game.state = "compromising_gifts"
}
@@ -798,12 +798,12 @@ states.compromising_gifts = {
}
game.cav = {
"n": 2,
- "next": "end_card"
+ "next": "end_mongol_invasion"
}
remove_influence(f)
},
end_gifts() {
- end_card()
+ game.state = "end_mongol_invasion"
}
}
@@ -915,10 +915,10 @@ states.rebel = {
}
states.strategic_assistance = {
- inactive: "Strategic Assistance",
+ inactive: "Mongol Invasion",
prompt() {
- let n_command = (game.cmd.free === 2) ? "two" : "one"
- view.prompt = `Strategic Assistance: ${faction_name[game.current]} must execute ${n_command} Mongol Invaders Commands.`
+ let n_command = (game.cmd.free === 2) ? "two Mongol Commands" : "one Mongol Command"
+ view.prompt = `Strategic Assistance: Carry out ${n_command}.`
gen_mi_command()
},
@@ -927,6 +927,17 @@ states.strategic_assistance = {
mi_attack: goto_mi_attack,
}
+states.end_mongol_invasion = {
+ inactive: "Mongol Invasion",
+ prompt() {
+ view.prompt = "Mongol Invasion: Done."
+ view.actions.end_of_turn = 1
+ },
+ end_of_turn() {
+ end_card()
+ },
+}
+
states.tax = {
inactive: "Tax",
prompt() {
@@ -2706,7 +2717,7 @@ function can_amass() {
states.amass = {
inactive: "Amass",
prompt() {
- view.prompt = "Amass: Place up to three Mongol Invaders in the Mountain Passes."
+ view.prompt = "Amass: Place three Mongol Invaders in the Mountain Passes."
gen_action_space(S_MONGOL_INVADERS)
},