From 2ee6c285ea69cef4717eaa6278d99bd0e0a28fbe Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sat, 4 Jun 2022 21:06:01 +0200 Subject: [PATCH] Add competence roll --- modules/mournblade-actor-sheet.js | 22 +++++++-- modules/mournblade-actor.js | 49 +++++++++++++++++-- modules/mournblade-item-sheet.js | 11 ----- modules/mournblade-utility.js | 6 ++- packs/armes.db | 14 +++--- packs/protection.db | 11 +++++ styles/simple.css | 48 +++++++++++++++++++ templates/actor-sheet.html | 71 ++++++++++++++++------------ templates/item-competence-sheet.html | 4 +- templates/item-don-sheet.html | 4 +- templates/partial-list-niveau.html | 11 +++++ 11 files changed, 189 insertions(+), 62 deletions(-) create mode 100644 packs/protection.db create mode 100644 templates/partial-list-niveau.html diff --git a/modules/mournblade-actor-sheet.js b/modules/mournblade-actor-sheet.js index 83f96e0..a77e980 100644 --- a/modules/mournblade-actor-sheet.js +++ b/modules/mournblade-actor-sheet.js @@ -70,12 +70,21 @@ export class MournbladeActorSheet extends ActorSheet { let itemId = li.data("item-id") const item = this.actor.items.get( itemId ) item.sheet.render(true) - }); + }) // Delete Inventory Item html.find('.item-delete').click(ev => { const li = $(ev.currentTarget).parents(".item"); MournbladeUtility.confirmDelete(this, li); - }); + }) + html.find('.edit-item-data').change(ev => { + const li = $(ev.currentTarget).parents(".item") + let itemId = li.data("item-id") + let itemType = li.data("item-type") + let itemField = $(ev.currentTarget).data("item-field") + let dataType = $(ev.currentTarget).data("dtype") + let value = ev.currentTarget.value + this.actor.editItemField(itemId, itemType, itemField, dataType, value) + }) html.find('.quantity-minus').click(event => { const li = $(event.currentTarget).parents(".item"); @@ -90,7 +99,14 @@ export class MournbladeActorSheet extends ActorSheet { const li = $(event.currentTarget).parents(".item") let attrKey = li.data("attr-key") this.actor.rollAttribut(attrKey) - }); + }) + html.find('.roll-competence').click((event) => { + const li = $(event.currentTarget).parents(".item") + let attrKey = $(event.currentTarget).data("attr-key") + let compId = li.data("item-id") + this.actor.rollCompetence(attrKey, compId) + }) + html.find('.roll-spec').click((event) => { const li = $(event.currentTarget).parents(".item"); const specId = li.data("item-id"); diff --git a/modules/mournblade-actor.js b/modules/mournblade-actor.js index 8838201..3b80c4e 100644 --- a/modules/mournblade-actor.js +++ b/modules/mournblade-actor.js @@ -54,7 +54,25 @@ export class MournbladeActor extends Actor { } /* -------------------------------------------- */ getSkills() { - return this.data.items.filter(item => item.type == "competence" ) + let comp = [] + for( let item of this.data.items) { + item = duplicate(item) + if ( item.type == "competence") { + item.data.attribut1total = item.data.niveau + (this.data.data.attributs[item.data.attribut1]?.value || 0) + item.data.attribut2total = item.data.niveau + (this.data.data.attributs[item.data.attribut2]?.value || 0) + item.data.attribut3total = item.data.niveau + (this.data.data.attributs[item.data.attribut3]?.value || 0) + if (item.data.niveau == 0) { + item.data.attribut1total -= 3 + item.data.attribut2total -= 3 + item.data.attribut3total -= 3 + } + item.data.attribut1label = this.data.data.attributs[item.data.attribut1]?.label || "" + item.data.attribut2label = this.data.data.attributs[item.data.attribut2]?.label || "" + item.data.attribut3label = this.data.data.attributs[item.data.attribut3]?.label || "" + comp.push( item ) + } + } + return comp } /* -------------------------------------------- */ @@ -99,6 +117,21 @@ export class MournbladeActor extends Actor { } } + /* -------------------------------------------- */ + editItemField(itemId, itemType, itemField, dataType, value) { + let item= this.data.items.find(item => item.id == itemId) + if (item) { + console.log("Item ", item, itemField, dataType, value) + if (dataType.toLowerCase() == "number") { + value = Number(value) + } else { + value = String(value) + } + let update = { _id: item.id, [`data.${itemField}`]: value }; + this.updateEmbeddedDocuments( "Item", [update]) + } + } + /* -------------------------------------------- */ compareName(a, b) { if (a.name < b.name) { @@ -159,7 +192,7 @@ export class MournbladeActor extends Actor { } /* -------------------------------------------- */ - getCommonRollData(attrKey = undefined, compKey = undefined) { + getCommonRollData(attrKey = undefined, compId = undefined) { let rollData = MournbladeUtility.getBasicRollData() rollData.alias = this.name rollData.actorImg = this.img @@ -170,9 +203,8 @@ export class MournbladeActor extends Actor { rollData.attrKey = attrKey rollData.attr = duplicate(this.data.data.attributs[attrKey]) } - if (compKey) { - rollData.compKey = compKey - // TODO! + if (compId) { + rollData.competence = duplicate(this.data.items.get(compId) || {}) } return rollData } @@ -183,7 +215,14 @@ export class MournbladeActor extends Actor { console.log("RollDatra", rollData) let rollDialog = await MournbladeRollDialog.create(this, rollData) rollDialog.render(true) + } + /* -------------------------------------------- */ + async rollCompetence(attrKey, compId) { + let rollData = this.getCommonRollData(attrKey, compId) + console.log("RollDatra", rollData) + let rollDialog = await MournbladeRollDialog.create(this, rollData) + rollDialog.render(true) } } diff --git a/modules/mournblade-item-sheet.js b/modules/mournblade-item-sheet.js index 4c3ca85..0cf84bc 100644 --- a/modules/mournblade-item-sheet.js +++ b/modules/mournblade-item-sheet.js @@ -124,21 +124,10 @@ export class MournbladeItemSheet extends ItemSheet { item.sheet.render(true); }); - html.find('.delete-spec').click(ev => { - this.object.update({ "data.specialisation": [{ name: 'None' }] }); - }); - html.find('.delete-subitem').click(ev => { this.deleteSubitem(ev); }); - html.find('.stat-choice-flag').click(ev => { - let idx = $(ev.currentTarget).data("stat-idx"); - let array = duplicate(this.object.data.data.statincreasechoice); - array[Number(idx)].flag = !array[Number(idx)].flag; - this.object.update({ "data.statincreasechoice": array }); - }); - // Update Inventory Item html.find('.item-delete').click(ev => { const li = $(ev.currentTarget).parents(".item"); diff --git a/modules/mournblade-utility.js b/modules/mournblade-utility.js index 903fb53..87b58dd 100644 --- a/modules/mournblade-utility.js +++ b/modules/mournblade-utility.js @@ -102,7 +102,8 @@ export class MournbladeUtility { const templatePaths = [ 'systems/fvtt-mournblade/templates/editor-notes-gm.html', - 'systems/fvtt-mournblade/templates/partial-item-description.html' + 'systems/fvtt-mournblade/templates/partial-item-description.html', + 'systems/fvtt-mournblade/templates/partial-list-niveau.html' ] return loadTemplates(templatePaths); } @@ -264,7 +265,8 @@ export class MournbladeUtility { rollData.diceFormula = rollData.mainDice if (rollData.competence) { - rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.data.niveau}+${rollData.modificateur}` + let compmod = (rollData.competence.data.niveau == 0) ? -3 : 0 + rollData.diceFormula += `+${rollData.attr.value}+${rollData.competence.data.niveau}+${rollData.modificateur}+${compmod}` } else { rollData.diceFormula += `+${rollData.attr.value}*2+${rollData.modificateur}` } diff --git a/packs/armes.db b/packs/armes.db index a061370..e0d70f1 100644 --- a/packs/armes.db +++ b/packs/armes.db @@ -1,5 +1,4 @@ {"name":"Fouet","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contactjet","bonusmaniementoff":0,"bonusmaniementdef":0,"degats":"1d4 + 1","deuxmains":false,"courte":3,"moyenne":0,"longue":0,"tr":0,"rarete":4,"prix":40},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Qb1h25U88mTM4h72"}},"_id":"0swiE8k5zfUIqmXu"} -{"name":"Sabre de Pan Tang","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d10 + 2","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":120},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.l3ffzso7GyHMKguD"}},"_id":"1hIQVgVH6VgTTaAc"} {"name":"Hache des mers","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"2d6","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":7,"prix":150},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.mGYFgteaWBDo10Xb"}},"_id":"2BSVJXr0FGZZJ9fh"} {"name":"Fléau d’armes","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":0,"bonusmaniementdef":0,"degats":"1D10+1","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":7,"prix":70},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.PHQabMgfk1GNOjKo"}},"_id":"2qezkR1BdC0DcRIl"} {"name":"Arbalète","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"tir","bonusmaniementoff":1,"bonusmaniementdef":0,"degats":"2d6","deuxmains":false,"courte":25,"moyenne":50,"longue":75,"tr":3,"rarete":10,"prix":500},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.WYp8ojQN8HYJwUJc"}},"_id":"2zIdrBK88iuMbOF0"} @@ -7,11 +6,9 @@ {"name":"Fronde","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"tir","bonusmaniementoff":0,"bonusmaniementdef":0,"degats":"1D4","deuxmains":false,"courte":10,"moyenne":25,"longue":50,"tr":1,"rarete":2,"prix":1},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.TgVuNnytO9k2K0Xe"}},"_id":"4To8rLxv4efsoZK0"} {"name":"Pierre","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contactjet","bonusmaniementoff":0,"bonusmaniementdef":0,"degats":"1D4","deuxmains":false,"courte":3,"moyenne":6,"longue":15,"tr":1,"rarete":0,"prix":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.3YS9IfQddECnoagK"}},"_id":"4yKlK8MeSj5Zk8lM"} {"name":"Grand marteau","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":1,"bonusmaniementdef":0,"degats":"2D6+2","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":7,"prix":120},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.vjic4cPkJ0iMCIt5"}},"_id":"6e1JHoD1Jrz020R7"} -{"name":"Arc en os","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"tir","bonusmaniementoff":3,"bonusmaniementdef":0,"degats":"1d8 + 1","deuxmains":false,"courte":30,"moyenne":60,"longue":125,"tr":2,"rarete":10,"prix":500},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Dy9dzVhXbNAVm3zn"}},"_id":"7dXsPz1WDmL12leA"} {"name":"Arc de cavalerie","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"tir","bonusmaniementoff":1,"bonusmaniementdef":0,"degats":"1d6","deuxmains":false,"courte":25,"moyenne":50,"longue":75,"tr":1,"rarete":7,"prix":100},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.5EWrgNQjJMx1t2v1"}},"_id":"88UuW1bdpFuCmkqb"} {"name":"Épée de maître","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":1,"degats":"1d8+ 2","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":7,"prix":120},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.kX3MbDFu9uYZVNf2"}},"_id":"9Eo9mRbPPZHN98Cr"} -{"name":"Pique filkharienne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d8 + 2","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":150},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.dF9LxfA1crZBmT92"}},"_id":"AYBujxf5C0XaW9iZ"} -{"name":"Lance ilmioréenne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":0,"bonusmaniementdef":2,"degats":"1d8 + 2","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":100},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.8ApbiVgkx79OHVp2"}},"_id":"BN8LBnXSidpKa3OO"} +{"name":"Lance ilmioréenne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"

La lance ilmioréenne est un solide bâton de combat surmonté d’une pointe sur lequel est fi xé quasi perpendiculairement un fer de hache plat et étroit. Un contrepoids fi xé à l’autre extrémité sert à équilibrer l’arme qui peut être maniée à la fois comme une lance et comme une hache à deux mains, ce qui permet de maintenir ses ennemis à distance ou de leur porter des coups dévastateurs. Ces lances furent inventées à l’époque de la tribu d’Ilm, quand les lances et épées étaient déclarées illégales par les gouverneurs melnibonéens de la région. Certaines écoles militaires ilmioréennes enseignent toujours le Style Imar, qui mêle en une seule et même technique le combat à deux mains à la lance et le combat au bâton.

","typearme":"contact","bonusmaniementoff":0,"bonusmaniementdef":2,"degats":"1d8 + 2","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":100},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.8ApbiVgkx79OHVp2"}},"_id":"9xPd4ITtyk3nmMoN"} {"name":"Masse lourde","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d10 + 1","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":5,"prix":80},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.DPfXgFj3gpjJ3nbR"}},"_id":"CeC5lAKs7NdPF05l"} {"name":"Gourdin","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1D6","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":0,"prix":5},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.CBIfq9eRd2RmoI4H"}},"_id":"CqP80SQFQOefpGgd"} {"name":"Rapière","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":3,"bonusmaniementdef":1,"degats":"1d8+ 1","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":150},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.XIStcClTnmLoSwyR"}},"_id":"CupT9m8L909l4Fo5"} @@ -20,8 +17,10 @@ {"name":"Arc de chasse","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"tir","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d6 - 1","deuxmains":false,"courte":25,"moyenne":50,"longue":75,"tr":1,"rarete":8,"prix":250},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.TrYZ9BxYukS1mbBX"}},"_id":"Hrm08cpgAMMV6Jpq"} {"name":"Coup de pied / poing / tête","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":3,"bonusmaniementdef":0,"degats":"1d4","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":0,"prix":0},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.nBPKHsYIM0HgMcBy"}},"_id":"Iw3j4oC6H8HJ9MFQ"} {"name":"Lance lourde","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":1,"bonusmaniementdef":2,"degats":"1d10","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":5,"prix":50},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Kcl07bs7TOcne37W"}},"_id":"KY22L6Lx5WxgvyGD"} +{"name":"Arc du Désert des Larmes","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"

Cet arc composite fait de bois, d’andouillers de cerf et/ou d’os est un arc court et très recourbé utilisé par les barbares du Désert des Larmes pour la chasse. On peut également trouver ce type d’arcs à Pikarayd et au Dorel.

","typearme":"tir","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d6 + 1","deuxmains":false,"courte":25,"moyenne":50,"longue":75,"tr":1,"rarete":8,"prix":250},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.QmYjdRCAk3MnxKJg"}},"_id":"MDpFpqmXpIX5VV80"} +{"name":"Hache de bataille dite lormyrienne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"

Cette double hache parfaitement équilibrée et proportionnée est l’arme favorite des chevaliers lormyriens. Il s’agit de l’arme idéale pour trancher, découper les lances ennemies et fendre les crânes.

","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"2d6 + 2","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":250},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Lpa6kesbzgKVtogn"}},"_id":"MP49mYF7FVuW9ALB"} {"name":"Couteau / Dague","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contactjet","bonusmaniementoff":3,"bonusmaniementdef":0,"degats":"1d4","deuxmains":false,"courte":3,"moyenne":6,"longue":15,"tr":1,"rarete":1,"prix":10},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.5a9GKIvNgbbXBq3s"}},"_id":"N5BbO2lGwzQnpvH0"} -{"name":"Hache de bataille dite lormyrienne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"2d6 + 2","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":250},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Lpa6kesbzgKVtogn"}},"_id":"Ss5vYfkV6su8vp6z"} +{"name":"Pique filkharienne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"

Cette longue pique à grande lame de près de trois mètres de long est l’arme de prédilection des piquiers de l’armée de Filkhar. Très effi cace pour lutter contre des cavaliers ou des ennemis en train de charger, elle l’est beaucoup moins en combat rapproché.

","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d8 + 2","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":150},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.dF9LxfA1crZBmT92"}},"_id":"QwrZbFeJUQv2OBqI"} {"name":"Masse légère","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d6 + 2","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":5,"prix":5},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.xrWRNZBrEzkUQzRG"}},"_id":"SzgkzHvzma8NiMd5"} {"name":"Sabre d’abordage","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":1,"bonusmaniementdef":0,"degats":"1d8","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":5,"prix":50},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.aNUqO9OZT0GBszvv"}},"_id":"U8CoqFhGuT3ZHeq1"} {"name":"Javelot","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"jet","bonusmaniementoff":1,"bonusmaniementdef":0,"degats":"1d6","deuxmains":false,"courte":25,"moyenne":50,"longue":75,"tr":1,"rarete":5,"prix":30},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Zwiz9E3TbeUP8qHH"}},"_id":"aELvOR7A9DIJKgBk"} @@ -30,12 +29,13 @@ {"name":"Arc de guerre","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"tir","bonusmaniementoff":0,"bonusmaniementdef":0,"degats":"1d10 + 1","deuxmains":false,"courte":30,"moyenne":50,"longue":100,"tr":1,"rarete":6,"prix":70},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Tq6lUFPTkBN5cBwn"}},"_id":"cKf5z3fajUnxJh0r"} {"name":"Main gauche","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":0,"bonusmaniementdef":3,"degats":"1d4 + 1","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":10},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.BBii0qi1unvSRNO4"}},"_id":"fLHX6ut131CQI630"} {"name":"Marteau de guerre","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":0,"bonusmaniementdef":0,"degats":"1d8 + 2","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":6,"prix":70},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.6n2uSdYfRAsSqQnA"}},"_id":"freCCeiYGfWmUAQU"} +{"name":"Sabre de Pan Tang","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"

Ce long sabre effi lé sert aux Cavaliers démoniaques de Pan Tang pour couper les têtes depuis le dos de leurs monstrueuses montures reptiliennes à six pattes.

","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d10 + 2","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":8,"prix":120},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.l3ffzso7GyHMKguD"}},"_id":"j5659PJlrHz56V1k"} {"name":"Hallebarde","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":0,"bonusmaniementdef":2,"degats":"2d6","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":7,"prix":150},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.ZTdyIoMzE9kqm4e6"}},"_id":"lYtm5MwP96numskx"} -{"name":"Lance melnibonéenne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":1,"bonusmaniementdef":2,"degats":"2d6+ 4","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":10,"prix":70},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.KAl5qXHeYDoYRU6G"}},"_id":"qHi8s2eKLWaSR5kT"} +{"name":"Lance melnibonéenne","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"

La lance melnibonéenne, faite pour le combat à cheval ou à dos de dragon, ressemble à une lance ordinaire. Son fer est cependant plus fi n et plus étroit. Avant la chute d’Imrryr, il est quasi impossible de se procurer de telles armes sur les marchés des Jeunes Royaumes. Elles peuvent être maniées à une main comme lors des joutes à cheval ou à deux mains au cœur des mêlées.

","typearme":"contact","bonusmaniementoff":1,"bonusmaniementdef":2,"degats":"2d6+ 4","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":10,"prix":70},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.KAl5qXHeYDoYRU6G"}},"_id":"mQGT0vmDjoTZCW5u"} +{"name":"Arc en os","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"

Arc composite recourbé fait de bois, d’os et d’acier, l’arc en os melnibonéen est une arme extraordinairement puissante entre les mains d’un guerrier melnibonéen ou d’un archer esclave du Glorieux Empire. On peut se le procurer dans les Jeunes Royaumes après la chute d’Imrryr.

","typearme":"tir","bonusmaniementoff":3,"bonusmaniementdef":0,"degats":"1d8 + 1","deuxmains":false,"courte":30,"moyenne":60,"longue":125,"tr":2,"rarete":10,"prix":500},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Dy9dzVhXbNAVm3zn"}},"_id":"nzve5qucVN6FC5wn"} {"name":"Bâton ferré ou lesté","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":1,"bonusmaniementdef":2,"degats":"1D8","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":0,"prix":1},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.zoBHSbvJPnjbtPh6"}},"_id":"sHj90bPcMaDlOw51"} {"name":"Épée courte / Glaive","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":1,"degats":"1D6+1","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":4,"prix":40},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Mxv5gMHRvRrsuhPA"}},"_id":"sju2r73hUHyGbHYg"} {"name":"Faucheur","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":1,"degats":"1d4 + 1","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":7,"prix":100},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.OlmzE29fh9DFd8TF"}},"_id":"t2uQcWe7kirUOp3D"} -{"name":"Arc du Désert des Larmes","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"tir","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d6 + 1","deuxmains":false,"courte":25,"moyenne":50,"longue":75,"tr":1,"rarete":8,"prix":250},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.QmYjdRCAk3MnxKJg"}},"_id":"tn7L1zaimB0PThI5"} {"name":"Fléau lourd","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":1,"bonusmaniementdef":0,"degats":"1d10+ 3","deuxmains":true,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":7,"prix":150},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.vDDw0qqM1Kg7Pu6T"}},"_id":"uatjBTFCE5ZCqhAd"} {"name":"Hache","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":0,"degats":"1d6 + 2","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":2,"prix":30},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.2MwgptY2kE4tgYBe"}},"_id":"v7ymzlEALvsk0poA"} {"name":"Épée large","type":"arme","img":"systems/fvtt-mournblade/assets/icons/arme.webp","data":{"description":"","typearme":"contact","bonusmaniementoff":2,"bonusmaniementdef":1,"degats":"1d6+ 2","deuxmains":false,"courte":0,"moyenne":0,"longue":0,"tr":0,"rarete":5,"prix":70},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.iuAizxCvnUxmsjrn"}},"_id":"wWk0Wfer06Ttmouv"} diff --git a/packs/protection.db b/packs/protection.db new file mode 100644 index 0000000..b61c968 --- /dev/null +++ b/packs/protection.db @@ -0,0 +1,11 @@ +{"name":"Armure de plaques melnibonéenne","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"

Cette armure ornée et fi nement gravée est ajustée aux mensurations de celui qui la porte. On ne peut en trouver en dehors d’Imrryr avant sa chute. L’armure couvre tout le corps des pieds à la tête. Le casque est toujours surmonté d’une sculpture en forme de dragon ou de serpent de mer. Des motifs complexes et imbriqués recouvrent la surface de tous les éléments de l’armure. Après la chute d’Imrryr, quelques pièces d’armure melnibonéennes apparaissent de temps en temps sur les marchés mais les armures entières restent rarissimes. Si elle a été spécialement conçue pour son porteur, une armure de plaques melnibonéenne n’impose pas de pénalité d’encombrement à ce dernier.

","typeprotection":"armure","protection":6,"degats":"","rarete":10,"prix":1000},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.09OukepQ8Oep0642"}},"_id":"FFX0dFDZoVXFzyXk"} +{"name":"Armure de plates, harnois","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":5,"degats":"","rarete":10,"prix":500},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.7JErvrlTYaFbCvoR"}},"_id":"so7x8hK8qEc5QqnQ"} +{"name":"Armure du Désert des Larmes","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"

Les barbares et les nomades du Désert des Larmes ont créé des armures de bois protégeant l’abdomen, la poitrine et les bras. Ces armures sont faites à partir du bois de l’arbre Fal, originaire de plateaux pluvieux situés au-delà du désert. Les barbares décorent souvent leurs armures de symboles tribaux et en protègent la surface avec de la laque. Conçue en bois, cette armure a la particularité de pouvoir flotter quoiqu’un séjour prolongé dans l’eau risque de la détériorer très rapidement. Elle n’en reste pas moins une protection très recherchée par ceux qui ont à s’aventurer sur les flots.

","typeprotection":"armure","protection":2,"degats":"","rarete":8,"prix":200},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.b1JGc5OlrIzlQbTO"}},"_id":"ZzzXZUn5PU1lnP0X"} +{"name":"Bouclier d’infanterie","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":2,"degats":"1D6","rarete":5,"prix":50},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.Xn1tVJgKinG0hc10"}},"_id":"I2X36O7hkpigZmJo"} +{"name":"Broigne, cotte de maille","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":3,"degats":"","rarete":7,"prix":150},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.th6blCtgBmsWSYdY"}},"_id":"veoS6Gtzj6Dq087V"} +{"name":"Cuir bouilli, cuir clouté","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":2,"degats":"","rarete":5,"prix":50},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.T9RAyLXDPSHlvoDR"}},"_id":"kis2lI7oEtdWzJbQ"} +{"name":"Cuirasse, armure de demi-plaques","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":4,"degats":"","rarete":8,"prix":200},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.FvufSkzJOSftZhYt"}},"_id":"2hD1DQVeCIQIXFU7"} +{"name":"Écu d’acier","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":3,"degats":"1D8","rarete":9,"prix":100},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.TAA8qb6POO0HyhU5"}},"_id":"zqKOtmrDNrDYBu2z"} +{"name":"Pavois","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"

Le pavois se plante dans le sol au début du combat et ne peut normalement plus être déplacé jusqu’à son issue.

","typeprotection":"armure","protection":3,"degats":"","rarete":7,"prix":50},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.y1kNQJYRCEol83IA"}},"_id":"2uqB1doLYK4S2EN2"} +{"name":"Targe","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":1,"degats":"1D4","rarete":4,"prix":20},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.dyTeMFfvg5mAKT2n"}},"_id":"WH1m35jgm7ilTTuG"} +{"name":"Tenues rembourrées, cuir souple, fourrures","type":"protection","img":"systems/fvtt-mournblade/assets/icons/protection.webp","data":{"description":"","typeprotection":"armure","protection":1,"degats":"","rarete":2,"prix":10},"effects":[],"folder":null,"sort":0,"permission":{"default":0,"RiMAsQHaUMojde7N":3},"flags":{"core":{"sourceId":"Item.5dV4DORRrNdAd2Z5"}},"_id":"SqyKvR1GJMJvgHCJ"} diff --git a/styles/simple.css b/styles/simple.css index 3ce9224..6bdb4da 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1,15 +1,23 @@ /* ==================== (A) Fonts ==================== */ + /* ==================== (A) Fonts ==================== */ + @font-face { + font-family: "Charlemagne"; + src: url('../assets/fonts/CharlemagneStd-Bold.otf') format("otf"); + } :root { /* =================== 1. ACTOR SHEET FONT STYLES =========== */ + --window-header-font-family: Charlemagne; --window-header-title-font-size: 1.3rem; --window-header-title-font-weight: normal; --window-header-title-color: #f5f5f5; + --major-button-font-family: Charlemagne; --major-button-font-size: 1.05rem; --major-button-font-weight: normal; --major-button-color: #dadada; + --tab-header-font-family: Charlemagne; --tab-header-font-size: 1.0rem; --tab-header-font-weight: 700; --tab-header-color: #403f3e; @@ -43,9 +51,11 @@ /* Fonts */ .sheet header.sheet-header h1 input, .window-app .window-header, #actors .directory-list, #navigation #scene-list .scene.nav-item { + font-family: "Charlemagne"; font-size: 1.0rem; } /* For title, sidebar character and scene */ .sheet nav.sheet-tabs { + font-family: "Charlemagne"; font-size: 0.8rem; } /* For nav and title */ .window-app input, .foundryvtt-vadentis .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle { @@ -1181,6 +1191,44 @@ ul, li { border: 2px ridge #846109; } +/*************************************************************/ +.competence-name { + padding-top: 7px; + padding-left: 4px; + margin-left: 4px; + flex-grow: 2; +} + +/*************************************************************/ +.competence-niveau { + flex-grow: 1; + min-width: 64px; + max-width: 64px; +} + +/*************************************************************/ +.button-roll-competence { + min-width: 64px; + max-width: 64px; + background-color: rgb(211, 221, 187); + padding-top: 7px; + padding-left: 4px; + margin-left: 4px; + margin-right: 4px; + border-radius: 12px; +} + +/*************************************************************/ +.button-roll-competence-empty { + min-width: 64px; + max-width: 64px; + padding-top: 7px; + padding-left: 4px; + margin-left: 4px; + margin-right: 4px; + border-radius: 12px; +} + /*************************************************************/ .item-name-img { flex-grow:1; diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index d352134..cef1c4b 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -4,23 +4,22 @@
-
-

- {{!-- Sheet Tab Navigation --}} - -
+

+ {{!-- Sheet Tab Navigation --}} + + {{!-- Sheet Body --}}
@@ -34,20 +33,12 @@ {{#each data.attributs as |attr key|}}
  • {{attr.label}} - {{#select attr.value}} - - - - - - - - - - + {{> systems/fvtt-mournblade/templates/partial-list-niveau.html}} {{/select}} - +
  • {{/each}} @@ -102,13 +93,31 @@
     
    {{#each skills as |skill key|}} -
  • +
  • - {{skill.name}} - {{skill.data.niveau}} - {{skill.data.attribut1}} : {{skill.data.attribut1value}} - {{skill.data.attribut2}} : {{skill.data.attribut1value}} - {{skill.data.attribut3}} : {{skill.data.attribut1value}} + {{skill.name}} + + + {{#if (ne skill.data.attribut1 "none")}} + {{upper skill.data.attribut1}} : {{skill.data.attribut1total}} + {{else}} +   + {{/if}} + {{#if (ne skill.data.attribut2 "none")}} + {{upper skill.data.attribut2}} : {{skill.data.attribut2total}} + {{else}} +   + {{/if}} + {{#if (ne skill.data.attribut3 "none")}} + {{upper skill.data.attribut3}} : {{skill.data.attribut3total}} + {{else}} +   + {{/if}}
     
    @@ -141,7 +150,7 @@
  • - +
      diff --git a/templates/item-competence-sheet.html b/templates/item-competence-sheet.html index 96b7bca..3ca5ccb 100644 --- a/templates/item-competence-sheet.html +++ b/templates/item-competence-sheet.html @@ -12,8 +12,8 @@
      - + diff --git a/templates/item-don-sheet.html b/templates/item-don-sheet.html index ece7b96..4ada4c7 100644 --- a/templates/item-don-sheet.html +++ b/templates/item-don-sheet.html @@ -26,7 +26,9 @@ - +
      + {{editor content=data.sacrifice target="data.sacrifice" button=true owner=owner editable=editable}} +
      {{> systems/fvtt-mournblade/templates/partial-item-description.html}} diff --git a/templates/partial-list-niveau.html b/templates/partial-list-niveau.html new file mode 100644 index 0000000..706f51a --- /dev/null +++ b/templates/partial-list-niveau.html @@ -0,0 +1,11 @@ + + + + + + + + + + +