summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events.txt5
-rw-r--r--play.html17
-rw-r--r--play.js9
-rw-r--r--rules.js26
4 files changed, 49 insertions, 8 deletions
diff --git a/events.txt b/events.txt
index bf367a5..f0fc35c 100644
--- a/events.txt
+++ b/events.txt
@@ -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
diff --git a/play.html b/play.html
index 398a94b..c918959 100644
--- a/play.html
+++ b/play.html
@@ -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()">&#x1F41E; Save</div>
+ <div class="menu_item" onclick="send_restore()">&#x1F41E; Restore</div>
+ <div class="menu_item" onclick="send_restart('Standard')">&#x26a0; Restart</div>
</div>
</div>
<div class="icon_button" onclick="toggle_zoom()"><img src="/images/magnifying-glass.svg"></div>
diff --git a/play.js b/play.js
index eb6ea6f..069daac 100644
--- a/play.js
+++ b/play.js
@@ -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
}
diff --git a/rules.js b/rules.js
index bf1cc1b..cccf046 100644
--- a/rules.js
+++ b/rules.js
@@ -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 ],
]