COrrections, WIP

This commit is contained in:
2026-04-24 22:04:09 +02:00
parent d75b6cb945
commit e200b5f7b0
126 changed files with 768 additions and 5805 deletions

View File

@@ -10,6 +10,8 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
static types = [
{ id: "ring", label: "l5r5e.rings.label" },
{ id: "skill", label: "l5r5e.skills.label" },
{ id: "arcane", label: "l5r5e.chiaroscuro.arcane.label" },
{ id: "mot_invocation", label: "l5r5e.chiaroscuro.technique.mot_invocation" },
// others have theirs own xp count
];
@@ -27,6 +29,12 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
sheetData.data.subTypesList = AdvancementSheetL5r5e.types;
sheetData.data.skillsList = game.l5r5e.HelpersL5r5e.getSkillsList(true);
// Invocation sub-types (Général / Neutre / Précis)
const invTypes = game.l5r5e.HelpersL5r5e.getLocalizedRawObject("l5r5e.chiaroscuro.technique.invocation_types") ?? {};
sheetData.data.invocationTypesList = [{ id: "", label: "—" }].concat(
Object.entries(invTypes).map(([id, label]) => ({ id, label }))
);
return sheetData;
}
@@ -49,15 +57,22 @@ export class AdvancementSheetL5r5e extends ItemSheetL5r5e {
html.find("#advancement_type").on("change", (event) => {
const targetEvt = $(event.target);
targetEvt.prop("disabled", true);
const val = targetEvt.val();
if (targetEvt.val() === "skill") {
if (val === "skill") {
this._updateChoice({ ring: currentRing }, { skill: currentSkill }).then(
targetEvt.prop("disabled", false)
);
} else if (targetEvt.val() === "ring") {
} else if (val === "ring") {
this._updateChoice({ skill: currentSkill }, { ring: currentRing }).then(
targetEvt.prop("disabled", false)
);
} else {
// arcane or mot_invocation: just save the type, no auto-calc
this.object.update({ system: { advancement_type: val } }).then(() => {
targetEvt.prop("disabled", false);
this.render(true);
});
}
});