First round of changes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user