summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-21 00:10:19 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-21 00:11:27 +0200
commit9f5ba19997bb5ebc4d02ce734b934f9ab562c207 (patch)
treeba2852520e590ea8f498d93111b8347a4d54ce7a /rules.ts
parentd38bd7128125717e125d2c2b1eb44952d02e5ae4 (diff)
downloadplantagenet-9f5ba19997bb5ebc4d02ce734b934f9ab562c207.tar.gz
Streamlining and prompts.
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts12
1 files changed, 4 insertions, 8 deletions
diff --git a/rules.ts b/rules.ts
index e4e32a4..311f87c 100644
--- a/rules.ts
+++ b/rules.ts
@@ -8475,8 +8475,8 @@ function check_campaign_victory_lancaster() {
}
function check_campaign_victory() {
- let york_v = check_campaign_victory_york(true)
- let lancaster_v = check_campaign_victory_lancaster(true)
+ let york_v = check_campaign_victory_york()
+ let lancaster_v = check_campaign_victory_lancaster()
if (york_v && lancaster_v) {
goto_game_over("Draw", "The game ended in a draw.")
@@ -10261,8 +10261,7 @@ function end_lancaster_event_french_troops() {
states.french_troops = {
inactive: "French Troops",
prompt() {
-
- view.prompt = `Add 2 Men at Arms and 2 Militia to a Lord at a port.`
+ view.prompt = `French Troops: Add up to 2 Men at Arms and up to 2 Militia to a Lord at a port.`
if (game.who === NOBODY) {
for (let lord of all_friendly_lords()) {
if (is_lord_on_map(lord) && is_seaport(get_lord_locale(lord))) {
@@ -10270,23 +10269,20 @@ states.french_troops = {
}
}
} else {
- view.prompt = `Add ${2-pack2_get(game.count, 0)} Men at Arms and ${2-pack2_get(game.count, 1)} Militia to ${lord_name[game.who]}.`
+ view.prompt = `French Troops: Add up to 2 Men at Arms and up to 2 Militia to ${lord_name[game.who]}.`
if (pack2_get(game.count, 0) < 2)
view.actions.add_men_at_arms = 1
if (pack2_get(game.count, 1) < 2)
view.actions.add_militia = 1
}
-
view.actions.done = 1
},
add_men_at_arms() {
- push_undo()
add_lord_forces(game.who, MEN_AT_ARMS, 1)
let c = pack2_get(game.count, 0)
game.count = pack2_set(game.count, 0, c+1)
},
add_militia() {
- push_undo()
add_lord_forces(game.who, MILITIA, 1)
let c = pack2_get(game.count, 1)
game.count = pack2_set(game.count, 1, c+1)