Update arts obscurs
This commit is contained in:
@@ -118,9 +118,10 @@ export class HeritiersUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getSDSortValue(niveau) {
|
||||
if (niveau <= 2) return 12;
|
||||
if (niveau <= 4) return 14;
|
||||
if (niveau <= 6) return 16;
|
||||
if (niveau <= 1) return 12;
|
||||
if (niveau == 2) return 14;
|
||||
if (niveau == 3) return 16;
|
||||
if (niveau > 3) return 18;
|
||||
return 18;
|
||||
}
|
||||
|
||||
@@ -129,6 +130,18 @@ export class HeritiersUtility {
|
||||
return this.competencesMagie
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static buildCompetencesMagie() {
|
||||
let competences = foundry.utils.duplicate(this.getCompetencesMagie())
|
||||
for (let comp of competences) {
|
||||
// Calcul du rang
|
||||
let rang = Math.round(comp.system.niveau / 2);
|
||||
competences.system.rang = rang;
|
||||
competences.system.rangGenericName = game.system.lesheritiers.config.rangName[rang];
|
||||
competences.system.rangSpecificName = game.system.lesheritiers.config.rangNameSpecific[comp.Name][competences.system.rangGenericName];
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async loadCompendiumData(compendium) {
|
||||
const pack = game.packs.get(compendium);
|
||||
@@ -567,6 +580,17 @@ export class HeritiersUtility {
|
||||
if (rollData.mode == "pouvoir" || rollData.mode == "pouvoirpassif") {
|
||||
actor.incDecPointsUsage(rollData.pouvoir._id, -rollData.pouvoirPointsUsage)
|
||||
}
|
||||
// Gestion sort et points d'âme
|
||||
if (rollData.mode == "sort") {
|
||||
if (rollData.spendEsprit) {
|
||||
actor.inDecCarac("esp", -1)
|
||||
} else {
|
||||
actor.incDecPointsAme(-rollData.sortPointsAme)
|
||||
if (rollData.sort.system.competence == "Magie du Clan") {
|
||||
actor.incDecPV(-2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.createChatWithRollMode(rollData.alias, {
|
||||
content: await foundry.applications.handlebars.renderTemplate(`systems/fvtt-les-heritiers/templates/chat-generic-result.html`, rollData)
|
||||
|
Reference in New Issue
Block a user