diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -2092,6 +2092,24 @@ states.battle_round = { function goto_battle_hits() { game.battle_list = list_victims(game.active) + + if (game.autohit) { + let n = 0 + while (game.hits >= game.battle_list.length && game.battle_list.length > 0) { + while (game.battle_list.length > 0) { + let who = game.battle_list.pop() + log_battle(block_name(who) + " took a hit.") + reduce_block(who, 'combat') + game.hits-- + ++n + } + if (game.hits > 0) + game.battle_list = list_victims(game.active) + } + if (n > 0) + game.flash += ` Assigned ${n}.` + } + if (game.battle_list.length === 0) resume_battle() else @@ -2602,6 +2620,9 @@ exports.setup = function (seed, scenario, options) { if (options.automatic_disruption) game.automatic_disruption = 1 + if (options.autohit) + game.autohit = 1 + setup_historical_deployment() if (scenario === "Free Deployment") start_free_deployment() |