First round of changes

This commit is contained in:
2026-04-23 14:27:33 +02:00
parent f72230dd39
commit abe35cb537
45 changed files with 1860 additions and 56 deletions

View File

@@ -50,6 +50,21 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e {
label: game.i18n.localize("l5r5e.character_types." + e),
}));
// Danger levels for martial/social danger selects
const dangerLevels = ["simple", "moyenne", "assez_difficile", "difficile"];
sheetData.data.dangerList = dangerLevels.map((id) => ({
id,
label: game.i18n.localize(`chiaroscuro.danger.${id}`),
}));
// Invocations list (mot_invocation techniques, split by type like character sheet)
const invocations = sheetData.data.splitTechniquesList?.["mot_invocation"] ?? [];
sheetData.data.splitInvocationsList = {
general: invocations.filter((t) => !t.system.invocation_type || t.system.invocation_type === "general"),
neutre: invocations.filter((t) => t.system.invocation_type === "neutre"),
precis: invocations.filter((t) => t.system.invocation_type === "precis"),
};
return sheetData;
}
@@ -101,4 +116,16 @@ export class NpcSheetL5r5e extends BaseCharacterSheetL5r5e {
return super._updateObject(event, formData);
}
/**
* Override base dice picker to open Chiaroscuro d6 dialog.
* @param {Event} event
*/
_openDicePickerForSkill(event) {
event.preventDefault();
const el = $(event.currentTarget);
const skillId = el.data("skill");
const ringId = el.data("ring") || this.actor.system?.default_ring || "void";
new game.l5r5e.ChiaroscuroDiceDialog({ actor: this.actor, ringId, skillId }).render(true);
}
}