diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-05-09 10:13:48 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-24 21:06:18 +0200 |
commit | 6e11782299250cecad1ef3603f850859fa5769e6 (patch) | |
tree | f3edb904ddbda986b1b80b31f07399899983fe56 | |
parent | 8d1550f08e25d0f13661b8db99a181a0515adbf7 (diff) | |
download | red-flag-over-paris-6e11782299250cecad1ef3603f850859fa5769e6.tar.gz |
Styling & Prompts.
-rw-r--r-- | events.txt | 5 | ||||
-rw-r--r-- | play.html | 17 | ||||
-rw-r--r-- | play.js | 9 | ||||
-rw-r--r-- | rules.js | 26 |
4 files changed, 49 insertions, 8 deletions
@@ -78,6 +78,7 @@ CARD 10 - Fortification of Mont-Valérien CARD 11 - Adolphe Thiers increase_prussian_collaboration + prompt "Place up to 2 in Royalists." place_up_to 2 ROYALISTS CARD 12 - Otto von Bismarck @@ -109,6 +110,7 @@ CARD 15 - Jules Favre place_up_to 1 REPUBLICANS CARD 16 - Hostage Decree + prompt "Remove all from Catholic Church." remove 20 CATHOLIC_CHURCH CARD 17 - Maréchal Macmahon @@ -167,7 +169,9 @@ CARD 27 - Luise Michel endswitch CARD 28 - Jaroslav Dombrowski + prompt "Place up to 1 in Paris." place_up_to 1 PARIS + prompt "You may place a Barricade in Paris." may_place_disc PARIS CARD 29 - Raoul Rigault @@ -295,6 +299,7 @@ CARD 44 - Commune's Stronghold CARD 45 - Fighting in Issy Village ops 2 FORTS player VERSAILLES + prompt "You may place a Fortification in Fort d'Issy." may_place_disc FORT_D_ISSY CARD 46 - Battle of Mont-Valérien @@ -22,7 +22,8 @@ body.Versailles header.your_turn { background-color: skyblue; } #log { background-color: ivory; } #log .h1 { background-color: tan; font-weight: bold; padding-top:2px; padding-bottom:2px; text-align: center; } -#log .h2 { background-color: wheat; padding-top:2px; padding-bottom:2px; text-align: center; } +#log .h2 { background-color: palegoldenrod; padding-top:2px; padding-bottom:2px; text-align: center; } +#log .h3 { background-color: beige; text-align: center; } #log .commune { background-color: lightpink } #log .versailles { background-color: lightblue } #log > .i { padding-left: 20px; } @@ -127,11 +128,17 @@ body.Observer #set_aside_panel { display: none } .space { position: absolute; - border: 8px solid transparent; + box-sizing: border-box; + border: 4px solid transparent; } .space.action { - border-color: white; + border: 4px solid white; + background-color: #fff8; +} + +.space.selected { + border: 4px dashed yellow; } .piece { @@ -385,6 +392,10 @@ body.Observer #set_aside_panel { display: none } <a class="menu_item" href="info/cards.html" target="_blank">Cards</a> <div class="resign menu_separator"></div> <div class="resign menu_item" onclick="confirm_resign()">Resign</div> + <div class="menu_separator"></div> + <div class="menu_item" onclick="send_save()">🐞 Save</div> + <div class="menu_item" onclick="send_restore()">🐞 Restore</div> + <div class="menu_item" onclick="send_restart('Standard')">⚠ Restart</div> </div> </div> <div class="icon_button" onclick="toggle_zoom()"><img src="/images/magnifying-glass.svg"></div> @@ -83,7 +83,7 @@ const space_names = [ "Catholic Church", "Social Movements", "Mont-Valérien", - "Fort D'Issy", + "Fort d'Issy", "Château de Vincennes", "Butte Montmartre", "Butte-Aux-Cailles", @@ -121,7 +121,7 @@ const boxes = { "Republicans": [490,428,126,126], "Catholic Church": [80,786,126,126], "Social Movements": [490,786,126,126], - "Fort D'Issy": [844,793,126,126], + "Fort d'Issy": [844,793,126,126], "Butte-Aux-Cailles": [1038,660,126,126], "Père Lachaise": [1206,591,126,126], "Château de Vincennes": [1342,650,126,127], @@ -366,6 +366,11 @@ function on_log(text) { p.className = 'h2' } + if (text.match(/^\.h3/)) { + text = text.substring(4) + p.className = 'h3' + } + p.innerHTML = text return p } @@ -107,7 +107,7 @@ const space_names = [ "Catholic Church", "Social Movements", "Mont-Valérien", - "Fort D'Issy", + "Fort d'Issy", "Château de Vincennes", "Butte Montmartre", "Butte-Aux-Cailles", @@ -1168,6 +1168,7 @@ states.play_final_discard = { card(c) { push_undo() log("Discarded C" + c + " to play C" + game.what + ".") + discard_final() discard_card(c) game.state = "play_final_ops" }, @@ -1182,13 +1183,11 @@ states.play_final_ops = { }, political() { push_undo() - discard_final() log("4 Ops.") goto_operations(4, POLITICAL) }, military() { push_undo() - discard_final() log("4 Ops.") goto_operations(4, MILITARY) }, @@ -2378,6 +2377,16 @@ states.vm_switch = { game.vm.choice = "ops" vm_next() }, + political() { + push_undo() + game.vm.choice = "political" + vm_next() + }, + military() { + push_undo() + game.vm.choice = "military" + vm_next() + }, public_opinion() { push_undo() game.vm.choice = "public_opinion" @@ -2576,6 +2585,7 @@ states.vm_replace = { }, piece(p) { push_undo() + let s = game.pieces[p] replace_cube(p) log("Replaced in S" + s + ".") if (--game.vm.count === 0 || !can_vm_replace()) @@ -3099,6 +3109,12 @@ function log_h2(msg) { log_br() } +function log_h3(msg) { + log_br() + log(".h3 " + msg) + log_br() +} + // === COMMON LIBRARY === function clear_undo() { @@ -3285,6 +3301,7 @@ CODE[10] = [ // Fortification of Mont-Valérien CODE[11] = [ // Adolphe Thiers [ vm_increase_prussian_collaboration ], + [ vm_prompt, "Place up to 2 in Royalists." ], [ vm_place_up_to, 2, ROYALISTS ], [ vm_return ], ] @@ -3403,7 +3420,9 @@ CODE[27] = [ // Luise Michel ] CODE[28] = [ // Jaroslav Dombrowski + [ vm_prompt, "Place up to 1 in Paris." ], [ vm_place_up_to, 1, PARIS ], + [ vm_prompt, "You may place a Barricade in Paris." ], [ vm_may_place_disc, PARIS ], [ vm_return ], ] @@ -3556,6 +3575,7 @@ CODE[44] = [ // Commune's Stronghold CODE[45] = [ // Fighting in Issy Village [ vm_ops, 2, FORTS ], [ vm_player, VERSAILLES ], + [ vm_prompt, "You may place a Fortification in Fort d'Issy." ], [ vm_may_place_disc, FORT_D_ISSY ], [ vm_return ], ] |