diff --git a/fonts/goudyacc.ttf b/fonts/goudyacc.ttf
new file mode 100755
index 00000000..6672c4ef
Binary files /dev/null and b/fonts/goudyacc.ttf differ
diff --git a/module/actor-sheet.js b/module/actor-sheet.js
index a129a022..15c92bb3 100644
--- a/module/actor-sheet.js
+++ b/module/actor-sheet.js
@@ -93,7 +93,12 @@ export class RdDActorSheet extends ActorSheet {
let compName = event.currentTarget.text;
this.actor.rollCompetence( compName);
});
-
+ // On carac change
+ $(".competence-value").change((event) => {
+ 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 @@
-