Merge branch 'amelioration-diverses' into 'v1.2'

Amelioration diverses

See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!100
This commit is contained in:
Leratier Bretonnien 2021-01-03 18:56:53 +00:00
commit 4461899abc
12 changed files with 126 additions and 107 deletions

View File

@ -20,7 +20,8 @@ export class RdDActorSheet extends ActorSheet {
tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac"}], tabs: [{navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac"}],
dragDrop: [{dragSelector: ".item-list .item", dropSelector: null}], dragDrop: [{dragSelector: ".item-list .item", dropSelector: null}],
editCaracComp: false, editCaracComp: false,
cacherCompetencesNiveauBase: false, montrerCompetencesNiveauBase: false,
montrerArchetype: false
}); });
} }
@ -28,17 +29,13 @@ export class RdDActorSheet extends ActorSheet {
getData() { getData() {
let data = super.getData(); let data = super.getData();
// Gestion du lock/unlock des zones éditables (carac+compétences)
data.data.editCaracComp = this.options.editCaracComp; data.data.editCaracComp = this.options.editCaracComp;
data.data.lockUnlockText = (this.options.editCaracComp) ? "Bloquer" : "Débloquer"; data.data.montrerCompetencesNiveauBase = this.options.montrerCompetencesNiveauBase;
data.data.lockUnlockIcon = (this.options.editCaracComp) ? "unlocked.svg" : "locked.svg"; data.data.montrerArchetype = this.options.montrerArchetype;
// Gestion de l'affichage total/partiel des compétences
data.data.cacherCompetencesNiveauBase = this.options.cacherCompetencesNiveauBase;
data.data.showHideCompetenceText = (this.options.cacherCompetencesNiveauBase) ? "Montrer tout" : "Filtrer" ;
data.data.showHideCompetenceIcon = (this.options.cacherCompetencesNiveauBase) ? "no-filter.svg" : "filter.svg";
let compCategorieNiveau = RdDUtility.getLevelCategory(); // recup catégorie let compCategorieNiveau = RdDUtility.getLevelCategory(); // recup catégorie
data.itemsByType = RdDUtility.buildItemsClassification(data.items); data.itemsByType = RdDUtility.buildItemsClassification(data.items);
// Competence per category // Competence per category
data.competenceByCategory = {}; data.competenceByCategory = {};
let competenceXPTotal = 0; let competenceXPTotal = 0;
@ -54,7 +51,7 @@ export class RdDActorSheet extends ActorSheet {
if (!RdDUtility.isTronc( item.name ) ) // Ignorer les compétences 'troncs' à ce stade if (!RdDUtility.isTronc( item.name ) ) // Ignorer les compétences 'troncs' à ce stade
competenceXPTotal += RdDUtility.computeCompetenceXPCost(item); competenceXPTotal += RdDUtility.computeCompetenceXPCost(item);
item.data.afficherCompetence = true; item.data.afficherCompetence = true;
if ( data.data.cacherCompetencesNiveauBase && (Number(item.data.niveau) == Number(compCategorieNiveau[item.data.categorie]) ) ) { if ( data.data.montrerCompetencesNiveauBase && (Number(item.data.niveau) == Number(compCategorieNiveau[item.data.categorie]) ) ) {
item.data.afficherCompetence = false; item.data.afficherCompetence = false;
} }
list.push(item); list.push(item);
@ -170,31 +167,6 @@ export class RdDActorSheet extends ActorSheet {
d.render(true); d.render(true);
} }
/* -------------------------------------------- */
afficheResumeArchetype() {
let levelCategory = RdDUtility.getLevelCategory();
let labelCategory = RdDUtility.getLabelCategory();
let contentHTML = "";
for (let compCategory in this.competenceByCategory) {
console.log(">>>>", compCategory);
contentHTML += "<br><b>" + labelCategory[compCategory] + "</b>";
for (let comp of this.competenceByCategory[compCategory]) {
if ( !comp.data.niveau_archetype ) comp.data.niveau_archetype = levelCategory[compCategory];
contentHTML += "<br>" + comp.name + " : " + comp.data.niveau_archetype;
}
}
let dialogData = {
content: contentHTML,
buttons: {
one: {
icon: '<i class="fas fa-check"></i>',
label: "Fermer"
}
}
}
new Dialog( dialogData ).render(true);
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async createEmptyTache( ) { async createEmptyTache( ) {
await this.actor.createOwnedItem( { name: 'Nouvelle tache', type: 'tache'}, { renderSheet: true } ); await this.actor.createOwnedItem( { name: 'Nouvelle tache', type: 'tache'}, { renderSheet: true } );
@ -419,6 +391,11 @@ export class RdDActorSheet extends ActorSheet {
let compName = event.currentTarget.attributes.compname.value; let compName = event.currentTarget.attributes.compname.value;
this.actor.updateCompetenceXP( compName, parseInt(event.target.value) ); this.actor.updateCompetenceXP( compName, parseInt(event.target.value) );
} ); } );
// On competence archetype change
html.find('.competence-archetype').change((event) => {
let compName = event.currentTarget.attributes.compname.value;
this.actor.updateCompetenceArchetype( compName, parseInt(event.target.value) );
} );
} }
// Gestion du bouton lock/unlock // Gestion du bouton lock/unlock
@ -426,8 +403,12 @@ export class RdDActorSheet extends ActorSheet {
this.options.editCaracComp = !this.options.editCaracComp; this.options.editCaracComp = !this.options.editCaracComp;
this.render(true); this.render(true);
}); });
html.find('.show-hide-competences').click((event) => { html.find('#show-hide-competences').click((event) => {
this.options.cacherCompetencesNiveauBase = !this.options.cacherCompetencesNiveauBase; this.options.montrerCompetencesNiveauBase = !this.options.montrerCompetencesNiveauBase;
this.render(true);
});
html.find('#show-hide-archetype').click((event) => {
this.options.montrerArchetype = !this.options.montrerArchetype;
this.render(true); this.render(true);
}); });
@ -458,12 +439,6 @@ export class RdDActorSheet extends ActorSheet {
html.find('#ethylisme').change((event) => { html.find('#ethylisme').change((event) => {
this.actor.setEthylisme(parseInt(event.target.value) ); this.actor.setEthylisme(parseInt(event.target.value) );
} ); } );
// Dialog d'archetype
html.find("#affiche-archetype").click((event) => {
this.afficheResumeArchetype()
} );
html.find('#stress-test').click((event) => { html.find('#stress-test').click((event) => {
this.actor.stressTest(); this.actor.stressTest();
this.render(true); this.render(true);

View File

@ -611,6 +611,18 @@ export class RdDActor extends Actor {
console.log("Competence not found", compName); console.log("Competence not found", compName);
} }
} }
/* -------------------------------------------- */
async updateCompetenceArchetype( compName, compValue )
{
let comp = this.getCompetence(compName);
if ( comp ) {
const update = {_id: comp._id, 'data.niveau_archetype': compValue };
const updated = await this.updateEmbeddedEntity("OwnedItem", update); // Updates one EmbeddedEntity
} else {
console.log("Competence not found", compName);
}
}
/* -------------------------------------------- */ /* -------------------------------------------- */
async updateCompteurValue( fieldName, fieldValue ) async updateCompteurValue( fieldName, fieldValue )

View File

@ -84,7 +84,7 @@ export class RdDBonus {
/* -------------------------------------------- */ /* -------------------------------------------- */
static _dmgParticuliere(rollData) { static _dmgParticuliere(rollData) {
return rollData.particuliereAttaque == 'force' ? 5 : 0; return rollData.particuliere == 'force' ? 5 : 0;
} }
} }

View File

@ -247,7 +247,7 @@ export class RdDCombat {
rollData.show = { rollData.show = {
cible: this.target ? this.defender.data.name : 'la cible', cible: this.target ? this.defender.data.name : 'la cible',
isRecul: (rollData.particuliereAttaque == 'force' || rollData.tactique == 'charge') isRecul: (rollData.particuliere == 'force' || rollData.tactique == 'charge')
} }
await RdDResolutionTable.displayRollData(rollData, this.attacker.name, 'chat-resultat-attaque.html'); await RdDResolutionTable.displayRollData(rollData, this.attacker.name, 'chat-resultat-attaque.html');
@ -299,17 +299,17 @@ export class RdDCombat {
/* -------------------------------------------- */ /* -------------------------------------------- */
_filterArmesParade(items, competence) { _filterArmesParade(items, competence) {
let itemsEquipped = items.filter(item => item.data.equipe == true ); items = items.filter(item => item.data.equipe == true );
switch (competence.data.categorie) { switch (competence.data.categorie) {
case 'tir': case 'tir':
case 'lancer': case 'lancer':
return items.filter(item => RdDItemArme.getCategorieParade(itemsEquipped) == 'boucliers') return items.filter(item => RdDItemArme.getCategorieParade(item) == 'boucliers')
default: default:
// Le fléau ne peut être paré quau bouclier p115 // Le fléau ne peut être paré quau bouclier p115
if (competence.name == "Fléau"){ if (competence.name == "Fléau"){
return items.filter(item => RdDItemArme.getCategorieParade(itemsEquipped) == 'boucliers') return items.filter(item => RdDItemArme.getCategorieParade(item) == 'boucliers')
} }
return items.filter(item => RdDItemArme.getCategorieParade(itemsEquipped)); return items.filter(item => RdDItemArme.getCategorieParade(item));
} }
} }
@ -336,7 +336,7 @@ export class RdDCombat {
/* -------------------------------------------- */ /* -------------------------------------------- */
async choixParticuliere(rollData, choix) { async choixParticuliere(rollData, choix) {
console.log("RdDCombat.choixParticuliere >>>", rollData, choix); console.log("RdDCombat.choixParticuliere >>>", rollData, choix);
rollData.particuliereAttaque = choix; rollData.particuliere = choix;
await this._onAttaqueNormale(rollData); await this._onAttaqueNormale(rollData);
} }
@ -404,7 +404,7 @@ export class RdDCombat {
} }
static isAttaqueFinesse(attackerRoll) { static isAttaqueFinesse(attackerRoll) {
return attackerRoll && attackerRoll.particuliereAttaque == 'finesse'; return attackerRoll && attackerRoll.particuliere == 'finesse';
} }
needParadeSignificative(attackerRoll, armeParade) { needParadeSignificative(attackerRoll, armeParade) {
@ -555,7 +555,7 @@ export class RdDCombat {
// Est-ce une parade normale? // Est-ce une parade normale?
if (rollData.arme && attackerRoll && !rollData.rolled.isPart) { if (rollData.arme && attackerRoll && !rollData.rolled.isPart) {
// Est-ce que l'attaque est une particulière en force ou une charge // Est-ce que l'attaque est une particulière en force ou une charge
if (rollData.needResist || attackerRoll.particuliereAttaque == 'force' || attackerRoll.tactique == 'charge') { if (rollData.needResist || attackerRoll.particuliere == 'force' || attackerRoll.tactique == 'charge') {
rollData.show = rollData.show || {} rollData.show = rollData.show || {}
@ -621,7 +621,7 @@ export class RdDCombat {
} }
_isAttaqueCauseRecul(attaque) { _isAttaqueCauseRecul(attaque) {
return attaque.particuliereAttaque == 'force' || attaque.tactique == 'charge'; return attaque.particuliere == 'force' || attaque.tactique == 'charge';
} }
_computeImpactRecul(attaque) { _computeImpactRecul(attaque) {

View File

@ -431,6 +431,9 @@ export class RdDUtility {
xp += competence_xp_par_niveau[i+10]; xp += competence_xp_par_niveau[i+10];
//console.log(i, i+10, competence_xp_par_niveau[i+10]); //console.log(i, i+10, competence_xp_par_niveau[i+10]);
} }
if (competence.data.categorie == 'draconic') {
xp+= competence.data.xp_sort;
}
return xp; return xp;
} }

View File

@ -101,12 +101,12 @@
{{#each data.competencecreature as |comp key|}} {{#each data.competencecreature as |comp key|}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}" /> <img class="sheet-competence-img" src="{{comp.img}}" />
<span class="competence-label" name="data.competencecreature[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value creature-carac" type="text" <input class="competence-value creature-carac" type="text"
name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}" name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}"
value="{{comp.data.carac_value}}" data-dtype="number" /> value="{{comp.data.carac_value}}" data-dtype="number" />
<input class="competence-value creature-niveau" type="text" <input class="competence-value creature-niveau" type="text"
name="data.competencecreature[{{key}}].data.niveau" compname="{{comp.name}}" compname="{{comp.name}}"
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" /> value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />
<input class="competence-value creature-dommages" type="text" <input class="competence-value creature-dommages" type="text"
name="data.competencecreature[{{key}}]].data.dommages" compname="{{comp.name}}" name="data.competencecreature[{{key}}]].data.dommages" compname="{{comp.name}}"

View File

@ -74,12 +74,12 @@
{{#each data.competencecreature as |comp key|}} {{#each data.competencecreature as |comp key|}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}" /> <img class="sheet-competence-img" src="{{comp.img}}" />
<span class="competence-label" name="data.competencecreature[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value creature-carac" type="text" <input class="competence-value creature-carac" type="text"
name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}" name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}"
value="{{comp.data.carac_value}}" data-dtype="number" /> value="{{comp.data.carac_value}}" data-dtype="number" />
<input class="competence-value creature-niveau" type="text" <input class="competence-value creature-niveau" type="text"
name="data.competencecreature[{{key}}].data.niveau" compname="{{comp.name}}" compname="{{comp.name}}"
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" /> value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />
<input class="competence-value creature-dommages" type="text" <input class="competence-value creature-dommages" type="text"
name="data.competencecreature[{{key}}].data.dommages" compname="{{comp.name}}" name="data.competencecreature[{{key}}].data.dommages" compname="{{comp.name}}"

View File

@ -101,12 +101,12 @@
{{#each data.competencecreature as |comp key|}} {{#each data.competencecreature as |comp key|}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}" /> <img class="sheet-competence-img" src="{{comp.img}}" />
<span class="competence-label" name="data.competencecreature[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value creature-carac" type="text" <input class="competence-value creature-carac" type="text"
name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}" name="data.competencecreature[{{key}}].data.carac_value" compname="{{comp.name}}"
value="{{comp.data.carac_value}}" data-dtype="number" /> value="{{comp.data.carac_value}}" data-dtype="number" />
<input class="competence-value creature-niveau" type="text" <input class="competence-value creature-niveau" type="text"
name="data.competencecreature[{{key}}].data.niveau" compname="{{comp.name}}" compname="{{comp.name}}"
value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" /> value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" />
<input class="competence-value creature-dommages" type="text" <input class="competence-value creature-dommages" type="text"
name="data.competencecreature[{{key}}].data.dommages" compname="{{comp.name}}" name="data.competencecreature[{{key}}].data.dommages" compname="{{comp.name}}"

View File

@ -98,7 +98,9 @@
<div class="tab items" data-group="primary" data-tab="carac"> <div class="tab items" data-group="primary" data-tab="carac">
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left flexcol"> <div class="flex-group-left flexcol">
<span><a class="lock-unlock-sheet"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/{{data.lockUnlockIcon}}" alt="blocker/débloquer">{{data.lockUnlockText}}</a></span> <span><a class="lock-unlock-sheet"><img class="small-button-container"
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
>{{#if data.editCaracComp}}Vérouiller{{else}}Dévérouiller{{/if}}</a></span>
<ul class="carac-list alterne-list"> <ul class="carac-list alterne-list">
{{#each data.carac as |carac key|}} {{#each data.carac as |carac key|}}
<li class="competence flexrow list-item" data-attribute="{{key}}"> <li class="competence flexrow list-item" data-attribute="{{key}}">
@ -184,8 +186,15 @@
{{!-- Compétences Tab --}} {{!-- Compétences Tab --}}
<div class="tab competences" data-group="primary" data-tab="competences"> <div class="tab competences" data-group="primary" data-tab="competences">
<div class="flexrow"> <div class="flexrow">
<span><a class="lock-unlock-sheet"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/{{data.lockUnlockIcon}}" alt="blocker/débloquer">{{data.lockUnlockText}}</a></span> <span><a class="lock-unlock-sheet"><img class="small-button-container"
<span><a class="show-hide-competences"><img class="small-button-container" src="systems/foundryvtt-reve-de-dragon/icons/{{data.showHideCompetenceIcon}}" alt="filter/montrer tout">{{data.showHideCompetenceText}}</a></span> src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.editCaracComp}}unlocked.svg{{else}}locked.svg{{/if}}" alt="blocker/débloquer"
>{{#if data.editCaracComp}}Vérouiller{{else}}Dévérouiller{{/if}}</a></span>
<span><a id="show-hide-competences"><img class="small-button-container"
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.montrerCompetencesNiveauBase}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer tout"
>{{#if data.montrerCompetencesNiveauBase}}Montrer tout{{else}}Filtrer{{/if}}</a></span>
<span><a id="show-hide-archetype"><img class="small-button-container"
src="systems/foundryvtt-reve-de-dragon/icons/{{#if data.montrerArchetype}}no-filter.svg{{else}}filter.svg{{/if}}" alt="filter/montrer l'archétype"
>{{#if data.montrerArchetype}}Masquer l'archétype{{else}}Voir l'archétype{{/if}}</a></span>
</div> </div>
<div class="grid grid-2col"> <div class="grid grid-2col">
<div class="flex-group-left flexcol competence-column"> <div class="flex-group-left flexcol competence-column">
@ -197,13 +206,16 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.generale[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.generale[{{key}}].data.value" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.generale[{{key}}]].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -217,13 +229,16 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.particuliere[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.particuliere[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.particuliere[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -236,13 +251,16 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.specialisee[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.specialisee[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.specialisee[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -258,13 +276,16 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.melee[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.melee[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.melee[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.melee[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -278,13 +299,16 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.tir[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.tir[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.tir[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.tir[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -298,13 +322,16 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.lancer[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.lancer[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number"{{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number"{{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.lancer[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.lancer[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -318,13 +345,16 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.connaissance[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -338,13 +368,17 @@
{{#if data.afficherCompetence}} {{#if data.afficherCompetence}}
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label" name="data.competenceByCategory.draconic[{{key}}].name"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" name="data.competenceByCategory.draconic[{{key}}].data.niveau" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp-sort" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp_sort" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <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-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> <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>
{{#if ../data.montrerArchetype}}
<input class="competence-archetype" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
{{/if}}
</li> </li>
{{/if}} {{/if}}
{{/each}} {{/each}}
@ -355,9 +389,6 @@
<span class="generic-label">Total XP compétences</span> <span class="generic-label">Total XP compétences</span>
<span class="competence-value">{{data.competenceXPTotal}}</span> <span class="competence-value">{{data.competenceXPTotal}}</span>
</li> </li>
<li class="item flexrow">
<span class="generic-label"><a id="affiche-archetype">Voir l'Archetype</a></span>
</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -378,7 +409,7 @@
<li class="item flexrow list-item" data-item-id="{{arme._id}}"> <li class="item flexrow list-item" data-item-id="{{arme._id}}">
<span class="arme-label" name="data.armes[{{key}}].name"><a data-competence-name="{{arme.data.competence}}">{{arme.name}}</a></span> <span class="arme-label" name="data.armes[{{key}}].name"><a data-competence-name="{{arme.data.competence}}">{{arme.name}}</a></span>
<span class="arme-initiative" ><a data-arme-name="{{arme.name}}" data-competence-name="{{arme.data.competence}}">{{arme.data.initiative}}</a></span> <span class="arme-initiative" ><a data-arme-name="{{arme.name}}" data-competence-name="{{arme.data.competence}}">{{arme.data.initiative}}</a></span>
<span class="competence-label" name="data.armes[{{key}}].data.competence">{{arme.data.competence}}</span> <span class="competence-label">{{arme.data.competence}}</span>
<span class="competence-value" name="data.armes[{{key}}].data.niveau">{{numberFormat arme.data.niveau decimals=0 sign=true}}</span> <span class="competence-value" name="data.armes[{{key}}].data.niveau">{{numberFormat arme.data.niveau decimals=0 sign=true}}</span>
<span class="competence-value" name="data.armes[{{key}}].data.dommages">{{numberFormat arme.data.dommages decimals=0 sign=true}}</span> <span class="competence-value" name="data.armes[{{key}}].data.dommages">{{numberFormat arme.data.dommages decimals=0 sign=true}}</span>
</li> </li>
@ -404,19 +435,19 @@
</li> </li>
<li> <li>
Premiers soins Premiers soins
<input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.premiers_soins}}"/>
</li> </li>
<li> <li>
Soins complets Soins complets
<input class="blessures-soins" type="text" name="soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.soins_complets}}"/>
</li> </li>
<li> <li>
Jours Jours
<input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.jours}}"/>
</li> </li>
<li> <li>
Loc. Loc.
<input class="blessures-soins" type="text" name="localisation" data-dtype="String" value="{{bless.loc}}"/> <input class="blessures-soins" type="text" data-dtype="String" value="{{bless.loc}}"/>
</li> </li>
</ul> </ul>
</li> </li>
@ -436,19 +467,19 @@
</li> </li>
<li> <li>
Premiers soins Premiers soins
<input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.premiers_soins}}"/>
</li> </li>
<li> <li>
Soins complets Soins complets
<input class="blessures-soins" type="text" name="soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.soins_complets}}"/>
</li> </li>
<li> <li>
Jours Jours
<input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.jours}}"/>
</li> </li>
<li> <li>
Loc. Loc.
<input class="blessures-soins" type="text" name="localisation" data-dtype="String" value="{{bless.loc}}"/> <input class="blessures-soins" type="text" data-dtype="String" value="{{bless.loc}}"/>
</li> </li>
</ul> </ul>
</li> </li>
@ -468,19 +499,19 @@
</li> </li>
<li> <li>
Premiers soins Premiers soins
<input class="blessures-soins" type="text" name="premiers_soins" data-dtype="number" value="{{bless.premiers_soins}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.premiers_soins}}"/>
</li> </li>
<li> <li>
Soins complets Soins complets
<input class="blessures-soins" type="text" name="soins_complets" data-dtype="number" value="{{bless.soins_complets}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.soins_complets}}"/>
</li> </li>
<li> <li>
Jours Jours
<input class="blessures-soins" type="text" name="jours" data-dtype="number" value="{{bless.jours}}"/> <input class="blessures-soins" type="text" data-dtype="number" value="{{bless.jours}}"/>
</li> </li>
<li> <li>
Loc. Loc.
<input class="blessures-soins" type="text" name="localisation" data-dtype="String" value="{{bless.loc}}"/> <input class="blessures-soins" type="text" data-dtype="String" value="{{bless.loc}}"/>
</li> </li>
</ul> </ul>
</li> </li>

View File

@ -27,7 +27,7 @@
Le coup vise: {{dmg.loc.label}}. Le coup vise: {{dmg.loc.label}}.
</span> </span>
</div> </div>
{{#if (eq particuliereAttaque 'rapidite')}} {{#if (eq particuliere 'rapidite')}}
<div> <div>
<span> <span>
<br>Votre attaque rapide vous permet une deuxième attaque, ou défense supplémentaire! <br>Votre attaque rapide vous permet une deuxième attaque, ou défense supplémentaire!

View File

@ -3,9 +3,8 @@
<div class="rdd-hud-list tokenhudext left"> <div class="rdd-hud-list tokenhudext left">
{{#each armes as |arme key|}} {{#each armes as |arme key|}}
{{#unless arme.data.initOnly}} {{#unless arme.data.initOnly}}
<div class="control-icon tokenhudicon rdd-attaque" title="{{arme.name}}"> <div class="control-icon tokenhudicon rdd-hud-menu rdd-attaque" data-combatant-id="{{../combatant._id}}" data-arme-id="{{arme.index}}" title="{{arme.name}}">
<label class="rdd-hud-menu" data-combatant-id="{{../combatant._id}}" <label class="rdd-hud-menu" ></i>C:{{arme.name}} {{arme.data.mainInfo}}</label>
data-arme-id="{{arme.index}}"></i>C:{{arme.name}} {{arme.data.mainInfo}}</label>
</div> </div>
{{/unless}} {{/unless}}
{{/each}} {{/each}}

View File

@ -2,9 +2,8 @@
<img class="rdd-hud-togglebutton" src="icons/svg/sword.svg" width="36" height="36" title="Initiative" /> <img class="rdd-hud-togglebutton" src="icons/svg/sword.svg" width="36" height="36" title="Initiative" />
<div class="rdd-hud-list tokenhudext right"> <div class="rdd-hud-list tokenhudext right">
{{#each armes as |arme key|}} {{#each armes as |arme key|}}
<div class="control-icon tokenhudicon" title="{{arme.name}}"> <div class="control-icon tokenhudicon rdd-hud-menu" data-combatant-id="{{../combatant._id}}" data-arme-id="{{arme.index}}"title="{{arme.name}}">
<label class="rdd-hud-menu" data-combatant-id="{{../combatant._id}}" <label class="rdd-hud-menu">I:{{arme.name}} {{arme.data.mainInfo}}</label>
data-arme-id="{{arme.index}}">I:{{arme.name}} {{arme.data.mainInfo}}</label>
</div> </div>
{{/each}} {{/each}}
</div> </div>