summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js10
-rw-r--r--rules.js6
2 files changed, 12 insertions, 4 deletions
diff --git a/play.js b/play.js
index 6e6c9f3..1408a0a 100644
--- a/play.js
+++ b/play.js
@@ -531,6 +531,7 @@ function update_battle() {
ui.battle.classList.remove("hide")
ui.battle_header.textContent = hex_name[view.battle]
ui.battle_message.textContent = view.flash
+ // TODO: don't show disrupted units?
if (player === ALLIED) {
update_battle_line(view.battle, ui.battle_line_1, u => is_axis_unit(u) && is_artillery_unit(u))
update_battle_line(view.battle, ui.battle_line_2, u => is_axis_unit(u) && !is_artillery_unit(u))
@@ -597,10 +598,6 @@ function on_update() {
action_button("overrun", "Overrun")
action_button("rommel", "Rommel")
action_button("stop", "Stop")
- action_button("end_move", "End move")
-
- action_button("end_retreat", "End retreat")
- action_button("end_combat", "End combat")
action_button("group", "Group")
action_button("regroup", "Regroup")
@@ -612,6 +609,11 @@ function on_update() {
action_button("pass", "Pass")
action_button("next", "Next")
+ action_button("end_move", "End move")
+ action_button("end_retreat", "End retreat")
+ action_button("end_combat", "End combat")
+ action_button("end_turn", "End turn")
+
action_button("undo", "Undo")
}
diff --git a/rules.js b/rules.js
index 7519ebd..b4dd302 100644
--- a/rules.js
+++ b/rules.js
@@ -1177,6 +1177,8 @@ states.select_moves = {
}
gen_action('group')
gen_action('regroup')
+ if (game.turn_option === 'pass')
+ gen_action('end_turn')
},
group() {
push_undo()
@@ -1186,6 +1188,10 @@ states.select_moves = {
push_undo()
game.state = 'regroup_move_command_point'
},
+ end_turn() {
+ clear_undo()
+ end_player_turn()
+ }
}
function gen_rommel_move() {