feat(magic): reorder schools, fix Wu Xing aspect & power formula

- `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)
This commit is contained in:
2026-06-10 15:54:31 +02:00
parent 188717c925
commit 75f79c1c08
21 changed files with 304 additions and 189 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ export default class KungfuDataModel extends foundry.abstract.TypeDataModel {
reference: stringField(""),
description: htmlField(""),
orientation: stringField("yin"), // yin | yang | yinyang
aspect: stringField("metal"), // metal | eau | terre | feu | bois
aspect: stringField("metal"), // metal | water | earth | fire | wood
skill: stringField("kungfu"), // kungfu | rangedcombat
speciality: stringField(""),
style: stringField(""),