summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-03-28 14:21:31 +0100
committerTor Andersson <tor@ccxvii.net>2025-03-28 14:21:31 +0100
commit53c2360b4ee8d85b2c7fec2606d39e05d3f7843c (patch)
tree7c5309c12410cf2af605e7c98d9037aa41adcb94
parent58758edfe76b07e1c35f0bd435127d02fc39eab7 (diff)
downloadland-and-freedom-53c2360b4ee8d85b2c7fec2606d39e05d3f7843c.tar.gz
Improve some "impossible" prompts.
-rw-r--r--rules.js11
-rw-r--r--rules.ts11
2 files changed, 12 insertions, 10 deletions
diff --git a/rules.js b/rules.js
index b06f4be..ae6c72b 100644
--- a/rules.js
+++ b/rules.js
@@ -737,7 +737,7 @@ states.add_to_front = {
const args = get_active_node_args();
const possible_fronts = get_fronts_to_add_to(args.t);
if (possible_fronts.length === 0) {
- view.prompt = 'No possible Front to Support.';
+ view.prompt = 'Cannot support ' + front_names[args.t] + '.';
gen_action('skip');
}
else if (possible_fronts.length === 4) {
@@ -770,7 +770,7 @@ states.attack_front = {
const possible_fronts = get_fronts_to_add_to(target, n);
const number_of_fronts = possible_fronts.length;
if (number_of_fronts === 0) {
- view.prompt = 'No possible Front to Attack.';
+ view.prompt = 'Cannot attack ' + front_names[target] + '.';
gen_action('skip');
}
else if (possible_fronts.length === 4) {
@@ -1455,6 +1455,7 @@ states.move_track = {
can_move_track = gen_move_track(track, game.tracks[track] + value) || can_move_track;
}
if (!can_move_track) {
+ view.prompt = view.prompt.replace("Move", "Cannot move");
gen_action('skip');
}
},
@@ -1604,12 +1605,12 @@ function set_player_turn_prompt({ can_play_card, use_ap, use_momentum, use_moral
else if (use_ap)
view.prompt = "Use Action Points.";
else if (use_momentum)
- view.prompt = "Play a second card.";
+ view.prompt = "Use Momentum Medallion.";
else
- view.prompt = "Player Turn: Done.";
+ view.prompt = "Player turn done.";
}
states.player_turn = {
- inactive: 'use their played card',
+ inactive: 'play their card',
prompt() {
gen_spend_hero_points();
const faction_id = get_active_faction();
diff --git a/rules.ts b/rules.ts
index 0ed7842..f7bd01e 100644
--- a/rules.ts
+++ b/rules.ts
@@ -982,7 +982,7 @@ states.add_to_front = {
const args = get_active_node_args();
const possible_fronts = get_fronts_to_add_to(args.t);
if (possible_fronts.length === 0) {
- view.prompt = 'No possible Front to Support.'
+ view.prompt = 'Cannot support ' + front_names[args.t] + '.'
gen_action('skip');
} else if (possible_fronts.length === 4) {
view.prompt = `Support any Front.`;
@@ -1017,7 +1017,7 @@ states.attack_front = {
const number_of_fronts = possible_fronts.length;
if (number_of_fronts === 0) {
- view.prompt = 'No possible Front to Attack.';
+ view.prompt = 'Cannot attack ' + front_names[target] + '.'
gen_action('skip');
} else if (possible_fronts.length === 4) {
view.prompt = `Attack any Front.`;
@@ -1769,6 +1769,7 @@ states.move_track = {
can_move_track = gen_move_track(track, game.tracks[track] + value) || can_move_track;
}
if (!can_move_track) {
+ view.prompt = view.prompt.replace("Move", "Cannot move")
gen_action('skip');
}
},
@@ -1951,13 +1952,13 @@ function set_player_turn_prompt({
else if (use_ap)
view.prompt = "Use Action Points."
else if (use_momentum)
- view.prompt = "Play a second card."
+ view.prompt = "Use Momentum Medallion."
else
- view.prompt = "Player Turn: Done."
+ view.prompt = "Player turn done."
}
states.player_turn = {
- inactive: 'use their played card',
+ inactive: 'play their card',
prompt() {
gen_spend_hero_points();
const faction_id = get_active_faction();