#import "/unit-card.typ": unit-card
#import "/content/40k/warhammer-40k-expansion.typ": weapons as base-weapons

#set page(width: 21cm, height: auto, margin: 1cm)

#let csm-weapons = (
    "Brutal assault weapon": (class: "OHS", range: "CQ", damage: "Crush M+4", attacks: "Standard", traits: none),
)

#let weapons = base-weapons + csm-weapons

#let w(name) = weapons.at(name) + (name: name)

#let armour-types = (

)

#let arm-str(name) = {
  armour-types.at(name).map(pair => pair.at(1)).join("/")
}

= Chaos Space Marines (40K CSM)

The Chaos Space Marines faction expansion from Warhammer 40k for Allesfezs Ekarschubi.

This expansion inherets the Warhammer 40k expansion rules.

= ABILITIES

*Dark Pacts*

Chaos Space Marines faction ability from 11th edition Warhammer. Whenever a #underline[Heretic Astartes] unit makes an *Attack* action, that unit may use this ability. When used, the unit makes a _leadership_ skill check. On a failed check, the unit takes 3 structure damage. On a successful check, that unit's attacking weapon gets *Lethal Crits* and *Damaging Crits X* for the duration of this attack.

= UNIT CARDS

#unit-card(
  name: "Cultist Mob",
  subtitle: "Mortal devotees of the Dark Gods",
  expansion: "40k CSM",
  unit-type: "AGENT/TEAM",
  points: 70,
  models: ((name: "Chaos Cultist Champion", mot: 14, phy: 14, wil: 14, str: 1, wsc: 4, wsr: 2, arm: 0),
    (name: "Chaos Cultist", mot: 14, phy: 14, wil: 15, str: 1, wsc: 4, wsr: 2, arm: 0),),
  keywords: ("Heretic Astartes", "Infantry", "Chaos", "Damned", "Cultist Mob"),
  weapons: ( w("Autopistol"), w("Bolt Pistol"), w("Brutal assault weapon"), ),
  equipment: (("Autopistol"), ("Brutal assault weapon"),
  ("Chaos Cultist Champion's autopistol may be replaced with Bolt Pistol")),
  armour: (("S", "0"), ("C", "0"), ("P", "0"), ("B", "0"), ("L", "0"), ("PL", "0")),
  skills: (
    ("One-Handed Striking", 4),
    ("Firearms", 2),
  ),
  abilities-unique: (),
  abilities-core: (
    ("Sticky Objectives"),
  ),
  abilities-expansion: (
    ("Dark Pacts"),
  ),
  notes: none,
)
