ravenous_typst/balance_report_master.typ

135 lines
3.8 KiB
Plaintext

// Standalone master-facing creature balance-analysis target.
#import "/setup/theme/themes.typ" as themes
#import "/setup/analysis/creature_common_report.typ": (
render-common-calamity-type-report, render-common-profile-report,
render-common-region-report, render-common-reward-report,
)
#import "/setup/analysis/creature_durability_report.typ": (
render-durability-report,
)
#import "/setup/analysis/creature_reward_report.typ": (
render-creature-reward-analysis,
)
#import "/setup/analysis/creature_advanced_report.typ": (
render-advanced-creature-analysis,
)
#import "/setup/analysis/aoe_threshold_audit.typ": creature-aoe-threshold-audit
#let report-config = yaml("/data/config/balance_report_master.yaml")
#let regional-map-config = yaml("/data/config/regional_map.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.types") {
render-common-calamity-type-report()
}
#if chapter-enabled("creatures.common.rewards") {
render-common-reward-report()
}
#if chapter-enabled("creatures.rewards.analysis") {
render-creature-reward-analysis()
}
#if chapter-enabled("creatures.common.regions") {
render-common-region-report(map-config: regional-map-config)
}
#if chapter-enabled("creatures.durability") { render-durability-report() }
#if chapter-enabled("creatures.advanced") {
render-advanced-creature-analysis(report-config.at(
"advanced_balance",
default: (:),
))
}
#if chapter-enabled("creatures.aoe-thresholds") {
creature-aoe-threshold-audit()
}