diff --git a/.gitignore b/.gitignore index d384c50..44bd530 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ coverage/ Thumbs.db !.dev.vars.example + +# Wrangler local dev state +.wrangler/ diff --git a/src/data/customUnits.test.ts b/src/data/customUnits.test.ts index 8b9e1e7..eaddfe5 100644 --- a/src/data/customUnits.test.ts +++ b/src/data/customUnits.test.ts @@ -118,7 +118,7 @@ describe("custom units", () => { ]); }); - it("Dramar Thungnisson (Mounted): Dwarf Hero supporting Ram Riders", () => { + it("Dramar Thungnisson (Mounted): Dwarf Hero with two named rules", () => { const dramar = customUnit(customDwarfs, "dwarfs:dramar-thungnisson-mounted"); expect(dramar.type).toBe("Hero"); expect(dramar.category).toBe("character"); @@ -127,9 +127,10 @@ describe("custom units", () => { expect(dramar.command).toBe(8); expect(dramar.points).toBe(80); expect(dramar.max).toBe(1); - expect(dramar.specialName).toBe("Master of the Goats"); + expect(dramar.specialName).toBeNull(); expect(dramar.specials).toEqual([ - "When attached to a unit of Ram Riders a unit with this sword can re-roll one unsuccessful Attack dice each round of combat.", + "**For the Hold!:** When attached to a unit, if that unit has moved into contact with an enemy unit this turn you can re-roll one unsuccessful attack each round of combat.", + "**Ironbreaker's Resolve:** When attached to a unit, one shooting hit inflicted on the unit after saves have been taken in each turn is ignored. This includes hits from magic spells inflicted in the Shooting phase.", ]); }); @@ -158,7 +159,6 @@ describe("custom units", () => { expect(yorri.points).toBe(80); expect(yorri.max).toBe(1); expect(yorri.specials).toEqual([ - "**Leading the Outcasts:** When attached to a unit of Slayers increase bonus attacks by +1.", "**This Will be the One:** When the unit this character is attached to is in close combat with an enemy Giant or Troll increase bonus attacks by +1.", ]); }); diff --git a/src/data/customUnits.ts b/src/data/customUnits.ts index 8c7aa3b..92315ac 100644 --- a/src/data/customUnits.ts +++ b/src/data/customUnits.ts @@ -117,14 +117,15 @@ export function applyCustomUnits(custom: RuleSetInfo, base: RuleSetInfo): void { }), ); - // Mounted Dramar fights alongside the Ram Riders. + // Mounted Dramar spurs on a charging unit and shrugs off incoming fire. dwarfs.units.push( deriveDwarfHero({ unitId: "dwarfs:dramar-thungnisson-mounted", troop: "Dramar Thungnisson (Mounted)", - specialName: "Master of the Goats", + specialName: null, specials: [ - "When attached to a unit of Ram Riders a unit with this sword can re-roll one unsuccessful Attack dice each round of combat.", + "**For the Hold!:** When attached to a unit, if that unit has moved into contact with an enemy unit this turn you can re-roll one unsuccessful attack each round of combat.", + "**Ironbreaker's Resolve:** When attached to a unit, one shooting hit inflicted on the unit after saves have been taken in each turn is ignored. This includes hits from magic spells inflicted in the Shooting phase.", ], }), ); @@ -141,8 +142,7 @@ export function applyCustomUnits(custom: RuleSetInfo, base: RuleSetInfo): void { }), ); - // Yorri Thungnisson is especially deadly alongside Slayers and against - // Giants or Trolls. + // Yorri Thungnisson is especially deadly against Giants or Trolls. dwarfs.units.push( deriveDwarfHero({ unitId: "dwarfs:yorri-thungnisson", @@ -150,7 +150,6 @@ export function applyCustomUnits(custom: RuleSetInfo, base: RuleSetInfo): void { bonusAttacks: 2, specialName: null, specials: [ - "**Leading the Outcasts:** When attached to a unit of Slayers increase bonus attacks by +1.", "**This Will be the One:** When the unit this character is attached to is in close combat with an enemy Giant or Troll increase bonus attacks by +1.", ], }), diff --git a/src/domain/unitCard.test.ts b/src/domain/unitCard.test.ts index 7fb3c08..af5dc59 100644 --- a/src/domain/unitCard.test.ts +++ b/src/domain/unitCard.test.ts @@ -28,8 +28,8 @@ function unit(army: typeof orcs, troop: string) { describe("unit cards", () => { it("splits Markdown-style names from custom special rules", () => { - expect(splitRuleHeading("**Leading the Outcasts:** Rule text.")).toEqual({ - title: "Leading the Outcasts", + expect(splitRuleHeading("**This Will be the One:** Rule text.")).toEqual({ + title: "This Will be the One", text: "Rule text.", }); }); @@ -41,9 +41,15 @@ describe("unit cards", () => { "Ironbreaker's Resolve", ); + const mountedDramar = buildCard(unit(customDwarfs, "Dramar Thungnisson (Mounted)")); + const mountedTitles = [...mountedDramar.frontRules, ...mountedDramar.backRules].map( + (rule) => rule.title, + ); + expect(mountedTitles).toContain("For the Hold!"); + expect(mountedTitles).toContain("Ironbreaker's Resolve"); + const yorri = buildCard(unit(customDwarfs, "Yorri Thungnisson")); const yorriTitles = [...yorri.frontRules, ...yorri.backRules].map((rule) => rule.title); - expect(yorriTitles).toContain("Leading the Outcasts"); expect(yorriTitles).toContain("This Will be the One"); const highElves = getArmy("warmaster-revolution", "high-elves")!;