75f79c1c08
- `magicOrder` ArrayField + ▲/▼ buttons for manual reordering
- Magic rolls use school's aspect for Wu Xing, not speciality's element
- Spell power: `difficulty × (aspectValue + freePowerLevels)` (not `successes × diff`)
- Prompt replaces `aspectspeciality`/`bonusmalusspeciality`/`heispend` with `freepowerlevels`
fix: code review issues
- combat.js: guard undefined `ids` in rollInitiative
- rolling.js: catch Dice So Nice promise, normalize French→English kungfu aspects
- weapon/armor/ingredient: `{ min: 0 }` on quantity
- character.js/npc.js: catch rollForActor fire-and-forget promises
- roll-actions.js/tinji-app.js: await ChatMessage.create
- sanhei.js: null guard on properties
- spell.js/kungfu.js: fix aspect name comments (French→English)
37 lines
1.4 KiB
JavaScript
37 lines
1.4 KiB
JavaScript
/**
|
||
* Chroniques de l'Étrange — Système FoundryVTT
|
||
*
|
||
* Chroniques de l'Étrange 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 2024–2026 LeRatierBretonnien
|
||
* @license CC BY-NC-SA 4.0 – https://creativecommons.org/licenses/by-nc-sa/4.0/
|
||
*/
|
||
|
||
import { CDEBaseItemSheet } from "./base.js"
|
||
|
||
export class CDESanheiSheet extends CDEBaseItemSheet {
|
||
static DEFAULT_OPTIONS = {
|
||
classes: ["sanhei"],
|
||
position: { width: 580, height: 620 },
|
||
}
|
||
|
||
static PARTS = {
|
||
main: { template: "systems/fvtt-chroniques-de-l-etrange/templates/item/cde-sanhei-sheet.html" },
|
||
}
|
||
|
||
async _prepareContext() {
|
||
const context = await super._prepareContext()
|
||
const enrich = (content) => foundry.applications.ux.TextEditor.implementation.enrichHTML(content ?? "", { async: true })
|
||
const props = this.document.system.properties ?? {}
|
||
context.prop1DescriptionHTML = await enrich(props.prop1?.description)
|
||
context.prop2DescriptionHTML = await enrich(props.prop2?.description)
|
||
context.prop3DescriptionHTML = await enrich(props.prop3?.description)
|
||
context.propFields = this.document.system.schema.fields.properties?.fields
|
||
return context
|
||
}
|
||
}
|