#136 Ajout des connaissances

This commit is contained in:
sladecraven 2021-01-27 23:35:45 +01:00
parent 8f3680eebd
commit 96d55a7cad
16 changed files with 761 additions and 180 deletions

View File

@ -285,6 +285,31 @@ export class RdDActorSheet extends ActorSheet {
let meditationId = li.data('item-id'); let meditationId = li.data('item-id');
this.actor.rollMeditation(meditationId); this.actor.rollMeditation(meditationId);
}); });
html.find('.chant-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
let chantId = li.data('item-id');
this.actor.rollChant(chantId);
});
html.find('.danse-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
let danseId = li.data('item-id');
this.actor.rollDanse(danseId);
});
html.find('.musique-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
let musiqueId = li.data('item-id');
this.actor.rollMusique(musiqueId);
});
html.find('.jeu-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
let jeuId = li.data('item-id');
this.actor.rollJeu(jeuId);
});
html.find('.recettecuisine-label a').click((event) => {
const li = $(event.currentTarget).parents(".item");
let recetteId = li.data('item-id');
this.actor.rollRecetteCuisine(recetteId);
});
html.find('.subacteur-label a').click((event) => { html.find('.subacteur-label a').click((event) => {
const li = $(event.currentTarget).parents(".item"); const li = $(event.currentTarget).parents(".item");
let actorId = li.data('actor-id'); let actorId = li.data('actor-id');

View File

@ -247,6 +247,21 @@ export class RdDActor extends Actor {
getMeditation(id) { getMeditation(id) {
return this.data.items.find(item => item.type == 'meditation' && item._id == id); return this.data.items.find(item => item.type == 'meditation' && item._id == id);
} }
getChant(id) {
return this.data.items.find(item => item.type == 'chant' && item._id == id);
}
getDanse(id) {
return this.data.items.find(item => item.type == 'danse' && item._id == id);
}
getMusique(id) {
return this.data.items.find(item => item.type == 'musique' && item._id == id);
}
getJeu(id) {
return this.data.items.find(item => item.type == 'jeu' && item._id == id);
}
getRecetteCuisine(id) {
return this.data.items.find(item => item.type == 'recettecuisine' && item._id == id);
}
/* -------------------------------------------- */ /* -------------------------------------------- */
getBestDraconic() { getBestDraconic() {
const list = this.getDraconicList().sort((a, b) => b.data.niveau - a.data.niveau); const list = this.getDraconicList().sort((a, b) => b.data.niveau - a.data.niveau);
@ -1864,6 +1879,203 @@ export class RdDActor extends Actor {
this.updateEmbeddedEntity("OwnedItem", rollData.tache); this.updateEmbeddedEntity("OwnedItem", rollData.tache);
} }
/* -------------------------------------------- */
async rollChant( id ) {
let chant = duplicate(this.getChant(id));
let competence = duplicate(this.getCompetence("chant"));
competence.data.defaut_carac = "ouie";
let chantData = {
competence: competence,
chant: chant,
diffLibre: -chant.data.niveau,
diffConditions: 0,
use: { libre: false, conditions: true, },
carac: {}
};
chantData.carac["ouie"] = duplicate(this.data.data.carac["ouie"]);
console.log("rollChant !!!", chantData);
const dialog = await RdDRoll.create(this, chantData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-chant.html' }, {
name: 'jet-chant',
label: 'Chanter ' + chant.name,
height: 600,
callbacks: [
this.createCallbackExperience(),
{ action: r => this._chantResult(r) }
]
});
dialog.render(true);
}
/* -------------------------------------------- */
async _chantResult(chantData) {
if ( chantData.rolled.isSuccess) {
chantData.qualiteFinale = chantData.danse.data.niveau + chantData.rolled.ptQualite;
} else {
chantData.qualiteFinale = chantData.competence.data.niveau + chantData.rolled.ptQualite;
}
console.log("CHAN", chantData)
RdDResolutionTable.displayRollData(chantData, this.name, 'chat-resultat-chant.html');
}
/* -------------------------------------------- */
async rollDanse( id ) {
let danse = duplicate(this.getDanse(id));
let competence = duplicate(this.getCompetence("danse"));
let danseData = {
competence: competence,
danse: danse,
diffLibre: -danse.data.niveau,
diffConditions: 0,
use: { libre: false, conditions: true, },
forceCarac: {}
};
if ( danse.data.agilite) {
competence.data.defaut_carac = "agilite";
danseData.selectedCarac = duplicate(this.data.data.carac["agilite"]);
danseData.forceCarac["agilite"] = duplicate(this.data.data.carac["agilite"]);
}
if ( danse.data.apparence) {
competence.data.defaut_carac = "apparence";
danseData.selectedCarac = duplicate(this.data.data.carac["apparence"]);
danseData.forceCarac["apparence"] = duplicate(this.data.data.carac["apparence"]);
}
console.log("rollDanse !!!", danseData);
const dialog = await RdDRoll.create(this, danseData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-danse.html' }, {
name: 'jet-danse',
label: 'Danser ' + danse.name,
height: 600,
callbacks: [
this.createCallbackExperience(),
{ action: r => this._danseResult(r) }
]
});
dialog.render(true);
}
/* -------------------------------------------- */
async _danseResult(danseData) {
if ( danseData.rolled.isSuccess) {
danseData.qualiteFinale = danseData.danse.data.niveau + danseData.rolled.ptQualite;
} else {
danseData.qualiteFinale = danseData.competence.data.niveau + danseData.rolled.ptQualite;
}
console.log("CHAN", danseData)
RdDResolutionTable.displayRollData(danseData, this.name, 'chat-resultat-danse.html');
}
/* -------------------------------------------- */
async rollMusique( id ) {
let musique = duplicate(this.getMusique(id));
let competence = duplicate(this.getCompetence("musique"));
competence.data.defaut_carac = "ouie";
let musiqueData = {
competence: competence,
musique: musique,
diffLibre: -musique.data.niveau,
diffConditions: 0,
use: { libre: false, conditions: true, },
carac: {}
};
musiqueData.carac["ouie"] = duplicate(this.data.data.carac["ouie"]);
console.log("rollMusique !!!", musiqueData);
const dialog = await RdDRoll.create(this, musiqueData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-musique.html' }, {
name: 'jet-musique',
label: 'Jouer ' + musique.name,
height: 600,
callbacks: [
this.createCallbackExperience(),
{ action: r => this._musiqueResult(r) }
]
});
dialog.render(true);
}
/* -------------------------------------------- */
async _musiqueResult(musiqueData) {
if ( musiqueData.rolled.isSuccess) {
musiqueData.qualiteFinale = musiqueData.musique.data.niveau + musiqueData.rolled.ptQualite;
} else {
musiqueData.qualiteFinale = musiqueData.competence.data.niveau + musiqueData.rolled.ptQualite;
}
console.log("MUSIQUE", musiqueData)
RdDResolutionTable.displayRollData(musiqueData, this.name, 'chat-resultat-musique.html');
}
/* -------------------------------------------- */
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 _jeuResult(jeudData) {
console.log("JEU", jeudData)
RdDResolutionTable.displayRollData(jeudData, this.name, 'chat-resultat-jeu.html');
}
/* -------------------------------------------- */
async rollRecetteCuisine( id ) {
let cuisine = duplicate(this.getRecetteCuisine(id));
let competence = duplicate(this.getCompetence("cuisine"));
competence.data.defaut_carac = "odoratgout";
let cuisineData = {
competence: competence,
cuisine: cuisine,
diffLibre: -cuisine.data.niveau,
diffConditions: 0,
use: { libre: true, conditions: true, },
carac: {}
};
cuisineData.carac["odoratgout"] = duplicate(this.data.data.carac["odoratgout"]);
console.log("rollRecetteCuisine !!!", cuisineData);
const dialog = await RdDRoll.create(this, cuisineData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-cuisine.html' }, {
name: 'jet-jeu',
label: 'Cuisiner ' + cuisine.name,
height: 600,
callbacks: [
this.createCallbackExperience(),
{ action: r => this._recetteCuisineResult(r) }
]
});
dialog.render(true);
}
/* -------------------------------------------- */
async _recetteCuisineResult(cuisineData) {
if ( cuisineData.rolled.isSuccess) {
cuisineData.qualiteFinale = cuisineData.cuisine.data.niveau + cuisineData.rolled.ptQualite;
} else {
cuisineData.qualiteFinale = cuisineData.competence.data.niveau + cuisineData.rolled.ptQualite;
}
console.log("Cuisine", cuisineData)
RdDResolutionTable.displayRollData(cuisineData, this.name, 'chat-resultat-cuisine.html');
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollMeditation(id) { async rollMeditation(id) {
let meditation = duplicate(this.getMeditation(id)); let meditation = duplicate(this.getMeditation(id));

View File

@ -54,6 +54,9 @@ export class RdDRoll extends Dialog {
surprise: actor.getSurprise(false), surprise: actor.getSurprise(false),
} }
mergeObject(rollData, defaultRollData, { recursive: true, overwrite: false }); mergeObject(rollData, defaultRollData, { recursive: true, overwrite: false });
if ( rollData.forceCarac) {
rollData.carac = rollData.forceCarac;
}
RollDataAjustements.calcul(rollData, actor); RollDataAjustements.calcul(rollData, actor);
} }

View File

@ -294,6 +294,11 @@ export class RdDUtility {
data.data.taches = this.checkNull(data.itemsByType['tache']); data.data.taches = this.checkNull(data.itemsByType['tache']);
data.data.monnaie = this.checkNull(data.itemsByType['monnaie']); data.data.monnaie = this.checkNull(data.itemsByType['monnaie']);
data.data.meditations = this.checkNull(data.itemsByType['meditation']); data.data.meditations = this.checkNull(data.itemsByType['meditation']);
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.jeux = this.checkNull(data.itemsByType['jeu']);
data.data.recettescuisine = this.checkNull(data.itemsByType['recettecuisine']);
data.data.recettesAlchimiques = this.checkNull(data.itemsByType['recettealchimique']); data.data.recettesAlchimiques = this.checkNull(data.itemsByType['recettealchimique']);
data.data.objets = data.data.conteneurs.concat(data.data.materiel).concat(data.data.armes).concat(data.data.armures).concat(data.data.munitions).concat(data.data.livres).concat(data.data.potions).concat(data.data.herbes).concat(data.data.ingredients); data.data.objets = data.data.conteneurs.concat(data.data.materiel).concat(data.data.armes).concat(data.data.armures).concat(data.data.munitions).concat(data.data.livres).concat(data.data.potions).concat(data.data.herbes).concat(data.data.ingredients);
} }

View File

@ -665,6 +665,13 @@ ul, li {
.astrologie-label, .astrologie-label,
.tache-label, .tache-label,
.subacteur-label, .subacteur-label,
.chant-label,
.musique-label,
.chant-label,
.danse-label,
.recette-label,
.jeu-label,
.recettecuisine-label,
.description-label { .description-label {
flex-grow: 2; flex-grow: 2;
} }

View File

@ -99,7 +99,7 @@
<a class="item" data-tab="carac">Carac.</a> <a class="item" data-tab="carac">Carac.</a>
<a class="item" data-tab="competences">Compétences</a> <a class="item" data-tab="competences">Compétences</a>
<a class="item" data-tab="combat">Combat</a> <a class="item" data-tab="combat">Combat</a>
<a class="item" data-tab="blessures">États</a> <a class="item" data-tab="connaissances">Savoirs&Taches</a>
<a class="item" data-tab="hautreve">Haut-Rêve</a> <a class="item" data-tab="hautreve">Haut-Rêve</a>
<a class="item" data-tab="items">Équipement</a> <a class="item" data-tab="items">Équipement</a>
<a class="item" data-tab="description">Description</a> <a class="item" data-tab="description">Description</a>
@ -519,10 +519,11 @@
{{!-- Combat Tab --}} {{!-- Combat Tab --}}
<div class="tab combat" data-group="primary" data-tab="combat"> <div class="tab combat" data-group="primary" data-tab="combat">
<h3 class="blessures-title">Armes et Défenses:</h3>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
<li class="competence-header flexrow"> <li class="competence-header flexrow">
<span class="competence-title competence-label">Armes</span> <span class="competence-title competence-label">Armes</span>
<span class="competence-title competence-label">Lancer l'Initiative</span> <span class="competence-title competence-label">Initiative</span>
<span class="competence-title competence-label">Comp.</span> <span class="competence-title competence-label">Comp.</span>
<span class="competence-title competence-value">Niveau</span> <span class="competence-title competence-value">Niveau</span>
<span class="competence-title competence-value">+dom</span> <span class="competence-title competence-value">+dom</span>
@ -544,13 +545,11 @@
<span class="competence-value"></span> <span class="competence-value"></span>
</li> </li>
</ul> </ul>
</div> <hr>
{{!-- Compteurs/Blessures Tab --}}
<div class="tab blessures" data-group="primary" data-tab="blessures">
{{!-- Liste de blessures --}} {{!-- Liste de blessures --}}
<h3 class="blessures-title">Blessures:</h3>
<div class="flex-group-left flexcol competence-column"> <div class="flex-group-left flexcol competence-column">
<h3 class="blessures-title">Blessures Légeres :</h3> <h4 class="blessures-title">Légères:</h4>
<ul class="blessure-data flexrow alterne-list blessures-list"> <ul class="blessure-data flexrow alterne-list blessures-list">
{{#each data.blessures.legeres.liste as |bless key|}} {{#each data.blessures.legeres.liste as |bless key|}}
<li class="item flexrow blessure-data list-item" data-blessure-type="legere" data-attribute={{key}} data-blessure-index="{{key}}"> <li class="item flexrow blessure-data list-item" data-blessure-type="legere" data-attribute={{key}} data-blessure-index="{{key}}">
@ -582,7 +581,7 @@
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
<h3 class="blessures-title">Blessures Graves :</h3> <h4 class="blessures-title">Graves :</h4>
<ul class="flexrow alterne-list blessures-list"> <ul class="flexrow alterne-list blessures-list">
{{#each data.blessures.graves.liste as |bless key|}} {{#each data.blessures.graves.liste as |bless key|}}
<li class="item flexrow list-item" data-blessure-type="grave" data-attribute={{key}} data-blessure-index="{{key}}" > <li class="item flexrow list-item" data-blessure-type="grave" data-attribute={{key}} data-blessure-index="{{key}}" >
@ -614,7 +613,7 @@
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
<h3 class="blessures-title">Blessure Critique :</h3> <h4 class="blessures-title">Critique :</h4>
<ul class="flexrow alterne-list blessures-list"> <ul class="flexrow alterne-list blessures-list">
{{#each data.blessures.critiques.liste as |bless key|}} {{#each data.blessures.critiques.liste as |bless key|}}
<li class="item list-item flexrow" data-blessure-type="critique" data-attribute={{key}} data-blessure-index="{{key}}" > <li class="item list-item flexrow" data-blessure-type="critique" data-attribute={{key}} data-blessure-index="{{key}}" >
@ -647,7 +646,188 @@
{{/each}} {{/each}}
</ul> </ul>
</div> </div>
</div>
{{!-- Connaissances Tab --}}
<div class="tab connaissances" data-group="primary" data-tab="connaissances">
<h3>Chants :</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>
<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>
<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>Jeux :</h3>
<ul class="item-list alterne-list">
{{#each data.jeux as |jeu id|}}
<li class="item flexrow list-item" data-item-id="{{jeu._id}}"><span class="competence-title jeu-label"><a>{{jeu.name}} (base {{jeu.data.base}})</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 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|}}
<li class="item flexrow list-item" data-item-id="{{recette._id}}"><span class="competence-title recette-label item-edit"><a>{{recette.name}}</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>Tâches</h3><a id='creer-tache'>Créer une nouvelle Tâche</a>
<ul class="item-list alterne-list">
{{#each data.taches as |tache id|}}
<li class="item flexrow list-item" data-item-id="{{tache._id}}"><span class="competence-title tache-label"><a>{{tache.name}} ({{tache.data.points_de_tache_courant}}/{{tache.data.points_de_tache}})</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>
<hr>
</div>
{{!-- hautreve Tab --}}
<div class="tab hautreve " data-group="primary" data-tab="hautreve" style="height:200px">
<div>
<h3>Haut rêve:</h3>
<ul class="item-list">
<li class="item flexrow">
<span class="competence-label">Position en TMR :</span>
<span>
{{#if data.isGM}}
<input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/>
{{else}}
{{data.reve.tmrpos.coord}}
{{/if}}
</span>
</li>
<li class="item flexrow">
<span class="competence-label">Seuil de Rêve :</span>
<span>
{{#if data.isGM}}
<input class="seuil-reve-value" type="text" name="data.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/>
{{else}}
{{data.reve.seuil.value}}
{{/if}}
</span>
</li>
<li class="item flexrow" >
<span class="competence-label">Refoulement : </span>
<span>
{{#if data.isGM}}
<input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/>
{{else}}
{{data.reve.refoulement.value}}
{{/if}}
</span>
</li>
<li class="item flexrow" >
<span class="astrologie-label"><a id="jet-astrologie">Astrologie : Nombres Astraux</a></span>
</li>
</ul>
</div>
<hr>
<div>
<h3>Sorts:</h3>
<ul class="item-list">
{{#each data.sorts as |mysort key|}}
<li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
<span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span>
<span>{{mysort.data.draconic}} / {{mysort.data.difficulte}}</span>
<div class="item-controls">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<hr>
<div>
<h3>Sorts en Réserve:</h3>
<ul class="item-list">
{{#each data.sortReserve as |reserve key|}}
<li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
<span class="sort-label"> {{reserve.sort.name}} - {{reserve.coord}}</span>
</li>
{{/each}}
</ul>
</div>
<hr>
<div>
<h3>Méditations:</h3>
<ul class="item-list">
{{#each data.meditations as |meditation key|}}
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
<span class="meditation-label"><a data-id="{{meditation._id}}">{{meditation.name}} - {{meditation.data.competence}}</a></span>
<div class="item-controls">
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<hr>
<div>
<h3>Cases Spéciales:</h3>
<ul class="item-list">
{{#each data.caseSpeciales as |casetmr key|}}
<li class="item flexrow" data-item-id="{{casetmr._id}}" data-attribute="{{key}}">
<span class="case-label"><a data-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{!-- Queues, Souffles, Tetes, Ombre --}} {{!-- Queues, Souffles, Tetes, Ombre --}}
<hr>
<h3>Queues:</h3> <h3>Queues:</h3>
<ul class="flex-group-left"> <ul class="flex-group-left">
{{#each data.queues as |queue key|}} {{#each data.queues as |queue key|}}
@ -692,98 +872,7 @@
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
</div>
{{!-- hautreve Tab --}}
<div class="tab hautreve " data-group="primary" data-tab="hautreve" style="height:200px">
<div>
<ul class="item-list">
<li class="item flexrow">
<span class="competence-label">Position en TMR :</span>
<span>
{{#if data.isGM}}
<input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/>
{{else}}
{{data.reve.tmrpos.coord}}
{{/if}}
</span>
</li>
<li class="item flexrow">
<span class="competence-label">Seuil de Rêve :</span>
<span>
{{#if data.isGM}}
<input class="seuil-reve-value" type="text" name="data.reve.seuil.value" value="{{data.reve.seuil.value}}" data-dtype="Number"/>
{{else}}
{{data.reve.seuil.value}}
{{/if}}
</span>
</li>
<li class="item flexrow" >
<span class="competence-label">Refoulement : </span>
<span>
{{#if data.isGM}}
<input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/>
{{else}}
{{data.reve.refoulement.value}}
{{/if}}
</span>
</li>
<li class="item flexrow" >
<span class="astrologie-label"><a id="jet-astrologie">Astrologie : Nombres Astraux</a></span>
</li>
</ul>
</div>
<div>
<span><strong>Sorts:</strong></span>
<ul class="item-list">
{{#each data.sorts as |mysort key|}}
<li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
<span class="sort-label"> <a data-id="{{mysort._id}}">{{mysort.name}}</a></span>
<span>{{mysort.data.draconic}} / {{mysort.data.difficulte}}</span>
<div class="item-controls">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div>
<span><strong>Sorts en Réserve:</strong></span>
<ul class="item-list">
{{#each data.sortReserve as |reserve key|}}
<li class="item flexrow" data-item-id="{{mysort._id}}" data-attribute="{{key}}">
<span class="sort-label"> {{reserve.sort.name}} - {{reserve.coord}}</span>
</li>
{{/each}}
</ul>
</div>
<div>
<span><strong>Méditations :</strong></span>
<ul class="item-list">
{{#each data.meditations as |meditation key|}}
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
<span class="meditation-label"><a data-id="{{meditation._id}}">{{meditation.name}} - {{meditation.data.competence}}</a></span>
<div class="item-controls">
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div>
<span><strong>Cases Spéciales:</strong></span>
<ul class="item-list">
{{#each data.caseSpeciales as |casetmr key|}}
<li class="item flexrow" data-item-id="{{casetmr._id}}" data-attribute="{{key}}">
<span class="case-label"><a data-id="{{casetmr._id}}">{{casetmr.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div> </div>
{{!-- Equipment Tab --}} {{!-- Equipment Tab --}}
@ -941,36 +1030,6 @@
</ul> </ul>
</article> </article>
<article class="flexcol">
<h3>Tâches</h3><a id='creer-tache'>Créer une nouvelle Tâche</a>
<ul class="item-list alterne-list">
{{#each data.taches as |tache id|}}
<li class="item flexrow list-item" data-item-id="{{tache._id}}"><span class="competence-title tache-label"><a>{{tache.name}} ({{tache.data.points_de_tache_courant}}/{{tache.data.points_de_tache}})</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>
<hr>
</article>
<article class="flexcol">
<h3>Recettes Alchimiques</h3>
<ul class="item-list alterne-list">
{{#each data.recettesAlchimiques as |recette id|}}
<li class="item flexrow list-item" data-item-id="{{recette._id}}"><span class="competence-title recette-label item-edit"><a>{{recette.name}} </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>
<hr>
</article>
<article class="flexcol"> <article class="flexcol">
<h3>Biographie : </h3> <h3>Biographie : </h3>
<div class="form-group editor"> <div class="form-group editor">

View File

@ -0,0 +1,13 @@
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_chant.png" alt="chant" height="32" width="32" />
<h4>
{{alias}} tente de chanter la chanson : {{chant.name}} (niveau {{chant.data.niveau}})
</h4>
{{> "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>

View File

@ -0,0 +1,13 @@
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_cuisine.webp" alt="cuisine" height="32" width="32" />
<h4>
{{alias}} tente cuisiner la recette : {{cuisine.name}} (niveau {{cuisine.data.niveau}})
</h4>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
<hr>
<div>
{{#if rolled.isSuccess}}
{{alias}} réussit sa cuisine, avec un plat de {{qualiteFinale}} pour {{cuisine.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 {{cuisine.data.sust}} Points de Sustentation
{{/if}}
</div>

View File

@ -0,0 +1,13 @@
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_danse.webp" alt="danse" height="32" width="32" />
<h4>
{{alias}} tente de danser : {{danse.name}} (niveau {{danse.data.niveau}})
</h4>
{{> "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>

View File

@ -0,0 +1,13 @@
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_jeu.webp" alt="jeu" height="32" width="32" />
<h4>
{{alias}} joue à : {{jeu.name}}
</h4>
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
<hr>
<div>
{{#if rolled.isSuccess}}
{{alias}} a gagné la partie !
{{else}}
{{alias}} a perdu ...
{{/if}}
</div>

View File

@ -0,0 +1,13 @@
<img class="chat-icon" src="systems/foundryvtt-reve-de-dragon/icons/competence_musique.webp" alt="musique" height="32" width="32" />
<h4>
{{alias}} tente de chanter la chanson : {{musique.name}} (niveau {{musique.data.niveau}})
</h4>
{{> "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>

View File

@ -0,0 +1,37 @@
<form class="dialog-roll-sort">
<div class="form-group">
<ul>
<li><label for="categorie">Chant : {{chant.name}}</label></li>
<li><label for="categorie">Jet : OUIE / {{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>

View File

@ -0,0 +1,37 @@
<form class="dialog-roll-sort">
<div class="form-group">
<ul>
<li><label for="categorie">Cuisiner : {{cuisine.name}}</label></li>
<li><label for="categorie">Jet : ODORAT-GOUT / {{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>

View File

@ -0,0 +1,46 @@
<form class="dialog-roll-danse">
<div class="form-group">
<ul>
<li><label for="categorie">Danse : {{danse.name}}</label></li>
<li><label for="categorie">Jet : APPARENCE ou AGILITE / {{competence.name}}</label></li>
</ul>
</div>
<label for="categorie">Caractéristique</label>
<select name="carac" id="carac" class="select-diff" data-dtype="String">
{{#select carac}}
{{#each carac as |caracitem key|}}
<option value={{key}}>{{caracitem.label}}</option>
{{/each}}
{{/select}}
</select>
<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>

View File

@ -0,0 +1,48 @@
<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>
</ul>
</div>
<label for="categorie">Caractéristique</label>
<select name="carac" id="carac" class="select-diff" data-dtype="String">
{{#select carac}}
{{#each carac as |caracitem key|}}
<option value={{key}}>{{caracitem.label}}</option>
{{/each}}
{{/select}}
</select>
<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>

View File

@ -0,0 +1,37 @@
<form class="dialog-roll-sort">
<div class="form-group">
<ul>
<li><label for="categorie">Jouer une Musique : {{musique.name}}</label></li>
<li><label for="categorie">Jet : OUIE / {{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>