#import "forge-data.typ": equipments #import "/setup/setup.typ": ddlvl, st // Temporary handling names. These are presentation/game-rule data rather than // composition rules, so they deliberately live beside the forge table. #let handling-by-shape = ( "Griffes": "Tranchante", "Hast": "Hast", "Épée": "Tranchante", "Marteau": "Contondante", "Hache": "Tranchante", "Arbalète": "Distance", "Arc": "Distance", "Bouclier": "-", "Armure": "-", ) #let super-heavy-handling = ( "Griffes": "Frienzä", "Hast": "Paysagiste", "Épée": "Haroth", "Marteau": "Rhödarak", "Hache": "Kahml", ) #let handling(item) = { if ( item.nature_category == "SuperHeavy" and item.shape_name in super-heavy-handling ) { super-heavy-handling.at(item.shape_name) } else { handling-by-shape.at(item.shape_name, default: "-") } } // The database stores a generic adjective per nature. French gender and the // plural form of "Griffes" are presentation details, kept here with handling. #let adjectives-by-shape = ( "Griffes": ( Light: "légères", Medium: "moyennes", Heavy: "lourdes", SuperHeavy: "super-lourdes", ), "Hast": ( Light: "léger", Medium: "moyen", Heavy: "lourd", SuperHeavy: "super-lourd", ), "Épée": ( Light: "légère", Medium: "moyenne", Heavy: "lourde", SuperHeavy: "super-lourde", ), "Marteau": ( Light: "léger", Medium: "moyen", Heavy: "lourd", SuperHeavy: "super-lourd", ), "Hache": ( Light: "légère", Medium: "moyenne", Heavy: "lourde", SuperHeavy: "super-lourde", ), "Arbalète": ( Light: "légère", Medium: "moyenne", Heavy: "lourde", SuperHeavy: "super-lourde", ), "Arc": ( Light: "léger", Medium: "moyen", Heavy: "lourd", SuperHeavy: "super-lourd", ), "Bouclier": ( Light: "léger", Medium: "moyen", Heavy: "lourd", SuperHeavy: "super-lourd", ), "Armure": ( Light: "légère", Medium: "moyenne", Heavy: "lourde", SuperHeavy: "super-lourde", ), ) #let display-name(item) = { let adjectives = adjectives-by-shape.at(item.shape_name, default: none) if adjectives == none { item.name } else { item.shape_name + " " + adjectives.at(item.nature_category) } } #let damage-symbols = ( "Slash": [@el_slash], "Blunt": [@el_blunt], "Pierce": [@el_pierce], ) #let mode(mode-data) = { let (rank, damage-type) = mode-data.pairs().first() let symbol = damage-symbols.at(damage-type, default: [#damage-type]) if rank == "Secondary" { [\[#symbol\]] } else if rank == "Tertiary" { [\[\[#symbol\]\]] } else { symbol } } #let modes(item) = item.damage_type.map(mode).join([, ]) #let signed(value) = if value > 0 { "+" + str(value) } else { str(value) } #let shown(value) = if value == none { [-] } else { [#value] } #let special(item) = { let parts = () if item.action_cost > 1 { parts.push([#(str(item.action_cost) + "A")]) } if item.reload_cost != none and item.reload_cost != "null" { parts.push([#item.reload_cost@rl_reload]) } if item.armor_pierce != 0 { parts.push([Perce-armure #signed(item.armor_pierce)]) } if item.antimaterial != 0 { parts.push([Antimatériel #signed(item.antimaterial)]) } if item.range > 0 { parts.push([#item.range m]) } if item.precision != 0 { parts.push([@rl_precision #signed(item.precision)]) } if item.agility_bonus != 0 { parts.push([Agilité #signed(item.agility_bonus)]) } parts += item.special.map(effect => [#effect]) if parts.len() == 0 { [-] } else { parts.join([, ]) } } // Category-specific post-treatment belongs in the helpers above. The data // module remains responsible only for importing and composing equipment. #page( flipped: true, )[ #st.set-table-style( table-theme: "steel", stroke: none, table( columns: 17, // TODO: This might be a little too tight // inset: (x: 2pt, y: 3pt), align: ( left, left, center, center, center, center, center, center, center, center, center, center, center, center, center, left, center, ), table.header( [Forme], [Maniement], [Dég.], [+], [R.Max], [Brise], [Prot.], [Int.], [T2], [T1], [Modes], [Esq.], [Par.], [Vit.], [Disc.], [Spécial], [Diff.], ), ..equipments .map(item => ( [#display-name(item)], [#handling(item)], [#item.damage], [#item.p_damage], [#item.rmax], [#item.armor_break], [#item.protection], [#item.integrity], shown(item.torque_two_handed), shown(item.torque_one_handed), [#modes(item)], [#item.dodge], [#item.parry], [#item.speed], [#item.stealth], [#special(item)], [#ddlvl(item.difficulty)], )) .flatten(), ), ) ] // \begin{landscape}\begin{center} // \begin{longtblr}[ // entry = none, // label = none, // ]{ // colspec = {|QQQQQQQQQQQQQQQQQ|}, // cells = {font = \footnotesize\selectfont}, // row{1} = {bg=cobluel, fg=white}, // row{even} = {coblueL}, // hspan = minimal, vspan=minimal, // colsep = 2mm, abovesep=0px,belowsep=0px, leftsep=3px, rightsep=3px, // rowhead = 1, // } // \hline // {Forme} & {Maniement} & {\damagew} & + & {R.Max} & \arbreakk & \protection & \integrite & $\mathbb{T}$2 & $\mathbb{T}$1 & {Modes} & {Esq.} & {Par.} & {Vit.} & {Disc.} & {Spécial} & {Diff.} \\ // \hline // Griffes légères & Tranchante & 3 & 0 & 3 & 0 & 1 & 3 & -2 & 3 & $\mathbf{\slash,[\pierce]}$ & 2\half{} & 1 & 2 & 1 & \glssymbol{precision} +3, Ag \half{} & \ddlvl{0} \\ // Griffes moyennes & Tranchante & 4 & 1 & 2 & 1 & 1 & 4 & 3 & 6 & $\mathbf{\slash,[\pierce]}$ & 2 & 0 & 2 & 1 & \glssymbol{precision} +2 & \ddlvl{1} \\ // Griffes lourdes & Tranchante & 5 & 2 & 3 & 2 & 2 & 5 & 11 & 17 & $\mathbf{\slash,[\pierce]}$ & 2 & -2 & 1 & 0 & \glssymbol{precision} +2 & \ddlvl{2} \\ // Griffes super-lourdes & Frienzä & 6 & 3 & 3 & 3 & 2 & 5 & 23 & 31 & $\mathbf{\slash,[\pierce],[[\blunt]]}$ & 2 & -2 & 0 & -2 & 2A, \glssymbol{precision} +1, Ag -1 & \ddlvl{3} \\ // \hline // \hline // Hast léger & Hast & 1 & 2 & 4 & 0 & 1 & 2 & 5 & 15 & $\mathbf{\pierce,[\slash]}$ & 1\half{} & 0 & 0 & 0 & \glssymbol{precision} +2, Ag \half{} & \ddlvl{0} \\ // Hast moyen & Hast & 2 & 3 & 3 & 1 & 1 & 3 & 10 & 18 & $\mathbf{\pierce,[\slash]}$ & 1 & -1 & 0 & 0 & \glssymbol{precision} +1 & \ddlvl{1} \\ // Hast lourd & Hast & 3 & 4 & 4 & 2 & 2 & 4 & 18 & 29 & $\mathbf{\pierce,[\slash]}$ & 1 & -3 & -1 & -1 & \glssymbol{precision} +1 & \ddlvl{2} \\ // Hast super-lourd & Paysagiste & 4 & 5 & 4 & 3 & 2 & 4 & 30 & 43 & $\mathbf{\pierce,[\slash],[[\blunt]]}$ & 1 & -3 & -2 & -3 & 2A, Ag -1 & \ddlvl{3} \\ // \hline // \hline // Épée légère & Tranchante & 2 & 1 & 3 & 2 & 2 & 3 & 7 & 12 & $\mathbf{\slash,[\pierce]}$ & \half{} & 3 & 0 & 0 & \glssymbol{precision} +2, Ag \half{} & \ddlvl{0} \\ // Épée moyenne & Tranchante & 3 & 2 & 2 & 3 & 2 & 4 & 12 & 15 & $\mathbf{\slash,[\pierce]}$ & 0 & 2 & 0 & 0 & \glssymbol{precision} +1 & \ddlvl{1} \\ // Épée lourde & Tranchante & 4 & 3 & 3 & 4 & 3 & 5 & 20 & 26 & $\mathbf{\slash,[\pierce]}$ & 0 & 0 & -1 & -1 & \glssymbol{precision} +1 & \ddlvl{2} \\ // Épée super-lourde & Haroth & 5 & 4 & 3 & 5 & 3 & 5 & 32 & 40 & $\mathbf{\slash,[\pierce],[[\blunt]]}$ & 0 & 0 & -2 & -3 & 2A, Ag -1 & \ddlvl{3} \\ // \hline // \hline // Marteau léger & Contondante & 5 & 1 & 3 & 3 & 2 & 2 & 6 & 15 & $\mathbf{\blunt}$ & \half{} & 0 & 0 & 0 & Ag \half{} & \ddlvl{0} \\ // Marteau moyen & Contondante & 6 & 2 & 2 & 4 & 2 & 3 & 11 & 18 & $\mathbf{\blunt}$ & 0 & -1 & 0 & 0 & \glssymbol{precision} -1 & \ddlvl{1} \\ // Marteau lourd & Contondante & 7 & 3 & 3 & 5 & 3 & 4 & 19 & 29 & $\mathbf{\blunt}$ & 0 & -3 & -1 & -1 & \glssymbol{precision} -1 & \ddlvl{2} \\ // Marteau super-lourd & Rhödarak & 8 & 4 & 3 & 6 & 3 & 4 & 31 & 43 & $\mathbf{\blunt}$ & 0 & -3 & -2 & -3 & 2A, \glssymbol{precision} -2, Ag -1 & \ddlvl{3} \\ // \hline // \hline // Hache légère & Tranchante & 3 & 1 & 4 & 3 & 2 & 2 & 4 & 11 & $\mathbf{\slash}$ & \half{} & 0 & 1 & 0 & \glssymbol{precision} +1, Ag \half{} & \ddlvl{0} \\ // Hache moyenne & Tranchante & 4 & 2 & 3 & 4 & 2 & 3 & 9 & 14 & $\mathbf{\slash}$ & 0 & -1 & 1 & 0 & & \ddlvl{1} \\ // Hache lourde & Tranchante & 5 & 3 & 4 & 5 & 3 & 4 & 17 & 25 & $\mathbf{\slash}$ & 0 & -3 & 0 & -1 & & \ddlvl{2} \\ // Hache super-lourde & Kahml & 6 & 4 & 4 & 6 & 3 & 4 & 29 & 39 & $\mathbf{\slash,[[\blunt]]}$ & 0 & -3 & -1 & -3 & 2A, \glssymbol{precision} -1, Ag -1 & \ddlvl{3} \\ // \hline // \hline // Arbalète légère & Distance & 3 & 1 & 3 & 0 & 1 & 1 & 3 & 13 & $\mathbf{\pierce}$ & \half{} & -2 & 0 & 0 & 2\reload{}, \glssymbol{parmure} 2, 80m, \glssymbol{precision} +1, Ag \half{} & \ddlvl{0} \\ // Arbalète moyenne & Distance & 4 & 2 & 2 & 1 & 1 & 2 & 8 & 16 & $\mathbf{\pierce}$ & 0 & -3 & 0 & 0 & 2\reload{}, \glssymbol{parmure} 2, 80m & \ddlvl{1} \\ // Arbalète lourde & Distance & 5 & 3 & 3 & 2 & 2 & 3 & 16 & 27 & $\mathbf{\pierce}$ & 0 & -5 & -1 & -1 & 2\reload{}, \glssymbol{parmure} 4, 110m & \ddlvl{2} \\ // Arbalète super-lourde & Distance & 6 & 4 & 3 & 3 & 2 & 3 & 28 & 41 & $\mathbf{\pierce,[[\blunt]]}$ & 0 & -5 & -2 & -3 & 2A, 2\reload{}, \glssymbol{parmure} 5, 140m, \glssymbol{precision} -1, Ag -1 & \ddlvl{3} \\ // Arc léger & Distance & 1 & 1 & 4 & 0 & 1 & 1 & -5 & 4 & $\mathbf{\pierce}$ & \half{} & -2 & 0 & 0 & 1\reload{}, \glssymbol{parmure} 2, 120m, \glssymbol{precision} +2, Ag \half{} & \ddlvl{0} \\ // Arc moyen & Distance & 2 & 2 & 3 & 1 & 1 & 2 & 0 & 7 & $\mathbf{\pierce}$ & 0 & -3 & 0 & 0 & 1\reload{}, \glssymbol{parmure} 2, 120m, \glssymbol{precision} +1 & \ddlvl{1} \\ // Arc lourd & Distance & 3 & 3 & 4 & 2 & 2 & 3 & 8 & 18 & $\mathbf{\pierce}$ & 0 & -5 & -1 & -1 & 1\reload{}, \glssymbol{parmure} 4, 150m, \glssymbol{precision} +1 & \ddlvl{2} \\ // Arc super-lourd & Distance & 4 & 4 & 4 & 3 & 2 & 3 & 20 & 32 & $\mathbf{\pierce,[[\blunt]]}$ & 0 & -5 & -2 & -3 & 2A, 1\reload{}, \glssymbol{parmure} 5, 180m, Ag -1 & \ddlvl{3} \\ // \hline // \hline // Bouclier léger & - & 1 & 0 & 3 & 0 & 2 & 1 & 1 & 5 & $\mathbf{\blunt}$ & 0 & 4 & -1 & -1 & & \ddlvl{0} \\ // Bouclier moyen & - & 2 & 1 & 2 & 0 & 3 & 2 & 6 & 8 & $\mathbf{\blunt}$ & 0 & 3 & -1 & -1 & \glssymbol{precision} -1 & \ddlvl{1} \\ // Bouclier lourd & - & 3 & 2 & 2 & 0 & 4 & 3 & 14 & 19 & $\mathbf{\blunt}$ & -2 & 4 & -3 & -2 & \glssymbol{precision} -2, Ag -1 & \ddlvl{2} \\ // Bouclier super-lourd & - & 4 & 3 & 1 & 0 & 5 & 3 & 26 & 33 & $\mathbf{\blunt}$ & -4 & 6 & -4 & -4 & 2A, \glssymbol{precision} -3, Ag -1 & \ddlvl{3} \\ // \hline // \hline // Armure légère & - & 0 & 0 & 0 & 0 & 3 & 5 & 9 & & $\mathbf{\blunt}$ & 0 & 0 & 0 & 1 & Ag 1 & \ddlvl{0} \\ // Armure moyenne & - & 0 & 0 & 0 & 0 & 3 & 6 & 10 & & $\mathbf{\blunt}$ & 0 & 0 & 0 & 0 & & \ddlvl{1} \\ // Armure lourde & - & 0 & 0 & 0 & 0 & 5 & 7 & 23 & & $\mathbf{\blunt}$ & -1 & -2 & -2 & -3 & Ag -1 & \ddlvl{2} \\ // Armure super-lourde & - & 0 & 0 & 0 & 0 & 7 & 8 & 38 & & $\mathbf{\blunt}$ & -2 & -3 & -4 & -6 & Ag -1 & \ddlvl{3} \\ // \hline // \end{longtblr} // \end{center} // \end{landscape} //