v10.2.5 #577

Merged
uberwald merged 5 commits from VincentVk/foundryvtt-reve-de-dragon:v10 into v10 2022-11-19 16:47:18 +01:00
5 changed files with 20 additions and 1 deletions
Showing only changes of commit 3362f2473a - Show all commits

View File

@ -2471,7 +2471,10 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
async rollCarac(caracName) {
let rollData = { selectedCarac: this.getCaracByName(caracName) };
let rollData = {
selectedCarac: this.getCaracByName(caracName),
competences: this.itemTypes['competence']
};
const dialog = await RdDRoll.create(this, rollData,
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html' },

View File

@ -217,6 +217,11 @@ export class RdDRoll extends Dialog {
this.updateRollResult();
$("#diffLibre").val(this.rollData.diffLibre);
});
html.find('.roll-carac-competence').change((event) => {
const competence = event.currentTarget.value;
this.rollData.competence = this.rollData.competences.find(it => it.name == competence);
this.updateRollResult();
});
html.find('.roll-signedraconique').change((event) => {
let sortKey = Misc.toInt(event.currentTarget.value);
this.setSelectedSigneDraconique(this.rollData.signes[sortKey]);

View File

@ -222,6 +222,7 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-forcer.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-competences.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html',
// Dialogs

View File

@ -5,7 +5,9 @@
<div class="flex-group-left">
<div class="flexrow">
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-competences.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}}
</div>
<div class="flex-group-left">
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}

View File

@ -0,0 +1,8 @@
<div class="form-group">
<label for="roll-carac-competence">Compétence</label>
<select name="roll-carac-competence" class="roll-carac-competence" data-dtype="String">
{{#select ''}}<option value="">Sans compétence</option>
{{>"systems/foundryvtt-reve-de-dragon/templates/enum-competence.html"}}
{{/select}}
</select>
</div>