Torque reporting & db
Build Successful The Ravenous rulebook and balance report were built successfully.
Ravenous/ravenous_typst/pipeline/head This commit looks good Details

This commit is contained in:
Dandaedre 2026-08-22 01:35:48 +02:00
parent 97f340ee17
commit bd1c07f070
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
3 changed files with 50 additions and 19 deletions

@ -1 +1 @@
Subproject commit de4fbf7832d468ada99c7739005de49fa591cb26
Subproject commit d666cdbde5d13fc78d6b7dbd47209639938cc222

View File

@ -62,7 +62,7 @@
resisted_by: Force
difficulty: 1
category: "@el_blunt"
description: 'Vous ne pouvez plus utiliser d''action de mouvement tant que la source de votre immobilisation reste intacte ou que vous ayez réussi le teste de résistance.'
description: 'Vous ne pouvez plus utiliser d''action de mouvement tant que la source de votre immobilisation reste intacte ou que vous ayez réussi le teste de résistance. Si vous étes dans une action continue nécessitant de rester en mouvement (charge, vol etc..) vous cessez immédiatement votre mouvement et devenez victime des loies (cruelles) de la physique du monde.'
group: Altérations
- key: al_consomption

View File

@ -1,9 +1,54 @@
// Concise armor and shield comparison for the balance report.
#import "@preview/primaviz:0.6.0": line-chart
#import "@preview/cetz:0.3.4"
#import "defense_metrics.typ": *
#import "report_style.typ": chart-theme
#import "report_style.typ": report-theme
#import "../theme/tables.typ" as tables
#let torque-protection-xy(items, title) = {
let items = items.sorted(key: item => item.torque)
let width = 7.2
let height = 4.1
let x-step = 5
let x-max = calc.ceil(calc.max(..items.map(item => item.torque)) / x-step) * x-step
let y-max = calc.max(1, calc.max(..items.map(item => item.protection)))
let x-ticks = range(0, x-max + 1, step: x-step)
let y-ticks = range(0, y-max + 1)
let point(item) = (
item.torque / x-max * width,
item.protection / y-max * height,
)
block(width: 100%, breakable: false)[
#align(center)[
#text(size: 8pt, weight: "bold", fill: report-theme.heading)[#title]
#v(4pt)
#cetz.canvas(length: 1cm, {
import cetz.draw: *
for tick in x-ticks {
let x = tick / x-max * width
line((x, 0), (x, height), stroke: 0.35pt + report-theme.dark-gold.transparentize(65%))
content((x, -0.2), text(size: 5.5pt, fill: report-theme.muted-ink)[#tick], anchor: "north")
}
for tick in y-ticks {
let y = tick / y-max * height
line((0, y), (width, y), stroke: 0.35pt + report-theme.dark-gold.transparentize(65%))
content((-0.18, y), text(size: 5.5pt, fill: report-theme.muted-ink)[#tick], anchor: "east")
}
line((0, 0), (width, 0), stroke: 0.75pt + report-theme.dark-gold)
line((0, 0), (0, height), stroke: 0.75pt + report-theme.dark-gold)
for index in range(items.len() - 1) {
line(point(items.at(index)), point(items.at(index + 1)), stroke: 1.4pt + report-theme.chart-2)
}
for item in items {
circle(point(item), radius: 0.07, fill: report-theme.chart-2, stroke: 0.5pt + report-theme.parchment-light)
}
content((width / 2, -0.62), text(size: 6.5pt, fill: report-theme.ink)[Torque minimale], anchor: "north")
content((-0.72, height / 2), text(size: 6.5pt, fill: report-theme.ink)[Protection], angle: -90deg, anchor: "center")
})
]
]
}
#let defense-report() = {
pagebreak()
heading(level: 2)[Artisanat — Armures et boucliers]
@ -18,21 +63,7 @@
column-gutter: 12pt,
..("Armors", "Shields").map(category => {
let items = defensive-equipment.filter(item => item.category == category)
line-chart(
(
labels: items.map(item => [T#item.torque]),
values: items.map(item => item.protection),
),
width: 100%,
height: 180pt,
title: [#defense-category-labels.at(category)],
show-points: true,
line-width: 1.4pt,
point-size: 5pt,
x-label: [Torque minimale],
y-label: [Protection],
theme: chart-theme,
)
torque-protection-xy(items, defense-category-labels.at(category))
}),
)