diff --git a/RdD.geany b/RdD.geany index e219c52c..3ffe9624 100644 --- a/RdD.geany +++ b/RdD.geany @@ -28,19 +28,17 @@ long_line_column=72 [files] current_page=4 -FILE_NAME_0=5110;JSON;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplate.json;0;2 -FILE_NAME_1=332;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor-sheet.js;0;2 -FILE_NAME_2=1730;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fdialog-competence.html;0;2 -FILE_NAME_3=1479;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor.js;0;2 -FILE_NAME_4=2451;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Factor-sheet.html;0;2 -FILE_NAME_5=6844;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Frdd-utility.js;0;2 +FILE_NAME_0=6135;JSON;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplate.json;0;2 +FILE_NAME_1=1602;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor-sheet.js;0;2 +FILE_NAME_2=1792;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fdialog-competence.html;0;2 +FILE_NAME_3=4217;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Factor.js;0;2 +FILE_NAME_4=405;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Factor-sheet.html;0;2 +FILE_NAME_5=12392;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Frdd-utility.js;0;2 FILE_NAME_6=335;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Ftemplates%2Fitem-competence-sheet.html;0;2 FILE_NAME_7=985;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fmodule%2Fsimple.js;0;2 FILE_NAME_8=28185;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2FWFRP-4th-Edition-FoundryVTT_SLADECRAVEN%2Fscripts%2Fdice-wfrp4e.js;0;2 FILE_NAME_9=674;HTML;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2FWFRP-4th-Edition-FoundryVTT_SLADECRAVEN%2Ftemplates%2Fchat%2Fskill-dialog.html;0;2 -FILE_NAME_10=5952;CSS;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fstyles%2Fsimple.css;0;2 -FILE_NAME_11=2003;Javascript;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2FWFRP-4th-Edition-FoundryVTT_SLADECRAVEN%2Fscripts%2Factor%2Factor-wfrp4e.js;0;2 -FILE_NAME_12=105669;CSS;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2FWFRP-4th-Edition-FoundryVTT_SLADECRAVEN%2Fcss%2Fwfrp4e.css;0;2 +FILE_NAME_10=6826;CSS;0;EUTF-8;0;1;0;%2Fhome%2Fsigmar%2Fwork%2Ffoundryvtt%2Ffoundryvtt-reve-de-dragon%2Fstyles%2Fsimple.css;0;2 [VTE] last_dir=/home/sigmar diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 7486cace..f08f9dc9 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -54,7 +54,7 @@ export class RdDActorSheet extends ActorSheet { list.push(item); } } - data.data.fatigueHTML = "
| | | | \
| | | | | \
@@ -247,6 +248,8 @@ export class RdDUtility {
max = (max < 16) ? 16 : max;
max = (max > 30) ? 30 : max;
value = (value > max) ? max : value;
+ value = (value < 0) ? 0 : value;
+
let fatigueTab = fatigueMatrix[max];
let idx = 0; // Current fatigue slot
let remFatigue = value;
@@ -257,23 +260,30 @@ export class RdDUtility {
// At this point, we have the segment id in idx and the remaing fatigue points for the next segment in remFatigue
let table = $(" | " + fatigueLineMalus[line] + " | ");
while (segmentIdx < segmentsPerLine) {
let freeSize = fatigueTab[segmentIdx];
for (let col=0; col <5; col++) {
- if ( col < freeSize )
- row.append("");
- else
+ if ( col < freeSize ) {
+ if (fatigueCount < value )
+ row.append(" | ");
+ else
+ row.append(" | ");
+ fatigueCount++;
+ } else {
row.append(" | ");
+ }
}
row.append(" | ");
segmentIdx = segmentIdx + 1;
}
table.append(row);
}
- console.log("fatigue", table);
+ //console.log("fatigue", table);
return table;
}
diff --git a/styles/simple.css b/styles/simple.css
index b2227c5e..c51c65a8 100644
--- a/styles/simple.css
+++ b/styles/simple.css
@@ -321,8 +321,12 @@ button {
}
.table-fatigue td {
table-layout: fixed;
- width: 8px;
- height: 8px;
+ width: 4px;
+ height: 4px;
+}
+.table-fatigue .fatigue-used {
+ background-color: DarkRed;
+ border: 1px solid #999;
}
.table-fatigue .fatigue-none {
background-color: black;
@@ -331,4 +335,9 @@ button {
.table-fatigue .fatigue-free {
border: 1px solid #999;
}
-
+.table-fatigue .fatigue-malus {
+ font-size:8px;
+}
+ .flex-fatigue {
+ flex-grow: 2;
+}
diff --git a/template.json b/template.json
index 8beeedfd..659b7e77 100644
--- a/template.json
+++ b/template.json
@@ -144,7 +144,7 @@
},
"sante": {
"vie": {
- "type": "number",
+ "type": "number",
"max": 10,
"value": 10,
"label": "Vie",
@@ -163,7 +163,9 @@
"value": 0,
"label": "Fatigue",
"derivee": true
- },
+ }
+ },
+ "blessures":
"legeres": {
"nombre": 0,
"liste": [ { "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" },
@@ -180,10 +182,6 @@
"critiques": {
"nombre": 0,
"liste": [ { "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ]
- },
- "ethylisme": {
- "value": 0,
- "label": ""
}
},
"attributs": {
@@ -221,30 +219,49 @@
"compteurs": {
"reve": {
"max": 0,
- "value": 0
+ "value": 0,
+ "label": "Points de Rêve"
},
"sust": {
- "value": 0
+ "value": 0,
+ "label": "Sust."
},
"eau": {
- "value": 0
+ "value": 0,
+ "label": "Eau"
},
"moral": {
"value": 0,
- "exaltation": 0,
- "dissolution": 0
+ "label": "Moral"
+ },
+ "exaltation": {
+ "value": 0,
+ "label": "Exaltation"
+ },
+ "dissolution": {
+ "value": 0,
+ "label": "Dissolution"
},
"chance": {
"value": 0,
- "destinee": 0
+ "label": "Chance"
+ },
+ "destinee": {
+ "value": 0,
+ "label": "Destinée"
},
"stress": {
- "value": 0
+ "value": 0,
+ "label": "Stress"
},
"etat": {
"value": 0,
- "label": ""
- }
+ "label": "Etat général"
+ },
+ "ethylisme": {
+ "value": 0,
+ "label": "Ethylisme"
+ }
},
"argent": {
"deniers": {
diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html
index bb9ef98e..5610b85d 100644
--- a/templates/actor-sheet.html
+++ b/templates/actor-sheet.html
@@ -5,17 +5,17 @@
|
-
+
-
@@ -61,7 +61,7 @@
{{/each}}
{{#each data.sante as |point key|}}
|
---|