Corrections sur factions, aspects, degats et fiches PNJs
This commit is contained in:
@@ -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 2025–2026 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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user