summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js42
1 files changed, 33 insertions, 9 deletions
diff --git a/rules.js b/rules.js
index 49dea02..f324f35 100644
--- a/rules.js
+++ b/rules.js
@@ -2391,8 +2391,14 @@ function end_player_turn() {
// Reveal supply cards
if (game.commit[0] + game.commit[1] > 0) {
log_br()
- log(`Supply Cards Revealed`)
- log(`>${game.commit[0]} real and ${game.commit[1]} dummy.`)
+ if (game.commit[0] === 0 && game.commit[1] === 0)
+ log(`Revealed zero supply.`)
+ else if (game.commit[1] === 0)
+ log(`Revealed ${game.commit[0]} real supply.`)
+ else if (game.commit[0] === 0)
+ log(`Revealed ${game.commit[1]} dummy supply.`)
+ else
+ log(`Revealed ${game.commit[0]} real and ${game.commit[1]} dummy supply.`)
log_br()
}
@@ -4273,7 +4279,7 @@ states.refuse_battle = {
gen_action('pass')
},
hex(x) {
- log_h3(`Refused battle at #${x}`)
+ log_h4(`Refused battle at #${x}`)
game.refuse = x
set_delete(game.new_battles, x)
goto_pursuit_fire_during_refuse_battle(x)
@@ -4366,7 +4372,7 @@ function goto_rout(from, enemy, after) {
if (enemy)
set_enemy_player()
- log_h3(`Rout at #${from}`)
+ log_h4(`Rout at #${from}`)
// RULES: Will be disrupted again, so won't be able to recover.
for_each_friendly_unit_in_hex(from, u => {
@@ -4612,6 +4618,21 @@ states.select_assault_battles = {
function goto_select_battle() {
if (game.active_battles.length > 0) {
+ if (game.active_battles.length > game.assault_battles.length) {
+ log_br()
+ log("Active battles")
+ for (let x of game.active_battles)
+ if (!set_has(game.assault_battles, x))
+ log(`>#${x}`)
+ }
+
+ if (game.assault_battles.length > 0) {
+ log_br()
+ log("Assault battles")
+ for (let x of game.assault_battles)
+ log(`>#${x}`)
+ }
+
if (game.active_battles.length === 1)
goto_battle(game.active_battles[0])
else
@@ -4736,8 +4757,7 @@ function goto_battle(x) {
log_h3(`Battle at #${x}`)
// goto defensive fire
- log_br()
- log(`Defensive Fire`)
+ log_h4(`Defensive Fire`)
set_passive_player()
game.state = 'battle_fire'
game.hits = [ 0, 0, 0, 0 ]
@@ -5006,8 +5026,7 @@ function end_battle_hits() {
goto_rout(game.battle, false, end_battle)
} else if (game.active === game.phasing && has_friendly_units_in_battle()) {
// goto offensive fire
- log_br()
- log(`Offensive Fire`)
+ log_h4(`Offensive Fire`)
game.state = 'battle_fire'
game.hits = [ 0, 0, 0, 0 ]
} else {
@@ -5684,7 +5703,7 @@ function print_buildup_summary() {
let to = (mm >>> 8 ) & 255
let sea = (mm >>> 16) & 255
if (sea)
- log(`>${n} #${from} to #${to}*`)
+ log(`>${n} #${from} to #${to} *`)
else
log(`>${n} #${from} to #${to}`)
}
@@ -7196,6 +7215,11 @@ function log_h3(msg) {
log_br()
}
+function log_h4(msg) {
+ log_br()
+ log(".h4 " + msg)
+}
+
function gen_action(action, argument) {
if (argument !== undefined) {
if (!(action in view.actions)) {