@alpaca-software/40kdc-data 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen-conformance.js +63 -0
- package/dist/gen-conformance.js.map +1 -1
- package/dist/translate/condition.d.ts.map +1 -1
- package/dist/translate/condition.js +13 -6
- package/dist/translate/condition.js.map +1 -1
- package/dist/translate/effect.d.ts.map +1 -1
- package/dist/translate/effect.js +36 -13
- package/dist/translate/effect.js.map +1 -1
- package/package.json +1 -1
package/dist/gen-conformance.js
CHANGED
|
@@ -1543,6 +1543,69 @@ function genEffectTranslation() {
|
|
|
1543
1543
|
expected: { text: describeAbility({ effect: fc.effect, scope: fc.scope }) },
|
|
1544
1544
|
});
|
|
1545
1545
|
}
|
|
1546
|
+
// Audit-corpus describer fixes (fallback-and-act default, re-roll "any",
|
|
1547
|
+
// player-turn opponent, opponent-unit-within-range within_inches, and the
|
|
1548
|
+
// compound unit-has-keyword lead-in). These exact shapes come from the human-
|
|
1549
|
+
// corrected aeldari audit oracle; every string is engine-authored, so a second
|
|
1550
|
+
// impl must independently reproduce it.
|
|
1551
|
+
const FORCED_AUDIT_CASES = [
|
|
1552
|
+
{
|
|
1553
|
+
id: "fallback-and-act-shoot-only",
|
|
1554
|
+
effect: { type: "fallback-and-act", target: "unit", modifier: {} },
|
|
1555
|
+
scope: { range: "unit", duration: "permanent" },
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
id: "fallback-and-act-can-charge",
|
|
1559
|
+
effect: { type: "fallback-and-act", target: "unit", modifier: { can_charge: true } },
|
|
1560
|
+
scope: { range: "unit", duration: "permanent" },
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
id: "superlative-strategist",
|
|
1564
|
+
effect: {
|
|
1565
|
+
type: "conditional",
|
|
1566
|
+
condition: { type: "model-is-leader" },
|
|
1567
|
+
effect: {
|
|
1568
|
+
type: "sequence",
|
|
1569
|
+
steps: [
|
|
1570
|
+
{ type: "re-roll", target: "unit", modifier: { roll: "advance", subset: "all-failures" } },
|
|
1571
|
+
{
|
|
1572
|
+
type: "conditional",
|
|
1573
|
+
condition: { type: "timing-is", parameters: { timing: "agile-manoeuvre" } },
|
|
1574
|
+
effect: { type: "re-roll", target: "unit", modifier: { roll: "any", subset: "all-failures" } },
|
|
1575
|
+
},
|
|
1576
|
+
],
|
|
1577
|
+
},
|
|
1578
|
+
},
|
|
1579
|
+
scope: { range: "unit", duration: "turn" },
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
id: "deceptive-feint",
|
|
1583
|
+
effect: {
|
|
1584
|
+
type: "conditional",
|
|
1585
|
+
condition: {
|
|
1586
|
+
operator: "and",
|
|
1587
|
+
operands: [
|
|
1588
|
+
{ type: "phase-is", parameters: { phase: "movement" } },
|
|
1589
|
+
{ type: "player-turn-is", parameters: { turn: "opponent" } },
|
|
1590
|
+
{ type: "opponent-unit-within-range", parameters: { within_inches: 8 } },
|
|
1591
|
+
{ operator: "not", operands: [{ type: "engagement-state" }] },
|
|
1592
|
+
{ type: "unit-has-keyword", parameters: { keyword: "HARLEQUINS" } },
|
|
1593
|
+
{ type: "unit-has-keyword", parameters: { keyword: "INFANTRY" } },
|
|
1594
|
+
],
|
|
1595
|
+
},
|
|
1596
|
+
effect: { type: "movement-modifier", target: "unit", modifier: { move_type: "normal", distance: "D3+3" } },
|
|
1597
|
+
},
|
|
1598
|
+
scope: { range: "unit", duration: "turn" },
|
|
1599
|
+
},
|
|
1600
|
+
];
|
|
1601
|
+
for (const fc of FORCED_AUDIT_CASES) {
|
|
1602
|
+
cases.push({
|
|
1603
|
+
caseId: `${fc.id}#${cases.length}`,
|
|
1604
|
+
effect: fc.effect,
|
|
1605
|
+
scope: fc.scope,
|
|
1606
|
+
expected: { text: describeAbility({ effect: fc.effect, scope: fc.scope }) },
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1546
1609
|
writeJson(join(CONFORMANCE, "effect-translation", "cases.json"), cases);
|
|
1547
1610
|
console.log(`effect-translation/cases.json: ${cases.length} cases (${seen.size} node types)`);
|
|
1548
1611
|
}
|