Ajout des Oeuvres génériques
Ajout de la description au tchat, ajout de la référence/auteur à tous les types d'oeuvres Ajout de l'exotisme à la cuisine Jet de chant (qui ne marchait pas)
This commit is contained in:
parent
a2ec26c4c0
commit
7c54597a20
@ -304,6 +304,11 @@ export class RdDActorSheet extends ActorSheet {
|
||||
let musiqueId = li.data('item-id');
|
||||
this.actor.rollMusique(musiqueId);
|
||||
});
|
||||
html.find('.oeuvre-label a').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
let oeuvreId = li.data('item-id');
|
||||
this.actor.rollOeuvre(oeuvreId);
|
||||
});
|
||||
html.find('.jeu-label a').click((event) => {
|
||||
const li = $(event.currentTarget).parents(".item");
|
||||
let jeuId = li.data('item-id');
|
||||
|
@ -278,6 +278,9 @@ export class RdDActor extends Actor {
|
||||
getMusique(id) {
|
||||
return this.data.items.find(item => item.type == 'musique' && item._id == id);
|
||||
}
|
||||
getOeuvre(id, type = 'oeuvre') {
|
||||
return this.data.items.find(item => item.type == type && item._id == id);
|
||||
}
|
||||
getJeu(id) {
|
||||
return this.data.items.find(item => item.type == 'jeu' && item._id == id);
|
||||
}
|
||||
@ -2041,20 +2044,21 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _rollArt(artData, selectedCarac, competence, oeuvre) {
|
||||
async _rollArt(artData, selectedCarac, oeuvre, callBackResult = r =>this._resultArt(r)) {
|
||||
mergeObject(artData, {
|
||||
oeuvre: oeuvre,
|
||||
competence: duplicate(competence),
|
||||
diffLibre: -oeuvre.data.niveau,
|
||||
art: oeuvre.type,
|
||||
competence: duplicate(this.getCompetence(oeuvre.data.competence ?? artData.art)),
|
||||
diffLibre: - (oeuvre.data.niveau ??0),
|
||||
diffConditions: 0,
|
||||
use: { libre: false, conditions: true, },
|
||||
use: { libre: false, conditions: true },
|
||||
selectedCarac: duplicate(this.data.data.carac[selectedCarac]),
|
||||
forceCarac: {}
|
||||
});
|
||||
artData.competence.data.defaut_carac = selectedCarac;
|
||||
artData.forceCarac[selectedCarac] = duplicate(this.data.data.carac[selectedCarac]);
|
||||
|
||||
console.log("rollArtiste !!!", artData);
|
||||
console.log("rollArt !!!", artData);
|
||||
|
||||
const dialog = await RdDRoll.create(this, artData, { html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${artData.art}.html` }, {
|
||||
name: `jet-${artData.art}`,
|
||||
@ -2077,84 +2081,65 @@ export class RdDActor extends Actor {
|
||||
RdDResolutionTable.displayRollData(artData, this.name, `chat-resultat-${artData.art}.html`);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollChant(id) {
|
||||
const artData = { art: 'chant', verbe: 'Chanter' };
|
||||
const oeuvre = duplicate(this.getChant(id));
|
||||
await this._rollArt(artData, "ouie", oeuvre);
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async rollDanse(id) {
|
||||
const oeuvre = duplicate(this.getDanse(id));
|
||||
const competence = this.getCompetence("danse");
|
||||
const selectedCarac = this._getCaracDanse(oeuvre, competence);
|
||||
const artData = { art: 'danse', verbe: 'Danser' };
|
||||
await this._rollArt(artData, selectedCarac, competence, oeuvre);
|
||||
const oeuvre = duplicate(this.getOeuvre(id, artData.art));
|
||||
const selectedCarac = this._getCaracDanse(oeuvre,);
|
||||
await this._rollArt(artData, selectedCarac, oeuvre);
|
||||
}
|
||||
|
||||
_getCaracDanse(oeuvre, competence) {
|
||||
_getCaracDanse(oeuvre) {
|
||||
if (oeuvre.data.agilite) { return "agilite"; }
|
||||
else if (oeuvre.data.apparence) { return "apparence"; }
|
||||
const competence = this.getCompetence(oeuvre.data.competence);
|
||||
return competence.data.defaut_carac;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollMusique(id) {
|
||||
const oeuvre = duplicate(this.getMusique(id));
|
||||
const competence = this.getCompetence("musique");
|
||||
const selectedCarac = "ouie";
|
||||
const artData = { art: 'musique', verbe: 'Jouer' };
|
||||
await this._rollArt(artData, selectedCarac, competence, oeuvre);
|
||||
const oeuvre = duplicate(this.getOeuvre(id, artData.art));
|
||||
await this._rollArt(artData, "ouie", oeuvre);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollRecetteCuisine(id) {
|
||||
const oeuvre = duplicate(this.getRecetteCuisine(id));
|
||||
const competence = this.getCompetence("cuisine");
|
||||
const selectedCarac = 'odoratgout';
|
||||
const artData = { art: 'cuisine', verbe: 'Cuisiner' };
|
||||
await this._rollArt(artData, selectedCarac, competence, oeuvre);
|
||||
const oeuvre = duplicate(this.getRecetteCuisine(id));
|
||||
await this._rollArt(artData, 'odoratgout', oeuvre, r => this._resultRecetteCuisine(r) );
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async _resultRecetteCuisine(artData) {
|
||||
const baseQualite = (artData.rolled.isSuccess ? artData.oeuvre.data.niveau : artData.competence.data.niveau);
|
||||
artData.qualiteFinale = Math.min(baseQualite, artData.oeuvre.data.niveau) + artData.rolled.ptQualite;
|
||||
artData.exotismeFinal = Math.min(Math.min(artData.qualiteFinale, -Math.abs(artData.oeuvre.data.exotisme??0)), 0);
|
||||
console.log("OEUVRE", artData.art, artData)
|
||||
RdDResolutionTable.displayRollData(artData, this.name, `chat-resultat-${artData.art}.html`);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollJeu(id) {
|
||||
const oeuvre = duplicate(this.getJeu(id));
|
||||
const competence = this.getCompetence("jeu");
|
||||
const selectedCarac = competence.data.defaut_carac;
|
||||
const artData = {
|
||||
art: 'jeu', verbe: 'Jeu',
|
||||
use: { libre: true, conditions: true, },
|
||||
};
|
||||
await this._rollArt(artData, selectedCarac, competence, oeuvre);
|
||||
const oeuvre = duplicate(this.getJeu(id));
|
||||
await this._rollArt(artData, oeuvre.data?.caraccomp.toLowerCase() ?? 'chance', oeuvre);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollJeu( id ) {
|
||||
let jeu = duplicate(this.getJeu(id));
|
||||
let competence = duplicate(this.getCompetence("jeu"));
|
||||
let jeuData = {
|
||||
competence: competence,
|
||||
jeu: jeu,
|
||||
diffLibre: 0,
|
||||
diffConditions: 0,
|
||||
use: { libre: true, conditions: true, },
|
||||
carac: {}
|
||||
};
|
||||
|
||||
console.log("rollJeu !!!", jeuData);
|
||||
|
||||
const dialog = await RdDRoll.create(this, jeuData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-jeu.html' }, {
|
||||
name: 'jet-jeu',
|
||||
label: 'Jeu ' + jeu.name,
|
||||
height: 600,
|
||||
callbacks: [
|
||||
this.createCallbackExperience(),
|
||||
{ action: r => this._jeuResult(r) }
|
||||
]
|
||||
});
|
||||
dialog.render(true);
|
||||
async rollOeuvre(id) {
|
||||
const artData = { art: 'oeuvre', verbe: 'Interpréter' };
|
||||
const oeuvre = duplicate(this.getOeuvre(id));
|
||||
await this._rollArt(artData, oeuvre.data.default_carac, oeuvre);
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
async _jeuResult(jeudData) {
|
||||
console.log("JEU", jeudData)
|
||||
RdDResolutionTable.displayRollData(jeudData, this.name, 'chat-resultat-jeu.html');
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async rollMeditation(id) {
|
||||
|
@ -49,7 +49,7 @@ export class RdDItemSheet extends ItemSheet {
|
||||
async getData() {
|
||||
let data = super.getData();
|
||||
data.categorieCompetences = RdDUtility.getCategorieCompetences();
|
||||
if ( data.item.type == 'tache' || data.item.type == 'livre' || data.item.type == 'meditation') {
|
||||
if ( data.item.type == 'tache' || data.item.type == 'livre' || data.item.type == 'meditation' || data.item.type == 'oeuvre') {
|
||||
data.caracList = duplicate(game.system.model.Actor.personnage.carac);
|
||||
data.competences = await RdDUtility.loadCompendiumNames( 'foundryvtt-reve-de-dragon.competences' );
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import { RdDRollResolutionTable } from "./rdd-roll-resolution-table.js";
|
||||
import { RdDItemCompetenceCreature } from "./item-competencecreature.js";
|
||||
import { RdDItemArme } from "./item-arme.js";
|
||||
import { RdDItemCompetence } from "./item-competence.js";
|
||||
import { Misc } from "./misc.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const categorieCompetences = {
|
||||
@ -128,18 +129,6 @@ const fatigueMarche = {
|
||||
"tresdifficile": { "4": 4, "6": 6 }
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Static tables for commands /table */
|
||||
const table2func = {
|
||||
"rdd": { descr: "rdd: Ouvre la table de résolution", func: RdDRollResolutionTable.open },
|
||||
"queues": { descr: "queues: Tire une queue de Dragon", func: RdDRollTables.getQueue },
|
||||
"ombre": { descr: "ombre: Tire une Ombre de Dragon", func: RdDRollTables.getOmbre },
|
||||
"tetehr": { descr: "tetehr: Tire une Tête de Dragon pour Hauts Revants", fund: RdDRollTables.getTeteHR },
|
||||
"tete": { descr: "tete: Tire une Tête de Dragon", func: RdDRollTables.getTete },
|
||||
"souffle": { descr: "souffle: Tire un Souffle de Dragon", func: RdDRollTables.getSouffle },
|
||||
"tarot": { descr: "tarot: Tire une carte de Tarot Dracnique", func: RdDRollTables.getTarot }
|
||||
};
|
||||
|
||||
/* -------------------------------------------- */
|
||||
const definitionsBlessures = [
|
||||
{ type: "legere", facteur: 2 },
|
||||
@ -264,6 +253,14 @@ export class RdDUtility {
|
||||
'systems/foundryvtt-reve-de-dragon/templates/chat-actor-carac-xp.html'
|
||||
];
|
||||
|
||||
Handlebars.registerHelper('upperFirst', function (str) {
|
||||
return Misc.upperFirst(str ?? 'null')
|
||||
})
|
||||
|
||||
Handlebars.registerHelper('upper', function (str) {
|
||||
return str?.toUpperCase() ?? 'NULL'
|
||||
})
|
||||
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
||||
@ -319,6 +316,7 @@ export class RdDUtility {
|
||||
data.data.chants = this.checkNull(data.itemsByType['chant']);
|
||||
data.data.danses = this.checkNull(data.itemsByType['danse']);
|
||||
data.data.musiques = this.checkNull(data.itemsByType['musique']);
|
||||
data.data.oeuvres = this.checkNull(data.itemsByType['oeuvre']);
|
||||
data.data.jeux = this.checkNull(data.itemsByType['jeu']);
|
||||
data.data.recettescuisine = this.checkNull(data.itemsByType['recettecuisine']);
|
||||
data.data.recettesAlchimiques = this.checkNull(data.itemsByType['recettealchimique']);
|
||||
|
@ -675,6 +675,7 @@ ul, li {
|
||||
.subacteur-label,
|
||||
.chant-label,
|
||||
.musique-label,
|
||||
.oeuvre-label,
|
||||
.chant-label,
|
||||
.danse-label,
|
||||
.recette-label,
|
||||
|
@ -6,7 +6,7 @@
|
||||
"manifestPlusVersion": "1.0.0",
|
||||
"minimumCoreVersion": "0.7.5",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
"templateVersion": 90,
|
||||
"templateVersion": 91,
|
||||
"author": "LeRatierBretonnien",
|
||||
"authors": [
|
||||
{
|
||||
|
@ -563,7 +563,7 @@
|
||||
"Item": {
|
||||
"types": ["objet", "arme", "armure", "conteneur", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition", "rencontresTMR", "queue", "ombre", "souffle",
|
||||
"tete", "competencecreature", "tarot", "monnaie", "nombreastral", "tache", "meditation", "casetmr", "recettealchimique",
|
||||
"musique", "chant", "danse", "jeu", "recettecuisine", "maladie", "poison" ],
|
||||
"musique", "chant", "danse", "jeu", "recettecuisine", "maladie", "poison", "oeuvre" ],
|
||||
"objet": {
|
||||
"description": "",
|
||||
"quantite": 1,
|
||||
@ -775,6 +775,7 @@
|
||||
},
|
||||
"musique": {
|
||||
"niveau": "",
|
||||
"reference": "",
|
||||
"description": ""
|
||||
},
|
||||
"danse": {
|
||||
@ -782,16 +783,19 @@
|
||||
"agilite": false,
|
||||
"apparence": false,
|
||||
"niveau": "",
|
||||
"reference": "",
|
||||
"description": ""
|
||||
},
|
||||
"chant": {
|
||||
"niveau": "",
|
||||
"reference": "",
|
||||
"description": ""
|
||||
},
|
||||
"jeu": {
|
||||
"type": "",
|
||||
"base": "",
|
||||
"caraccomp": "",
|
||||
"reference": "",
|
||||
"description": ""
|
||||
},
|
||||
"recettecuisine": {
|
||||
@ -799,6 +803,15 @@
|
||||
"ingredients": "",
|
||||
"duree": "",
|
||||
"sust": 0,
|
||||
"exotisme": 0,
|
||||
"reference": "",
|
||||
"description": ""
|
||||
},
|
||||
"oeuvre": {
|
||||
"default_carac": "",
|
||||
"competence": "",
|
||||
"niveau": 0,
|
||||
"reference": "",
|
||||
"description": ""
|
||||
},
|
||||
"maladie": {
|
||||
@ -815,7 +828,6 @@
|
||||
"dommages":"",
|
||||
"description": ""
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -650,32 +650,42 @@
|
||||
|
||||
{{!-- Connaissances Tab --}}
|
||||
<div class="tab connaissances" data-group="primary" data-tab="connaissances">
|
||||
<h3>Chants :</h3>
|
||||
<h3>Oeuvres diverses :</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.chants as |chant id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{chant._id}}"><span class="competence-title chant-label"><a>{{chant.name}} (niveau {{chant.data.niveau}})</a></span>
|
||||
<li class="item flexrow list-item" data-item-id="{{chant._id}}"><span>Chant</span><span class="competence-title chant-label"><a>{{chant.name}} (niveau {{chant.data.niveau}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<h3>Danses :</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.danses as |danse id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{danse._id}}"><span class="competence-title danse-label"><a>{{danse.name}} (niveau {{danse.data.niveau}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<h3>Musiques :</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.musiques as |musique id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{musique._id}}"><span class="competence-title musique-label"><a>{{musique.name}} (niveau {{musique.data.niveau}})</a></span>
|
||||
<li class="item flexrow list-item" data-item-id="{{musique._id}}"><span>Musique</span><span class="competence-title musique-label"><a>{{musique.name}} (niveau {{musique.data.niveau}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
{{#each data.danses as |danse id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{danse._id}}"><span>Danse</span><span class="competence-title danse-label"><a>{{danse.name}} (niveau {{danse.data.niveau}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
{{#each data.oeuvres as |oeuvre id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{oeuvre._id}}"><span>{{upperFirst oeuvre.data.competence}}</span><span class="competence-title oeuvre-label"><a>{{oeuvre.name}} (niveau {{oeuvre.data.niveau}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
{{#each data.recettescuisine as |recette id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{recette._id}}"><span>Recette de cuisine</span><span class="competence-title recettecuisine-label"><a>{{recette.name}} (niveau {{recette.data.niveau}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
@ -694,17 +704,6 @@
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<h3>Recettes de Cuisine :</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.recettescuisine as |recette id|}}
|
||||
<li class="item flexrow list-item" data-item-id="{{recette._id}}"><span class="competence-title recettecuisine-label"><a>{{recette.name}} (niveau {{recette.data.niveau}})</a></span>
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
<h3>Recettes Alchimiques</h3>
|
||||
<ul class="item-list alterne-list">
|
||||
{{#each data.recettesAlchimiques as |recette id|}}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_chant.png" alt="chant" />
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de chanter la chanson : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
</h4>
|
||||
@ -11,3 +11,18 @@
|
||||
{{alias}} est peu inspiré(e) et son interprétation a une qualité de {{qualiteFinale}}.
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if oeuvre.data.description}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
{{{oeuvre.data.description}}}
|
||||
{{#if oeuvre.data.reference}}
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{else if oeuvre.data.reference}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_cuisine.webp" alt="cuisine" />
|
||||
<h4>
|
||||
{{alias}} tente de cuisiner la recette : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
</h4>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
{{#if rolled.isSuccess}}
|
||||
{{alias}} réussit sa recette, avec un plat de {{qualiteFinale}} pour {{oeuvre.data.sust}} Points de Sustentation.
|
||||
{{else}}
|
||||
{{alias}} fait un pière cuisinier(e), et obtient une qualité de {{qualiteFinale}}. Selon la décision du MJ, le plat peut fournir {{oeuvre.data.sust}} Points de Sustentation
|
||||
{{/if}}
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_danse.webp" alt="danse" />
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de danser : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
</h4>
|
||||
@ -11,3 +11,18 @@
|
||||
{{alias}} est peu inspiré(e) et son interprétation a une qualité de {{qualiteFinale}}.
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if oeuvre.data.description}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
{{{oeuvre.data.description}}}
|
||||
{{#if oeuvre.data.reference}}
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{else if oeuvre.data.reference}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_jeu.webp" alt="jeu" />
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} joue à : {{oeuvre.name}}
|
||||
</h4>
|
||||
@ -11,3 +11,18 @@
|
||||
{{alias}} a perdu ...
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if oeuvre.data.description}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
{{{oeuvre.data.description}}}
|
||||
{{#if oeuvre.data.reference}}
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{else if oeuvre.data.reference}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_musique.webp" alt="musique" />
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de jouer le morceau : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
</h4>
|
||||
@ -11,3 +11,18 @@
|
||||
{{alias}} est peu inspiré(e) et son interprétation a une qualité de {{qualiteFinale}}.
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if oeuvre.data.description}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
{{{oeuvre.data.description}}}
|
||||
{{#if oeuvre.data.reference}}
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{else if oeuvre.data.reference}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
||||
|
29
templates/chat-resultat-oeuvre.html
Normal file
29
templates/chat-resultat-oeuvre.html
Normal file
@ -0,0 +1,29 @@
|
||||
<h4><img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
|
||||
{{alias}} tente d'interpréter {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
</h4>
|
||||
<br>{{upperFirst oeuvre.data.default_carac}} / {{oeuvre.data.competence}}
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
{{#if rolled.isSuccess}}
|
||||
{{alias}} réussi son interprétation avec une qualité de {{qualiteFinale}} .
|
||||
{{else}}
|
||||
{{alias}} est peu inspiré(e) et son interprétation a une qualité de {{qualiteFinale}}.
|
||||
{{/if}}
|
||||
</div>
|
||||
{{#if oeuvre.data.description}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
{{{oeuvre.data.description}}}
|
||||
{{#if oeuvre.data.reference}}
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{else if oeuvre.data.reference}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
34
templates/chat-resultat-recettecuisine.html
Normal file
34
templates/chat-resultat-recettecuisine.html
Normal file
@ -0,0 +1,34 @@
|
||||
<img class="chat-icon" src="{{competence.img}}" alt="{{oeuvre.data.competence}}" />
|
||||
<h4>
|
||||
{{alias}} tente de cuisiner la recette : {{oeuvre.name}} (niveau {{oeuvre.data.niveau}})
|
||||
</h4>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
|
||||
{{#if rolled.isSuccess}}
|
||||
{{alias}} réussit sa recette, avec un plat de {{qualiteFinale}} pour {{oeuvre.data.sust}} Points de Sustentation.
|
||||
{{else}}
|
||||
{{alias}} fait un pière cuisinier(e), et obtient {{#if (lt qualiteFinale 0)}}un plat à l'exotisme certain{{else}}un plat de qualité {{qualiteFinale}}{{/if}}.
|
||||
Selon la décision du MJ, le plat peut fournir {{oeuvre.data.sust}} Points de Sustentation
|
||||
{{/if}}
|
||||
|
||||
{{#if (lt exotismeFinal 0)}}
|
||||
<br>Au vu de l'exotisme du plat, les convives devront réussir un jet de Volonté / Cuisine à {{exotismeFinal}}.
|
||||
En cas d'échec, ils peuvent se forcer pour faire plaisir au Maître Queux, mais devront faire un jet de moral Malheureux.
|
||||
{{/if}}
|
||||
|
||||
{{#if oeuvre.data.description}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
{{{oeuvre.data.description}}}
|
||||
{{#if oeuvre.data.reference}}
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
{{/if}}
|
||||
</span>
|
||||
{{else if oeuvre.data.reference}}
|
||||
<hr>
|
||||
<span class="poesie-extrait">
|
||||
<p class="poesie-reference">{{oeuvre.data.reference}}</p>
|
||||
</span>
|
||||
{{/if}}
|
||||
|
@ -1,13 +1,13 @@
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
<li><label for="competence-label">Jouer à : {{jeu.name}}</label></li>
|
||||
<li><label for="competence-label">Type : {{jeu.data.type}}</label></li>
|
||||
<li><label for="competence-label">Base : {{jeu.data.base}}</label></li>
|
||||
<li><label for="competence-label">Carac/Compétence : {{jeu.data.caraccomp}}</label></li>
|
||||
<li><label for="competence-label">Jouer à : {{oeuvre.name}}</label></li>
|
||||
<li><label for="competence-label">Type : {{oeuvre.data.type}}</label></li>
|
||||
<li><label for="competence-label">Base : {{oeuvre.data.base}}</label></li>
|
||||
<li><label for="competence-label">Carac/Compétence : {{oeuvre.data.caraccomp}}</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categorie">Caractéristique</label>
|
||||
<select name="carac" id="carac" class="select-diff" data-dtype="String">
|
||||
{{#select carac}}
|
||||
@ -16,8 +16,6 @@
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categorie">conditions</label>
|
||||
<select name="diffConditions" id="diffConditions" data-dtype="number">
|
||||
{{#select diffConditions}}
|
||||
|
37
templates/dialog-roll-oeuvre.html
Normal file
37
templates/dialog-roll-oeuvre.html
Normal file
@ -0,0 +1,37 @@
|
||||
<form class="dialog-roll-sort">
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
<li><label for="categorie">Interpréter une Oeuvre : {{oeuvre.name}}</label></li>
|
||||
<li><label for="categorie">Jet : {{upperFirst oeuvre.data.default_carac}} / {{competence.name}}</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="categorie">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 for="categorie">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>
|
||||
|
||||
<script>
|
||||
</script>
|
@ -1,8 +1,10 @@
|
||||
<form class="dialog-roll-sort">
|
||||
|
||||
<div class="form-group">
|
||||
<ul>
|
||||
<li><label for="categorie">Cuisiner : {{cuisine.name}}</label></li>
|
||||
<li><label for="categorie">Cuisiner : {{oeuvre.name}}</label></li>
|
||||
<li><label for="categorie">Jet : ODORAT-GOUT / {{competence.name}}</label></li>
|
||||
<li><label for="categorie">Exotisme : {{oeuvre.data.exotisme}}</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -12,6 +12,10 @@
|
||||
<label class="alchimie-title" for="xp">Niveau</label>
|
||||
<input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Référence / Auteur</label>
|
||||
<input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<span><label class="alchimie-title">Description : </label></span>
|
||||
<div class="form-group editor">
|
||||
|
@ -29,6 +29,10 @@
|
||||
<label class="alchimie-title" for="xp">Niveau</label>
|
||||
<input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Référence / Auteur</label>
|
||||
<input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<span><label class="alchimie-title">Description : </label></span>
|
||||
<div class="form-group editor">
|
||||
|
@ -27,6 +27,10 @@
|
||||
<label class="alchimie-title" for="xp">Caractéristique/Compétence</label>
|
||||
<input class="attribute-value" type="text" name="data.caraccomp" value="{{data.caraccomp}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Référence / Auteur</label>
|
||||
<input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<span><label class="alchimie-title">Description : </label></span>
|
||||
<div class="form-group editor">
|
||||
|
@ -12,6 +12,10 @@
|
||||
<label class="alchimie-title" for="xp">Niveau</label>
|
||||
<input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Référence / Auteur</label>
|
||||
<input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<span><label class="alchimie-title">Description : </label></span>
|
||||
<div class="form-group editor">
|
||||
|
45
templates/item-oeuvre-sheet.html
Normal file
45
templates/item-oeuvre-sheet.html
Normal file
@ -0,0 +1,45 @@
|
||||
<form class="{{cssClass}}" autocomplete="off">
|
||||
<header class="sheet-header">
|
||||
<img class="profile-img" src="{{item.img}}" data-edit="img" title="{{item.name}}"/>
|
||||
<div class="header-fields">
|
||||
<h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeholder="Name"/></h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<label>Caractéristique</label>
|
||||
<select name="data.default_carac" id="default_carac" data-dtype="String">
|
||||
{{#select item.data.default_carac}}
|
||||
{{>"systems/foundryvtt-reve-de-dragon/templates/competence-carac-defaut.html"}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Compétence</label>
|
||||
<select name="data.competence" id="competenceselect" data-dtype="String">
|
||||
{{#select item.data.competence}}
|
||||
{{#each competences as |competence key|}}
|
||||
<option value="{{competence.name}}">{{competence.name}}</option>
|
||||
{{/each}}
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Référence / Auteur</label>
|
||||
<input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Niveau</label>
|
||||
<input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<span><label>Description : </label></span>
|
||||
<div class="form-group editor">
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</form>
|
@ -9,25 +9,33 @@
|
||||
{{!-- Sheet Body --}}
|
||||
<section class="sheet-body">
|
||||
<div class="form-group">
|
||||
<label class="alchimie-title" for="xp">Niveau</label>
|
||||
<label>Niveau</label>
|
||||
<input class="attribute-value" type="text" name="data.niveau" value="{{data.niveau}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="alchimie-title" for="xp">Durée</label>
|
||||
<label>Durée</label>
|
||||
<input class="attribute-value" type="text" name="data.duree" value="{{data.duree}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="alchimie-title" for="xp">Sust</label>
|
||||
<label>Sust</label>
|
||||
<input class="attribute-value" type="text" name="data.sust" value="{{data.sust}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Exotisme</label>
|
||||
<input class="attribute-value" type="text" name="data.exotisme" value="{{data.exotisme}}" data-dtype="Number"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<span><label class="alchimie-title">Ingrédients : </label></span>
|
||||
<span><label>Ingrédients : </label></span>
|
||||
<div class="form-group editor">
|
||||
{{editor content=data.ingredients target="data.ingredients" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Référence / Auteur</label>
|
||||
<input class="attribute-value" type="text" name="data.reference" value="{{data.reference}}" data-dtype="String"/>
|
||||
</div>
|
||||
<div class="flexcol">
|
||||
<span><label class="alchimie-title">Description : </label></span>
|
||||
<span><label>Description : </label></span>
|
||||
<div class="form-group editor">
|
||||
{{editor content=data.description target="data.description" button=true owner=owner editable=editable}}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user