diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-24 19:08:27 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-30 21:59:25 +0200 |
commit | 747f34b553bf0388c2f48c169a9eb24ac6cf8c4c (patch) | |
tree | efcd248a7b96f0306d6fc9097e4688b7e0599ff3 | |
parent | fb1b55e614598fb846b97d5f2a09bbea3ea90f24 (diff) | |
download | friedrich-747f34b553bf0388c2f48c169a9eb24ac6cf8c4c.tar.gz |
use full names in prompt
-rw-r--r-- | rules.js | 30 |
1 files changed, 24 insertions, 6 deletions
@@ -158,7 +158,7 @@ const all_power_re_entry_cities = [ data.sectors.hearts_south_of_koblenz, ] -const piece_name = [ +const piece_abbr = [ "P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8", "H1", "H2", "R1", "R2", "R3", "R4", @@ -169,6 +169,23 @@ const piece_name = [ "PT1", "PT2", "HT", "RT1", "RT2", "ST", "AT1", "AT2", "IAT", "FT1", "FT2", ] +const piece_name = [ + "Friedrich", "Winterfeldt", "Heinrich", "Schwerin", "Keith", "Seydlitz", "Dohna", "Lehwaldt", + "Ferdinand", "Cumberland", + "Saltikov", "Fermor", "Apraxin", "Tottleben", + "Ehrensvärd", + "Daun", "Browne", "Karl", "Laudon", "Lacy", + "Hildburghausen", + "Richelieu", "Soubise", "Chevert", + "Prussian Train", "Prussian Train", + "Hanoverian Train", + "Russian Train", "Russian Train", + "Swedish Train", + "Austrian Train", "Austrian Train", + "Imperial Army Train", + "French Train", "French Train", +] + const all_power_generals = [ /* P */ [ 0, 1, 2, 3, 4, 5, 6, 7 ], /* H */ [ 8, 9 ], @@ -1374,8 +1391,10 @@ function move_general_to(to) { } function move_general_immediately(to) { - let who = game.selected[0] - let from = game.pos[who] + for (let p of game.selected) { + log("P" + p + " to S" + to) + game.pos[p] = to + } // uniting stacks (turn all oos if one is oos) let oos = false @@ -1398,7 +1417,7 @@ function move_general_immediately(to) { states.move_supply_train_NEW = { prompt() { - prompt("Move " + format_selected() + format_move(2)) + prompt("Move supply train" + format_move(2)) view.selected = game.selected let who = game.selected[0] @@ -1467,7 +1486,7 @@ states.move_supply_train_NEW = { states.move_supply_train_OLD = { prompt() { - prompt("Move " + format_selected() + format_move(2)) + prompt("Move supply train" + format_move(2)) view.selected = game.selected let who = game.selected[0] @@ -3067,7 +3086,6 @@ states.austria_may_move_laudon_by_one_city_immediately = { }, space(s) { push_undo() - log("P" + GEN_LAUDON + " to S" + s) // no conquest, but may capture supply trains? move_general_immediately(s) game.state = "laudon_done" |