Ajout comp libres
All checks were successful
Release Creation / build (release) Successful in 1m13s

This commit is contained in:
2025-02-25 21:29:52 +01:00
parent caedcf5e21
commit c24f4fe502
52 changed files with 172 additions and 140 deletions

View File

@ -64,6 +64,14 @@ export class TeDeumActor extends Actor {
super._preUpdate(changed, options, user);
}
getCompetenceScore(compName) {
let competence = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == compName.toLowerCase())
if (competence) {
return competence.system.score
}
return 0
}
/* -------------------------------------------- */
_onUpdate(changed, options, userId) {

View File

@ -581,9 +581,17 @@ export class TeDeumCharacterCreator {
histoire += `<p>${reponse.question}<br>${reponse.reponse} (${reponse.compName})</p>`
}
await actor.update({ "system.histoire": histoire})
actor.render(true)
context.pointsCompetence = {
"savoir": { score: actor.getCompetenceScore("Mémoriser"), label: "Savoir" },
"sensibilite": { score: actor.getCompetenceScore("Perception"), label: "Sensibilité" },
"entregent": { score: actor.getCompetenceScore("Charme"), label: "Entregent" },
"puissance": { score: actor.getCompetenceScore("Effort"), label: "Puissance" },
"complexion": { score: actor.getCompetenceScore("Endurance"), label: "Complexion" },
"adresse": { score: actor.getCompetenceScore("Initiative"), label: "Adresse" },
}
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-finished.hbs", context)
const label = "Terminer"
const choiceResult = await foundry.applications.api.DialogV2.wait({

View File

@ -5,7 +5,7 @@ export class TeDeumCombat extends Combat {
/* -------------------------------------------- */
async rollInitiative(ids, formula = undefined, messageOptions = {} ) {
console.log("Roll INIT !")
//console.log("Roll INIT !")
ids = typeof ids === "string" ? [ids] : ids;
for (let cId of ids) {
const c = this.combatants.get(cId);