Various fixes and update template

This commit is contained in:
LeRatierBretonnien 2020-05-27 21:57:00 +02:00
parent bb4bd19f4e
commit a6b46cb4ad
3 changed files with 60 additions and 4 deletions

View File

@ -184,14 +184,19 @@ export class RdDUtility {
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 );
data.sante.vie.value = data.sante.vie.max;
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.sante.endurance.value = endurance;
data.sante.fatigue.max = endurance;
data.sante.fatigue.value = endurance;
data.attributs.sconst.value = 5; // Max !
if ( data.carac.constitution.value < 9 )
@ -202,10 +207,10 @@ export class RdDUtility {
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;
if ( data.carac.taille.value < 10 )
data.attributs.sust.value = 2;
else if (data.carac.taille.value < 14 )
data.attributs.sust.value = 3;
}
/* -------------------------------------------- */

View File

@ -163,6 +163,27 @@
"value": 10,
"label": "Points de Fatigue",
"derivee": true
},
"legeres": {
"nombre": 0,
"liste": [ { "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" },
{ "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" },
{ "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" },
{ "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" },
{ "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ]
},
"graves": {
"nombre": 0,
"liste": [ { "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" },
{ "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ]
},
"critiques": {
"nombre": 0,
"liste": [ { "premiers_soins": 0, "soins_complets": 0, "jours": 0, "localisation": "" } ]
},
"ethylisme": {
"value": 0,
"label": ""
}
},
"attributs": {
@ -197,6 +218,34 @@
"derivee": true
}
},
"compteurs": {
"reve": {
"max": 0,
"value": 0
},
"sust": {
"value": 0
},
"eau": {
"value": 0
},
"moral": {
"value": 0,
"exaltation": 0,
"dissolution": 0
},
"chance": {
"value": 0,
"destinee": 0
},
"stress": {
"value": 0
},
"etat": {
"value": 0,
"label": ""
}
},
"argent": {
"deniers": {
"label": "Denier",

View File

@ -7,9 +7,11 @@
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Name"/></h1>
<div class="grid grid-2col">
<div class="flex-group-center">
Vie
<input class="resource-content flexrow flex-center flex-between" type="text" name="data.sante.vie.value" value="{{data.sante.vie.value}}" data-dtype="Number"/>/{{data.sante.vie.max}}
</div>
<div class="flex-group-center">
Endurance
<input class="resource-content flexrow flex-center flex-between" type="text" name="data.sante.fatigue.value" value="{{data.sante.fatigue.value}}" data-dtype="Number"/>/{{data.sante.fatigue.max}}
</div>
</div>