From 003d548f1f548ad4f998cfc2dc41a570750cb153 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Sun, 24 May 2020 20:19:57 +0200 Subject: [PATCH] Sync with head --- fonts/goudyacc.ttf | Bin 0 -> 46276 bytes module/actor-sheet.js | 7 +- module/actor.js | 85 ++++++++- module/rdd-utility.js | 202 +++++++++++++++++++- module/simple.js | 41 +--- styles/simple.css | 318 ++++++++++++++++++++++--------- system.json | 4 +- template.json | 131 +++++++++++-- templates/actor-sheet.html | 74 ++++--- templates/dialog-competence.html | 67 +++++++ 10 files changed, 754 insertions(+), 175 deletions(-) create mode 100755 fonts/goudyacc.ttf create mode 100644 templates/dialog-competence.html diff --git a/fonts/goudyacc.ttf b/fonts/goudyacc.ttf new file mode 100755 index 0000000000000000000000000000000000000000..6672c4ef9196319a44c5794bb274f7709302fe1c GIT binary patch literal 46276 zcmb5X37A}GbtZhjyYIKQTl-$!)%#x6i+U?b-K~A!Wm)@XTe4(Xk}Yr8V1tdZ!Nz6{ zW)Bb&FqjaNAq#|%1@b3M<_8jqzkr_~#?KvR z&tJaxZ~xCLPYA*XKOhL~@6TO0aZKpG`=B7a|8w~H2j`F7dy$33lQ{k(IKFu2vGb=M zcTl=v<9fPr46aK^vMTO_KdXdX z^AQvB!s+H?QE-JPn~x=7Q22}HV;RSMy!luW*0Z7JV^v7AN1Kl|p@Y3B&)(NMCJMr(5a7?(2|4#}<;ka-O_e;VBJaZZMXZW)hg|qy)qEN#!j;ya;E zu@fgw-Ff-S)2DEv3&It=oL+iNIDs3T_%eR?J>k^OQ)jN6J9bIfiC><9+OaH&l z5FEU^^>)QePhY+5?pM9->Q}!lF69#5{;F`Ba5r7XmSZO_T{wU0` z?@NljB=o(cskr})EaTbFs4DKEouV+0*L_|pLPs@WZ==X`yWJy$HP0&=0 ziA)mk9!pn;CX&MZ%+O5e75dADW?sP$ugnM|!)(J@I0-@DaQ4`Xjh*`^!xLW+^yS~4 zJTMk6g*(T>m3em0_22vHPo?6|{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JY(E|gl;$8oaR z5^X2c=T_PzX!I;-!zT!lYQ!dnCG{cAgNK3Z2VT~9e5D=o#M~}nqu97|qXSz1Z9C-b z5N)Iz(twfrpo%s}zT@O_uDC>FbqJY|jC_M7leKe z2DmVU3;?7DBMzQhp{?qVpCo6|6@6)=fHwy}h@|HdT189Ek?*?se2KQ3)@tu1Je%md zzU=}DLqWp;>P{Fs)J4)y`KizgLmy}KP-zn{jB3XPdg}xl$RYLLNpW_FHY%2?(B{WO zv;)_zsqw@kU7(xM8Uo6jTah=|^Fi|^c+MaQ91>4b7qhq-lMX9P1vQkwLmKH4?Ih{8 zpp6EqmT>npv=a!F7b=cE(|9Hko`;H}K$IHw2|NN;Mzn2@G>L=;gm%(Z+KMDh1gVe> z+W5(*a+y?+N&5uDuMNGF(#~KIbv!QM)@}j~gvC@IHv?Y*qU#IM**0MtO0=WWC~Zm- zdLI4(Shm3M6A#r&1c`v^Oyhw@!APDH>TWu%wDb5^XEH%L9TJr-?IVl~V&is6&*#<= zZAkH~So%1n$MXJ(W5_7 zdN;lgBeiOYHpE~zk> { + let caracName = event.currentTarget.name.replace(".value", "").replace("data.carac.", ""); + console.log("Value changed :", event, caracName); + this.actor.updateCarac( caracName, parseInt(event.target.value) ); + } ); } /* -------------------------------------------- */ diff --git a/module/actor.js b/module/actor.js index a5b331d9..d712957e 100644 --- a/module/actor.js +++ b/module/actor.js @@ -7,6 +7,25 @@ import { RdDUtility } from "./rdd-utility.js"; export class RdDActor extends Actor { + /* -------------------------------------------- */ + /** + * Override the create() function to provide additional RdD functionality. + * + * This overrided create() function adds initial items + * Namely: Basic skills, money, + * + * @param {Object} data Barebones actor data which this function adds onto. + * @param {Object} options (Unused) Additional options which customize the creation workflow. + * + */ + static async create(data, options) { + // If the created actor has items (only applicable to duplicated actors) bypass the new actor creation logic + if (data.items) { + return super.create(data, options); + } + super.create(data, options); + } + /* -------------------------------------------- */ prepareData() { @@ -25,16 +44,67 @@ export class RdDActor extends Actor { * Prepare Character type specific data */ _prepareCharacterData(actorData) { + // Initialize empty items + RdDUtility.computeCarac(actorData.data); + } + + /* -------------------------------------------- */ + performRoll( html, rollData ) { + let myroll = new Roll("d100"); + myroll.roll(); + let quality = "Echec"; + let tache = 0; + //console.log(">>> ROLL", rollData.selectedCarac.label, rollData.rollTarget.score, myroll.total ); + let result = myroll.total; + if (result <= rollData.rollTarget.part) { + quality = "Réussite Particulière!"; + tache = 4; + } else if (result <= (rollData.rollTarget.score /2) ) { + quality = "Réussite Significative"; + tache = 2; + } else if (result <= (rollData.rollTarget.score) ) { + quality = "Réussite Normale"; + tache = 1; + } else if (result < (rollData.rollTarget.epart) ) { + quality = "Echec Normal"; + tache = 0; + } else if (result < (rollData.rollTarget.etotal) ) { + quality = "Echec Particulier"; + tache = -2; + } else if (result >= (rollData.rollTarget.etotal) ) { + quality = "Echec Total"; + tache = -4; + } + let chatOptions = { "content": "Test : " + rollData.selectedCarac.label + " / " + rollData.competence.name + "
Modificateur : " + rollData.bmValue + " - " + + rollData.selectedCarac.value + " / " + rollData.finalLevelStr + "
Résutat : " + myroll.total + "
" + + "" + quality + "
Points de taches : " + tache , + "title": "Test" + } + ChatMessage.create( chatOptions ); + } + + /* -------------------------------------------- */ + updateCarac( caracName, caracValue ) + { + let data = this.data.data; + data.carac[caracName].value = caracValue; // Force update ? + RdDUtility.computeCarac( data ); } - /* -------------------------------------------- */ - + /* -------------------------------------------- */ rollCompetence( compName ) { let compItem = RdDUtility.findCompetence( this.data.items, compName); - console.log("Roll !", compItem ); - renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html', compItem).then(dlg => + let rollData = { + "competence": compItem, + "carac": this.data.data.carac, + "bonusmalusTable": CONFIG.RDD.bonusmalus, + "bmValue": 0, + "finalLevel": 0 + } + CONFIG.currentRollData = rollData; + renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html', rollData).then(dlg => { new Dialog( { @@ -44,8 +114,8 @@ export class RdDActor extends Actor { { rollButton: { - label: "Lancer" - //callback: html => dialogOptions.callback(html, roll) + label: "Lancer", + callback: html => this.performRoll(html, rollData) } }, default: "rollButton" @@ -53,8 +123,7 @@ export class RdDActor extends Actor { }); } - /* -------------------------------------------- */ - + /* -------------------------------------------- */ /** @override */ getRollData() { const data = super.getRollData(); diff --git a/module/rdd-utility.js b/module/rdd-utility.js index 86157dfe..03846433 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -1,7 +1,207 @@ /* Common useful functions shared between objects */ +const level_category = { + "generale": "-4", + "particuliere": "-8", + "speciale": "-11", + "connaissance": "-11", + "draconic": "-11", + "melee": "-6", + "tir": "-8", + "lancer": "-8" +} +const carac_array = [ "taille", "apparence", "constitution", "force", "agilite", "dexterite", "vue", "ouie", "odoratgout", "volonte", "intellect", "empathie", "reve", "chance", "melee", "tir", "lancer", "derobee"]; +const bonusmalus = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10]; +const specialResults = [ { "part": 0, "epart": 0, "etotal": 0 }, // 0 + { "part": 1, "epart": 81, "etotal": 92 }, // 01-05 + { "part": 2, "epart": 82, "etotal": 92 }, // 06-10 + { "part": 3, "epart": 83, "etotal": 93 }, // 11-15 + { "part": 4, "epart": 84, "etotal": 93 }, // 16-20 + { "part": 5, "epart": 85, "etotal": 94 }, // 21-25 + { "part": 6, "epart": 86, "etotal": 94 }, // 26-30 + { "part": 7, "epart": 87, "etotal": 95 }, // 31-35 + { "part": 8, "epart": 88, "etotal": 95 }, // 36-40 + { "part": 9, "epart": 89, "etotal": 96 }, // 41-45 + { "part": 10, "epart": 90, "etotal": 96 }, // 46-50 + { "part": 11, "epart": 91, "etotal": 97 }, // 51-55 + { "part": 12, "epart": 92, "etotal": 97 }, // 56-60 + { "part": 13, "epart": 93, "etotal": 98 }, // 61-65 + { "part": 14, "epart": 94, "etotal": 98 }, // 65-70 + { "part": 15, "epart": 95, "etotal": 99 }, // 71-75 + { "part": 16, "epart": 96, "etotal": 99 }, // 76-80 + { "part": 17, "epart": 97, "etotal": 100 }, // 81-85 + { "part": 18, "epart": 98, "etotal": 100 }, // 86-90 + { "part": 19, "epart": 99, "etotal": 100 }, // 81-95 + { "part": 20, "epart": 100, "etotal": 100 } // 96-00 + ]; +const levelDown = [ { "level": -11, "score": 1, "part": 0, "epart": 2, "etotal": 90 }, + { "level": -12, "score": 1, "part": 0, "epart": 2, "etotal": 70 }, + { "level": -13, "score": 1, "part": 0, "epart": 2, "etotal": 50 }, + { "level": -14, "score": 1, "part": 0, "epart": 2, "etotal": 30 }, + { "level": -15, "score": 1, "part": 0, "epart": 2, "etotal": 10 }, + { "level": -16, "score": 1, "part": 0, "epart": 2, "etotal": 2 }, + ]; + export class RdDUtility { + /* -------------------------------------------- */ + static async preloadHandlebarsTemplates( ) { + const templatePaths = [ + //Character Sheets + 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html', + //Items + 'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html', + 'systems/foundryvtt-reve-de-dragon/templates/competence-categorie.html', + 'systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html', + 'systems/foundryvtt-reve-de-dragon/templates/competence-base.html', + // Dialogs + 'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html' + ]; + + return loadTemplates(templatePaths); + } + + /* -------------------------------------------- */ + static buildResolutionTable( ) { + let tableRes = [] + for (var j=0; j<=21; j++) { + let subtab = []; + for (var i=-10; i<=22; i++) { + var m = (i + 10) * 0.5; + var v; + if (i == -9) { + v = Math.floor(j / 2); + } else if (i == -10) { + v = Math.floor(j / 4); + } else { + if (j % 2 == 0) { + var v = Math.ceil(j * m); + } else { + var v = Math.floor(j * m); + } + } + if (v < 1) v = 1; + let specResults + if ( v > 100 ) + specResults = { "part": Math.ceil(v / 5), "epart": 1000, "etotal": 1000 }; + else + specResults = specialResults[Math.ceil(v / 5 )]; + let tabIndex = i+10; + subtab[tabIndex] = { "niveau": i, "score": v, "part": specResults.part, "epart": specResults.epart, "etotal": specResults.etotal } + } + tableRes[j] = subtab; + } + return tableRes; + } + + /* -------------------------------------------- */ + static getLevelCategory( ) + { + return level_category; + } + static getCaracArray() + { + return carac_array; + } + static getBonusMalus() + { + return bonusmalus; + } + + /* -------------------------------------------- */ + static __buildHTMLResolutionHead( dataRow ) { + let r = dataRow; + var row = $(""); + $.each(r, function(colIndex, c) { + let txt = (c.niveau > 0) ? "+"+c.niveau : c.niveau; + row.append($("").text(txt) ); + }); + return row; + } + + /* -------------------------------------------- */ + static __buildHTMLResolutionRow( dataRow ) { + let r = dataRow; + var row = $(""); + $.each(r, function(colIndex, c) { + if ( colIndex == 2 ) + row.append($("").text(c.score)); + else + row.append($("").text(c.score)); + }); + return row; + } + + /* -------------------------------------------- */ + static makeHTMLResolutionTable(container, minCarac = 1, maxCarac = 21) { + minCarac = (minCarac < 1) ? 1 : minCarac; + maxCarac = (maxCarac > 21) ? 21 : maxCarac; + let data = CONFIG.RDD.resolutionTable; + var table = $("").addClass('table-resolution'); + // Build first row of levels + let row = this.__buildHTMLResolutionHead( data[0] ); + table.append(row); + // Then the rest... + for (var rowIndex=minCarac; rowIndex <= maxCarac; rowIndex++) { + let row = this.__buildHTMLResolutionRow( data[rowIndex] ); + table.append(row); + } + return container.append(table); + } + + /* -------------------------------------------- */ + static getResolutionField(caracValue, levelValue ) + { + if ( levelValue < -16 ) { + return { "score": 0, "part": 0, "epart": 1, "etotal": 1}; + } if ( levelValue < -10 ) { + return levelDown.find(levelData => levelData.level == levelValue); + } + return CONFIG.RDD.resolutionTable[caracValue][levelValue+10]; + } + + /* -------------------------------------------- */ + static computeCarac( data) + { + let fmax = parseInt(data.carac.taille.value) + 4; + if ( data.carac.force.value > fmax ) + data.carac.force.value = fmax; + + data.carac.derobee.value = Math.floor(parseInt(((21 - data.carac.taille.value)) + parseInt(data.carac.agilite.value)) / 2); + let bonusDomKey = Math.floor( (parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2); + data.attributs.plusdom.value = 2 + if (bonusDomKey < 8) + data.attributs.plusdom.value = -1; + else if (bonusDomKey < 12) + data.attributs.plusdom.value = 0; + else if (bonusDomKey < 14) + data.attributs.plusdom.value = 1; + data.attributs.encombrement.value = (parseInt(data.carac.force.value) + parseInt(data.carac.taille.value)) / 2; + data.carac.melee.value = Math.floor( (parseInt(data.carac.force.value) + parseInt(data.carac.agilite.value)) / 2); + data.carac.tir.value = Math.floor( (parseInt(data.carac.vue.value) + parseInt(data.carac.dexterite.value)) / 2); + data.carac.lancer.value = Math.floor( (parseInt(data.carac.tir.value) + parseInt(data.carac.force.value)) / 2); + + data.sante.vie.max = Math.ceil( parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value) /2 ); + let endurance = Math.max( parseInt(data.carac.taille.value) + parseInt(data.carac.constitution.value), parseInt(data.sante.vie.max) + parseInt(data.carac.volonte.value) ); + data.sante.endurance.max = endurance; + + data.attributs.sconst.value = 5; // Max ! + if ( data.carac.constitution.value < 9 ) + data.attributs.sconst.value = 2; + else if (data.carac.constitution.value < 12 ) + data.attributs.sconst.value = 3; + else if (data.carac.constitution.value < 15 ) + data.attributs.sconst.value = 4; + + data.attributs.sust.value = 4; // Max ! + if ( data.carac.constitution.value < 10 ) + data.attributs.sconst.value = 2; + else if (data.carac.constitution.value < 14 ) + data.attributs.sconst.value = 3; + } + + /* -------------------------------------------- */ + static findCompetence(compList, compName) { for (const item of compList) { @@ -12,6 +212,4 @@ export class RdDUtility { } } - } - diff --git a/module/simple.js b/module/simple.js index 390196c3..b4aa0686 100644 --- a/module/simple.js +++ b/module/simple.js @@ -5,17 +5,6 @@ */ /* -------------------------------------------- */ -const RDD = {} -RDD.level_category = { - "generale": "-4", - "particuliere": "-8", - "speciale": "-11", - "connaissance": "-11", - "draconic": "-11", - "melee": "-6", - "tir": "-8", - "lancer": "-8" -} /* -------------------------------------------- */ // Import Modules @@ -24,33 +13,16 @@ import { RdDItemSheet } from "./item-sheet.js"; import { RdDActorSheet } from "./actor-sheet.js"; import { RdDUtility } from "./rdd-utility.js"; -/* -------------------------------------------- */ -// Handlers management -const preloadHandlebarsTemplates = async function () { - const templatePaths = [ - //Character Sheets - 'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html', - //Items - 'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html', - 'systems/foundryvtt-reve-de-dragon/templates/competence-categorie.html', - 'systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html', - 'systems/foundryvtt-reve-de-dragon/templates/competence-base.html', - // Dialogs - 'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html' - ]; - - return loadTemplates(templatePaths); -} - /* -------------------------------------------- */ /* Foundry VTT Initialization */ /* -------------------------------------------- */ Hooks.once("init", async function() { console.log(`Initializing Reve de Dragon System`); - // preload handlebars templates - preloadHandlebarsTemplates(); + // preload handlebars templates + RdDUtility.preloadHandlebarsTemplates(); + /** * Set an initiative formula for the system * @type {String} @@ -62,7 +34,12 @@ Hooks.once("init", async function() { // Define custom Entity classes CONFIG.Actor.entityClass = RdDActor; - CONFIG.RDD = RDD; + CONFIG.RDD = {} + CONFIG.RDD.resolutionTable = RdDUtility.buildResolutionTable(); + CONFIG.RDD.level_category = RdDUtility.getLevelCategory(); + CONFIG.RDD.carac_array = RdDUtility.getCaracArray(); + CONFIG.RDD.bonusmalus = RdDUtility.getBonusMalus(); + game.data.RdDUtility = RdDUtility; // Register sheet application classes Actors.unregisterSheet("core", ActorSheet); diff --git a/styles/simple.css b/styles/simple.css index 485b976a..651a6208 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -1,146 +1,294 @@ -.foundryvtt-reve-de-dragon { - /* Sheet Tabs */ - /* Items List */ - /* Attributes */ + /* ==================== (A) GOUDY ==================== */ + @font-face { + font-family: "GoudyAcc"; + src: url('../fonts/goudyacc.ttf'); + } + + :root { + /* =================== 1. ACTOR SHEET FONT STYLES =========== */ + --window-header-title-font-family: GoudyAcc; + --window-header-title-font-size: 19px; + --window-header-title-font-weight: normal; + --window-header-title-color: #f5f5f5; + + --major-button-font-family: GoudyAcc; + --major-button-font-size: 20px; + --major-button-font-weight: normal; + --major-button-color: #dadada; + + --tab-header-font-family: GoudyAcc; + --tab-header-font-size: 16px; + --tab-header-font-weight: 700; + --tab-header-color: #403f3e; + --tab-header-color-active: #4a0404; + + --actor-input-font-family: GoudyAcc; + --actor-input-font-size: 14px; + --actor-input-font-weight: 500; + --actor-input-color: black; + + --actor-label-font-family: GoudyAcc; + --actor-label-font-size: 16px; + --actor-label-font-weight: 700; + --actor-label-color: #464331c4; + + /* =================== 2. DEBUGGING HIGHLIGHTERS ============ */ + --debug-background-color-red: #ff000054; + --debug-background-color-blue: #1d00ff54; + --debug-background-color-green: #54ff0054; + + --debug-box-shadow-red: inset 0 0 2px red; + --debug-box-shadow-blue: inset 0 0 2px blue; + --debug-box-shadow-green: inset 0 0 2px green; + } + +/*@import url("https://fonts.googleapis.com/css2?family=Martel:wght@400;800&family=Roboto:wght@300;400;500&display=swap");*/ +/* Global styles */ +.window-app { + font-family: "GoudyAcc", sans-serif; } -.foundryvtt-reve-de-dragon .window-content { - height: 100%; + +.rollable:hover, .rollable:focus { + color: #000; + text-shadow: 0 0 10px red; + cursor: pointer; +} + +.grid, +.grid-2col { + display: grid; + grid-column: span 2 / span 2; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 10px; + margin: 10px 0; + padding: 0; +} + +.grid-3col { + grid-column: span 3 / span 3; + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.grid-4col { + grid-column: span 4 / span 4; + grid-template-columns: repeat(4, minmax(0, 1fr)); +} + +.grid-5col { + grid-column: span 5 / span 5; + grid-template-columns: repeat(5, minmax(0, 1fr)); +} + +.grid-6col { + grid-column: span 5 / span 5; + grid-template-columns: repeat(5, minmax(0, 1fr)); +} + +.grid-7col { + grid-column: span 7 / span 7; + grid-template-columns: repeat(7, minmax(0, 1fr)); +} + +.grid-8col { + grid-column: span 8 / span 8; + grid-template-columns: repeat(8, minmax(0, 1fr)); +} + +.grid-9col { + grid-column: span 9 / span 9; + grid-template-columns: repeat(9, minmax(0, 1fr)); +} + +.grid-10col { + grid-column: span 10 / span 10; + grid-template-columns: repeat(10, minmax(0, 1fr)); +} + +.grid-11col { + grid-column: span 11 / span 11; + grid-template-columns: repeat(11, minmax(0, 1fr)); +} + +.grid-12col { + grid-column: span 12 / span 12; + grid-template-columns: repeat(12, minmax(0, 1fr)); +} + +.flex-group-center, +.flex-group-left, +.flex-group-right { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + text-align: center; padding: 5px; - overflow-y: hidden; + border: 1px solid #999; } + +.flex-group-left { + -webkit-box-pack: start; + -ms-flex-pack: start; + justify-content: flex-start; + text-align: left; +} + +.flex-group-right { + -webkit-box-pack: end; + -ms-flex-pack: end; + justify-content: flex-end; + text-align: right; +} + +.flex-center { + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + text-align: center; +} + +.flex-between { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; +} + +/* Styles limited to foundryvtt-reve-de-dragon sheets */ +.foundryvtt-reve-de-dragon .item-form { + font-family: "Roboto", sans-serif; +} + .foundryvtt-reve-de-dragon .sheet-header { - height: 100px; + -webkit-box-flex: 0; + -ms-flex: 0 0 210px; + flex: 0 0 210px; overflow: hidden; + display: -webkit-box; + display: -ms-flexbox; display: flex; + -webkit-box-orient: horizontal; + -webkit-box-direction: normal; + -ms-flex-direction: row; flex-direction: row; + -ms-flex-wrap: wrap; flex-wrap: wrap; + -webkit-box-pack: start; + -ms-flex-pack: start; justify-content: flex-start; margin-bottom: 10px; } + .foundryvtt-reve-de-dragon .sheet-header .profile-img { + -webkit-box-flex: 0; + -ms-flex: 0 0 100px; flex: 0 0 100px; height: 100px; margin-right: 10px; } + .foundryvtt-reve-de-dragon .sheet-header .header-fields { + -webkit-box-flex: 1; + -ms-flex: 1; flex: 1; - height: 100px; } + .foundryvtt-reve-de-dragon .sheet-header h1.charname { height: 50px; padding: 0px; margin: 5px 0; border-bottom: 0; } + .foundryvtt-reve-de-dragon .sheet-header h1.charname input { width: 100%; height: 100%; margin: 0; } -.foundryvtt-reve-de-dragon .resource { - width: 50%; - height: 40px; - margin-top: 10px; - float: left; - text-align: center; + +.foundryvtt-reve-de-dragon .sheet-tabs { + -webkit-box-flex: 0; + -ms-flex: 0; + flex: 0; } -.foundryvtt-reve-de-dragon .resource input { - width: 100px; - height: 28px; + +.foundryvtt-reve-de-dragon .sheet-body, +.foundryvtt-reve-de-dragon .sheet-body .tab, +.foundryvtt-reve-de-dragon .sheet-body .tab .editor { + height: 100%; } + +.foundryvtt-reve-de-dragon .tox .tox-editor-container { + background: #fff; +} + +.foundryvtt-reve-de-dragon .tox .tox-edit-area { + padding: 0 8px; +} + +.foundryvtt-reve-de-dragon .resource-label { + font-weight: bold; + text-transform: uppercase; +} + .foundryvtt-reve-de-dragon .tabs { height: 40px; border-top: 1px solid #AAA; border-bottom: 1px solid #AAA; } + .foundryvtt-reve-de-dragon .tabs .item { line-height: 40px; font-weight: bold; } + .foundryvtt-reve-de-dragon .tabs .item.active { text-decoration: underline; text-shadow: none; } -.foundryvtt-reve-de-dragon .sheet-body { - overflow: hidden; -} -.foundryvtt-reve-de-dragon .sheet-body .tab { - height: 100%; - overflow-y: auto; -} -.foundryvtt-reve-de-dragon .editor, -.foundryvtt-reve-de-dragon .editor-content { - height: 100%; -} -.foundryvtt-reve-de-dragon .item-list { + +.foundryvtt-reve-de-dragon .items-list { list-style: none; margin: 7px 0; padding: 0; overflow-y: auto; } -.foundryvtt-reve-de-dragon .item-list .item { + +.foundryvtt-reve-de-dragon .items-list .item-header { + font-weight: bold; +} + +.foundryvtt-reve-de-dragon .items-list .item { height: 30px; line-height: 24px; padding: 3px 0; border-bottom: 1px solid #BBB; } -.foundryvtt-reve-de-dragon .item-list .item img { + +.foundryvtt-reve-de-dragon .items-list .item .item-image { + -webkit-box-flex: 0; + -ms-flex: 0 0 24px; flex: 0 0 24px; margin-right: 5px; } -.foundryvtt-reve-de-dragon .item-list .item-name { - margin: 0; -} -.foundryvtt-reve-de-dragon .item-list .item-controls { - flex: 0 0 36px; -} -.foundryvtt-reve-de-dragon .attributes-header { - padding: 5px; - margin: 5px 0; - background: rgba(0, 0, 0, 0.05); - border: 1px solid #AAA; - border-radius: 2px; - text-align: center; - font-weight: bold; -} -.foundryvtt-reve-de-dragon .attributes-header .attribute-label { - flex: 1.5; -} -.foundryvtt-reve-de-dragon .attributes-header .attribute-control { - flex: 0 0 20px; -} -.foundryvtt-reve-de-dragon .attributes-list { - list-style: none; - margin: 0; - padding: 0; -} -.foundryvtt-reve-de-dragon .attributes-list li > * { - margin: 0 3px; - height: 28px; - line-height: 24px; - background: transparent; - border: none; - border-radius: 0; - border-bottom: 1px solid #AAA; -} -.foundryvtt-reve-de-dragon .attributes-list a.attribute-control { - flex: 0 0 20px; - text-align: center; - line-height: 28px; - border: none; -} -.foundryvtt-reve-de-dragon.sheet.actor { - min-width: 560px; - min-height: 420px; -} -.foundryvtt-reve-de-dragon.sheet.item { - min-width: 460px; - min-height: 400px; + +.foundryvtt-reve-de-dragon .items-list .item img { + display: block; } -//Editor -.editor { - border: $section-border; - height: 300px; - width: 100%; +.foundryvtt-reve-de-dragon .items-list .item-name { + margin: 0; } + +.foundryvtt-reve-de-dragon .items-list .item-controls { + -webkit-box-flex: 0; + -ms-flex: 0 0 86px; + flex: 0 0 86px; + text-align: right; +} + + diff --git a/system.json b/system.json index 8c370e57..010a36ae 100644 --- a/system.json +++ b/system.json @@ -2,10 +2,10 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "L'implémentation de Rêve de Dragon pour FoundryVTT", - "version": 0.2, + "version": 0.3, "minimumCoreVersion": "0.5.7", "compatibleCoreVersion": "0.5.7", - "templateVersion": 5, + "templateVersion": 6, "author": "LeRatierBretonnien", "esmodules": ["module/simple.js"], "styles": ["styles/simple.css"], diff --git a/template.json b/template.json index aaaec835..fbd516dc 100644 --- a/template.json +++ b/template.json @@ -5,7 +5,13 @@ "background": { "biographie": "Histoire personnelle...", "yeux": "", - "cheveux": "" + "cheveux": "", + "poids": "", + "heure": 0, + "sexe": "", + "age": 0, + "beaute": 10, + "main": "droitier" }, "common": { "carac": { @@ -13,85 +19,127 @@ "type": "number", "value": 10, "label": "Taille", - "xp": 0 + "xp": 0, + "derivee": false }, "apparence": { "type": "number", "value": 10, "label": "Apparence", - "xp": 0 + "xp": 0, + "derivee": false }, "constitution": { "type": "number", "value": 10, "label": "Constitution", - "xp": 0 + "xp": 0, + "derivee": false }, "force": { "type": "number", "value": 10, "label": "Force", - "xp": 0 + "xp": 0, + "derivee": false }, "agilite": { "type": "number", "value": 10, "label": "Agilité", - "xp": 0 + "xp": 0, + "derivee": false }, "dexterite": { "type": "number", "value": 10, "label": "Dexterité", - "xp": 0 + "xp": 0, + "derivee": false }, "vue": { "type": "number", "value": 10, "label": "Vue", - "xp": 0 + "xp": 0, + "derivee": false }, "ouie": { "type": "number", "value": 10, "label": "Ouïe", - "xp": 0 + "xp": 0, + "derivee": false }, "odoratgout": { "type": "number", "value": 10, "label": "Odorat-Goût", - "xp": 0 + "xp": 0, + "derivee": false }, "volonte": { "type": "number", "value": 10, "label": "Volonté", - "xp": 0 + "xp": 0, + "derivee": false }, "intellect": { "type": "number", "value": 10, "label": "Intellect", - "xp": 0 + "xp": 0, + "derivee": false }, "empathie": { "type": "number", "value": 10, "label": "Empathie", - "xp": 0 + "xp": 0, + "derivee": false }, "reve": { "type": "number", "value": 10, "label": "Rêve", - "xp": 0 + "xp": 0, + "derivee": false }, "chance": { "type": "number", "value": 10, "label": "Chance", - "xp": 0 + "xp": 0, + "derivee": false + }, + "melee": { + "type": "number", + "value": 10, + "label": "Mêlée", + "xp": 0, + "derivee": true + }, + "tir": { + "type": "number", + "value": 10, + "label": "Tir", + "xp": 0, + "derivee": true + }, + "lancer": { + "type": "number", + "value": 10, + "label": "Lancer", + "xp": 0, + "derivee": true + }, + "derobee": { + "type": "number", + "value": 10, + "label": "Dérobée", + "xp": 0, + "derivee": true } }, "sante": { @@ -99,19 +147,66 @@ "type": "number", "max": 10, "value": 10, - "label": "Points de Vie" + "label": "Points de Vie", + "derivee": true }, "endurance": { "type": "number", "max": 10, "value": 10, - "label": "Points d'Endurance" + "label": "Points d'Endurance", + "derivee": true }, "fatigue": { "type": "number", "max": 40, "value": 10, - "label": "Points de Fatigue" + "label": "Points de Fatigue", + "derivee": true + } + }, + "attributs": { + "sconst": { + "type": "number", + "value": 0, + "label": "S. Const", + "derivee": true + }, + "sust": { + "type": "number", + "value": 0, + "label": "Sustentation", + "derivee": true + }, + "plusdom": { + "type": "number", + "value": 0, + "label": "+dom", + "derivee": true + }, + "encombrement": { + "type": "number", + "value": 0, + "label": "Encombrement", + "derivee": true + } + "malusarmure": { + "type": "number", + "value": 0, + "label": "Malus Armure", + "derivee": true + } + }, + "argent": { + "deniers": { + "label": "Denier", + "value": 0, + "enc": 0 + }, + "sols": { + "label": "Sol", + "value": 0, + "enc": 0 } } } diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index b7a47e2d..6052501f 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -1,20 +1,18 @@ - + {{!-- Sheet Header --}}
-

-
- - / - +

+
+
+ /{{data.sante.vie.max}}
-
- - / - +
+ /{{data.sante.fatigue.max}}
+
@@ -31,23 +29,45 @@
{{!-- Carac Tab --}} -
-
- Nom - Valeur - XP -
-
    - {{#each data.carac as |carac key|}} -
  1. - {{carac.label}} - - -
  2. - {{/each}} -
+
+
+
+
+ Nom + Valeur + XP +
+
    + {{#each data.carac as |carac key|}} +
  1. + {{carac.label}} + {{#if carac.derivee}} + + {{else}} + + + {{/if}} +
  2. + {{/each}} +
+
+
+
+ Nom + Valeur +
+
    + {{#each data.attributs as |attr key|}} +
  1. + {{attr.label}} + +
  2. + {{/each}} +
+
+
- + {{!-- Compétences Tab --}}
@@ -59,7 +79,7 @@ {{#each data.competenceByCategory.generale as |comp key|}}
  • {{comp.name}} - +
  • {{/each}} diff --git a/templates/dialog-competence.html b/templates/dialog-competence.html new file mode 100644 index 00000000..fe28d3b9 --- /dev/null +++ b/templates/dialog-competence.html @@ -0,0 +1,67 @@ + +

    +
    + + +
    +
    + + +
    +
    + +
    +
    + +
    + + +