Expérience par le stress

- Vue détaillée (regroupe archétype et contrôles)
- Ajout d'un bouton pour mettre du stress dans une compétence
This commit is contained in:
Vincent Vandemeulebrouck
2021-11-23 02:11:24 +01:00
parent 863218f03c
commit b6b6acc4e3
7 changed files with 86 additions and 39 deletions

View File

@ -30,8 +30,7 @@ export class RdDActorSheet extends ActorSheet {
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: null }],
editCaracComp: false,
showCompNiveauBase: false,
montrerArchetype: false,
hideControls: true
vueDetaillee: false
});
}
@ -80,7 +79,7 @@ export class RdDActorSheet extends ActorSheet {
formData.competences.forEach(item => {
item.visible = !this.options.showCompNiveauBase || !RdDItemCompetence.isNiveauBase(item);
RdDItemCompetence.levelUp(item);
RdDItemCompetence.levelUp(item, formData.data.compteurs.experience.value);
});
Object.values(formData.data.carac).forEach(c => {
@ -414,7 +413,7 @@ export class RdDActorSheet extends ActorSheet {
});
}
html.find('#show-hide-competences').click(async event => {
html.find('.show-hide-competences').click(async event => {
this.options.showCompNiveauBase = !this.options.showCompNiveauBase;
this.render(true);
});
@ -422,13 +421,9 @@ export class RdDActorSheet extends ActorSheet {
this.options.editCaracComp = !this.options.editCaracComp;
this.render(true);
});
html.find('#show-hide-archetype').click(async event => {
this.options.montrerArchetype = !this.options.montrerArchetype;
this.render(true);
});
html.find('.lock-unlock-controls').click(async event => {
console.log("CONTROLS", this.options.hideControls)
this.options.hideControls = !this.options.hideControls;
html.find('.vue-detaillee').click(async event => {
console.log("CONTROLS", this.options.vueDetaillee)
this.options.vueDetaillee = !this.options.vueDetaillee;
this.render(true);
});