Files
fvtt-celestopol/module/config/system.mjs
LeRatierBretonnier cff700bd3d Fix roll dialog CSS + JS: template <div> wrapper, moon-section, selectors
- Remplace <form class='roll-dialog celestopol'> par <div class='roll-dialog-content'>
  pour éviter les formulaires HTML imbriqués invalides (DialogV2 a son propre <form>)
- Corrige le sélecteur CSS de .roll-dialog.celestopol vers .application.roll-dialog .roll-dialog-content
- Remplace .form-group.form-moon par .moon-section (classe custom) pour éviter
  les conflits avec le CSS grid de FoundryVTT standard-form (label 130px de hauteur)
- Met à jour le script JS inline pour utiliser document.querySelector('.roll-dialog-content')
- Ajoute white-space: nowrap sur le label Destin pour éviter le wrapping sur 3 lignes
- Supprime .application.roll-dialog .window-content padding override (remplacé par dialog-content)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 17:21:18 +01:00

131 lines
7.1 KiB
JavaScript

export const SYSTEM_ID = "fvtt-celestopol"
export const ASCII = `
░█▀▀░█▀▀░█░░░█▀▀░█▀▀░▀█▀░█▀█░█▀█░█▀█░█░░
░█░░░█▀▀░█░░░█▀▀░▀▀█░░█░░█░█░█▀▀░█░█░█░░
░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░░▀░░▀▀▀░▀░░░▀▀▀░▀▀▀
░░░░░░░░░░░░░░░░░░1922░░░░░░░░░░░░░░░░░░░
`
/** Les 4 attributs principaux (stats). Chacun a une résistance (res) et 4 domaines. */
export const STATS = {
ame: { id: "ame", label: "CELESTOPOL.Stat.ame" },
corps: { id: "corps", label: "CELESTOPOL.Stat.corps" },
coeur: { id: "coeur", label: "CELESTOPOL.Stat.coeur" },
esprit: { id: "esprit", label: "CELESTOPOL.Stat.esprit" },
}
/** Domaines groupées par attribut. */
export const SKILLS = {
ame: {
artifice: { id: "artifice", label: "CELESTOPOL.Skill.artifice", stat: "ame" },
attraction: { id: "attraction", label: "CELESTOPOL.Skill.attraction", stat: "ame" },
coercition: { id: "coercition", label: "CELESTOPOL.Skill.coercition", stat: "ame" },
faveur: { id: "faveur", label: "CELESTOPOL.Skill.faveur", stat: "ame" },
},
corps: {
echauffouree: { id: "echauffouree", label: "CELESTOPOL.Skill.echauffouree", stat: "corps" },
effacement: { id: "effacement", label: "CELESTOPOL.Skill.effacement", stat: "corps" },
mobilite: { id: "mobilite", label: "CELESTOPOL.Skill.mobilite", stat: "corps" },
prouesse: { id: "prouesse", label: "CELESTOPOL.Skill.prouesse", stat: "corps" },
},
coeur: {
appreciation: { id: "appreciation", label: "CELESTOPOL.Skill.appreciation", stat: "coeur" },
arts: { id: "arts", label: "CELESTOPOL.Skill.arts", stat: "coeur" },
inspiration: { id: "inspiration", label: "CELESTOPOL.Skill.inspiration", stat: "coeur" },
traque: { id: "traque", label: "CELESTOPOL.Skill.traque", stat: "coeur" },
},
esprit: {
instruction: { id: "instruction", label: "CELESTOPOL.Skill.instruction", stat: "esprit" },
mtechnologique: { id: "mtechnologique", label: "CELESTOPOL.Skill.mtechnologique", stat: "esprit" },
raisonnement: { id: "raisonnement", label: "CELESTOPOL.Skill.raisonnement", stat: "esprit" },
traitement: { id: "traitement", label: "CELESTOPOL.Skill.traitement", stat: "esprit" },
},
}
/** Liste plate de tous les domaines (utile pour les DataModels d'items). */
export const ALL_SKILLS = Object.values(SKILLS).flatMap(group => Object.values(group))
/** Types d'anomalies (pouvoirs paranormaux). */
export const ANOMALY_TYPES = {
none: { id: "none", label: "CELESTOPOL.Anomaly.none" },
entropie: { id: "entropie", label: "CELESTOPOL.Anomaly.entropie" },
communicationaveclesmorts:{ id: "communicationaveclesmorts",label: "CELESTOPOL.Anomaly.communicationaveclesmorts" },
illusion: { id: "illusion", label: "CELESTOPOL.Anomaly.illusion" },
suggestion: { id: "suggestion", label: "CELESTOPOL.Anomaly.suggestion" },
tarotdivinatoire: { id: "tarotdivinatoire", label: "CELESTOPOL.Anomaly.tarotdivinatoire" },
telekinesie: { id: "telekinesie", label: "CELESTOPOL.Anomaly.telekinesie" },
telepathie: { id: "telepathie", label: "CELESTOPOL.Anomaly.telepathie" },
voyageastral: { id: "voyageastral", label: "CELESTOPOL.Anomaly.voyageastral" },
}
/** Factions du monde de Célestopol. */
export const FACTIONS = {
pinkerton: { id: "pinkerton", label: "CELESTOPOL.Faction.pinkerton" },
police: { id: "police", label: "CELESTOPOL.Faction.police" },
okhrana: { id: "okhrana", label: "CELESTOPOL.Faction.okhrana" },
lunanovatek: { id: "lunanovatek", label: "CELESTOPOL.Faction.lunanovatek" },
oto: { id: "oto", label: "CELESTOPOL.Faction.oto" },
syndicats: { id: "syndicats", label: "CELESTOPOL.Faction.syndicats" },
vorovskoymir:{ id: "vorovskoymir",label: "CELESTOPOL.Faction.vorovskoymir" },
cour: { id: "cour", label: "CELESTOPOL.Faction.cour" },
}
/** Niveaux de blessures avec leur malus associé. */
export const WOUND_LEVELS = [
{ id: 0, label: "CELESTOPOL.Wound.none", malus: 0 },
{ id: 1, label: "CELESTOPOL.Wound.anodin", malus: 0 },
{ id: 2, label: "CELESTOPOL.Wound.derisoire", malus: 0 },
{ id: 3, label: "CELESTOPOL.Wound.negligeable", malus: -1 },
{ id: 4, label: "CELESTOPOL.Wound.superficiel", malus: -1 },
{ id: 5, label: "CELESTOPOL.Wound.leger", malus: -2 },
{ id: 6, label: "CELESTOPOL.Wound.modere", malus: -2 },
{ id: 7, label: "CELESTOPOL.Wound.grave", malus: -3 },
{ id: 8, label: "CELESTOPOL.Wound.dramatique", malus: -999 },
]
/** Seuils de difficulté pour les jets de dés. */
export const DIFFICULTY_CHOICES = {
unknown: { id: "unknown", label: "CELESTOPOL.Difficulty.unknown", value: 0 },
facile: { id: "facile", label: "CELESTOPOL.Difficulty.facile", value: 5 },
normal: { id: "normal", label: "CELESTOPOL.Difficulty.normal", value: 7 },
difficile:{ id: "difficile", label: "CELESTOPOL.Difficulty.difficile", value: 9 },
ardu: { id: "ardu", label: "CELESTOPOL.Difficulty.ardu", value: 11 },
extreme: { id: "extreme", label: "CELESTOPOL.Difficulty.extreme", value: 13 },
}
/** Phases de la lune (dé de lune). */
export const MOON_DICE_PHASES = {
none: { id: "none", label: "CELESTOPOL.Moon.none", bonus: 0 },
nouvellelune: { id: "nouvellelune", label: "CELESTOPOL.Moon.nouvellelune", bonus: 0 },
premiercroissant: { id: "premiercroissant", label: "CELESTOPOL.Moon.premiercroissant", bonus: 1 },
premierquartier: { id: "premierquartier", label: "CELESTOPOL.Moon.premierquartier", bonus: 1 },
lunegibbeuse: { id: "lunegibbeuse", label: "CELESTOPOL.Moon.lunegibbeuse", bonus: 2 },
lunevoutee: { id: "lunevoutee", label: "CELESTOPOL.Moon.lunevoutee", bonus: 2 },
derniercroissant: { id: "derniercroissant", label: "CELESTOPOL.Moon.derniercroissant", bonus: 1 },
dernierquartier: { id: "dernierquartier", label: "CELESTOPOL.Moon.dernierquartier", bonus: 1 },
pleinelune: { id: "pleinelune", label: "CELESTOPOL.Moon.pleinelune", bonus: 3 },
}
/** Types d'équipements. */
export const EQUIPMENT_TYPES = {
autre: { id: "autre", label: "CELESTOPOL.Equipment.autre" },
arme: { id: "arme", label: "CELESTOPOL.Equipment.arme" },
protection:{ id: "protection",label: "CELESTOPOL.Equipment.protection" },
vehicule: { id: "vehicule", label: "CELESTOPOL.Equipment.vehicule" },
}
export const SYSTEM = {
id: SYSTEM_ID,
ASCII,
STATS,
SKILLS,
ALL_SKILLS,
ANOMALY_TYPES,
FACTIONS,
WOUND_LEVELS,
DIFFICULTY_CHOICES,
MOON_DICE_PHASES,
EQUIPMENT_TYPES,
}