diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-06-05 01:43:36 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-06-05 01:43:36 +0200 |
commit | f8c4a98ab031abda04b3b089d9a7d490da2ff9ae (patch) | |
tree | 38954dd2a3c7387858332ef2b7f78da5a083aef7 | |
parent | 957225d83351a9dc42b84ea72a98406136a55d18 (diff) | |
download | friedrich-f8c4a98ab031abda04b3b089d9a7d490da2ff9ae.tar.gz |
log fate card movements using paths too
-rw-r--r-- | rules.js | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -365,6 +365,17 @@ function is_important_move(s) { return set_has(game.move_conq, s) || set_has(game.move_reconq, s) || set_has(game.retro, s) } +function log_small_move_to(to) { + if (0) { + log_selected() + log(">from S" + game.pos[game.selected[0]]) + log(">to S" + s) + } else { + let from = game.pos[game.selected[0]] + log("@" + game.selected.join(",") + ";" + from + "," + to) + } +} + function log_selected_move_path() { if (0) { log_selected() @@ -3842,9 +3853,7 @@ states.austria_may_move_laudon_by_one_city_immediately = { space(s) { push_undo() - log_selected() - log(">from S" + game.pos[game.selected[0]]) - log(">to S", s) + log_small_move_to(s) move_general_immediately(s) game.state = "laudon_done" @@ -4003,9 +4012,7 @@ states.move_to_any_empty_adjacent_city = { gen_action_space(next) }, space(s) { - log_selected() - log(">from S" + game.pos[game.selected[0]]) - log(">to S" + s) + log_small_move_to(s) for (let p of game.selected) game.pos[p] = s game.state = "prussians_who_are_attacked_by_daun_may_move" |