12.0.11 #712

Merged
uberwald merged 8 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2024-10-02 07:37:43 +02:00
Showing only changes of commit b8f236fa97 - Show all commits

View File

@ -80,7 +80,8 @@ const MAPPING_BASE = [
{ column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) },
{ column: "protection", getter: (actor, context) => Mapping.getProtectionArmure(actor, context) },
{ column: "malus-armure", getter: (actor, context) => Mapping.getMalusArmure(actor, context) },
{ column: "esquive", getter: (actor, context) => Mapping.getEsquiveNiveau(context) },
{ column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) },
{ column: "esquive-armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) },
{ column: "competences", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_COMPETENCES) },
{ column: "draconic", getter: (actor, context) => Mapping.getCompetences(actor, CATEGORIES_DRACONIC) },
]
@ -181,7 +182,7 @@ export class Mapping {
const esquive = esquives[0]
return {
name: esquive.name,
niveau: Misc.toSignedString(esquive.system.niveau)
niveau: esquive.system.niveau
}
}
return undefined
@ -242,10 +243,16 @@ export class Mapping {
return context?.armure?.malus ?? 0
}
static getEsquiveNiveau(context) {
static getEsquive(context) {
if (context.esquive) {
return Misc.toSignedString(context.esquive.niveau)
}
return ''
}
static getEsquiveArmure(context) {
if (context.esquive) {
const niveau = context.esquive.niveau + context.armure.malus
return niveau > 0 ? ('+' + niveau) : ('' + niveau)
return Misc.toSignedString(niveau)
}
return ''
}