diff --git a/plan/scenarios.md b/plan/scenarios.md index f3f3227..d9d7cea 100644 --- a/plan/scenarios.md +++ b/plan/scenarios.md @@ -115,9 +115,10 @@ loads" is not verification.* A converted scenario is only right when its battle values match what it replaced. - [ ] **Serve the scenario files instead of vendoring them.** The four files - are copied into the tree from the arena image, so a bumped image still - needs them re-copied — better than retyping them, and still a copy. An - API that serves them from the image is the end state. + and the report beside them are copied into the tree from the arena image, + so a bumped image still needs them re-copied — better than retyping them, + and still a copy. An API that serves them from the image is the end + state, and would carry the measurements with them. ## Done diff --git a/scripts/unit-stats.py b/scripts/unit-stats.py index e05339d..89c7ad8 100755 --- a/scripts/unit-stats.py +++ b/scripts/unit-stats.py @@ -21,13 +21,13 @@ What is here is true of the design wherever it turns up. Keyed by the full designation - "Clint CLNT-5U", chassis and model - because that is what a scenario file names and what the catalog names. -Coverage is partial on purpose. The dailies are reported; the hand-written -catalog in services/api/src/matches/scenarios.rs is not, and nine of the -thirty-four machines it fields have never appeared in a daily. Those get no -entry, the card shows a dash where a figure would go, and nothing is invented -to fill the hole. Reporting the catalog too is an arena run away - see -plan/scenarios.md - and when it happens the file lands here and the cards fill -in with no change to the site. +Both catalogs are reported now: the dailies, and the vendored scenario files +beside them. A machine still missing from both gets no entry, `statsFor` +returns null and the card shows a dash - nothing is invented to fill a hole. + +Refreshing either report is an arena run, not something this script can do: + + java -cp arena.ScenarioReport > report.json """ import argparse @@ -35,7 +35,10 @@ import json import pathlib import sys -REPORTS = ["services/api/src/matches/daily/report.json"] +REPORTS = [ + "services/api/src/matches/daily/report.json", + "services/api/src/matches/scenarios/report.json", +] def collect(root: pathlib.Path) -> dict[str, dict[str, int]]: diff --git a/services/api/src/matches/scenarios/report.json b/services/api/src/matches/scenarios/report.json new file mode 100644 index 0000000..e87edce --- /dev/null +++ b/services/api/src/matches/scenarios/report.json @@ -0,0 +1,388 @@ +[ + { + "file": "TrainingScenarios/1-FirstRun.mms", + "name": "First Run", + "description": "Battletech 3rd Edition Training Scenario #1, pg. 36", + "singlePlayer": false, + "board": { + "width": 32, + "height": 17 + }, + "factions": [ + { + "name": "TraineeA", + "team": 1, + "start": "S", + "bv": 2285, + "tons": 75, + "cost": 6603747, + "units": [ + { + "name": "Griffin GRF-1N", + "year": 2492, + "bv": 1755, + "tons": 55, + "cost": 4957107 + }, + { + "name": "Wasp WSP-1A", + "year": 2471, + "bv": 530, + "tons": 20, + "cost": 1646640 + } + ] + }, + { + "name": "TraineeB", + "team": 2, + "start": "N", + "bv": 2014, + "tons": 75, + "cost": 6443122, + "units": [ + { + "name": "Stinger STG-3R", + "year": 2479, + "bv": 495, + "tons": 20, + "cost": 1615440 + }, + { + "name": "Wolverine WVR-6R", + "year": 2575, + "bv": 1519, + "tons": 55, + "cost": 4827682 + } + ] + } + ] + }, + { + "file": "TrainingScenarios/2-FinalExam.mms", + "name": "Final Exam", + "description": "Battletech 3rd Edition Training Scenario #2, pg. 37", + "singlePlayer": false, + "board": { + "width": 32, + "height": 17 + }, + "factions": [ + { + "name": "TraineeA", + "team": 1, + "start": "Any", + "bv": 1842, + "tons": 65, + "cost": 5413760, + "units": [ + { + "name": "Thunderbolt TDR-5S", + "year": 2505, + "bv": 1842, + "tons": 65, + "cost": 5413760 + } + ] + }, + { + "name": "TraineeB", + "team": 2, + "start": "Any", + "bv": 1817, + "tons": 65, + "cost": 5686010, + "units": [ + { + "name": "Crusader CRD-3R", + "year": 2752, + "bv": 1817, + "tons": 65, + "cost": 5686010 + } + ] + } + ] + }, + { + "file": "TrainingScenarios/4-DivideAndConquer.mms", + "name": "Divide and Conquer", + "description": "Battletech 3rd Edition Training Scenario #4, pg. 39", + "singlePlayer": false, + "board": { + "width": 16, + "height": 34 + }, + "factions": [ + { + "name": "Defender", + "team": 1, + "start": "Any", + "bv": 3201, + "tons": 140, + "cost": 12455956, + "units": [ + { + "name": "Archer ARC-2R", + "year": 2474, + "bv": 1772, + "tons": 70, + "cost": 6384973 + }, + { + "name": "Warhammer WHM-6R", + "year": 2515, + "bv": 1429, + "tons": 70, + "cost": 6070983 + } + ] + }, + { + "name": "Attacker", + "team": 2, + "start": "Any", + "bv": 2806, + "tons": 130, + "cost": 11174507, + "units": [ + { + "name": "Shadow Hawk SHD-2H", + "year": 2550, + "bv": 1170, + "tons": 55, + "cost": 4539382 + }, + { + "name": "Marauder MAD-3R", + "year": 2819, + "bv": 1636, + "tons": 75, + "cost": 6635125 + } + ] + } + ] + }, + { + "file": "MonteDiablo/MonteDiablo-Four_Players.mms", + "name": "The Battle of Monte Diablo", + "description": "Elements from the 2nd and 7th Donegal Guards converge in on the 4th Crucis Lancers headquarters company", + "singlePlayer": false, + "board": { + "width": 48, + "height": 17 + }, + "factions": [ + { + "name": "Steiner2nd", + "team": 1, + "start": "E", + "bv": 18952, + "tons": 535, + "cost": 115113354, + "units": [ + { + "name": "Fafnir FNR-5", + "year": 3063, + "bv": 3796, + "tons": 100, + "cost": 11470000 + }, + { + "name": "Falconer FLC-8R", + "year": 3053, + "bv": 2945, + "tons": 75, + "cost": 18891250 + }, + { + "name": "Rakshasa MDG-1A", + "year": 3055, + "bv": 2369, + "tons": 75, + "cost": 18943750 + }, + { + "name": "Avatar AV1-OC", + "year": 3056, + "bv": 2025, + "tons": 70, + "cost": 19712917 + }, + { + "name": "Barghest BGS-3T", + "year": 3062, + "bv": 2090, + "tons": 70, + "cost": 15927867 + }, + { + "name": "Javelin JVN-11D", + "year": 3062, + "bv": 1457, + "tons": 30, + "cost": 4504240 + }, + { + "name": "Thanatos TNS-4S", + "year": 3061, + "bv": 2434, + "tons": 75, + "cost": 19339250 + }, + { + "name": "Clint CLNT-5U", + "year": 3062, + "bv": 1836, + "tons": 40, + "cost": 6324080 + } + ] + }, + { + "name": "Steiner7th", + "team": 2, + "start": "W", + "bv": 5710, + "tons": 160, + "cost": 26389842, + "units": [ + { + "name": "Uziel UZL-3S", + "year": 3065, + "bv": 1712, + "tons": 50, + "cost": 9783750 + }, + { + "name": "Lynx LNX-9Q", + "year": 2761, + "bv": 1898, + "tons": 55, + "cost": 10105742 + }, + { + "name": "Commando COM-7S", + "year": 3064, + "bv": 869, + "tons": 25, + "cost": 2965000 + }, + { + "name": "Razorback RZK-9S", + "year": 3063, + "bv": 1231, + "tons": 30, + "cost": 3535350 + } + ] + }, + { + "name": "Davion", + "team": 3, + "start": "Any", + "bv": 16796, + "tons": 455, + "cost": 94177710, + "units": [ + { + "name": "Bushwacker BSW-L1", + "year": 3063, + "bv": 1997, + "tons": 55, + "cost": 8750525 + }, + { + "name": "Enfield END-6J", + "year": 3060, + "bv": 2040, + "tons": 50, + "cost": 8852000 + }, + { + "name": "Hellspawn HSN-7D", + "year": 3062, + "bv": 1757, + "tons": 45, + "cost": 8375200 + }, + { + "name": "Templar TLR1-OB", + "year": 3062, + "bv": 2384, + "tons": 85, + "cost": 25484135 + }, + { + "name": "Stiletto STO-4A", + "year": 3061, + "bv": 945, + "tons": 35, + "cost": 5280525 + }, + { + "name": "Osiris OSR-3D", + "year": 3063, + "bv": 1639, + "tons": 30, + "cost": 5230550 + }, + { + "name": "Argus AGS-4D", + "year": 3062, + "bv": 2359, + "tons": 60, + "cost": 11978400 + }, + { + "name": "Sagittaire SGT-8R", + "year": 3063, + "bv": 3675, + "tons": 95, + "cost": 20226375 + } + ] + }, + { + "name": "ComStar", + "team": 4, + "start": "Any", + "bv": 6809, + "tons": 225, + "cost": 45694290, + "units": [ + { + "name": "Exterminator EXT-5E", + "year": 3060, + "bv": 1838, + "tons": 65, + "cost": 18743010 + }, + { + "name": "Hussar HSR-500-D", + "year": 3060, + "bv": 1172, + "tons": 30, + "cost": 6152640 + }, + { + "name": "Thug THG-12E", + "year": 3067, + "bv": 2521, + "tons": 80, + "cost": 9974640 + }, + { + "name": "Tessen TSN-1C", + "year": 3061, + "bv": 1278, + "tons": 50, + "cost": 10824000 + } + ] + } + ] + } +] diff --git a/web/src/content/unit-stats.json b/web/src/content/unit-stats.json index 12343de..b20b861 100644 --- a/web/src/content/unit-stats.json +++ b/web/src/content/unit-stats.json @@ -25,6 +25,16 @@ "cost": 9626000, "year": 2755 }, + "Avatar AV1-OC": { + "tons": 70, + "cost": 19712917, + "year": 3056 + }, + "Barghest BGS-3T": { + "tons": 70, + "cost": 15927867, + "year": 3062 + }, "Black Hawk (Nova) A": { "tons": 50, "cost": 11426875, @@ -70,6 +80,21 @@ "cost": 8852000, "year": 3060 }, + "Exterminator EXT-5E": { + "tons": 65, + "cost": 18743010, + "year": 3060 + }, + "Fafnir FNR-5": { + "tons": 100, + "cost": 11470000, + "year": 3063 + }, + "Falconer FLC-8R": { + "tons": 75, + "cost": 18891250, + "year": 3053 + }, "Firefly FFL-3PP": { "tons": 30, "cost": 3614000, @@ -125,6 +150,16 @@ "cost": 1512400, "year": 2499 }, + "Lynx LNX-9Q": { + "tons": 55, + "cost": 10105742, + "year": 2761 + }, + "Marauder MAD-3R": { + "tons": 75, + "cost": 6635125, + "year": 2819 + }, "Marauder MAD-5S": { "tons": 75, "cost": 15498000, @@ -135,6 +170,11 @@ "cost": 5230550, "year": 3063 }, + "Rakshasa MDG-1A": { + "tons": 75, + "cost": 18943750, + "year": 3055 + }, "Razorback RZK-9S": { "tons": 30, "cost": 3535350, @@ -205,6 +245,11 @@ "cost": 20965958, "year": 2872 }, + "Thug THG-12E": { + "tons": 80, + "cost": 9974640, + "year": 3067 + }, "Thunderbolt TDR-5S": { "tons": 65, "cost": 5413760,