Gestion des signes draconiques #455

Closed
vincent.vandeme wants to merge 233 commits from v1.4-signes-draconiques into master
22 changed files with 240 additions and 277 deletions
Showing only changes of commit 226319b067 - Show all commits

View File

@ -2315,15 +2315,17 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async _rollArt(artData, selected, oeuvre, callBackResult = r => this._resultArt(r)) { async _rollArt(artData, selected, oeuvre, callBackResult = r => this._resultArt(r)) {
const actorData = Misc.data(this); const actorData = Misc.data(this);
mergeObject(artData, { mergeObject(artData,
oeuvre: oeuvre, {
art: oeuvre.type, oeuvre: oeuvre,
competence: Misc.data(this.getCompetence(oeuvre.data.competence ?? artData.art)), art: oeuvre.type,
diffLibre: - (oeuvre.data.niveau ?? 0), competence: duplicate(Misc.data(this.getCompetence(oeuvre.data.competence ?? artData.art))),
diffConditions: 0, diffLibre: - (oeuvre.data.niveau ?? 0),
use: { libre: false, conditions: true }, diffConditions: 0,
selectedCarac: duplicate(actorData.data.carac[selected]) use: { libre: false, conditions: true },
}); selectedCarac: duplicate(actorData.data.carac[selected])
},
{ overwrite: false });
artData.competence.data.defaut_carac = selected; artData.competence.data.defaut_carac = selected;
if (!artData.forceCarac) { if (!artData.forceCarac) {
artData.forceCarac = {}; artData.forceCarac = {};
@ -2366,13 +2368,13 @@ export class RdDActor extends Actor {
const actorData = Misc.data(this); const actorData = Misc.data(this);
const artData = { art: 'danse', verbe: 'Danser', forceCarac: {} }; const artData = { art: 'danse', verbe: 'Danser', forceCarac: {} };
const oeuvre = duplicate(this.getItemOfType(id, artData.art)); const oeuvre = duplicate(this.getItemOfType(id, artData.art));
const selectedCarac = this._getCaracDanse(oeuvre);
if (oeuvre.data.agilite) { if (oeuvre.data.agilite) {
artData.forceCarac['agilite'] = duplicate(actorData.data.carac.agilite); artData.forceCarac['agilite'] = duplicate(actorData.data.carac.agilite);
} }
if (oeuvre.data.apparence) { if (oeuvre.data.apparence) {
artData.forceCarac['apparence'] = duplicate(actorData.data.carac.apparence); artData.forceCarac['apparence'] = duplicate(actorData.data.carac.apparence);
} }
const selectedCarac = this._getCaracDanse(oeuvre);
await this._rollArt(artData, selectedCarac, oeuvre); await this._rollArt(artData, selectedCarac, oeuvre);
} }
@ -2434,12 +2436,21 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollJeu(id) { async rollJeu(id) {
const actorData = Misc.data(this);
const oeuvre = Misc.data(this.getJeu(id));
const listCarac = oeuvre.data.caraccomp.toLowerCase().split(/[.,:\/-]/).map(it => it.trim());
const carac = listCarac.length > 0 ? listCarac[0] : 'chance'
const artData = { const artData = {
art: 'jeu', verbe: 'Jeu', art: 'jeu', verbe: 'Jeu',
use: { libre: true, conditions: true, }, use: { libre: true, conditions: true, },
competence: duplicate(Misc.data(this.getCompetence('jeu'))),
forceCarac: {}
}; };
const oeuvre = duplicate(this.getJeu(id)); listCarac.forEach(c => artData.forceCarac[c] = actorData.data.carac[c]);
await this._rollArt(artData, oeuvre.data?.caraccomp.toLowerCase() ?? 'chance', oeuvre); artData.competence.data.niveauReel = artData.competence.data.niveau;
artData.competence.data.niveau = Math.max(artData.competence.data.niveau, oeuvre.data.base);
await this._rollArt(artData, carac, oeuvre);
} }
async rollOeuvre(id) { async rollOeuvre(id) {
@ -2597,9 +2608,8 @@ export class RdDActor extends Actor {
let xpComp = 0; let xpComp = 0;
if (competence) { if (competence) {
xpComp = xp - xpCarac; xpComp = xp - xpCarac;
competence = duplicate(competence); let update = { _id: competence.id, 'data.xp': Misc.toInt(competence.data.xp) + xpComp };
competence.data.xp = Misc.toInt(competence.data.xp) + xpComp; await this.updateEmbeddedDocuments('Item', [update]);
await this.updateEmbeddedDocuments('Item', [competence]);
} else { } else {
xpCarac = Math.max(xpCarac, 1); xpCarac = Math.max(xpCarac, 1);
} }
@ -3202,24 +3212,33 @@ export class RdDActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async effectuerTacheAlchimie(recetteId, alchimieName, alchimieData) { async effectuerTacheAlchimie(recetteId, tacheAlchimie, texteTache) {
let recette = this.getItemOfType(recetteId, 'recettealchimique'); let recetteData = Misc.data(this.getItemOfType(recetteId, 'recettealchimique'));
const actorData = Misc.data(this); const actorData = Misc.data(this);
if (recette) { if (recetteData) {
let competence = Misc.data(this.getCompetence("alchimie")); if (tacheAlchimie != "couleur" && tacheAlchimie != "consistance") {
let diffAlchimie = RdDAlchimie.getDifficulte(alchimieData); ui.notifications.warn(`L'étape alchimique ${tacheAlchimie} - ${texteTache} est inconnue`);
return;
}
const sansCristal = tacheAlchimie == "couleur" && this.data.items.filter(it => it.isCristalAlchimique()).length == 0;
const caracTache = RdDAlchimie.getCaracTache(tacheAlchimie);
const alchimieData = Misc.data(this.getCompetence("alchimie"));
let rollData = { let rollData = {
recette: recette, recette: recetteData,
competence: competence, carac: { [caracTache]: actorData.data.carac[caracTache] },
diffLibre: diffAlchimie // Per default at startup selectedCarac: actorData.data.carac[caracTache],
} competence: alchimieData,
if (alchimieName == "couleur") { diffLibre: RdDAlchimie.getDifficulte(texteTache),
rollData.selectedCarac = actorData.data.carac.vue, diffConditions: sansCristal ? -4 : 0,
rollData.alchimieTexte = `Couleurs ${alchimieData} (${diffAlchimie}) (Malus de -4 si vous ne possédez pas de Cristal Alchimique)`; alchimie: {
} else { tache: Misc.upperFirst(tacheAlchimie),
rollData.selectedCarac = actorData.data.carac.dexterite, texte: texteTache,
rollData.alchimieTexte = `Consistances ${alchimieData} (${diffAlchimie})`; sansCristal: sansCristal
}
} }
rollData.competence.data.defaut_carac = caracTache;
const dialog = await RdDRoll.create(this, rollData, const dialog = await RdDRoll.create(this, rollData,
{ {
@ -3239,6 +3258,10 @@ export class RdDActor extends Actor {
} }
} }
isCristalAlchimique(it) {
return it.type == 'objet' && Grammar.toLowerCaseNoAccent(it.name) == 'cristal alchimique' && it.data.quantite > 0;
}
/* -------------------------------------------- */ /* -------------------------------------------- */
_alchimieResult(rollData) { _alchimieResult(rollData) {
RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-alchimie.html'); RdDResolutionTable.displayRollData(rollData, this, 'chat-resultat-alchimie.html');

View File

@ -33,6 +33,12 @@ export class RdDItem extends Item {
isEquipement() { isEquipement() {
return RdDItem.getTypeObjetsEquipement().includes(Misc.data(this).type); return RdDItem.getTypeObjetsEquipement().includes(Misc.data(this).type);
} }
isCristalAlchimique() {
const itemData = Misc.data(this);
return itemData.type == 'objet' && Grammar.toLowerCaseNoAccent(itemData.name) == 'cristal alchimique' && itemData.data.quantite > 0;
}
getEnc() { getEnc() {
const itemData = Misc.data(this); const itemData = Misc.data(this);

View File

@ -53,4 +53,13 @@ export class RdDAlchimie {
} }
return Math.min(0, -composantes); return Math.min(0, -composantes);
} }
static getCaracTache(tache) {
switch (tache) {
case "consistance": return 'dexterite';
case "couleur": return 'vue';
}
return 'intellect';
}
} }

View File

@ -285,7 +285,7 @@ export class RdDRoll extends Dialog {
HtmlUtility._showControlWhen($("#ajust-astrologique"), RdDResolutionTable.isAjustementAstrologique(rollData)); HtmlUtility._showControlWhen($("#ajust-astrologique"), RdDResolutionTable.isAjustementAstrologique(rollData));
// Mise à jour valeurs // Mise à jour valeurs
$("#compdialogTitle").text(this._getTitle(rollData)); $(".dialog-roll-title").text(this._getTitle(rollData));
$('#coupsNonMortels').prop('checked', rollData.coupsNonMortels); $('#coupsNonMortels').prop('checked', rollData.coupsNonMortels);
$(".dmg-arme-actor").text(dmgText); $(".dmg-arme-actor").text(dmgText);
$('.table-ajustement').remove(); $('.table-ajustement').remove();
@ -299,7 +299,7 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
async buildAjustements(rollData) { async buildAjustements(rollData) {
const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/dialog-roll-ajustements.html`, rollData); const html = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.html`, rollData);
return html; return html;
} }

View File

@ -147,7 +147,6 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/niveau-ethylisme.html', 'systems/foundryvtt-reve-de-dragon/templates/niveau-ethylisme.html',
'systems/foundryvtt-reve-de-dragon/templates/casetmr-specific-list.html', 'systems/foundryvtt-reve-de-dragon/templates/casetmr-specific-list.html',
// Dialogs // Dialogs
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-ajustements.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-resolution.html', 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-resolution.html',
'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',
@ -155,10 +154,16 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-encaisser.html', 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-encaisser.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html', 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html', 'systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-enctotal.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-alchimie.html', 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-alchimie.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-astrologie-joueur.html', 'systems/foundryvtt-reve-de-dragon/templates/dialog-astrologie-joueur.html',
// Partials
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html',
'systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.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-select-carac.html',
// Calendrier // Calendrier
'systems/foundryvtt-reve-de-dragon/templates/calendar-template.html', 'systems/foundryvtt-reve-de-dragon/templates/calendar-template.html',
'systems/foundryvtt-reve-de-dragon/templates/calendar-editor-template.html', 'systems/foundryvtt-reve-de-dragon/templates/calendar-editor-template.html',

View File

@ -528,6 +528,12 @@ section.sheet-body:after {
text-align: left; text-align: left;
width: 50px; width: 50px;
} }
.select-carac {
display: inline-block;
text-align: left;
width: 100%;
max-width: 90%;
}
#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;

View File

@ -1,17 +1,12 @@
<form class="skill-roll-dialog"> <form class="skill-roll-dialog">
<h2 class="compdialog" id="compdialogTitle"></h2> <h2 class="dialog-roll-title"></h2>
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left"> <div class="flex-group-left">
<img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="flexrow"> <div class="flexrow">
<label>Caractéristique </label> <label>Caractéristique</label>
<select name="carac" id="carac" data-dtype="String"> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
{{#select carac}}
{{#each carac as |caracitem key|}}
<option value={{key}}>{{caracitem.label}}</option>
{{/each}}
{{/select}}
</select>
</div> </div>
{{#if arme}} {{#if arme}}
{{#if attackerRoll}} {{#if attackerRoll}}
@ -63,47 +58,22 @@
{{/unless}} {{/unless}}
{{/if}} {{/if}}
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}}
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-enctotal.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-enctotal.html"}}
</div> </div>
<div class="flex-group-left"> <div class="flex-group-left">
{{#if attackerRoll}}
<div class="flexrow"> <div class="flexrow">
{{#if attackerRoll}}
<label>Difficulté</label> <label>Difficulté</label>
<label>{{diffLibre}}</label> <label>{{diffLibre}}</label>
{{else}}
<label>Difficulté libre</label>
<select name="diffLibre" id="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}>
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
{{/if}}
</div>
<div class="flexrow">
</div>
<div class="flexrow">
<label>Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}>
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>
<div class="flexrow">
<label class="diffMoral">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label>
<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 id="tableAjustements" class="flexrow">
</div> </div>
{{else}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}
{{/if}}
{{>"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>

View File

@ -1,42 +1,35 @@
{{log 'recette alchimique' this}}
<form class="rdddialog"> <form class="rdddialog">
<div class="form-group"> <h2>Fabrication: {{recette.name}}</h2>
<ul> <div class="grid grid-2col">
<li><label>Recette : {{recetteName}}</label></li> <div class="flex-group-left">
<li><label>Tâche Alchimique : {{alchimieTexte}}</label></li> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<li><label>Jet : {{selectedCarac.label}} / {{competence.name}}</label></li> <div class="grid grid-2col">
</ul> <label>{{alchimie.tache}}:</label><label class="flex-grow">{{alchimie.texte}}</label>
<div class="tooltipAppelAuMoral divAppelAuMoral"> <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg"> <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
<span class="tooltipAppelAuMoralText">Sans appel au moral</span> </div>
</div>
<div class="flex-group-left">
<div class="flexrow">
<label>Difficulté</label>
<label>{{numberFormat diffLibre decimals=0 sign=true}}</label>
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
{{#if alchimie.sansCristal}}
<div class="flexrow">
<label></label>
<label>(-4 sans Cristal Alchimique)</label>
</div>
{{/if}}
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}}
<div id="tableAjustements" class="flexrow"></div>
</div>
</div> </div>
</div>
<div class="form-group"> <div id="tableResolution"></div>
<label>conditions</label> <div id="tableProbaReussite"></div>
<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>
<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 id="tableAjustements">
</div>
<div id="tableResolution">
</div>
<div id="tableProbaReussite">
</div>
</form> </form>
<script> <script>
</script> </script>

View File

@ -1,32 +1,20 @@
<form class="skill-roll-dialog"> <form class="skill-roll-dialog">
<h2 class="compdialog" id="compdialogTitle"></h2> <h2 class="dialog-roll-title"></h2>
<div class="form-group">
<label>Difficulté libre</label> <div class="grid grid-2col">
<select name="diffLibre" id="diffLibre" data-dtype="number"> <div class="flex-group-left">
{{#select diffLibre}} <div class="flexrow">
{{#each difficultesLibres as |key|}} </div>
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}}
{{/each}}
{{/select}}
</select>
<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>
<label class="diffMoral">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label>
<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 class="flex-group-left">
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}
<div id="tableAjustements"> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
</div> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}}
<div id="tableAjustements" class="flexrow"></div>
</div>
</div>
<div id="tableResolution"> <div id="tableResolution">
</div> </div>
<div id="tableProbaReussite"> <div id="tableProbaReussite">

View File

@ -1,36 +1,26 @@
<form class="rdddialog"> <form class="rdddialog">
<div class="form-group"> <h2>Chanter: {{oeuvre.name}}</h2>
<ul>
<li><label>Chant : {{oeuvre.name}}</label></li> <div class="grid grid-2col">
<li><label>Jet : OUIE / {{competence.name}}</label></li> <div class="flex-group-left">
</ul> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<div class="tooltipAppelAuMoral divAppelAuMoral"> <div class="grid grid-2col">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg"> <label>Caractéristique: </label><label class="flex-grow">{{selectedCarac.label}}</label>
<span class="tooltipAppelAuMoralText">Sans appel au moral</span> <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
</div>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}}
</div>
<div class="flex-group-left">
<div class="flexrow">
<label>Difficulté</label>
<label>{{numberFormat diffLibre decimals=0 sign=true}}</label>
</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 class="form-group">
<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>
<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>
<div id="tableAjustements">
</div>
<div id="tableResolution"> <div id="tableResolution">
</div> </div>
<div id="tableProbaReussite"> <div id="tableProbaReussite">

View File

@ -1,47 +1,26 @@
<form class="dialog-roll-danse"> <form class="dialog-roll-danse">
<div class="form-group"> <h2>Danser: {{oeuvre.name}}</h2>
<ul>
<li><label>Danse : {{oeuvre.name}}</label></li>
<li><label>Jet : APPARENCE ou AGILITE / {{competence.name}}</label></li>
</ul>
</div>
<div class="form-group"> <div class="grid grid-2col">
<label>Caractéristique</label> <div class="flex-group-left">
<select name="carac" id="carac" class="select-diff" data-dtype="String"> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
{{#select carac}} <div class="grid grid-2col">
{{#each carac as |caracitem key|}} <label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
<option value={{key}}>{{caracitem.label}}</option> <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveau decimals=0 sign=true}}</label></label>
{{/each}} </div>
{{/select}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}}
</select> </div>
<div class="tooltipAppelAuMoral divAppelAuMoral"> <div class="flex-group-left">
<img class="imgAppelAuMoral small-button-container" src="/systems/foundryvtt-reve-de-dragon/icons/moral-neutre.svg"> <div class="flexrow">
<span class="tooltipAppelAuMoralText">Sans appel au moral</span> <label>Difficulté</label>
<label>{{numberFormat diffLibre decimals=0 sign=true}}</label>
</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="form-group">
<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>
<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 id="tableAjustements">
</div>
<div id="tableResolution"> <div id="tableResolution">
</div> </div>
<div id="tableProbaReussite"> <div id="tableProbaReussite">

View File

@ -1,47 +1,25 @@
<form class="rdddialog"> <form class="rdddialog">
<div class="form-group"> <h2>Jouer à : {{oeuvre.name}}</h2>
<ul>
<li><label for="competence-label">Jouer à : {{oeuvre.name}}</label></li> <div class="grid grid-2col">
<li><label for="competence-label">Type : {{oeuvre.data.type}}</label></li> <div class="flex-group-left">
<li><label for="competence-label">Base : {{oeuvre.data.base}}</label></li> <img class="chat-icon" src="{{competence.img}}" alt="{{competence.name}}"/>
<li><label for="competence-label">Carac/Compétence : {{oeuvre.data.caraccomp}}</label></li> <div class="grid grid-2col">
</ul> <label>Type:</label><label class="flex-grow">{{oeuvre.data.type}}</label>
</div> <label for="carac">Caractéristique:</label>{{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
<div class="form-group"> <label>{{competence.name}}:</label><label class="flex-grow">{{numberFormat competence.data.niveauReel decimals=0 sign=true}}</label></label>
<label>Caractéristique</label> <label>Niveau de base:</label><label class="flex-grow">{{oeuvre.data.base}}</label>
<select name="carac" id="carac" class="select-diff" data-dtype="String"> </div>
{{#select carac}} </div>
{{#each carac as |caracitem key|}} <div class="flex-group-left">
<option value={{key}}>{{caracitem.label}}</option> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}
{{/each}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
{{/select}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-moral.html"}}
</select> <div id="tableAjustements" class="flexrow"></div>
<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>
<div class="form-group"> {{> "systems/foundryvtt-reve-de-dragon/templates/chat-poesie.html" oeuvre.data}}
<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>
<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 id="tableAjustements">
</div>
<div id="tableResolution"> <div id="tableResolution">
</div> </div>
<div id="tableProbaReussite"> <div id="tableProbaReussite">

View File

@ -14,7 +14,7 @@
</select> </select>
</span> </span>
</div> </div>
{{>"systems/foundryvtt-reve-de-dragon/templates/dialog-roll-surenc.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-surenc.html"}}
<div id="tableAjustements"> <div id="tableAjustements">
</div> </div>
<div id="tableResolution"> <div id="tableResolution">

View File

@ -1,29 +1,11 @@
<form class="resolution-roll-dialog"> <form class="resolution-roll-dialog">
<div class="flexrow flex-group-left"> <div class="grid grid-4col">
<label>Caractéristique</label> <div class="flexrow">
<select name="carac" id="carac" class="select-diff" data-dtype="String"> <label>Caractéristique</label>
{{#select carac}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-select-carac.html"}}
{{#each carac as |caracitem key|}} </div>
<option value={{key}}>{{caracitem.label}}</option> {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffLibre.html"}}
{{/each}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-roll-diffCondition.html"}}
{{/select}}
</select>
<label>Difficulté libre</label>
<select name="diffLibre" id="diffLibre" class="select-diff" data-dtype="number">
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
<label>&nbsp;&nbsp;Conditions</label>
<select name="diffConditions" id="diffConditions" class="select-diff" data-dtype="number">
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
<button id="lancer" type="button">Lancer les dés</button> <button id="lancer" type="button">Lancer les dés</button>
</div> </div>
<div id="tableResolution"> <div id="tableResolution">

View File

@ -1,5 +1,5 @@
<form class="skill-roll-dialog"> <form class="skill-roll-dialog">
<h2 class="compdialog">Rêve de Dragon de force {{rencontre.force}}!</h2> <h2>Rêve de Dragon de force {{rencontre.force}}!</h2>
<div class="form-group"> <div class="form-group">
</div> </div>
<div id="tableAjustements"></div> <div id="tableAjustements"></div>

View File

@ -0,0 +1,10 @@
<div class="flexrow">
<label for="diffConditions">Conditions</label>
<select name="diffConditions" id="diffConditions" data-dtype="number" {{#unless use.conditions}}disabled{{/unless}}>
{{#select diffConditions}}
{{#each ajustementsConditions as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>

View File

@ -0,0 +1,10 @@
<div class="flexrow">
<label for="diffLibre">Difficulté libre</label>
<select name="diffLibre" id="diffLibre" data-dtype="number" {{#unless use.libre}}disabled{{/unless}}>
{{#select diffLibre}}
{{#each difficultesLibres as |key|}}
<option value={{key}}>{{numberFormat key decimals=0 sign=true}}</option>
{{/each}}
{{/select}}
</select>
</div>

View File

@ -0,0 +1,7 @@
<div class="flexrow">
<label class="diffMoral">Moral: {{#if (gt moral 0)}}+{{/if}}{{moral}}</label>
<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>

View File

@ -0,0 +1,7 @@
<select name="carac" id="carac" class="flex-grow select-carac" data-dtype="String">
{{#select carac}}
{{#each carac as |caracitem key|}}
<option value={{key}}>{{caracitem.label}}</option>
{{/each}}
{{/select}}
</select>