v10.2.5 #577
@ -2471,7 +2471,10 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async rollCarac(caracName) {
|
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,
|
const dialog = await RdDRoll.create(this, rollData,
|
||||||
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html' },
|
{ html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html' },
|
||||||
|
@ -217,6 +217,11 @@ export class RdDRoll extends Dialog {
|
|||||||
this.updateRollResult();
|
this.updateRollResult();
|
||||||
$("#diffLibre").val(this.rollData.diffLibre);
|
$("#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) => {
|
html.find('.roll-signedraconique').change((event) => {
|
||||||
let sortKey = Misc.toInt(event.currentTarget.value);
|
let sortKey = Misc.toInt(event.currentTarget.value);
|
||||||
this.setSelectedSigneDraconique(this.rollData.signes[sortKey]);
|
this.setSelectedSigneDraconique(this.rollData.signes[sortKey]);
|
||||||
|
@ -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-enctotal.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.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-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-select-carac.html',
|
||||||
'systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html',
|
'systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html',
|
||||||
// Dialogs
|
// Dialogs
|
||||||
|
@ -5,7 +5,9 @@
|
|||||||
<div class="flex-group-left">
|
<div class="flex-group-left">
|
||||||
<div class="flexrow">
|
<div class="flexrow">
|
||||||
</div>
|
</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-surenc.html"}}
|
||||||
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-group-left">
|
<div class="flex-group-left">
|
||||||
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}
|
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}
|
||||||
|
8
templates/partial-roll-competences.html
Normal file
8
templates/partial-roll-competences.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user