diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-13 15:40:34 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | f6855ea8426dc634844243ee46cf694dc8acf5c5 (patch) | |
tree | e9320049acb225db57b62daee8913d2c7c21e306 | |
parent | c6637917de7e7281d947f3fd10a1dfe831c544d2 (diff) | |
download | table-battles-f6855ea8426dc634844243ee46cf694dc8acf5c5.tar.gz |
2nd gettys day
-rw-r--r-- | data.js | 11 | ||||
-rw-r--r-- | info/all-cards.html | 4 | ||||
-rw-r--r-- | rules.js | 62 | ||||
-rw-r--r-- | tools/cards.csv | 8 | ||||
-rw-r--r-- | tools/scenarios.csv | 6 |
5 files changed, 78 insertions, 13 deletions
@@ -9533,6 +9533,7 @@ cards: [ "type": "Screen", "requirement": "Voluntary", "target": "Any enemy formation", + "effect": "1 hit per die. 1 self per action.", "target_list": [ 291, 292, @@ -10840,7 +10841,7 @@ cards: [ "number": "155B", "name": "Breastworks", "wing": 2, - "morale": 1, + "morale": 0, "strength": 8, "dice": "", "actions": [], @@ -10929,6 +10930,9 @@ cards: [ ] } ], + "rules": { + "place_2_blue": 1 + }, "retire": 1 }, { @@ -11275,7 +11279,7 @@ cards: [ "type": "Absorb", "requirement": "Voluntary", "target": "Any friendly but Little Round Top", - "effect": "When this Reaction is used, choose any friendly Formation except Little Round Top, that Formation suffers the hits instead. The Meade Formation never suffers hits, and this Reaction can never be used to absorb hits for Little Round Top.", + "effect": "When this Reaction is used, choose any friendly Formation except Little Round Top, that Formation suffers the hits instead.", "target_list": [ 343, 344, @@ -11285,7 +11289,8 @@ cards: [ 348 ] } - ] + ], + "rule_text": "The Meade Formation never suffers hits, and this Reaction can never be used to absorb hits for Little Round Top." }, { "scenario": 29, diff --git a/info/all-cards.html b/info/all-cards.html index 18e3062..4313c8a 100644 --- a/info/all-cards.html +++ b/info/all-cards.html @@ -4908,6 +4908,7 @@ h1{color: white} <div class="action_type">Screen</div> <div class="action_requirement">Voluntary</div> <div class="action_target">Any enemy formation</div> +<div class="action_effect">1 hit per die. 1 self per action.</div> </div> <div class="number">154A</div> <div class="extra">♦</div> @@ -5907,8 +5908,9 @@ h1{color: white} <div class="action_type">Absorb</div> <div class="action_requirement">Voluntary</div> <div class="action_target">Any friendly but Little Round Top</div> -<div class="action_effect">When this Reaction is used, choose any friendly Formation except Little Round Top, that Formation suffers the hits instead. The Meade Formation never suffers hits, and this Reaction can never be used to absorb hits for Little Round Top.</div> +<div class="action_effect">When this Reaction is used, choose any friendly Formation except Little Round Top, that Formation suffers the hits instead.</div> </div> +<div class="rule_text">The Meade Formation never suffers hits, and this Reaction can never be used to absorb hits for Little Round Top.</div> <div class="number">172B</div> <div class="extra">♣</div> </div> @@ -164,9 +164,10 @@ function goto_game_over(result, victory) { game.state = "game_over" game.active = "None" game.result = result - game.victory = victory + game.victory = result + " victory! " + victory log("") - log(game.victory) + log(result + " victory!") + log(victory) return false } @@ -248,6 +249,15 @@ const S28_CULPS_HILL = find_scenario(28) const S28_BREASTWORKS = find_card(28, "Breastworks") const S28_GEARY = find_card(28, "Geary") +const S29_GETTYS_2ND = find_scenario(29) +const S29_MCLAWS = find_card(29, "McLaws") +const S29_ANDERSON = find_card(29, "Anderson") +const S29_HOOD = find_card(29, "Hood") +const S29_EARLY = find_card(29, "Early") +const S29_JOHNSON = find_card(29, "Johnson") +const S29_MEADE = find_card(29, "Meade") +const S29_LITTLE_ROUND_TOP = find_card(29, "Little Round Top") + // === SETUP === exports.setup = function (seed, scenario, options) { @@ -836,6 +846,25 @@ function can_place_dice(c) { } } + if (game.scenario === S29_GETTYS_2ND) { + if (c === S29_MCLAWS) { + if (!has_any_dice_on_card(S29_HOOD)) + return false + } + if (c === S29_ANDERSON) { + if (!has_any_dice_on_card(S29_MCLAWS)) + return false + } + if (c === S29_EARLY || c === S29_JOHNSON) { + let red = 0 + if (has_any_dice_on_card(S29_HOOD)) ++red + if (has_any_dice_on_card(S29_MCLAWS)) ++red + if (has_any_dice_on_card(S29_ANDERSON)) ++red + if (red < 2) + return false + } + } + return pred(c) } @@ -1228,6 +1257,11 @@ function end_roll_phase() { } } + if (game.scenario === S28_CULPS_HILL) { + if (map_get(game.cubes, S28_GEARY, 0) === 5) + return goto_game_over(P2, "Geary's Division arrived.") + } + end_turn() } @@ -2144,6 +2178,13 @@ states.screen = { function goto_absorb(c, a) { game.reacted = player_index() + if (game.scenario === S29_GETTYS_2ND) { + if (c === S29_MEADE) { + game.state = "meade" + return + } + } + game.target = c update_attack1() @@ -2169,6 +2210,23 @@ function goto_absorb(c, a) { game.state = "absorb" } +states.meade = { + prompt() { + view.prompt = "Choosy any friendly Formation except Little Round Top to absorb the hits instead." + let p = player_index() + for (let c of game.front[p]) { + if (c !== S29_MEADE && c !== S29_LITTLE_ROUND_TOP && c !== game.target) + gen_action_card(c) + } + }, + card(c) { + game.target = c + update_attack1() + update_attack2() + game.state = "absorb" + } +} + states.absorb = { prompt() { view.prompt = "Absorb attack from " + card_name(game.selected) + "." diff --git a/tools/cards.csv b/tools/cards.csv index 4a939ec..48b4cbf 100644 --- a/tools/cards.csv +++ b/tools/cards.csv @@ -350,7 +350,7 @@ THE WHEATFIELD,,,,,,,,,,,,,,,,,,,, 25,151A,red,Kershaw,,,6,3/4,,,Attack,,"de Trobriand, Tilton, Kelly, Sweitzer",1 hit per die. 1 self per action. (But see Semmes.),Counterattack,Pair,Any enemy attacking it,"1 hit. Addtionally, this unit suffers one less hit.",take_from=150A,,
25,152A,pink,Anderson,,,5,4,,,Attack,,"Ward, de Trobriand, Zook, Burbank",1 hit per die. 1 self per action.,Counterattack,Pair,Any enemy attacking it,1 hit.,,,
25,153A,pink,Benning,,,5,3,,,Attack,,"Ward, Cross, Day, Burbank",1 hit per die. 1 self per action.,Counterattack,Pair,Any enemy attacking it,1 hit.,,,
-25,154A,red,Rebel Artillery,,,I,Straight 4,,,Screen,Voluntary,Any enemy formation,,,,,,,,
+25,154A,red,Rebel Artillery,,,I,Straight 4,,,Screen,Voluntary,Any enemy formation,1 hit per die. 1 self per action.,,,,,,,
25,155A,red,McLaws,,,1,1/2,,de Trobriand,Command,Full House,Wofford out of reserve,,,,,,,,
25,156A,red,Wofford,,,5,4/5/6,,Commanded,Attack,,"Tilton, Sweitzer, Burbank, Day","1 hit, PLUS 1 hit per die. 1 self per action.",,,,,attack_reserve,"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.",
25,157A,dkblue,Ward,,,4,1/2,,RETIRE,Attack,,"Benning, Anderson",1 hit per die. 1 self per action.,Screen,Pair,"Benning, Anderson",,,,
@@ -399,10 +399,10 @@ CEMETERY RIDGE,,,,,,,,,,,,,,,,,,,, 27,154B,blue,Union Artillery,,,II,Straight 4,,,Screen,,Any enemy formation,,,,,,,,
,,,,,,,,,,,,,,,,,,,,
CULP'S HILL,,,,,,,,,,,,,,,,,,,,
-28,155B,blue,Breastworks,,,8,,,,,,,,,,,,,"When any Dark Blue Formation (including Reserves taking an Absorb Reaction) is to suffer only one hit in an attack, this Formation suffers the hit instead. <p>If the Formation would suffer more than one hit, this Formation suffers all hits but one, which the targeted/absorbing Formation suffers. <p>When this Formation Routs, it does not cause the loss of a morale cube. <p>Finally, while I've got your attention: as long as Greene's Right is in play, you can place dice on TWO Dark Blue cards each turn. Why is this note on this card, and not on Greene's Right? Because I didn't have any room on that card. And folks wonder why the cards don't have art on them...",
+28,155B,blue,Breastworks,,,8-,,,,,,,,,,,,,"When any Dark Blue Formation (including Reserves taking an Absorb Reaction) is to suffer only one hit in an attack, this Formation suffers the hit instead. <p>If the Formation would suffer more than one hit, this Formation suffers all hits but one, which the targeted/absorbing Formation suffers. <p>When this Formation Routs, it does not cause the loss of a morale cube. <p>Finally, while I've got your attention: as long as Greene's Right is in play, you can place dice on TWO Dark Blue cards each turn. Why is this note on this card, and not on Greene's Right? Because I didn't have any room on that card. And folks wonder why the cards don't have art on them...",
28,156B,dkblue,Greene's Left,,,3*,6,,,Attack,,Jones,1 hit per die.,Counterattack,Pair,Jones,"1 hit. Additionally, this unit suffers one less hit.",,,
28,157B,dkblue,Greene's Center,,,3*,5,,,Attack,,Williams,1 hit per die.,Counterattack,Pair,Williams,"1 hit. Additionally, this unit suffers one less hit.",,,
-28,158B,dkblue,Greene's Right,,,3*,4,,RETIRE,Attack,,Steuart,1 hit per die.,Counterattack,Pair,Steuart,"1 hit. Additionally, this unit suffers one less hit.",,,
+28,158B,dkblue,Greene's Right,,,3*,4,,RETIRE,Attack,,Steuart,1 hit per die.,Counterattack,Pair,Steuart,"1 hit. Additionally, this unit suffers one less hit.",place_2_blue,,
28,159B,dkblue,Reserves,,,4*,Doubles,,,Absorb,Voluntary,Any friendly formation,"When target suffers Hits, this unit suffers them instead.",,,,,,,
28,160B,blue,137th New York,,,2,Doubles,,Greene's Right,Attack,,Steuart,1 hit.,,,,,suffer_1_less_1_max,This Formation ALWAYS suffers one less Hit when Attacked and NEVER suffers more than one Hit in any given Attack.,
28,161B,dkblue,Geary,,,V,Straight 4/3,,,,,,,,,,,start_with_no_cubes,"Unlike most Special Formations, this card begins the game with NO cubes on it. <p>If rolling five or more dice during your Roll Phase, you need a four-die straight to earn a cube. If rolling four or less dice, you need a three-die straight to earn a cube. <p>When there are FIVE cubes on this card, Geary's Division arrives, bringing the late hour battle to a close. The game ends immediately in a UNION VICTORY.",
@@ -418,7 +418,7 @@ GETTYSBURG 2ND,,,,,,,,,,,,,,,,,,,, 29,169B,blue,Howard,,,6*,(3),,,Attack,,Early,1 hit per die. 1 self per action.,Counterattack,,Early,"1 hit. Additionally, this unit suffers one less hit.",,,
29,170B,blue,Slocum,,,6*,(2),,,Attack,,Johnson,1 hit per die.,Counterattack,Pair,Johnson,"1 hit. Additionally, this unit suffers one less hit.",,,
29,171B,blue,Sykes,,,4*,Doubles,,,Absorb,Voluntary,Little Round Top,"When target suffers Hits, this unit suffers 1 hit ONLY instead.",,,,,,,
-29,172B,blue,Meade,,,1,Any,,,Absorb,Voluntary,Any friendly but Little Round Top,"When this Reaction is used, choose any friendly Formation except Little Round Top, that Formation suffers the hits instead. The Meade Formation never suffers hits, and this Reaction can never be used to absorb hits for Little Round Top.",,,,,,,
+29,172B,blue,Meade,,,1,Any,,,Absorb,Voluntary,Any friendly but Little Round Top,"When this Reaction is used, choose any friendly Formation except Little Round Top, that Formation suffers the hits instead.",,,,,,"The Meade Formation never suffers hits, and this Reaction can never be used to absorb hits for Little Round Top.",
29,173B,pink,Johnson,,,4,(3)/(4),,,Attack,,Slocum,1 hit per die. 1 self per action.,,,,,,"Dice can only be placed on this card if there are dice on TWO Red cards. (This doesn't necessarily need to be the case when your turn begins, but does need to be the case the instant that you place dice on this card.)",
29,174B,pink,Early,,,5,(1)/(2),,,Attack,,Howard,1 hit per die. 1 self per action.,,,,,,"Dice can only be placed on this card if there are dice on TWO Red cards. (This doesn't necessarily need to be the case when your turn begins, but does need to be the case the instant that you place dice on this card.)",
29,175B,red,Anderson,,,5,5/6,,,Attack,,Hancock,"2 hits, PLUS 1 hit per die. 1 self per action.",,,,,,Dice can only be placed on this card if there are already dice on McLaws.,
diff --git a/tools/scenarios.csv b/tools/scenarios.csv index 5a2d6af..3cb04f4 100644 --- a/tools/scenarios.csv +++ b/tools/scenarios.csv @@ -29,10 +29,10 @@ status,expansion,number,name,date,player1,cards1,morale1,tactical1,player2,cards 1,Age of Alexander,23,Ipsus,301 BCE,Antigonus,124B-129B,2,,Seleucus,130B-135B,2,,,,"Like Gabiene and many other battles from the Wars of the Diadochi, this battle saw two armies that were mostly identical in structure and tactics. And like many ancient battles, the death of a single man, the enemy commander (in this case Antigonus), was sufficient to secure victory."
,,,,,,,,,,,,,,,
1,Gettysburg,24,Little Round Top,2 July 1863,Union,136A-143A,1,,Confederate,144A-149A,2,,,,"One of the most famous actions of the day saw fewer than three thousand men mount a desperate, hard-fought, and ingenious defense of the Union left flank against the repeated assaults of nearly five thousand butternuts."
-"wofford,stony hill",Gettysburg,25,The Wheatfield,2 July 1863,Confederate,150A-156A,3,,Union,157A-167A,3,,,,"Confederate assaults caused the Union to retreat, then Union assoults caused the rebs to fall back, and on and on, back and forth, possession of the Wheatfield changing hands repeatedly, neither side gaining any real advantage, with thousands of casualties"
-fatal blunder,Gettysburg,26,The Peach Orchard,2 July 1863,Confederate,168A-177A,4,,Union,136B-143B,2,,,,"Sickle's line formed a salient at the Peach Orchard, which collapsed under pressure from the Confederates. Sickles himself was hit in the leg by a cannonball. To counter rumors that he had died, he sat up on his stretcher and puffed at a cigar to show that he was still breathing."
+1,Gettysburg,25,The Wheatfield,2 July 1863,Confederate,150A-156A,3,,Union,157A-167A,3,,,,"Confederate assaults caused the Union to retreat, then Union assoults caused the rebs to fall back, and on and on, back and forth, possession of the Wheatfield changing hands repeatedly, neither side gaining any real advantage, with thousands of casualties"
+1,Gettysburg,26,The Peach Orchard,2 July 1863,Confederate,168A-177A,4,,Union,136B-143B,2,,,,"Sickle's line formed a salient at the Peach Orchard, which collapsed under pressure from the Confederates. Sickles himself was hit in the leg by a cannonball. To counter rumors that he had died, he sat up on his stretcher and puffed at a cigar to show that he was still breathing."
1,Gettysburg,27,Cemetery Ridge,2 July 1863,Confederate,144B-147B,1,,Union,148B-154B,3,,,,"Anderson's attack on the Union center came close to breaking it, opening a gap in the line. The line – perhaps even the Union – was saved byt he 262 men of the First Minnesota Volunteer Infantry Regiment, which charged a brigade over five times its size, suffering 215 casualties."
-"breastworks,geary",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,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.)"
"meade,etc",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."
|