Gestion des jets opposés

This commit is contained in:
2024-06-06 17:16:40 +02:00
parent 1224500881
commit 82e7a170c2
24 changed files with 181 additions and 267 deletions

View File

@ -42,6 +42,7 @@ export class TeDeumActorPJSheet extends ActorSheet {
providence: this.actor.prepareProvidence(),
arbreCompetences: this.actor.prepareArbreCompetences(),
equipements: this.actor.getEquipements(),
armures: this.actor.getArmures(),
graces: this.actor.getGraces(),
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),

View File

@ -34,6 +34,16 @@ export class TeDeumActor extends Actor {
return actor;
}
if (data.type == 'pj') {
const skills = await TeDeumUtility.loadCompendium("fvtt-te-deum.competences")
data.items = data.items || []
for (let skill of skills) {
if (skill.system.isBase || skill.system.score == 1) {
data.items.push(skill.toObject())
}
}
}
return super.create(data, options);
}