#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');
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) => {
const li = $(event.currentTarget).parents(".item");
let actorId = li.data('actor-id');

View File

@ -247,6 +247,21 @@ export class RdDActor extends Actor {
getMeditation(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() {
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);
}
/* -------------------------------------------- */
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) {
let meditation = duplicate(this.getMeditation(id));

View File

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

View File

@ -294,6 +294,11 @@ export class RdDUtility {
data.data.taches = this.checkNull(data.itemsByType['tache']);
data.data.monnaie = this.checkNull(data.itemsByType['monnaie']);
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.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,
.tache-label,
.subacteur-label,
.chant-label,
.musique-label,
.chant-label,
.danse-label,
.recette-label,
.jeu-label,
.recettecuisine-label,
.description-label {
flex-grow: 2;
}

View File

@ -99,7 +99,7 @@
<a class="item" data-tab="carac">Carac.</a>
<a class="item" data-tab="competences">Compétences</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="items">Équipement</a>
<a class="item" data-tab="description">Description</a>
@ -519,10 +519,11 @@
{{!-- Combat Tab --}}
<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">
<li class="competence-header flexrow">
<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-value">Niveau</span>
<span class="competence-title competence-value">+dom</span>
@ -544,159 +545,195 @@
<span class="competence-value"></span>
</li>
</ul>
<hr>
{{!-- Liste de blessures --}}
<h3 class="blessures-title">Blessures:</h3>
<div class="flex-group-left flexcol competence-column">
<h4 class="blessures-title">Légères:</h4>
<ul class="blessure-data flexrow alterne-list blessures-list">
{{#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}}">
<ul>
<li class="item-control blessure-control" title="Blessure Légère" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
<h4 class="blessures-title">Graves :</h4>
<ul class="flexrow alterne-list blessures-list">
{{#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}}" >
<ul>
<li class="item-control blessure-control" title="Blessure Grave" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
<h4 class="blessures-title">Critique :</h4>
<ul class="flexrow alterne-list blessures-list">
{{#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}}" >
<ul>
<li class="flex-group-center item-control blessure-control" title="Blessure Critique" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
</div>
</div>
{{!-- Compteurs/Blessures Tab --}}
<div class="tab blessures" data-group="primary" data-tab="blessures">
{{!-- Liste de blessures --}}
<div class="flex-group-left flexcol competence-column">
<h3 class="blessures-title">Blessures Légeres :</h3>
<ul class="blessure-data flexrow alterne-list blessures-list">
{{#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}}">
<ul>
<li class="item-control blessure-control" title="Blessure Légère" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
<h3 class="blessures-title">Blessures Graves :</h3>
<ul class="flexrow alterne-list blessures-list">
{{#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}}" >
<ul>
<li class="item-control blessure-control" title="Blessure Grave" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
<h3 class="blessures-title">Blessure Critique :</h3>
<ul class="flexrow alterne-list blessures-list">
{{#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}}" >
<ul>
<li class="flex-group-center item-control blessure-control" title="Blessure Critique" data-blessure-active="{{bless.active}}">
{{#if bless.active}}
<i class="fas fa-circle"></i>
{{else}}
<i class="fas fa-genderless"></i>
{{/if}}
</li>
<li>
Premiers soins
<input class="blessures-soins" type="text" name='premiers_soins' data-dtype="number" value="{{bless.premiers_soins}}"/>
</li>
<li>
Soins complets
<input class="blessures-soins" type="text" name='soins_complets' data-dtype="number" value="{{bless.soins_complets}}"/>
</li>
<li>
Jours
<input class="blessures-soins" type="text" name='jours' data-dtype="number" value="{{bless.jours}}"/>
</li>
<li>
Loc.
<input class="blessures-soins" type="text" name='localisation' data-dtype="String" value="{{bless.loc}}"/>
</li>
</ul>
</li>
{{/each}}
</ul>
</div>
{{!-- Queues, Souffles, Tetes, Ombre --}}
<h3>Queues:</h3>
<ul class="flex-group-left">
{{#each data.queues as |queue key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{queue._id}}">{{queue.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
{{!-- 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>Souffles:</h3>
<ul class="item-list">
{{#each data.souffles as |souffle key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Tetes:</h3>
<ul class="item-list">
{{#each data.tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{tete._id}}">{{tete.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Ombres de Thanatos:</h3>
<ul class="item-list">
{{#each data.ombres as |ombre key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{ombre._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
<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>
@ -733,8 +770,9 @@
</li>
</ul>
</div>
<hr>
<div>
<span><strong>Sorts:</strong></span>
<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}}">
@ -747,8 +785,9 @@
{{/each}}
</ul>
</div>
<hr>
<div>
<span><strong>Sorts en Réserve:</strong></span>
<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}}">
@ -757,8 +796,9 @@
{{/each}}
</ul>
</div>
<hr>
<div>
<span><strong>Méditations :</strong></span>
<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}}">
@ -771,8 +811,9 @@
{{/each}}
</ul>
</div>
<hr>
<div>
<span><strong>Cases Spéciales:</strong></span>
<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}}">
@ -784,6 +825,54 @@
{{/each}}
</ul>
</div>
{{!-- Queues, Souffles, Tetes, Ombre --}}
<hr>
<h3>Queues:</h3>
<ul class="flex-group-left">
{{#each data.queues as |queue key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{queue._id}}">{{queue.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Souffles:</h3>
<ul class="item-list">
{{#each data.souffles as |souffle key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{souffle._id}}">{{souffle.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Tetes:</h3>
<ul class="item-list">
{{#each data.tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{tete._id}}">{{tete.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<h3>Ombres de Thanatos:</h3>
<ul class="item-list">
{{#each data.ombres as |ombre key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{ombre._id}}">
<span class="queuesouffle-label"> <a data-item-id="{{ombre._id}}">{{ombre.name}}</a></span>
<div class="item-controls">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
{{!-- Equipment Tab --}}
@ -941,36 +1030,6 @@
</ul>
</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">
<h3>Biographie : </h3>
<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>