Gestion des signes draconiques #455

Closed
vincent.vandeme wants to merge 233 commits from v1.4-signes-draconiques into master
2 changed files with 47 additions and 53 deletions
Showing only changes of commit b663560b53 - Show all commits

View File

@ -2335,16 +2335,20 @@ export class RdDActor extends Actor {
console.log("rollArt !!!", artData); console.log("rollArt !!!", artData);
const dialog = await RdDRoll.create(this, artData, { html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${artData.art}.html` }, { const dialog = await RdDRoll.create(this, artData,
name: `jet-${artData.art}`, {
label: `${artData.verbe} ${oeuvre.name}`, html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${oeuvre.type}.html`,
height: 600, options: { height: 500, }
callbacks: [ },
this.createCallbackExperience(), {
this.createCallbackAppelAuMoral(), name: `jet-${artData.art}`,
{ action: r => callBackResult(r) } label: `${artData.verbe} ${oeuvre.name}`,
] callbacks: [
}); this.createCallbackExperience(),
this.createCallbackAppelAuMoral(),
{ action: r => callBackResult(r) }
]
});
dialog.render(true); dialog.render(true);
} }
@ -2396,13 +2400,13 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollRecetteCuisine(id) { async rollRecetteCuisine(id) {
const oeuvre = Misc.data(this.getRecetteCuisine(id));
const artData = { const artData = {
art: 'cuisine', art: 'cuisine',
verbe: 'Cuisiner', verbe: 'Cuisiner',
proportions: 1, proportions: 1,
ajouterEquipement: false ajouterEquipement: false
}; };
const oeuvre = Misc.data(this.getRecetteCuisine(id));
await this._rollArt(artData, 'odoratgout', oeuvre, r => this._resultRecetteCuisine(r)); await this._rollArt(artData, 'odoratgout', oeuvre, r => this._resultRecetteCuisine(r));
} }

View File

@ -1,54 +1,44 @@
<form class="rdddialog"> <form class="rdddialog">
<h2 class="tooltip" style="width: 100%;">Cuisiner: {{oeuvre.name}}
<div class="tooltiptext ttt-titre">
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}}
</div>
</h2>
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left"> <div class="flex-group-left">
<ul> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}" />
<li><label>Cuisiner : {{oeuvre.name}}</label></li> <div>
<li><label>Jet : ODORAT-GOUT / {{competence.name}}</label></li> <div class="flexrow">
<li><label>Exotisme : {{oeuvre.data.exotisme}}</label></li> <label>Caractéristique: </label><label>{{selectedCarac.label}}</label>
</ul> </div>
<div class="flexrow">
<label>{{competence.name}}: </label><label>{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
</div>
<div class="flexrow">
<label>Exotisme: </label><label>{{oeuvre.data.exotisme}}</label>
</div>
<div class="flexrow">
<label for="proportions">Proportions: </label>
<input class="cuisine-proportions" type="number" size="4" name="proportions" value="{{proportions}}" data-dtype="Number" />
</div>
<div class="flexrow">
<label for="ajouterEquipement">Ajouter à l'équipement</label>
<input class="checkbox-by-name" type="checkbox" name="ajouterEquipement" {{#if ajouterEquipement}}checked{{/if}} />
</div>
</div>
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">
<div class="flexrow"> <div class="flexrow">
<label class="competence-label">Multiplier les proportions</label> <label>Difficulté</label>
<input class="competence-value cuisine-proportions" type="number" size="4" name="proportions" value="{{proportions}}" data-dtype="Number" /> <label>{{numberFormat diffLibre decimals=0 sign=true}}</label>
</div>
<div class="flexrow">
<label class="competence-label">Ajouter à l'équipement</label>
<input class="checkbox-by-name" type="checkbox" name="ajouterEquipement" {{#if ajouterEquipement}}checked{{/if}} />
</div> </div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}}
<div id="tableAjustements" class="flexrow"></div>
</div> </div>
</div> </div>
<div class="grid grid-3col">
<div class="flex-group-left">
<label>Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number">
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="flex-group-left">
<label>Difficulté</label>
<select name="diffLibre" id="diffLibre" data-dtype="number">
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="flex-group-right flexrow">
<div class="tooltipAppelAuMoral divAppelAuMoral">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span>
</div>
</div>
</div>
<div id="tableAjustements">
</div>
<div id="tableResolution"></div> <div id="tableResolution"></div>
<div id="tableProbaReussite"></div> <div id="tableProbaReussite"></div>
</form> </form>