Version 12.0.2 #713

Merged
uberwald merged 10 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2024-10-06 17:03:41 +02:00
3 changed files with 12 additions and 8 deletions
Showing only changes of commit b866c95ebd - Show all commits

View File

@ -80,7 +80,7 @@ const MAPPING_BASE = [
{ column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max }, { column: "endurance", getter: (actor, context) => actor.system.sante.endurance.max },
{ column: "description", getter: (actor, context) => Mapping.getDescription(actor) }, { column: "description", getter: (actor, context) => Mapping.getDescription(actor) },
{ column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) }, { column: "armure", getter: (actor, context) => Mapping.getArmure(actor, context) },
{ column: "protection", getter: (actor, context) => Mapping.getProtectionArmure(actor, context) }, { column: "protectionarmure", colName: 'Protection', getter: (actor, context) => Mapping.getProtectionArmure(actor, context) },
{ column: "malus_armure", getter: (actor, context) => Mapping.getMalusArmure(actor, context) }, { column: "malus_armure", getter: (actor, context) => Mapping.getMalusArmure(actor, context) },
{ column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) }, { column: "esquive", getter: (actor, context) => Mapping.getEsquive(context) },
{ column: "esquive_armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) }, { column: "esquive_armure", getter: (actor, context) => Mapping.getEsquiveArmure(context) },
@ -273,14 +273,14 @@ export class Mapping {
} }
static getProtectionArmure(actor, context) { static getProtectionArmure(actor, context) {
const protection = Number(actor.system.attributs.protection.value) const naturelle = Number(actor.system.attributs.protection.value)
if (context?.armure?.protection == undefined) { if (context?.armure?.protection == undefined) {
return protection return naturelle
} }
if (Number.isNumeric(context?.armure?.protection)) { if (Number.isNumeric(context?.armure?.protection)) {
return Number(context?.armure?.protection ?? 0) + protection return Number(context?.armure?.protection ?? 0) + naturelle
} }
return context?.armure.protection + (protection > 0 ? `+${protection}` : '') return context?.armure.protection + (naturelle > 0 ? `+${naturelle}` : '')
} }
static getMalusArmure(actor, context) { static getMalusArmure(actor, context) {

View File

@ -1 +1,4 @@
<div class="flexrow"><div>{{upperFirst carac.colName}}</div><div class="flex-group-right">{{carac.value}}</div></div> <div class="flexrow">
<div>{{upperFirst carac.colName}}</div>
<div class="flex-group-right">{{carac.value}}</div>
</div>

View File

@ -1,7 +1,8 @@
{{#if protectionnaturelle.value}} {{#if protectionnaturelle.value}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" protectionnaturelle}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=protectionnaturelle}}
{{/if}} {{/if}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" protection}} {{log 'protectionarmure' protectionarmure}}
{{>"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/carac-derivee.hbs" carac=protectionarmure}}
{{#if armure.value}} {{#if armure.value}}
<div class="flexrow flex-group-right"><i>{{armure.value}}</i></div> <div class="flexrow flex-group-right"><i>{{armure.value}}</i></div>
{{/if}} {{/if}}