Fix ethylisme
This commit is contained in:
parent
85724e8f14
commit
ef2cb49542
@ -679,8 +679,9 @@ export class RdDActor extends Actor {
|
|||||||
state = state - (data.sante.vie.max - data.sante.vie.value);
|
state = state - (data.sante.vie.max - data.sante.vie.value);
|
||||||
if (data.sante.fatigue) // Creatures n'ont pas de fatigue
|
if (data.sante.fatigue) // Creatures n'ont pas de fatigue
|
||||||
state = state + RdDUtility.currentFatigueMalus(data.sante.fatigue.value, data.sante.endurance.max);
|
state = state + RdDUtility.currentFatigueMalus(data.sante.fatigue.value, data.sante.endurance.max);
|
||||||
if (data.compteurs && data.compteurs.ethylisme) // Ajout de l'éthylisme
|
if (data.compteurs && data.compteurs.ethylisme && data.compteurs.ethylisme.value < 0 ) { // Ajout de l'éthylisme
|
||||||
state = state + data.compteurs.ethylisme.value;
|
state = state + data.compteurs.ethylisme.value;
|
||||||
|
}
|
||||||
state = state;
|
state = state;
|
||||||
data.compteurs.etat.value = state;
|
data.compteurs.etat.value = state;
|
||||||
if ( data.compteurs && data.compteurs.surenc) {
|
if ( data.compteurs && data.compteurs.surenc) {
|
||||||
|
@ -19,7 +19,7 @@ export class RdDRollDialogEthylisme extends Dialog {
|
|||||||
let dialogOptions = { classes: ["rdddialog"], width: 400, height: 400, 'z-index': 99999 }
|
let dialogOptions = { classes: ["rdddialog"], width: 400, height: 400, 'z-index': 99999 }
|
||||||
super(dialogConf, dialogOptions)
|
super(dialogConf, dialogOptions)
|
||||||
|
|
||||||
console.log("ETH", rollData);
|
//console.log("ETH", rollData);
|
||||||
this.rollData = rollData;
|
this.rollData = rollData;
|
||||||
this.actor = actor;
|
this.actor = actor;
|
||||||
}
|
}
|
||||||
|
@ -171,6 +171,7 @@ export class RdDUtility {
|
|||||||
'systems/foundryvtt-reve-de-dragon/templates/arme-competence.html',
|
'systems/foundryvtt-reve-de-dragon/templates/arme-competence.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/sort-draconic.html',
|
'systems/foundryvtt-reve-de-dragon/templates/sort-draconic.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html',
|
'systems/foundryvtt-reve-de-dragon/templates/sort-tmr.html',
|
||||||
|
'systems/foundryvtt-reve-de-dragon/templates/niveau-ethylisme.html',
|
||||||
// Dialogs
|
// Dialogs
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html',
|
'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html',
|
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html',
|
||||||
|
@ -498,7 +498,7 @@
|
|||||||
"label": "Sur-encombrement"
|
"label": "Sur-encombrement"
|
||||||
},
|
},
|
||||||
"ethylisme": {
|
"ethylisme": {
|
||||||
"value": 0,
|
"value": 1,
|
||||||
"label": "Ethylisme",
|
"label": "Ethylisme",
|
||||||
"isInput": true,
|
"isInput": true,
|
||||||
"nb_doses": 0
|
"nb_doses": 0
|
||||||
|
@ -146,7 +146,15 @@
|
|||||||
{{else if compteur.isInput}}
|
{{else if compteur.isInput}}
|
||||||
<li class="competence flexrow list-item">
|
<li class="competence flexrow list-item">
|
||||||
<span class="generic-label">{{compteur.label}}</span>
|
<span class="generic-label">{{compteur.label}}</span>
|
||||||
|
{{#if (eq compteur.label 'Ethylisme')}}
|
||||||
|
<select name="data.compteurs.ethylisme.value" id="ethylisme" data-dtype="Number">
|
||||||
|
{{#select compteur.value}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/niveau-ethylisme.html"}}
|
||||||
|
{{/select}}
|
||||||
|
</select>
|
||||||
|
{{else}}
|
||||||
<input class="compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/>
|
<input class="compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/>
|
||||||
|
{{/if}}
|
||||||
<span>
|
<span>
|
||||||
{{#if compteur.isStress}}
|
{{#if compteur.isStress}}
|
||||||
<a class="item-control stress-test" id="stress-test" title="Transformer">Transformer</a>
|
<a class="item-control stress-test" id="stress-test" title="Transformer">Transformer</a>
|
||||||
|
9
templates/niveau-ethylisme.html
Normal file
9
templates/niveau-ethylisme.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<option value="1">Aucun</option>
|
||||||
|
<option value="0">Eméché</option>
|
||||||
|
<option value="-1">Gris</option>
|
||||||
|
<option value="-2">Pinté</option>
|
||||||
|
<option value="-3">Pas Frais</option>
|
||||||
|
<option value="-4">Ivre</option>
|
||||||
|
<option value="-5">Bu</option>
|
||||||
|
<option value="-6">Complètement fait</option>
|
||||||
|
<option value="-7">Ivre mort</option>
|
Loading…
Reference in New Issue
Block a user