Corrections sur factions, aspects, degats et fiches PNJs

This commit is contained in:
2026-04-11 15:02:46 +02:00
parent 36516c3b08
commit 3358dea306
44 changed files with 2308 additions and 148 deletions

View File

@@ -1,3 +1,16 @@
/**
* Célestopol 1922 — Système FoundryVTT
*
* Célestopol 1922 est un jeu de rôle édité par Antre-Monde Éditions.
* Ce système FoundryVTT est une implémentation indépendante et n'est pas
* affilié à Antre-Monde Éditions,
* mais a été réalisé avec l'autorisation d'Antre-Monde Éditions.
*
* @author LeRatierBretonnien
* @copyright 20252026 LeRatierBretonnien
* @license CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0/
*/
import CelestopolItemSheet from "./base-item-sheet.mjs"
import { SYSTEM } from "../../config/system.mjs"
@@ -97,4 +110,22 @@ export class CelestopolArmureSheet extends CelestopolItemSheet {
this.document.system.description, { async: true })
return ctx
}
_onRender(context, options) {
super._onRender(context, options)
const protectionInput = this.element.querySelector('[name="system.protection"]')
const malusInput = this.element.querySelector('[name="system.malus"]')
const malusValue = this.element.querySelector('[data-armure-malus-value]')
if (!protectionInput || !malusInput || !malusValue) return
const syncMalus = () => {
malusInput.value = protectionInput.value
malusValue.textContent = protectionInput.value
}
syncMalus()
protectionInput.addEventListener("input", syncMalus)
protectionInput.addEventListener("change", syncMalus)
}
}