225 lines
6.1 KiB
Plaintext
225 lines
6.1 KiB
Plaintext
// Canonical attack-threshold modifiers.
|
|
//
|
|
// Keep attack-profile modifiers separate from combat circumstances: the former
|
|
// can be written on an attack before play, while the latter are checked only
|
|
// when the attack is resolved. Both books and reference aids import this file.
|
|
|
|
#import "/setup/theme/variables.typ": theme
|
|
|
|
#let discrete-threshold-table(columns: (auto, 1fr), ..cells) = block(
|
|
width: 100%,
|
|
breakable: false,
|
|
inset: (left: 4pt, right: 4pt),
|
|
block(
|
|
width: 100%,
|
|
stroke: 0.4pt + theme.border.transparentize(45%),
|
|
table(
|
|
columns: columns,
|
|
inset: (x: 5pt, y: 2.5pt),
|
|
fill: (_, y) => if y == 0 {
|
|
theme.parchment.lighten(72%)
|
|
} else if calc.even(y) {
|
|
theme.parchment.lighten(91%)
|
|
} else {
|
|
none
|
|
},
|
|
stroke: (_, y) => (
|
|
bottom: 0.25pt
|
|
+ theme.border.transparentize(if y == 0 { 35% } else { 72% }),
|
|
),
|
|
..cells,
|
|
),
|
|
),
|
|
)
|
|
|
|
#let baked-threshold-modifiers = (
|
|
targeting: (
|
|
(category: [Ciblage], value: -1, label: [Attaque visant un membre]),
|
|
(
|
|
category: [Ciblage],
|
|
value: -2,
|
|
label: [Attaque visant un point exact d'un membre],
|
|
),
|
|
(
|
|
category: [Ciblage],
|
|
value: -2,
|
|
label: [Partie normalement difficile à atteindre],
|
|
),
|
|
),
|
|
ranged: (
|
|
(
|
|
category: [Portée],
|
|
value: +2,
|
|
label: [_Bout portant_ — jusqu'à la moitié de la portée],
|
|
),
|
|
(
|
|
category: [Portée],
|
|
value: 0,
|
|
label: [_Portée normale_ — de la moitié à la portée de l'arme],
|
|
),
|
|
(
|
|
category: [Portée],
|
|
value: -2,
|
|
label: [_Portée longue_ — au-delà de la portée et jusqu'à deux fois celle-ci],
|
|
),
|
|
(
|
|
category: [Portée],
|
|
value: -4,
|
|
label: [_Portée extrême_ — au-delà de deux fois la portée et jusqu'à trois fois celle-ci],
|
|
),
|
|
(
|
|
category: [Obstruction],
|
|
value: -2,
|
|
label: [De nombreux alliés proches de la cible obstruent le tir],
|
|
),
|
|
),
|
|
common: (
|
|
(category: [Taille], value: +1, label: [Cible grande]),
|
|
(category: [Taille], value: +2, label: [Cible titanesque]),
|
|
(category: [Taille], value: +2, label: [Cible de taille mythique]),
|
|
(
|
|
category: [Maniement],
|
|
value: +1,
|
|
label: [Par point de spécialité de maniement de l'arme],
|
|
),
|
|
),
|
|
)
|
|
|
|
#let situational-threshold-modifiers = (
|
|
position: (
|
|
(
|
|
category: [Position],
|
|
value: -2,
|
|
label: [_Mauvais positionnement_ -- la partie visée est tout juste hors d'atteinte],
|
|
),
|
|
(
|
|
category: [Position],
|
|
value: -4,
|
|
label: [_Accès incertain_ -- il faut attendre une ouverture pour atteindre la partie visée (mauvais côté, sommet d'une aile battante, etc.)],
|
|
),
|
|
(
|
|
category: [Position],
|
|
value: [Échec],
|
|
label: [Partie impossible à atteindre depuis la position actuelle (derrière la créature sans moyen de la contourner, par exemple)],
|
|
),
|
|
),
|
|
bonuses: (
|
|
(category: [État], value: +1, label: [Cible grandement ralentie]),
|
|
(category: [État], value: +2, label: [Cible immobile]),
|
|
),
|
|
penalties: (
|
|
(
|
|
category: [Position],
|
|
value: -1,
|
|
label: [Attaque effectuée dans un mouvement acrobatique],
|
|
),
|
|
(
|
|
category: [Position],
|
|
value: -2,
|
|
label: [Attaque effectuée en chute libre],
|
|
),
|
|
(
|
|
category: [Position],
|
|
value: -2,
|
|
label: [Attaque de mêlée effectuée en étant à terre],
|
|
),
|
|
// (
|
|
// category: [Réaction],
|
|
// reaction: true,
|
|
// value: -1,
|
|
// label: [Cible en mouvement],
|
|
// ),
|
|
(
|
|
category: [Réaction],
|
|
reaction: true,
|
|
value: -2,
|
|
label: [Cible en train d'effectuer une charge],
|
|
),
|
|
),
|
|
)
|
|
|
|
#let signed-threshold(value) = if type(value) == int or type(value) == float {
|
|
if value > 0 { "+" + str(value) } else if value == 0 {
|
|
" " + str(value)
|
|
} else { str(value) }
|
|
} else {
|
|
value
|
|
}
|
|
|
|
#let threshold-category(entry, fallback) = {
|
|
let label = entry.at("category", default: fallback)
|
|
if entry.at("reaction", default: false) {
|
|
box(
|
|
inset: (x: 3.5pt, y: 1pt),
|
|
radius: 2pt,
|
|
fill: theme.heading-accent.lighten(88%),
|
|
stroke: 0.35pt + theme.heading-accent.lighten(48%),
|
|
text(size: 0.82em, weight: "medium", fill: theme.heading-accent, label),
|
|
)
|
|
} else {
|
|
text(size: 0.88em, fill: theme.muted, label)
|
|
}
|
|
}
|
|
|
|
#let threshold-modifier-list(entries) = {
|
|
for entry in entries {
|
|
[- #signed-threshold(entry.value) : #entry.label]
|
|
}
|
|
}
|
|
|
|
#let threshold-reference-table(penalties: (), bonuses: ()) = {
|
|
let rows = (
|
|
penalties.map(entry => (
|
|
threshold-category(entry, [Malus]),
|
|
[#signed-threshold(entry.value)],
|
|
entry.label,
|
|
)),
|
|
bonuses.map(entry => (
|
|
threshold-category(entry, [Bonus]),
|
|
[#signed-threshold(entry.value)],
|
|
entry.label,
|
|
)),
|
|
).flatten()
|
|
|
|
discrete-threshold-table(
|
|
columns: (auto, 3.4em, 1fr),
|
|
table.header(
|
|
[*Nature*],
|
|
[*Seuil*],
|
|
[*Circonstance*],
|
|
),
|
|
..rows,
|
|
)
|
|
}
|
|
|
|
#let baked-threshold-reference-table(entries) = discrete-threshold-table(
|
|
columns: (auto, 3.4em, 1fr),
|
|
table.header([*Nature*], [*Seuil*], [*Élément à intégrer au profil*]),
|
|
..entries
|
|
.map(entry => (
|
|
threshold-category(entry, [Seuil]),
|
|
[#signed-threshold(entry.value)],
|
|
entry.label,
|
|
))
|
|
.flatten(),
|
|
)
|
|
|
|
#let inline-threshold-modifiers(entries) = {
|
|
for (index, entry) in entries.enumerate() {
|
|
if index > 0 { [; ] }
|
|
[#signed-threshold(entry.value) #entry.label]
|
|
}
|
|
}
|
|
|
|
#let situational-threshold-screen-section = (
|
|
title: "Seuils circonstanciels",
|
|
source: "Règles en combat — Attaque",
|
|
items: (
|
|
[Ciblage : #inline-threshold-modifiers(baked-threshold-modifiers.targeting).],
|
|
[Position : #inline-threshold-modifiers(situational-threshold-modifiers.position).],
|
|
[Malus : #inline-threshold-modifiers(situational-threshold-modifiers.penalties).],
|
|
[Bonus : #inline-threshold-modifiers(situational-threshold-modifiers.bonuses).],
|
|
[Le maître de jeu peut aussi modifier le seuil pour le couvert, l'élévation ou le camouflage.],
|
|
),
|
|
)
|