Merge branch 'stabilisation-v1.2' into 'v1.2'
Stabilisation v1.2 See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!118
This commit is contained in:
commit
d72f6d563d
@ -49,8 +49,9 @@ export class RdDRollResolutionTable extends Dialog {
|
|||||||
title: titleTableDeResolution,
|
title: titleTableDeResolution,
|
||||||
content: html,
|
content: html,
|
||||||
buttons: {
|
buttons: {
|
||||||
'lancer': { label: 'Lancer les dés', callback: html => this.onAction(html) }
|
'lancer-fermer': { label: 'Lancer les dés et fermer', callback: html => this.onLancerFermer() }
|
||||||
}
|
},
|
||||||
|
default: 'lancer'
|
||||||
};
|
};
|
||||||
super(conf, { classes: ["rdddialog"], width: 800, height: 800, 'z-index': 99999 });
|
super(conf, { classes: ["rdddialog"], width: 800, height: 800, 'z-index': 99999 });
|
||||||
|
|
||||||
@ -58,7 +59,14 @@ export class RdDRollResolutionTable extends Dialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async onAction(html) {
|
async onLancer() {
|
||||||
|
await RdDResolutionTable.rollData(this.rollData);
|
||||||
|
console.log("RdDRollResolutionTable -=>", this.rollData, this.rollData.rolled);
|
||||||
|
await RdDResolutionTable.displayRollData(this.rollData);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
async onLancerFermer() {
|
||||||
await RdDResolutionTable.rollData(this.rollData);
|
await RdDResolutionTable.rollData(this.rollData);
|
||||||
console.log("RdDRollResolutionTable -=>", this.rollData, this.rollData.rolled);
|
console.log("RdDRollResolutionTable -=>", this.rollData, this.rollData.rolled);
|
||||||
await RdDResolutionTable.displayRollData(this.rollData);
|
await RdDResolutionTable.displayRollData(this.rollData);
|
||||||
@ -79,7 +87,9 @@ export class RdDRollResolutionTable extends Dialog {
|
|||||||
dialog.updateRollResult();
|
dialog.updateRollResult();
|
||||||
}
|
}
|
||||||
$(function () { onLoad();});
|
$(function () { onLoad();});
|
||||||
|
html.find('#lancer').click((event) => {
|
||||||
|
this.onLancer();
|
||||||
|
});
|
||||||
// Update !
|
// Update !
|
||||||
html.find('#diffLibre').change((event) => {
|
html.find('#diffLibre').change((event) => {
|
||||||
this.rollData.diffLibre = Misc.toInt(event.currentTarget.value);
|
this.rollData.diffLibre = Misc.toInt(event.currentTarget.value);
|
||||||
|
@ -663,11 +663,12 @@ export class RdDUtility {
|
|||||||
} else if (arme.name == "Draconic") {
|
} else if (arme.name == "Draconic") {
|
||||||
initOffset = 7;
|
initOffset = 7;
|
||||||
} else {
|
} else {
|
||||||
initOffset = 2; // Melée = 3.XX
|
initOffset = 3; // Melée = 3.XX
|
||||||
let competence = RdDItemCompetence.findCompetence(combatant.actor.data.items, arme.data.competence);
|
let competence = RdDItemCompetence.findCompetence(combatant.actor.data.items, arme.data.competence);
|
||||||
compNiveau = competence.data.niveau;
|
compNiveau = competence.data.niveau;
|
||||||
|
|
||||||
if (actor.data.type == 'creature' || actor.data.type == 'entite') {
|
if (actor.data.type == 'creature' || actor.data.type == 'entite') {
|
||||||
|
initOffset = 3; // Melée = 3.XX
|
||||||
caracForInit = competence.data.carac_value;
|
caracForInit = competence.data.carac_value;
|
||||||
} else {
|
} else {
|
||||||
caracForInit = actor.data.data.carac[competence.data.defaut_carac].value;
|
caracForInit = actor.data.data.carac[competence.data.defaut_carac].value;
|
||||||
|
@ -507,6 +507,11 @@ section.sheet-body:after {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
}
|
}
|
||||||
|
.select-diff {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: left;
|
||||||
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
#vie-plus, #vie-moins, #endurance-plus, #endurance-moins, #fatigue-plus, #fatigue-moins, #ptreve-actuel-plus, #ptreve-actuel-moins, .monnaie-plus, .monnaie-moins {
|
#vie-plus, #vie-moins, #endurance-plus, #endurance-moins, #fatigue-plus, #fatigue-moins, #ptreve-actuel-plus, #ptreve-actuel-moins, .monnaie-plus, .monnaie-moins {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
<form class="resolution-roll-dialog">
|
<form class="resolution-roll-dialog">
|
||||||
<div class="form-group">
|
<div class="flexrow flex-group-left">
|
||||||
<label for="categorie">Caractéristique </label>
|
<label for="categorie">Caractéristique</label>
|
||||||
<select name="carac" id="carac" data-dtype="String">
|
<select name="carac" id="carac" class="select-diff" data-dtype="String">
|
||||||
{{#select carac}}
|
{{#select carac}}
|
||||||
{{#each carac as |caracitem key|}}
|
{{#each carac as |caracitem key|}}
|
||||||
<option value={{key}}>{{caracitem.label}}</option>
|
<option value={{key}}>{{caracitem.label}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<label></label>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="categorie">Difficulté libre</label>
|
<label for="categorie">Difficulté libre</label>
|
||||||
<select name="diffLibre" id="diffLibre" data-dtype="number">
|
<select name="diffLibre" id="diffLibre" class="select-diff" data-dtype="number">
|
||||||
{{#select diffLibre}}
|
{{#select diffLibre}}
|
||||||
{{#each difficultesLibres as |key|}}
|
{{#each difficultesLibres as |key|}}
|
||||||
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
|
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
|
||||||
@ -20,13 +17,15 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
<label for="categorie"> Conditions</label>
|
<label for="categorie"> Conditions</label>
|
||||||
<select name="diffConditions" id="diffConditions" data-dtype="number">
|
<select name="diffConditions" id="diffConditions" class="select-diff" data-dtype="number">
|
||||||
{{#select diffConditions}}
|
{{#select diffConditions}}
|
||||||
{{#each ajustementsConditions as |key|}}
|
{{#each ajustementsConditions as |key|}}
|
||||||
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
|
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
|
<span class="flex-between"></span>
|
||||||
|
<button id="lancer" type="button">Lancer les dés</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="tableResolution">
|
<div id="tableResolution">
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user