summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.js76
-rw-r--r--play.js22
-rw-r--r--rules.js9
-rw-r--r--tools/gendata.js4
-rw-r--r--tools/scenarios.csv2
5 files changed, 64 insertions, 49 deletions
diff --git a/data.js b/data.js
index e38dd18..2f932af 100644
--- a/data.js
+++ b/data.js
@@ -2539,7 +2539,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 4,
@@ -2624,7 +2624,7 @@ cards: [
],
"rule_text": "When this card comes out of Reserve, Northumberland immediately Routs.",
"lore_text": "The Stanleys were political intriguers who spent most of the battle on the sidelines, waiting to see who was likely to win before intervening decisively for Henry.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 5,
@@ -4959,7 +4959,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 13,
@@ -5053,7 +5053,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 13,
@@ -5075,7 +5075,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 13,
@@ -5173,7 +5173,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 14,
@@ -8189,7 +8189,7 @@ cards: [
"attack_reserve": 1
},
"rule_text": "This Formation can Attack its targets even when those targets are in Reserve.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 21,
@@ -9597,7 +9597,7 @@ cards: [
"attack_reserve": 1
},
"rule_text": "When this card enters play, the Union Formations Zook and Kelly immediately Retire. <p>This Formation can Attack targets even when those targets are in Reserve.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 25,
@@ -11822,7 +11822,7 @@ cards: [
}
],
"rule_text": "When both Rupert of the Rhine and Wilmot have left play (either via Rout or Pursuit), this card comes out of reserve.",
- "reserve": []
+ "reserve": "See Above"
},
{
"scenario": 30,
@@ -11845,7 +11845,7 @@ cards: [
}
],
"rule_text": "When both Rupert of the Rhine and Wilmot have left play (either via Rout or Pursuit), this card comes out of reserve.",
- "reserve": []
+ "reserve": "See Above"
},
{
"scenario": 31,
@@ -12358,7 +12358,7 @@ cards: [
]
},
"lore_text": "An obscure back-bencher who no one ever heard of again.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 32,
@@ -13509,7 +13509,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 35,
@@ -13539,7 +13539,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 35,
@@ -13569,7 +13569,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 35,
@@ -13598,7 +13598,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 36,
@@ -13878,7 +13878,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 37,
@@ -13930,7 +13930,7 @@ cards: [
}
],
"rule_text": "When this card Commands Pauloff's Left, add one new Morale Cube to the Russian side.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 37,
@@ -14047,7 +14047,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 37,
@@ -14075,7 +14075,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 37,
@@ -14492,7 +14492,7 @@ cards: [
],
"rule_text": "If this card routs, the French win.",
"lore_text": "Nine battalions under van Aylva and three thousand horse under van Weibnom and Vaudemont arrived too late to reverse the French victory, but they were able to cover Waldeck's retreat to Nivelles.",
- "reserve": []
+ "reserve": "Special Rule"
},
{
"scenario": 38,
@@ -14520,7 +14520,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Special Rule"
},
{
"scenario": 39,
@@ -16145,7 +16145,7 @@ cards: [
]
}
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 43,
@@ -16294,7 +16294,7 @@ cards: [
}
],
"rule_text": "Each Command action brings into play the next card in this sequence: Leopold's Right, Leopold's Center, Leopold's Left, Nassau, Zieten, Bayreuth Dragoons. <p>If at the start of your turn you have no Infantry or Cavalry cards in play, you lose.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16358,7 +16358,7 @@ cards: [
528
],
"rule_text": "If neither target is in play, may attack Charles and suffers no self hits.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16395,7 +16395,7 @@ cards: [
531
],
"rule_text": "If neither target is in play, may attack Charles and suffers no self hits.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16431,7 +16431,7 @@ cards: [
532
],
"rule_text": "If neither target is in play, may attack Charles and suffers no self hits.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16464,7 +16464,7 @@ cards: [
"link": [
531
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16496,7 +16496,7 @@ cards: [
"link": [
534
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16520,7 +16520,7 @@ cards: [
"cavalry": 1,
"rule_text": "After making its first and only attack, this card is removed from play (this does not count as a Rout).",
"lore_text": "The justly famous charge of the Bayreuth Dragoons decisively broke the enemy line, securing for Frederick a major victory.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16613,7 +16613,7 @@ cards: [
"link": [
538
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16649,7 +16649,7 @@ cards: [
537,
539
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16685,7 +16685,7 @@ cards: [
538,
540
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 44,
@@ -16719,7 +16719,7 @@ cards: [
"link": [
539
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 45,
@@ -17629,7 +17629,7 @@ cards: [
],
"cavalry": 1,
"rule_text": "*- If not yet in play, skip this target.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 47,
@@ -17948,7 +17948,7 @@ cards: [
],
"cavalry": 1,
"rule_text": "*- If not yet in play, skip this target.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 47,
@@ -18548,7 +18548,7 @@ cards: [
600,
602
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 49,
@@ -18582,7 +18582,7 @@ cards: [
601,
603
],
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 49,
@@ -18614,7 +18614,7 @@ cards: [
],
"cavalry": 1,
"lore_text": "Once the Austrian line had repositioned, these cavalry swooped down, aimed at the exposed Prussian left flank. This was thwarted, narrowly, by Driesen.",
- "reserve": []
+ "reserve": "Commanded"
},
{
"scenario": 49,
diff --git a/play.js b/play.js
index 9a13a14..cdebef5 100644
--- a/play.js
+++ b/play.js
@@ -204,16 +204,28 @@ function create_formation_card(id) {
if (card.lore_text)
append_div(e, "lore_text", card.lore_text)
+ let reserve = null
+ if (card.reserve) {
+ if (Array.isArray(card.reserve) && card.reserve.length > 0) {
+ reserve = card.reserve.map(c => data.cards[c].alias || data.cards[c].name).join(" or ")
+ } else {
+ reserve = card.reserve
+ }
+ }
+
if (card.retire) {
- let ee = append_div(e, "retire", "RETIRE")
+ let ee
+ if (card.pursuit)
+ ee = append_div(e, "retire", "RETIRE, PURSUIT")
+ else if (card.reserve)
+ ee = append_div(e, "retire", `RETIRE, RESERVE (${reserve})`)
+ else
+ ee = append_div(e, "retire", "RETIRE")
register_action(ee, "retire", id)
} else if (card.pursuit) {
append_div(e, "reserve", "PURSUIT")
} else if (card.reserve) {
- if (card.reserve.length === 0)
- append_div(e, "reserve", "IN RESERVE (Commanded)")
- else
- append_div(e, "reserve", "IN RESERVE (" + card.reserve.map(c => data.cards[c].name).join(" or ") + ")")
+ append_div(e, "reserve", `IN RESERVE (${reserve})`)
}
append_div(e, "number", card.number)
diff --git a/rules.js b/rules.js
index f1f229d..f5d8a2d 100644
--- a/rules.js
+++ b/rules.js
@@ -2593,9 +2593,12 @@ function should_enter_reserve(c) {
return map_get(game.cubes, S37_THE_FOG, 0) === 0
}
- for (let t of reserve)
- if (is_routed(t))
- return true
+ if (Array.isArray(reserve)) {
+ for (let t of reserve) {
+ if (is_routed(t))
+ return true
+ }
+ }
if (game.scenario === S30_EDGEHILL) {
if (c === S30_BALFOUR || c === S30_STAPLETON) {
diff --git a/tools/gendata.js b/tools/gendata.js
index 36b42cf..c4f6efb 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -188,7 +188,7 @@ for (let c of card_records) {
else if (c.reserve === "PURSUIT")
card.pursuit = 1
else if (c.reserve === "Commanded" || c.reserve === "See Above" || c.reserve === "Special Rule")
- card.reserve = []
+ card.reserve = c.reserve
else
card.reserve = c.reserve.split(" or ")
@@ -302,7 +302,7 @@ function process_card(c) {
throw new Error("PURSUIT with more than one target!")
c.pursuit = c.actions[0].target_list[0]
}
- if (c.reserve)
+ if (Array.isArray(c.reserve))
c.reserve = c.reserve.map(name => find_card(c.scenario, name))
}
diff --git a/tools/scenarios.csv b/tools/scenarios.csv
index 08db426..9a17baa 100644
--- a/tools/scenarios.csv
+++ b/tools/scenarios.csv
@@ -35,7 +35,7 @@ status,expansion,number,name,date,player1,cards1,morale1,tactical1,player2,cards
1,Gettysburg,28,Culp's Hill,2 July 1863,Union,155B-161B,1,,Confederate,162B-165B,3,,,,"Impressive defensive works constructed on the initiative of Brig. Gen. Goerge Greene (a civil engineer) allowedh a desperately thin blue line of around two thousand men to beat back nearly five thousand rebs. (Before playing, be sure to read the ""Geary"" card and keep its effects in mind.)"
1,Gettysburg,29,2nd Day of Gettysburg,2 July 1863,Union,166B-172B,2,,Confederate,173B-177B,2,,,,"The Confederates attacked the Union line <i>en echelon</i> in a series of bloody assaults. Meade shuffled men from one part of the ""fish hook"" to the next, pushing back and plugging holes in his line. At the end of the day, the line held."
,,,,,,,,,,,,,,,
-reserve_and,English Civil War,30,Edgehill,23 October 1642,Royalists,178A-185A,2,18,Parliamentarians,186A-193A,3,,,,"Initial success on the wings and a stubborn infantry contest had all the makings of a decisive Royalist victory. But the cavalier cavalry pursued the main roundhead horse, and the unsupported infantry was scattered by Parliamentarian reservee cavalry."
+1,English Civil War,30,Edgehill,23 October 1642,Royalists,178A-185A,2,18,Parliamentarians,186A-193A,3,,,,"Initial success on the wings and a stubborn infantry contest had all the makings of a decisive Royalist victory. But the cavalier cavalry pursued the main roundhead horse, and the unsupported infantry was scattered by Parliamentarian reservee cavalry."
s34/byron/etc,English Civil War,31,1st Newbury,20 September 1643,Parliamentarians,194A-199A,2,,Royalists,200A-206A,1,,,,"A surprise attack grabbed key terrain and threatened the Royalist flanks. Recovering from the chaos, a counterattack broke the roundhead center, splitting Essex's army. An attempt to envelop the two halves was thwarted by the London Trained Bands."
all_extra,English Civil War,32,2nd Newbury,27 October 1644,Parliamentarians,207A-211A,1,16,Royalists,212A-216A,2,16,,,"Attacked from opposite directions and outnumbered more than two to one, the King appeared to be doomed. But the enemy just couldn't coordinate; stubborn Royalist resistance denied Essex anything more than a tactical victory."
1,English Civil War,33,Naseby,14 June 1645,Royalists,173B-183B,2,20,Parliamentarians,184B-190B,2,,,,"The New Model Army at last achieved decisive victory at Naseby, leaving Charles without a field army. It was also a political victory, as they captured (and published) letters in which the King plotted with foreign troops against his subjects."