forked from public/foundryvtt-reve-de-dragon
Various fixes and update template
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user