ravenous_typst/balance_report_master.typ

66 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Standalone master-facing creature balance-analysis target.
#import "/setup/theme/themes.typ" as themes
#import "/setup/analysis/creature_common_report.typ": (
render-common-profile-report,
render-common-region-report,
render-common-reward-report,
)
#import "/setup/analysis/creature_durability_report.typ": render-durability-report
#let report-config = yaml("/data/config/balance_report_master.yaml")
#let enabled-chapters = report-config.chapters
#let chapter-enabled(id) = id in enabled-chapters
#let report-theme = themes.make-theme(theme-name: "steingrund")
#let report-theme-var = themes.make-theme-variable(theme-name: "steingrund")
#let report-numbering(..numbers) = {
let patterns = ("1", "1", "1", "I", "a")
numbers.pos().enumerate().map(pair => numbering(
patterns.at(pair.at(0), default: "1"), pair.at(1),
)).join([.]) + [.]
}
#let configure-report(document) = {
set page(paper: "a4", margin: (x: 1.8cm, y: 1.7cm), numbering: "1")
set text(font: report-theme-var("font"), size: 9.5pt, lang: "fr", fill: report-theme.ink)
set par(justify: true, leading: 0.7em, spacing: 0.75em)
set heading(numbering: report-numbering)
let heading-label(it) = if it.numbering == none { [] } else {
counter(heading).display(it.numbering)
}
show heading.where(level: 1): it => block(above: 1.4em, below: 0.8em)[
#text(size: 20pt, weight: "bold", fill: report-theme.heading)[#heading-label(it) #h(0.45em) #it.body]
]
show heading.where(level: 2): it => block(above: 1em, below: 0.5em)[
#text(size: 13pt, weight: "bold", fill: report-theme.heading-accent)[#heading-label(it) #h(0.4em) #it.body]
]
show heading.where(level: 3): it => block(above: 0.8em, below: 0.35em)[
#text(size: 10.5pt, weight: "bold", fill: report-theme.heading-subtle)[#heading-label(it) #h(0.35em) #it.body]
]
show strong: set text(fill: report-theme.emphasis)
document
}
#show: configure-report
#set document(title: "Ravenous — Rapport d’équilibrage des créatures", author: "Dandaedre")
#page(numbering: none)[
#align(center + horizon)[
#text(size: 34pt, weight: "bold", fill: report-theme.heading)[RAPPORT D’ÉQUILIBRAGE]
#v(0.8em)
#text(size: 14pt, tracking: 0.08em, fill: report-theme.heading-accent)[CRÉATURES — LIVRE DU MJ]
#v(1.8em)
#text(size: 10pt, fill: report-theme.muted-ink)[Profils communs, récompenses et difficulté régionale]
]
]
#pagebreak()
#outline(title: "Sommaire")
#pagebreak()
#if chapter-enabled("creatures.common.profile") { render-common-profile-report() }
#if chapter-enabled("creatures.common.rewards") { render-common-reward-report() }
#if chapter-enabled("creatures.common.regions") { render-common-region-report() }
#if chapter-enabled("creatures.durability") { render-durability-report() }