diff --git a/system/lang/en-en.json b/system/lang/en-en.json index 507fbcf..91a7504 100644 --- a/system/lang/en-en.json +++ b/system/lang/en-en.json @@ -88,10 +88,19 @@ "armors": { "title": "Armors", "physical": "physical", - "spiritual": "spiritual" + "supernatural": "supernatural" }, "items": "Items", - "feats": "Feats", + "feats": { + "title": "Feats", + "kata": "Kata", + "kiho": "Kihõ", + "invocation": "Invocation", + "ritual": "Ritual", + "shuji": "Shuji", + "maho": "Mahõ", + "ninjutsu": "Ninjutsu" + }, "skill": "Skill", "level": "Level", "approaches": "Approaches", @@ -207,6 +216,31 @@ "spent": "Used", "saved": "Saved", "acquisitions": "Acquisitions" + }, + "twenty_questions": { + "title": "Twenty questions", + "bt_abrev": "20Q", + "part1": { + "title": "Partie I: Core Identity (Clan and Family)" + }, + "part2": { + "title": "Partie II: Role and School" + }, + "part3": { + "title": "Partie III: Honor and Glory" + }, + "part4": { + "title": "Partie IV: Strengths and Weaknesses" + }, + "part5": { + "title": "Partie V: Personality and Behavior" + }, + "part6": { + "title": "Partie VI: Ancestry and Family" + }, + "part7": { + "title": "Partie VII: Death" + } } } } diff --git a/system/lang/es-es.json b/system/lang/es-es.json index 6a72324..8a8725c 100644 --- a/system/lang/es-es.json +++ b/system/lang/es-es.json @@ -88,10 +88,19 @@ "armors": { "title": "Armors", "physical": "physical", - "spiritual": "spiritual" + "supernatural": "supernatural" }, "items": "Equipo", - "feats": "Rasgos", + "feats": { + "title": "Rasgos", + "kata": "Kata", + "kiho": "Kihõ", + "invocation": "Invocation", + "ritual": "Ritual", + "shuji": "Shuji", + "maho": "Mahõ", + "ninjutsu": "Ninjutsu" + }, "skill": "Habilidad", "level": "Nivel", "approaches": "Planteamientos", @@ -206,6 +215,31 @@ "spent": "Usada", "saved": "Restante", "acquisitions": "Adquisiciones" + }, + "twenty_questions": { + "title": "Twenty questions", + "bt_abrev": "20Q", + "part1": { + "title": "Partie I: Core Identity (Clan and Family)" + }, + "part2": { + "title": "Partie II: Role and School" + }, + "part3": { + "title": "Partie III: Honor and Glory" + }, + "part4": { + "title": "Partie IV: Strengths and Weaknesses" + }, + "part5": { + "title": "Partie V: Personality and Behavior" + }, + "part6": { + "title": "Partie VI: Ancestry and Family" + }, + "part7": { + "title": "Partie VII: Death" + } } } } diff --git a/system/lang/fr-fr.json b/system/lang/fr-fr.json index 66448fe..3f6ef19 100644 --- a/system/lang/fr-fr.json +++ b/system/lang/fr-fr.json @@ -88,17 +88,26 @@ "armors": { "title": "Armures", "physical": "Physique", - "spiritual": "Spirituelle" + "supernatural": "Spirituelle" + }, + "items": "Objets", + "feats": { + "title": "Techniques", + "kata": "Kata", + "kiho": "Kihõ", + "invocation": "Invocation", + "ritual": "Rituel", + "shuji": "Shuji", + "maho": "Mahõ", + "ninjutsu": "Ninjutsu" }, - "items": "Equipement", - "feats": "Techniques", "skill": "Compétence", "level": "Niveau", "approaches": "Approches", "featplaceholdername": "Nouvelle technique", "notes": "Notes", "inventory": "Inventaire", - "equipment": "Equipement", + "equipment": "Équipement", "rank": "Rang", "name": "Nom", "social": { @@ -207,6 +216,31 @@ "spent": "Dépensée", "saved": "Restante", "acquisitions": "Acquisitions" + }, + "twenty_questions": { + "title": "Vingt questions", + "bt_abrev": "20Q", + "part1": { + "title": "Partie I: Identité (clan et famille)" + }, + "part2": { + "title": "Partie II: Rôle et École" + }, + "part3": { + "title": "Partie III: Honneur et Gloire" + }, + "part4": { + "title": "Partie IV: Forces et Faiblesses" + }, + "part5": { + "title": "Partie V: Personnalité et Comportement" + }, + "part6": { + "title": "Partie VI: Lignée et Famille" + }, + "part7": { + "title": "Partie VII: Mort" + } } } } diff --git a/system/scripts/actor-l5r5e.js b/system/scripts/actor-l5r5e.js index c6bd065..d7e8b08 100644 --- a/system/scripts/actor-l5r5e.js +++ b/system/scripts/actor-l5r5e.js @@ -7,10 +7,38 @@ export class ActorL5r5e extends Actor { * @override */ static async create(data, options = {}) { - if (!Object.keys(data).includes("type")) { - data.type = "character"; - } + // if (!Object.keys(data).includes("type")) { + // data.type = "character"; + // } + // Some tweak on actors + data.token = data.token || {}; + switch (data.type) { + case "character": + mergeObject( + data.token, + { + // vision: true, + // dimSight: 30, + // brightSight: 0, + actorLink: true, + disposition: 1, // friendly + }, + { overwrite: false } + ); + break; + + case "npc": + mergeObject( + data.token, + { + actorLink: false, + disposition: 0, // neutral + }, + { overwrite: false } + ); + break; + } await super.create(data, options); } diff --git a/system/scripts/items/quality-sheet.js b/system/scripts/items/quality-sheet.js new file mode 100644 index 0000000..c3a2540 --- /dev/null +++ b/system/scripts/items/quality-sheet.js @@ -0,0 +1,48 @@ +import { ItemSheetL5r5e } from "./item-sheet.js"; + +/** + * @extends {ItemSheet} + */ +export class QualitySheetL5r5e extends ItemSheetL5r5e { + /** @override */ + static get defaultOptions() { + return mergeObject(super.defaultOptions, { + classes: ["l5r5e", "sheet", "quality"], + template: CONFIG.L5r5e.paths.templates + "item/quality-sheet.html", + width: 520, + height: 480, + tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }], + }); + } + + getData() { + const sheetData = super.getData(); + sheetData.data.dtypes = ["String", "Number", "Boolean"]; + + sheetData.data.isQuality = true; + + return sheetData; + } + + /** + * Subscribe to events from the sheet. + * @param html HTML content of the sheet. + */ + activateListeners(html) { + super.activateListeners(html); + + // Everything below here is only needed if the sheet is editable + if (!this.options.editable) { + return; + } + } + + /** + * Update item with values from the sheet. + * @param event + * @param formData + */ + _updateObject(event, formData) { + return this.object.update(formData); + } +} diff --git a/system/scripts/items/weapon-sheet.js b/system/scripts/items/weapon-sheet.js index 0345843..2258a10 100644 --- a/system/scripts/items/weapon-sheet.js +++ b/system/scripts/items/weapon-sheet.js @@ -1,3 +1,4 @@ +import { L5R5E } from "../l5r5e-config.js"; import { ItemSheetL5r5e } from "./item-sheet.js"; /** @@ -21,6 +22,9 @@ export class WeaponSheetL5r5e extends ItemSheetL5r5e { sheetData.data.isWeapon = true; sheetData.data.isEquipment = true; + sheetData.data.skills = Array.from(L5R5E.skills) + .filter(([id, cat]) => cat === "martial") + .map(([id, cat]) => id); return sheetData; } diff --git a/system/scripts/l5r5e-config.js b/system/scripts/l5r5e-config.js index 0f87def..ad43716 100644 --- a/system/scripts/l5r5e-config.js +++ b/system/scripts/l5r5e-config.js @@ -6,6 +6,7 @@ L5R5E.paths = { }; L5R5E.stances = ["earth", "air", "water", "fire", "void"]; +L5R5E.feats = ["kata", "kiho", "invocation", "ritual", "shuji", "maho", "ninjutsu"]; // Map SkillId - CategoryId L5R5E.skills = new Map(); diff --git a/system/scripts/main-l5r5e.js b/system/scripts/main-l5r5e.js index 5b527f5..17e4f1a 100644 --- a/system/scripts/main-l5r5e.js +++ b/system/scripts/main-l5r5e.js @@ -11,6 +11,7 @@ import { ItemSheetL5r5e } from "./items/item-sheet.js"; import { ArmorSheetL5r5e } from "./items/armor-sheet.js"; import { WeaponSheetL5r5e } from "./items/weapon-sheet.js"; import { FeatSheetL5r5e } from "./items/feat-sheet.js"; +import { QualitySheetL5r5e } from "./items/quality-sheet.js"; // Import Dice Types @@ -67,6 +68,7 @@ Hooks.once("init", async function () { Items.registerSheet("l5r5e", ArmorSheetL5r5e, { types: ["armor"], makeDefault: true }); Items.registerSheet("l5r5e", WeaponSheetL5r5e, { types: ["weapon"], makeDefault: true }); Items.registerSheet("l5r5e", FeatSheetL5r5e, { types: ["feat"], makeDefault: true }); + Items.registerSheet("l5r5e", QualitySheetL5r5e, { types: ["quality"], makeDefault: true }); // for debug Handlebars.registerHelper("json", function (...objects) { @@ -108,6 +110,10 @@ Hooks.once("init", async function () { const key = "l5r5e.conflict.stances." + ringName.toLowerCase() + "tip"; return game.i18n.localize(key); }); + + Handlebars.registerHelper("localizeFeat", function (featName) { + return game.i18n.localize("l5r5e.feats." + featName.toLowerCase()); + }); }); /* ------------------------------------ */ diff --git a/system/scripts/preloadTemplates.js b/system/scripts/preloadTemplates.js index 2ce0e6d..cca1c80 100644 --- a/system/scripts/preloadTemplates.js +++ b/system/scripts/preloadTemplates.js @@ -23,6 +23,9 @@ export const PreloadTemplates = async function () { "systems/l5r5e/templates/item/armor-entry.html", "systems/l5r5e/templates/item/feat-sheet.html", "systems/l5r5e/templates/item/feat-entry.html", + "systems/l5r5e/templates/item/qualities.html", + "systems/l5r5e/templates/item/quality-sheet.html", + "systems/l5r5e/templates/item/quality-entry.html", ]; return loadTemplates(templatePaths); diff --git a/system/scripts/sheets/actor-sheet.js b/system/scripts/sheets/actor-sheet.js index 71aa6ce..30ba8e9 100644 --- a/system/scripts/sheets/actor-sheet.js +++ b/system/scripts/sheets/actor-sheet.js @@ -1,6 +1,10 @@ +import { BaseSheetL5r5e } from "./base-sheet.js"; import { TwentyQuestionsDialog } from "./twenty-questions-dialog.js"; -export class ActorSheetL5r5e extends ActorSheet { +/** + * Actor / Character Sheet + */ +export class ActorSheetL5r5e extends BaseSheetL5r5e { static get defaultOptions() { return mergeObject(super.defaultOptions, { classes: ["l5r5e", "sheet", "actor"], @@ -20,7 +24,7 @@ export class ActorSheetL5r5e extends ActorSheet { let buttons = super._getHeaderButtons(); buttons.unshift({ - label: "20Q", // TODO localization + label: game.i18n.localize("l5r5e.twenty_questions.bt_abrev"), class: "twenty-questions", icon: "fas fa-graduation-cap", onclick: async () => { @@ -30,139 +34,4 @@ export class ActorSheetL5r5e extends ActorSheet { return buttons; } - - getData() { - const sheetData = super.getData(); - - this._prepareItems(sheetData); - - const feats = sheetData.items.filter((item) => item.type === "feat"); - - sheetData.data.feats = feats; - - return sheetData; - } - - /** - * Update the actor. - * @param event - * @param formData - */ - _updateObject(event, formData) { - return this.object.update(formData); - } - - /** - * Prepare item data to be displayed in the actor sheet. - * @param sheetData Data of the actor been displayed in the sheet. - */ - _prepareItems(sheetData) { - for (let item of sheetData.items) { - switch (item.type) { - case "weapon": - item.isWeapon = true; - item.isEquipment = true; - break; - - case "armor": - item.isArmor = true; - item.isEquipment = true; - break; - - case "feat": - item.isFeat = true; - break; - - default: - item.isEquipment = true; - break; - } - } - } - - _prepareFeats() {} - - /** - * Subscribe to events from the sheet. - * @param html HTML content of the sheet. - */ - activateListeners(html) { - super.activateListeners(html); - - // Everything below here is only needed if the sheet is editable - if (!this.options.editable) return; - - // Update Inventory Item - html.find(".item-edit").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const itemId = li.data("itemId"); - const item = this.actor.getOwnedItem(itemId); - item.sheet.render(true); - }); - - // Delete Inventory Item - html.find(".item-delete").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const itemId = li.data("itemId"); - this.actor.deleteOwnedItem(itemId); - }); - - html.find(".feat-add").on("click", (ev) => { - this._createFeat(); - }); - - html.find(".feat-delete").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".feat"); - const featId = li.data("featId"); - console.log("Remove feat" + featId + " clicked"); - - this.actor.deleteOwnedItem(featId); - }); - - html.find(".feat-edit").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".feat"); - const featId = li.data("featId"); - const feat = this.actor.getOwnedItem(featId); - feat.sheet.render(true); - }); - - html.find(".skill-name").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".skill"); - const skillId = li.data("skill"); - - this._onSkillClicked(skillId); - }); - - html.find(".acquisition-add").on("click", (ev) => { - this._createFeat(); - }); - } - - /** - * Creates a new feat for the character and shows a window to edit it. - */ - async _createFeat() { - const data = { - name: game.i18n.localize("l5r5e.featplaceholdername"), - type: "feat", - }; - const created = await this.actor.createEmbeddedEntity("OwnedItem", data); - const feat = this.actor.getOwnedItem(created._id); - - // Default values - //feat.rank = 1; - //feat.xp_used = 0; - - feat.sheet.render(true); - - return feat; - } - - /** - * React to a skill from the skills list been clicked. - * @param {string} skillId Unique ID of the skill been clicked. - */ - async _onSkillClicked(skillId) { - new game.l5r5e.DicePickerDialog({ skillId: skillId, actor: this.actor }).render(true); - } } diff --git a/system/scripts/sheets/base-sheet.js b/system/scripts/sheets/base-sheet.js new file mode 100644 index 0000000..bba14fd --- /dev/null +++ b/system/scripts/sheets/base-sheet.js @@ -0,0 +1,153 @@ +/** + * Base Sheet for Actor and Npc + */ +export class BaseSheetL5r5e extends ActorSheet { + /** + * Commons datas + */ + getData() { + const sheetData = super.getData(); + + this._prepareItems(sheetData); + + const feats = sheetData.items.filter((item) => item.type === "feat"); + + sheetData.data.feats = feats; + sheetData.data.stances = CONFIG.L5r5e.stances; + + return sheetData; + } + + /** + * Update the actor. + * @param event + * @param formData + */ + _updateObject(event, formData) { + return this.object.update(formData); + } + + /** + * Prepare item data to be displayed in the actor sheet. + * @param sheetData Data of the actor been displayed in the sheet. + */ + _prepareItems(sheetData) { + for (let item of sheetData.items) { + switch (item.type) { + case "weapon": + item.isWeapon = true; + item.isEquipment = true; + break; + + case "armor": + item.isArmor = true; + item.isEquipment = true; + break; + + case "feat": + item.isFeat = true; + break; + + case "quality": + item.isQuality = true; + break; + + case "xp-advancement": + item.isXpAdvancement = true; + break; + + default: + item.isEquipment = true; + break; + } + } + } + + /** + * TODO + */ + _prepareFeats() {} + + /** + * Subscribe to events from the sheet. + * @param html HTML content of the sheet. + */ + activateListeners(html) { + super.activateListeners(html); + + // Everything below here is only needed if the sheet is editable + if (!this.options.editable) { + return; + } + + // Update Inventory Item + html.find(".item-edit").on("click", (ev) => { + const li = $(ev.currentTarget).parents(".item"); + const itemId = li.data("itemId"); + const item = this.actor.getOwnedItem(itemId); + item.sheet.render(true); + }); + + // Delete Inventory Item + html.find(".item-delete").on("click", (ev) => { + const li = $(ev.currentTarget).parents(".item"); + this.actor.deleteOwnedItem(li.data("itemId")); + }); + + html.find(".feat-add").on("click", (ev) => { + this._createFeat(); + }); + + html.find(".feat-delete").on("click", (ev) => { + const li = $(ev.currentTarget).parents(".feat"); + const featId = li.data("featId"); + console.log("Remove feat" + featId + " clicked"); + + this.actor.deleteOwnedItem(featId); + }); + + html.find(".feat-edit").on("click", (ev) => { + const li = $(ev.currentTarget).parents(".feat"); + const featId = li.data("featId"); + const feat = this.actor.getOwnedItem(featId); + feat.sheet.render(true); + }); + + html.find(".skill-name").on("click", (ev) => { + const li = $(ev.currentTarget).parents(".skill"); + this._onSkillClicked(li.data("skill")); + }); + + html.find(".acquisition-add").on("click", (ev) => { + this._createFeat(); + }); + } + + /** + * Creates a new feat for the character and shows a window to edit it. + */ + async _createFeat() { + const data = { + name: game.i18n.localize("l5r5e.featplaceholdername"), + type: "feat", + }; + const created = await this.actor.createEmbeddedEntity("OwnedItem", data); + const feat = this.actor.getOwnedItem(created._id); + + // Default values + //feat.rank = 1; + //feat.xp_used = 0; + + feat.sheet.render(true); + + return feat; + } + + /** + * React to a skill from the skills list been clicked. + * @param {string} skillId Unique ID of the skill been clicked. + */ + async _onSkillClicked(skillId) { + new game.l5r5e.DicePickerDialog({ skillId: skillId, actor: this.actor }).render(true); + } +} diff --git a/system/scripts/sheets/npc-sheet.js b/system/scripts/sheets/npc-sheet.js index 93aaf8d..c4aa808 100644 --- a/system/scripts/sheets/npc-sheet.js +++ b/system/scripts/sheets/npc-sheet.js @@ -1,5 +1,9 @@ -// TODO extend ActorSheetL5r5e ? -export class NpcSheetL5r5e extends ActorSheet { +import { BaseSheetL5r5e } from "./base-sheet.js"; + +/** + * NPC Sheet + */ +export class NpcSheetL5r5e extends BaseSheetL5r5e { static types = ["minion", "adversary"]; static get defaultOptions() { @@ -18,133 +22,8 @@ export class NpcSheetL5r5e extends ActorSheet { this._prepareItems(sheetData); - sheetData.data.feats = sheetData.items.filter((item) => item.type === "feat"); sheetData.data.types = NpcSheetL5r5e.types; - sheetData.data.stances = CONFIG.L5r5e.stances; return sheetData; } - - /** - * Update the actor. - * @param event - * @param formData - */ - _updateObject(event, formData) { - return this.object.update(formData); - } - - /** - * Prepare item data to be displayed in the actor sheet. - * @param sheetData Data of the actor been displayed in the sheet. - */ - _prepareItems(sheetData) { - for (let item of sheetData.items) { - switch (item.type) { - case "weapon": - item.isWeapon = true; - item.isEquipment = true; - break; - - case "armor": - item.isArmor = true; - item.isEquipment = true; - break; - - case "feat": - item.isFeat = true; - break; - - default: - item.isEquipment = true; - break; - } - } - } - - _prepareFeats() {} - - /** - * Subscribe to events from the sheet. - * @param html HTML content of the sheet. - */ - activateListeners(html) { - super.activateListeners(html); - - // Everything below here is only needed if the sheet is editable - if (!this.options.editable) return; - - // Update Inventory Item - html.find(".item-edit").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const itemId = li.data("itemId"); - const item = this.actor.getOwnedItem(itemId); - item.sheet.render(true); - }); - - // Delete Inventory Item - html.find(".item-delete").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".item"); - const itemId = li.data("itemId"); - this.actor.deleteOwnedItem(itemId); - }); - - html.find(".feat-add").on("click", (ev) => { - this._createFeat(); - }); - - html.find(".feat-delete").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".feat"); - const featId = li.data("featId"); - console.log("Remove feat" + featId + " clicked"); - - this.actor.deleteOwnedItem(featId); - }); - - html.find(".feat-edit").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".feat"); - const featId = li.data("featId"); - const feat = this.actor.getOwnedItem(featId); - feat.sheet.render(true); - }); - - html.find(".skill-name").on("click", (ev) => { - const li = $(ev.currentTarget).parents(".skill"); - const skillId = li.data("skill"); - - this._onSkillClicked(skillId); - }); - - html.find(".acquisition-add").on("click", (ev) => { - this._createFeat(); - }); - } - - /** - * Creates a new feat for the character and shows a window to edit it. - */ - async _createFeat() { - const data = { - name: game.i18n.localize("l5r5e.featplaceholdername"), - type: "feat", - }; - const created = await this.actor.createEmbeddedEntity("OwnedItem", data); - const feat = this.actor.getOwnedItem(created._id); - - // Default values - //feat.rank = 1; - //feat.xp_used = 0; - - feat.sheet.render(true); - - return feat; - } - - /** - * React to a skill from the skills list been clicked. - * @param {string} skillId Unique ID of the skill been clicked. - */ - async _onSkillClicked(skillId) { - new game.l5r5e.DicePickerDialog({ skillId: skillId, actor: this.actor }).render(true); - } } diff --git a/system/scripts/sheets/twenty-questions-dialog.js b/system/scripts/sheets/twenty-questions-dialog.js index 0f608c2..625f847 100644 --- a/system/scripts/sheets/twenty-questions-dialog.js +++ b/system/scripts/sheets/twenty-questions-dialog.js @@ -44,6 +44,7 @@ export class TwentyQuestionsDialog extends FormApplication { ...super.getData(options), elementsList: this._getElements(), skillsList: this._getSkills(), + featsList: CONFIG.L5r5e.feats, actor: this.actor.data.data, }; } @@ -96,13 +97,13 @@ export class TwentyQuestionsDialog extends FormApplication { actorTmp.social.glory = formData.step2_social_glory; actorTmp.identity.school = formData.step3_school; actorTmp.identity.roles = formData.step3_roles; - // actorTmp = formData.step3_tech_kata; - // actorTmp = formData.step3_tech_kiho; - // actorTmp = formData.step3_tech_invocations; - // actorTmp = formData.step3_tech_rituals; - // actorTmp = formData.step3_tech_shuji; - // actorTmp = formData.step3_tech_maho; - // actorTmp = formData.step3_tech_ninjutsu; + // actorTmp = formData.step3_feat_kata; + // actorTmp = formData.step3_feat_kiho; + // actorTmp = formData.step3_feat_invocations; + // actorTmp = formData.step3_feat_rituals; + // actorTmp = formData.step3_feat_shuji; + // actorTmp = formData.step3_feat_maho; + // actorTmp = formData.step3_feat_ninjutsu; // actorTmp = formData.step3_feats; // actorTmp = formData.step3_school_ability; // actorTmp = formData.step3_equipment; diff --git a/system/template.json b/system/template.json index 1f606c7..d658a95 100644 --- a/system/template.json +++ b/system/template.json @@ -121,11 +121,14 @@ } }, "Item": { - "types": ["item", "armor", "weapon", "feat", "xp-advancement"], + "types": ["item", "armor", "weapon", "feat", "quality", "xp-advancement"], "item": { "description": "", + "properties": "", "quantity": 1, - "weight": 0 + "rarity": 0, + "weight": 0, + "zeni": 0 }, "armor": { "quantity": 1, @@ -133,24 +136,40 @@ "description": "", "armor": { "physical": 0, - "spiritual": 0 + "supernatural": 0 }, - "properties": "" + "properties": "", + "rarity": 0, + "zeni": 0 }, "weapon": { - "quantity": 1, - "weight": 0, - "description": "", - "damage": 0, + "category": "", + "skill": "melee", "range": 0, - "properties": "" + "damage": 0, + "deadliness": 0, + "grip_1": "", + "grip_2": "", + "properties": "", + "quantity": 1, + "rarity": 0, + "weight": 0, + "zeni": 0, + "description": "" }, "feat": { "feat_type": "", "xp_used": 0, "rank": 0, "ring": "", + "effects": "", "description": "" + }, + "quality": { + "description": "" + }, + "xp-advancement": { + "description": "TODO" } } } diff --git a/system/templates/dice/chat-roll.html b/system/templates/dice/chat-roll.html index 2f931e2..b77664b 100644 --- a/system/templates/dice/chat-roll.html +++ b/system/templates/dice/chat-roll.html @@ -6,11 +6,11 @@
{{#if l5r5e.actor.name}}{{l5r5e.actor.name}}{{/if}}{{^if l5r5e.actor.name}}mystery-man{{/if}} @@ -23,8 +23,11 @@ - {{#if l5r5e.summary.difficultyHidden}}{{localize 'l5r5e.chatdices.difficulty_hidden'}}{{/if}} - {{^if l5r5e.summary.difficultyHidden}}{{localize 'l5r5e.chatdices.difficulty'}} {{l5r5e.summary.difficulty}}{{/if}} + {{#if l5r5e.summary.difficultyHidden}} + {{localize 'l5r5e.chatdices.difficulty_hidden'}} + {{else}} + {{localize 'l5r5e.chatdices.difficulty'}} {{l5r5e.summary.difficulty}} + {{/if}}
diff --git a/system/templates/dice/dice-picker-dialog.html b/system/templates/dice/dice-picker-dialog.html index 2ad1e18..0fc28d3 100644 --- a/system/templates/dice/dice-picker-dialog.html +++ b/system/templates/dice/dice-picker-dialog.html @@ -4,11 +4,11 @@ {{#if actor.name}}{{actor.name}}{{/if}}{{^if actor.name}}mystery-man{{/if}} @@ -51,8 +51,7 @@ {{skillData.value}} - {{/if}} - {{^if skillData.name}} + {{else}} {{ item.name }}
  • {{item.data.weight}}
  • {{item.data.armor.physical}}
  • -
  • {{item.data.armor.spiritual}}
  • +
  • {{item.data.armor.supernatural}}
  • diff --git a/system/templates/item/armor-sheet.html b/system/templates/item/armor-sheet.html index a0d0dd9..2764d79 100644 --- a/system/templates/item/armor-sheet.html +++ b/system/templates/item/armor-sheet.html @@ -12,6 +12,17 @@ + +
    +
    + + +
    +
    + + +
    +
    {{!-- Sheet Body --}}
    @@ -21,17 +32,23 @@ {{!-- Description Tab --}}
    - {{ localize 'l5r5e.armors.title' }} +
    + {{ localize 'l5r5e.description' }} + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} +
    +
    + {{ localize 'l5r5e.armors.title' }}
    +
    {{ localize 'l5r5e.properties' }} {{editor content=data.properties target="data.properties" button=true owner=owner editable=editable}} diff --git a/system/templates/item/item-entry.html b/system/templates/item/item-entry.html index 889c565..b241932 100644 --- a/system/templates/item/item-entry.html +++ b/system/templates/item/item-entry.html @@ -6,4 +6,5 @@
  • {{{ feat.data.description }}}
    +
    {{{ feat.data.properties }}}
    \ No newline at end of file diff --git a/system/templates/item/item-sheet.html b/system/templates/item/item-sheet.html index a61e36e..a28f0fe 100644 --- a/system/templates/item/item-sheet.html +++ b/system/templates/item/item-sheet.html @@ -12,6 +12,17 @@ + +
    +
    + + +
    +
    + + +
    +
    {{!-- Sheet Body --}}
    diff --git a/system/templates/item/qualities.html b/system/templates/item/qualities.html new file mode 100644 index 0000000..233591b --- /dev/null +++ b/system/templates/item/qualities.html @@ -0,0 +1,10 @@ +
    + {{ localize 'l5r5e.quality' }} +
      + {{#each actor.items as |item id|}} + {{#if item.isQuality }} + {{> 'systems/l5r5e/templates/item/quality-entry.html' item=item id=id }} + {{/if}} + {{/each}} +
    +
    \ No newline at end of file diff --git a/system/templates/item/quality-entry.html b/system/templates/item/quality-entry.html new file mode 100644 index 0000000..7841da5 --- /dev/null +++ b/system/templates/item/quality-entry.html @@ -0,0 +1,9 @@ +
  • +
      +
    • +
    • {{ item.name }}
    • +
    • +
    • +
    +
    {{{ item.data.description }}}
    +
  • \ No newline at end of file diff --git a/system/templates/item/quality-sheet.html b/system/templates/item/quality-sheet.html new file mode 100644 index 0000000..948e97a --- /dev/null +++ b/system/templates/item/quality-sheet.html @@ -0,0 +1,22 @@ +
    +
    + +
    +

    +
    +
    + {{!-- Sheet Body --}} +
    + {{!-- Sheet Tab Navigation --}} + + {{!-- Description Tab --}} +
    +
    + {{ localize 'l5r5e.description' }} + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} +
    +
    +
    +
    diff --git a/system/templates/item/weapon-sheet.html b/system/templates/item/weapon-sheet.html index 6b4629b..0ea9eec 100644 --- a/system/templates/item/weapon-sheet.html +++ b/system/templates/item/weapon-sheet.html @@ -12,6 +12,34 @@ + +
    +
    + + +
    +
    + + +
    +
    + +
    +
    + + +
    +
    + + +
    +
    {{!-- Sheet Body --}}
    @@ -31,10 +59,25 @@
    +
    + + +
    {{ localize 'l5r5e.properties' }} {{editor content=data.properties target="data.properties" button=true owner=owner editable=editable}}
    +
    + {{ localize 'l5r5e.description' }} + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} +
    diff --git a/system/templates/sheets/actor-sheet.html b/system/templates/sheets/actor-sheet.html index f921223..efcff93 100644 --- a/system/templates/sheets/actor-sheet.html +++ b/system/templates/sheets/actor-sheet.html @@ -43,6 +43,7 @@
    {{> 'systems/l5r5e/templates/sheets/actor/conflict.html' }} {{> 'systems/l5r5e/templates/item/weapons.html' }} + {{> 'systems/l5r5e/templates/item/armors.html' }}
    diff --git a/system/templates/sheets/actor/feats.html b/system/templates/sheets/actor/feats.html index af3cb87..f94c742 100644 --- a/system/templates/sheets/actor/feats.html +++ b/system/templates/sheets/actor/feats.html @@ -1,7 +1,7 @@
    - {{ localize 'l5r5e.feats' }} + {{ localize 'l5r5e.feats.title' }}
      diff --git a/system/templates/sheets/npc-sheet.html b/system/templates/sheets/npc-sheet.html index a2bcc91..6884513 100644 --- a/system/templates/sheets/npc-sheet.html +++ b/system/templates/sheets/npc-sheet.html @@ -81,7 +81,6 @@ {{!-- Sheet Body --}}
      - {{!-- Skills Tab --}}
        @@ -99,7 +98,7 @@ {{> 'systems/l5r5e/templates/item/weapons.html' }} - {{> 'systems/l5r5e/templates/item/armor.html' }} + {{> 'systems/l5r5e/templates/item/armors.html' }}
      \ No newline at end of file diff --git a/system/templates/sheets/twenty-questions-dialog.html b/system/templates/sheets/twenty-questions-dialog.html index 6d01e78..75dce35 100644 --- a/system/templates/sheets/twenty-questions-dialog.html +++ b/system/templates/sheets/twenty-questions-dialog.html @@ -2,7 +2,7 @@ -

      Vingt questions

      +

      {{localize 'l5r5e.twenty_questions.title'}}

      Renseignez vos réponses au jeu des vingt questions sur ce formulaire et notez-y des éléments à utiliser ultérieurement ! @@ -10,7 +10,7 @@
      -

      Partie I: Identité (clan et famille)

      +

      {{localize 'l5r5e.twenty_questions.part1.title'}}

      1. A quel clan appartient votre personnage ? (p. 41) @@ -100,7 +100,7 @@
      -

      Partie II: Rôle et École

      +

      {{localize 'l5r5e.twenty_questions.part2.title'}}

      3. Quelle est l'École votre personnage, et quel rôle remplit-elle ? (p. 56) @@ -186,27 +186,11 @@ Types de techniques accessibles
      + {{localizeFeat 'title'}} + {{#each featsList as |feat|}} + + {{/each}} - - - - - -
      @@ -246,7 +230,7 @@
      -

      Partie III: Honneur et Gloire

      +

      {{localize 'l5r5e.twenty_questions.part3.title'}}

      5. Qui est le seigneur de votre personnage et quel est le devoir de votre personnage envers lui ? (p. 88) Choisissez un giri: @@ -309,7 +293,7 @@
      -

      Partie IV: Forces et Faiblesses

      +

      {{localize 'l5r5e.twenty_questions.part4.title'}}

      9. Quelle est à ce jour la plus belle réussite de votre personnage ? (p. 92) @@ -366,7 +350,7 @@
      -

      Partie V: Personnalité et Comportement

      +

      {{localize 'l5r5e.twenty_questions.part5.title'}}

      14. Que remarque-t-on en premier chez votre personnage ? (p. 93) @@ -388,7 +372,7 @@
      -

      Partie VI: Lignée et Famille

      +

      {{localize 'l5r5e.twenty_questions.part6.title'}}

      17. Comment les parents de votre personnage le décriraient-ils ? (p. 95) @@ -424,7 +408,7 @@
      -

      Partie VII: Mort

      +

      {{localize 'l5r5e.twenty_questions.part7.title'}}

      20. Comment envisagez-vous la mort de votre personnage ? (p. 95)