diff --git a/icons/compcreature_empoignade.png b/icons/compcreature_empoignade.png new file mode 100644 index 00000000..0312a9c2 Binary files /dev/null and b/icons/compcreature_empoignade.png differ diff --git a/icons/competence_dague.png b/icons/competence_dague.png index 5bdb03ac..e10ac317 100644 Binary files a/icons/competence_dague.png and b/icons/competence_dague.png differ diff --git a/icons/competence_grouine.png b/icons/competence_grouine.png new file mode 100644 index 00000000..154d114c Binary files /dev/null and b/icons/competence_grouine.png differ diff --git a/icons/comptence-commerce.png b/icons/comptence-commerce.png new file mode 100644 index 00000000..22001c33 Binary files /dev/null and b/icons/comptence-commerce.png differ diff --git a/module/actor-humanoide-sheet.js b/module/actor-humanoide-sheet.js new file mode 100644 index 00000000..d3e5a600 --- /dev/null +++ b/module/actor-humanoide-sheet.js @@ -0,0 +1,171 @@ + +/** + * Extend the basic ActorSheet with some very simple modifications + * @extends {ActorSheet} + */ + +import { RdDUtility } from "./rdd-utility.js"; + +/* -------------------------------------------- */ +export class RdDActorHumanoideSheet extends ActorSheet { + + /** @override */ + static get defaultOptions() { + return mergeObject(super.defaultOptions, { + classes: ["rdd", "sheet", "actor"], + template: "systems/foundryvtt-reve-de-dragon/templates/actor-humanoide-sheet.html", + width: 640, + height: 720, + tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac"}], + dragDrop: [{dragSelector: ".item-list .item", dropSelector: null}] + }); + } + + /* -------------------------------------------- */ + _checkNull(items) { + if (items && items.length) { + return items; + } + return []; + } + + /* -------------------------------------------- */ + getData() { + let data = super.getData(); + + data.itemsByType = {}; + for (const item of data.items) { + let list = data.itemsByType[item.type]; + if (!list) { + list = []; + data.itemsByType[item.type] = list; + } + list.push(item); + } + + // Compute current carac sum + let sum = 0; + Object.values(data.data.carac).forEach(carac => { if (!carac.derivee) { sum += parseInt(carac.value) } } ); + data.data.caracSum = sum; + + data.data.carac.taille.isTaille = true; // To avoid button link; + data.data.nbLegeres = this.actor.GetNumberBlessures(data.data.blessures.legeres.liste ); + data.data.nbGraves = this.actor.GetNumberBlessures(data.data.blessures.graves.liste ); + data.data.nbCritiques = this.actor.GetNumberBlessures(data.data.blessures.critiques.liste ); + + data.data.competencecreature = data.itemsByType["competencecreature"]; + + console.log("DATA:", data); + return data; + } + + /* -------------------------------------------- */ + /** @override */ + 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').click(ev => { + const li = $(ev.currentTarget).parents(".item"); + const item = this.actor.getOwnedItem(li.data("itemId")); + item.sheet.render(true); + }); + + // Delete Inventory Item + html.find('.item-delete').click(ev => { + const li = $(ev.currentTarget).parents(".item"); + this.actor.deleteOwnedItem(li.data("itemId")); + li.slideUp(200, () => this.render(false)); + }); + + // Blessure control + html.find('.blessure-control').click(ev => { + const li = $(ev.currentTarget).parents(".item"); + let btype = li.data("blessure-type"); + let index = li.data('blessure-index'); + let active = $(ev.currentTarget).data('blessure-active'); + //console.log(btype, index, active); + this.actor.manageBlessureFromSheet(btype, index, active).then( this.render(true) ); + }); + + // Blessure data + html.find('.blessures-soins').change(ev => { + const li = $(ev.currentTarget).parents(".item"); + let btype = li.data('blessure-type'); + let index = li.data('blessure-index'); + let psoins = li.find('input[name=premiers_soins]').val(); + let pcomplets = li.find('input[name=soins_complets]').val(); + let jours = li.find('input[name=jours]').val(); + let loc = li.find('input[name=localisation]').val(); + //console.log(btype, index, psoins, pcomplets, jours, loc); + this.actor.setDataBlessureFromSheet(btype, index, psoins, pcomplets, jours, loc).then( this.render(true) ); + }); + + // Roll Carac + html.find('.carac-label a').click((event) => { + let caracName = event.currentTarget.attributes.name.value; + this.actor.rollCarac( caracName.toLowerCase() ); + }); + + // On competence change + html.find('.creature-carac').change((event) => { + let compName = event.currentTarget.attributes.compname.value; + this.actor.updateCreatureCompetence( compName, "carac_value", parseInt(event.target.value) ); + } ); + html.find('.creature-niveau').change((event) => { + let compName = event.currentTarget.attributes.compname.value; + this.actor.updateCreatureCompetence( compName, "niveau", parseInt(event.target.value) ); + } ); + html.find('.creature-dommages').change((event) => { + let compName = event.currentTarget.attributes.compname.value; + this.actor.updateCreatureCompetence( compName, "dommages", parseInt(event.target.value) ); + } ); + + // Roll Skill + html.find('.competence-label a').click((event) => { + let compName = event.currentTarget.text; + this.actor.rollCreatureCompetence( compName ); + }); + + html.find('#vie-plus').click((event) => { + this.actor.santeIncDec("vie", 1); + this.render(true); + }); + html.find('#vie-moins').click((event) => { + this.actor.santeIncDec("vie", -1); + this.render(true); + }); + html.find('#endurance-plus').click((event) => { + this.actor.santeIncDec("endurance", 1); + this.render(true); + }); + html.find('#endurance-moins').click((event) => { + this.actor.santeIncDec("endurance", -1); + this.render(true); + }); + } + + + /* -------------------------------------------- */ + + /** @override */ + setPosition(options={}) { + const position = super.setPosition(options); + const sheetBody = this.element.find(".sheet-body"); + const bodyHeight = position.height - 192; + sheetBody.css("height", bodyHeight); + return position; + } + + + /* -------------------------------------------- */ + + /** @override */ + _updateObject(event, formData) { + // Update the Actor + return this.object.update(formData); + } +} diff --git a/module/actor.js b/module/actor.js index 06e921f0..21348ceb 100644 --- a/module/actor.js +++ b/module/actor.js @@ -36,7 +36,7 @@ export class RdDActor extends Actor { } if (data.type == "humanoide") { - compendiumName = "foundryvtt-reve-de-dragon.competences-humanoide"; + compendiumName = "foundryvtt-reve-de-dragon.competences-humanoides"; } if (data.type == "creature") { @@ -70,6 +70,7 @@ export class RdDActor extends Actor { // things organized. if (actorData.type === 'personnage') this._prepareCharacterData(actorData); if (actorData.type === 'creature') this.computeEtatGeneral(actorData); + if (actorData.type === 'humanoide') this.computeEtatGeneral(actorData); } /* -------------------------------------------- */ diff --git a/module/rdd-main.js b/module/rdd-main.js index 4508e1b6..80f1ab46 100644 --- a/module/rdd-main.js +++ b/module/rdd-main.js @@ -12,6 +12,7 @@ import { RdDActor } from "./actor.js"; import { RdDItemSheet } from "./item-sheet.js"; import { RdDActorSheet } from "./actor-sheet.js"; import { RdDActorCreatureSheet } from "./actor-creature-sheet.js"; +import { RdDActorHumanoideSheet } from "./actor-humanoide-sheet.js"; import { RdDUtility } from "./rdd-utility.js"; import { RdDCalendrier } from "./rdd-calendrier.js"; @@ -128,6 +129,10 @@ Hooks.once("init", async function() { types: ["creature"], makeDefault: true }); + Actors.registerSheet("wfrp4e", RdDActorHumanoideSheet, { + types: ["humanoide"], + makeDefault: true + }); Items.unregisterSheet("core", ItemSheet); Items.registerSheet("foundryvtt-reve-de-dragon", RdDItemSheet, {makeDefault: true}); diff --git a/module/rdd-utility.js b/module/rdd-utility.js index 067c1e39..767d7632 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -92,6 +92,8 @@ export class RdDUtility { const templatePaths = [ //Character Sheets 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-creature-sheet.html', + 'systems/foundryvtt-reve-de-dragon/templates/actor-humanoide-sheet.html', //Items 'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html', 'systems/foundryvtt-reve-de-dragon/templates/item-competencecreature-sheet.html', diff --git a/packs/competences-humanoides.db b/packs/competences-humanoides.db new file mode 100644 index 00000000..49e6548c --- /dev/null +++ b/packs/competences-humanoides.db @@ -0,0 +1,42 @@ +{"name":"Esquive","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_esquive.png","effects":[],"_id":"0Ms9iKxqigNNpZEx"} +{"name":"Cuisine","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_cuisine.png","effects":[],"_id":"18wcei5hlEInsBFO"} +{"name":"Danse","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_danse.png","effects":[],"_id":"3Crwg8cx2JOb697T"} +{"name":"Survie en Montagne","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_survie_montagne.png","effects":[],"_id":"5c0hWcQJxb4Q21Mk"} +{"name":"Charpenterie","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_charpenterie.png","effects":[],"_id":"8wsg6Tea9uq4LIRR"} +{"name":"Natation","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_natation.png","effects":[],"_id":"9lapnIQBcoM2UbYx"} +{"name":"Equitation","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_equitation.png","effects":[],"_id":"Aea8wM5efy5gxjDj"} +{"name":"Survie en Extérieur","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_survie_exterieur.png","effects":[],"_id":"EAxj4uUREHbqwC9L"} +{"name":"Discrétion","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_discretion.png","effects":[],"_id":"HXUreQ9H5s3scKck"} +{"name":"Sagouine","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_grouine.png","effects":[],"_id":"I36ZBkdWbs46iMDy"} +{"name":"Fronde","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_fronde.png","effects":[],"_id":"K9AS7zs5uGkfiz2L"} +{"name":"Survie en Forêt","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_survie_foret.png","effects":[],"_id":"KAsU7UwtWjJ1pBYU"} +{"name":"Survie en Cité","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_survie_cite.png","effects":[],"_id":"MIo5O1rO0Rcougfs"} +{"name":"Javelot","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_lance.png","effects":[],"_id":"MSeP6k2QB3rGCJfd"} +{"name":"Bricolage","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_bricolage.png","effects":[],"_id":"MfIb6SBRQFytI7HC"} +{"name":"Petite Lance","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_lance.png","effects":[],"_id":"MmRwM7caZRkKKWpP"} +{"name":"Bouclier Moyen","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_bouclier.png","effects":[],"_id":"QGULMUoC9JXFze0r"} +{"name":"Chant","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_chant.png","effects":[],"_id":"TSYUgkeNySPebL6y"} +{"name":"Bouclier Léger","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_bouclier.png","effects":[],"_id":"UBMG769xfkd9wb6t"} +{"name":"Grouine","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_grouine.png","effects":[],"_id":"Uivn4w7d4JNdSIRb"} +{"name":"Légendes","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_legendes.png","effects":[],"_id":"UqZivWKal2hvRdcO"} +{"name":"Course","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_course.png","effects":[],"_id":"WsYnwR8GcOxfuCI0"} +{"name":"Epée Sorde","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_epee_1_main.png","effects":[],"_id":"YTKld5ggDsHqwYoR"} +{"name":"Masse Lourde","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_masse_1_main.png","effects":[],"_id":"bgzOT9PYCOsrm8FS"} +{"name":"Lance Courte","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_lance.png","effects":[],"_id":"btSxLWYSisFvbcRd"} +{"name":"Corps à Corps","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_corps_a_corps.png","effects":[],"_id":"c0I93Q53i4ZmxpyT"} +{"name":"Lance Courte (Lancer)","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_lance.png","effects":[],"_id":"dO72mix9tGUHiqmG"} +{"name":"Comédie","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_comedie.png","effects":[],"_id":"e74yfvlcv41oM1Td"} +{"name":"Petit Arc","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_arc.png","effects":[],"_id":"ezKaZNCSQMtr4LeB"} +{"name":"Empoignade","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature_empoignade.png","effects":[],"_id":"gAfrxCyNGA37mtLk"} +{"name":"Maroquinerie","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_maroquinerie.png","effects":[],"_id":"gXv03Rn71K3qXpGf"} +{"name":"Epée Gnome","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_epee_1_main.png","effects":[],"_id":"gfDCgPJjeVg8tSul"} +{"name":"Morsure","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-morsure.png","effects":[],"_id":"j1xHCzfIeYKgXxoH"} +{"name":"Arc","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_arc.png","effects":[],"_id":"lLJGyPzbDIAHuWs1"} +{"name":"Vigilance","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_vigilance.png","effects":[],"_id":"o3wwhOPjdGxRR19r"} +{"name":"Hache de Bataille","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_hache_a_1_main.png","effects":[],"_id":"oSSUSL9EHCrTkIVw"} +{"name":"Survie en Marais","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_survie_marais.png","effects":[],"_id":"pIi0hHqJvQ36h6JI"} +{"name":"Epée Cyane","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":true,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_epee_1_main.png","effects":[],"_id":"qT4pYktoaiWO0VFO"} +{"name":"Commerce","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/comptence-commerce.png","effects":[],"_id":"qcVZMYfF7w0mIFs5"} +{"name":"Survie en Sous-Sol","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_survie_sous_sol.png","effects":[],"_id":"rZIg94PO3TgoCwgh"} +{"name":"Ecriture","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_ecriture.png","effects":[],"_id":"w7w6YsXVjFh9BnvU"} +{"name":"Escalade","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac_value":0,"iscombat":false,"dommages":0,"description":"

Morsure de la créature

"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_escalade.png","effects":[],"_id":"wnrc1X4pAVHOEjt4"} diff --git a/system.json b/system.json index a2a9afb9..c3448ed6 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "0.9.16", + "version": "0.9.17", "minimumCoreVersion": "0.6.0", "compatibleCoreVersion": "0.6.6", "templateVersion": 37, @@ -27,6 +27,15 @@ "path": "./packs/competences-creatures.db", "entity": "Item", "tag" : "item" + }, + { + "name": "competences-humanoides", + "label": "Compétences Humanoïdes", + "system": "foundryvtt-reve-de-dragon", + "module": "foundryvtt-reve-de-dragon", + "path": "./packs/competences-humanoides.db", + "entity": "Item", + "tag" : "item" }, { "name": "sorts", diff --git a/templates/actor-humanoide-sheet.html b/templates/actor-humanoide-sheet.html new file mode 100644 index 00000000..0be19661 --- /dev/null +++ b/templates/actor-humanoide-sheet.html @@ -0,0 +1,188 @@ +
+ + {{!-- Sheet Header --}} +
+ +
+

+
+
+
Blessures légères : {{data.nbLegeres}}
+
Blessures graves : {{data.nbGraves}}
+
Blessure critique : {{data.nbCritiques}}
+
+
+
+
+ + {{!-- Sheet Tab Navigation --}} + + + {{!-- Sheet Body --}} +
+ + {{!-- Carac Tab --}} +
+
+
+
    + {{#each data.carac as |carac key|}} +
  1. + {{#if carac.isTaille}} + {{carac.label}} + {{else}} + {{carac.label}} + {{/if}} + +
  2. + {{/each}} +
  3. + Total Caractéristiques + {{data.caracSum}} +
  4. +
+
+
+
    + {{#each data.attributs as |attr key|}} +
  1. + {{attr.label}} : + +
  2. + {{/each}} +
  3. + Vie : + / + +
  4. +
  5. + Endurance : + / + +
  6. +
  7. + Sonné : + +
  8. +
  9. + Etat Général : + {{data.compteurs.etat.value}} +
  10. +
+
+
+
+ + {{!-- Compétences Tab --}} +
+
+
+
    + {{#each data.competencecreature as |comp key|}} +
  1. + + {{comp.name}} + + + +
    + + +
    +
  2. + {{/each}} +
+
+
+
+ + {{!-- blessures Tab --}} +
+ Blessures Légeres : +
+ {{#each data.blessures.legeres.liste as |bless key|}} +
  • + {{#if bless.active}}{{else}}{{/if}} + Premiers soins - + Soins complets - + Jours + - + Loc. +
  • + {{/each}} +
    + Blessures Graves : +
    + {{#each data.blessures.graves.liste as |bless key|}} +
  • + {{#if bless.active}}{{else}}{{/if}} + Premiers soins - + Soins complets - + Jours + - + Loc. +
  • + {{/each}} +
    + Blessure Critique : +
    + {{#each data.blessures.critiques.liste as |bless key|}} +
  • + {{#if bless.active}}{{else}}{{/if}} + Premiers soins - + Soins complets - + Jours + - + Loc. +
  • + + {{/each}} +
    +
    + + {{!-- Biography Tab --}} +
    +
    + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} +
    +
    + + + +
    +
    \ No newline at end of file diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 6460553e..41474122 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -40,8 +40,7 @@ Caractéristiques Compétences Combat - Compteurs - Blessures + Blessures/Compteurs Haut-Rêve Equipement Queues, Souffles et Têtes @@ -274,8 +273,8 @@ - {{!-- Compteurs Tab --}} -
    + {{!-- Compteurs/Blessures Tab --}} +
      {{#each data.compteurs as |compteur key|}}
    1. @@ -294,10 +293,6 @@
    2. {{/each}}
    -
    - - {{!-- blessures Tab --}} -
    Blessures Légeres :
    {{#each data.blessures.legeres.liste as |bless key|}}