Various fixes

This commit is contained in:
sladecraven 2022-04-30 23:42:55 +02:00
parent f64928858c
commit 5214b036d3
11 changed files with 96 additions and 98 deletions

View File

@ -36,16 +36,16 @@ export class RdDActorSheet extends ActorSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
const objectData = Misc.data(this.object); const objectData = Misc.data(this.object)
//this.actor.checkMonnaiePresence(this.actor.data.items); // Always check //this.actor.checkMonnaiePresence(this.actor.data.items); // Always check
let formData = { let formData = {
title: this.title, title: this.title,
id: objectData.id, id: this.object.id,
type: objectData.type, type: this.object.type,
img: objectData.img, img: this.object.img,
name: objectData.name, name: this.object.name,
editable: this.isEditable, editable: this.isEditable,
cssClass: this.isEditable ? "editable" : "locked", cssClass: this.isEditable ? "editable" : "locked",
data: foundry.utils.deepClone(this.object.system), data: foundry.utils.deepClone(this.object.system),
@ -168,12 +168,12 @@ export class RdDActorSheet extends ActorSheet {
if (!this.options.editable) return; if (!this.options.editable) return;
html.find('.item-split').click(async event => { html.find('.item-split').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor); const item = RdDSheetUtility.getItem(event, this.actor)
RdDSheetUtility.splitItem(item, this.actor); RdDSheetUtility.splitItem(item, this.actor)
}); });
html.find('.item-edit').click(async event => { html.find('.item-edit').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor); const item = RdDSheetUtility.getItem(event, this.actor)
item.sheet.render(true); item.sheet.render(true)
}); });
html.find('.display-label a').click(async event => { html.find('.display-label a').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor); const item = RdDSheetUtility.getItem(event, this.actor);
@ -549,10 +549,9 @@ export class RdDActorSheet extends ActorSheet {
} }
async _onSplitItem(item, split) { async _onSplitItem(item, split) {
if (split >= 1 && split < Misc.data(item).data.quantite) { if (split >= 1 && split < item.system.quantite) {
await item.diminuerQuantite(split); await item.diminuerQuantite(split)
const itemData = duplicate(Misc.data(item)); item.system.quantite = split;
itemData.data.quantite = split;
await this.actor.createEmbeddedDocuments('Item', [itemData]) await this.actor.createEmbeddedDocuments('Item', [itemData])
} }
} }

View File

@ -1785,13 +1785,13 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
_computeEnduranceMax() { _computeEnduranceMax() {
let blessures = this.system.data.blessures; let blessures = this.system.blessures;
let diffVie = this.system.data.sante.vie.max - this.system.data.sante.vie.value; let diffVie = this.system.sante.vie.max - this.system.sante.vie.value;
let maxEndVie = this.system.data.sante.endurance.max - (diffVie * 2); let maxEndVie = this.system.sante.endurance.max - (diffVie * 2);
let nbGraves = this.countBlessures(blessures.graves.liste); let nbGraves = this.countBlessures(blessures.graves.liste);
let nbCritiques = this.countBlessures(blessures.critiques.liste); let nbCritiques = this.countBlessures(blessures.critiques.liste);
let maxEndGraves = Math.floor(this.system.data.sante.endurance.max / (2 * nbGraves)); let maxEndGraves = Math.floor(this.system.sante.endurance.max / (2 * nbGraves));
let maxEndCritiques = nbCritiques > 0 ? 1 : this.system.data.sante.endurance.max; let maxEndCritiques = nbCritiques > 0 ? 1 : this.system.sante.endurance.max;
return Math.max(0, Math.min(maxEndVie, maxEndGraves, maxEndCritiques)); return Math.max(0, Math.min(maxEndVie, maxEndGraves, maxEndCritiques));
} }
@ -2206,24 +2206,24 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async checkCompetenceXP(compName, newXP, display = true) { async checkCompetenceXP(compName, newXP, display = true) {
let compData = Misc.data(this.getCompetence(compName)); let compData = this.getCompetence(compName)
if (compData && newXP && newXP == compData.data.xp) { // Si édition, mais sans changement XP if (compData && newXP && newXP == compData.data.xp) { // Si édition, mais sans changement XP
return; return
} }
newXP = (newXP) ? newXP : compData.data.xp; newXP = (newXP) ? newXP : compData.system.xp
if (compData && newXP > 0) { if (compData && newXP > 0) {
let xpNeeded = RdDItemCompetence.getCompetenceNextXp(compData.data.niveau + 1); let xpNeeded = RdDItemCompetence.getCompetenceNextXp(compData.system.niveau + 1);
if (newXP >= xpNeeded) { if (newXP >= xpNeeded) {
let newCompData = duplicate(compData); let newCompData = duplicate(compData)
newCompData.data.niveau += 1; newCompData.system.niveau += 1;
newCompData.data.xp = newXP; newCompData.system.xp = newXP;
let checkXp = { let checkXp = {
alias: this.name, alias: this.name,
competence: newCompData.name, competence: newCompData.name,
niveau: newCompData.data.niveau, niveau: newCompData.system.niveau,
xp: newCompData.data.xp, xp: newCompData.system.xp,
archetype: newCompData.data.niveau_archetype, archetype: newCompData.system.niveau_archetype,
archetypeWarning: newCompData.data.niveau > compData.data.niveau_archetype archetypeWarning: newCompData.system.niveau > compData.system.niveau_archetype
} }
if (display) { if (display) {
ChatMessage.create({ ChatMessage.create({
@ -2528,11 +2528,12 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async rollCompetence(idOrName) { async rollCompetence(idOrName) {
let rollData = { competence: Misc.data(this.getCompetence(idOrName)) } let comp = this.getCompetence(idOrName)
let rollData = { competence: comp }
//console.log("COMP CREATURE", name, rollData, name); //console.log("COMP CREATURE", name, rollData, name);
if (rollData.competence.type == 'competencecreature') { if (rollData.competence.type == 'competencecreature') {
if (rollData.competence.data.iscombat) { if (rollData.competence.system.iscombat) {
const arme = RdDItemCompetenceCreature.toArme(rollData.competence); const arme = RdDItemCompetenceCreature.toArme(rollData.competence);
RdDCombat.createUsingTarget(this).attaque(rollData.competence, arme); RdDCombat.createUsingTarget(this).attaque(rollData.competence, arme);
return; return;
@ -2554,8 +2555,8 @@ export class RdDActor extends Actor {
this.createCallbackAppelAuMoral(), this.createCallbackAppelAuMoral(),
{ action: r => this._competenceResult(r) } { action: r => this._competenceResult(r) }
] ]
}); })
dialog.render(true); dialog.render(true)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
@ -3186,15 +3187,16 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
rollArme(arme) { rollArme(arme) {
let competence = Misc.data(this.getCompetence(arme.system.competence)); let itemData = arme.system && arme.system || arme.data
let competence = this.getCompetence( itemData.competence )
if (arme || (competence.type == 'competencecreature' && competence.system.iscombat)) { if (arme || (competence.type == 'competencecreature' && competence.system.iscombat)) {
if (competence.data.ispossession) { if (competence.system.ispossession) {
RdDPossession.managePosession(this, competence); RdDPossession.managePosession(this, competence)
} else { } else {
RdDCombat.createUsingTarget(this)?.attaque(competence, arme); RdDCombat.createUsingTarget(this)?.attaque(competence, arme)
} }
} else { } else {
this.rollCompetence(competence.name); this.rollCompetence(competence.name)
} }
} }

View File

@ -37,13 +37,13 @@ export class RdDItemArme extends Item {
static computeNiveauArmes(armes, competences) { static computeNiveauArmes(armes, competences) {
for (const arme of armes) { for (const arme of armes) {
arme.data.niveau = RdDItemArme.niveauCompetenceArme(arme, competences); arme.system.niveau = RdDItemArme.niveauCompetenceArme(arme, competences)
} }
} }
static niveauCompetenceArme(arme, competences) { static niveauCompetenceArme(arme, competences) {
const compArme = competences.find(it => it.name == arme.data.competence); const compArme = competences.find(it => it.name == arme.system.competence);
return compArme?.data.niveau ?? -8; return compArme?.system.niveau ?? -8;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -89,9 +89,9 @@ export class RdDItemCompetence extends Item {
/* -------------------------------------------- */ /* -------------------------------------------- */
static isCompetenceArme(competence) { static isCompetenceArme(competence) {
switch (Misc.templateData(competence).categorie) { switch (competence.categorie) {
case 'melee': case 'melee':
return Misc.data(competence).name != 'Esquive'; return competence.name != 'Esquive';
case 'tir': case 'tir':
case 'lancer': case 'lancer':
return true; return true;
@ -101,15 +101,15 @@ export class RdDItemCompetence extends Item {
/* -------------------------------------------- */ /* -------------------------------------------- */
static isArmeUneMain(competence) { static isArmeUneMain(competence) {
return Misc.data(competence)?.name.toLowerCase().includes("1 main"); return competence.name.toLowerCase().includes("1 main");
} }
static isArme2Main(competence) { static isArme2Main(competence) {
return Misc.data(competence)?.name.toLowerCase().includes("2 main"); return competence.name.toLowerCase().includes("2 main");
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static isMalusEncombrementTotal(competence) { static isMalusEncombrementTotal(competence) {
return Misc.data(competence)?.name.toLowerCase().match(/(natation|acrobatie)/); return competence?.name.toLowerCase().match(/(natation|acrobatie)/)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -60,14 +60,14 @@ export class RdDItemSheet extends ItemSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
async getData() { async getData() {
const objectData = Misc.data(this.object); const objectData = this.object;
let formData = { let formData = {
id: this.object.id, id: this.object.id,
title: objectData.name, title: objectData.name,
type: objectData.type, type: objectData.type,
img: objectData.img, img: objectData.img,
name: objectData.name, name: objectData.name,
data: objectData.data, data: objectData.system,
isGM: game.user.isGM, isGM: game.user.isGM,
actorId: this.actor?.id, actorId: this.actor?.id,
owner: this.document.isOwner, owner: this.document.isOwner,
@ -82,14 +82,14 @@ export class RdDItemSheet extends ItemSheet {
} }
} }
formData.categorieCompetences = RdDItemCompetence.getCategorieCompetences(); formData.categorieCompetences = RdDItemCompetence.getCategorieCompetences()
if (formData.type == 'tache' || formData.type == 'livre' || formData.type == 'meditation' || formData.type == 'oeuvre') { if (formData.type == 'tache' || formData.type == 'livre' || formData.type == 'meditation' || formData.type == 'oeuvre') {
formData.caracList = duplicate(game.system.model.Actor.personnage.carac); formData.caracList = duplicate(game.system.model.Actor.personnage.carac)
formData.competences = await RdDUtility.loadCompendium('foundryvtt-reve-de-dragon.competences'); formData.competences = await RdDUtility.loadCompendium('foundryvtt-reve-de-dragon.competences');
} }
if (formData.type == 'arme') { if (formData.type == 'arme') {
formData.competences = await RdDUtility.loadCompendium('foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it)); formData.competences = await RdDUtility.loadCompendium('foundryvtt-reve-de-dragon.competences', it => RdDItemCompetence.isCompetenceArme(it));
console.log(formData.competences); console.log(formData.competences)
} }
if (formData.type == 'recettealchimique') { if (formData.type == 'recettealchimique') {
RdDAlchimie.processManipulation(objectData, this.actor && this.actor.id); RdDAlchimie.processManipulation(objectData, this.actor && this.actor.id);

View File

@ -56,48 +56,45 @@ export class RdDItem extends Item {
} }
isCompetence() { isCompetence() {
return Misc.data(this).type == 'competence'; return this.type == 'competence';
} }
isConteneur() { isConteneur() {
return Misc.data(this).type == 'conteneur'; return this.type == 'conteneur';
} }
isConteneurNonVide() { isConteneurNonVide() {
return this.isConteneur() && (Misc.templateData(this).contenu?.length ?? 0) > 0; return this.isConteneur() && (this.system.contenu?.length ?? 0) > 0;
} }
isConteneurVide() { isConteneurVide() {
return this.isConteneur() && (Misc.templateData(this).contenu?.length ?? 0) == 0; return this.isConteneur() && (this.system.contenu?.length ?? 0) == 0;
} }
isVideOuNonConteneur() { isVideOuNonConteneur() {
return !this.isConteneur() || (Misc.templateData(this).contenu?.length ?? 0) == 0; return !this.isConteneur() || (this.system.contenu?.length ?? 0) == 0;
} }
isAlcool() { isAlcool() {
const itemData = Misc.data(this); return this.type == 'nourritureboisson' && this.system.boisson && this.system.alcoolise;
return itemData.type == 'nourritureboisson' && itemData.data.boisson && itemData.data.alcoolise;
} }
isHerbeAPotion() { isHerbeAPotion() {
const itemData = Misc.data(this); return this.type == 'herbe' && (this.system.categorie == 'Soin' || this.system.categorie == 'Repos');
return itemData.type == 'herbe' && (itemData.data.categorie == 'Soin' || itemData.data.categorie == 'Repos');
} }
isPotion() { isPotion() {
return Misc.data(this).type == 'potion'; return this.type == 'potion';
} }
isEquipement() { isEquipement() {
return RdDItem.getTypeObjetsEquipement().includes(Misc.data(this).type); return RdDItem.getTypeObjetsEquipement().includes(this.type)
} }
isCristalAlchimique() { isCristalAlchimique() {
const itemData = Misc.data(this); return this.type == 'objet' && Grammar.toLowerCaseNoAccent(this.name) == 'cristal alchimique' && this.system.quantite > 0;
return itemData.type == 'objet' && Grammar.toLowerCaseNoAccent(itemData.name) == 'cristal alchimique' && itemData.data.quantite > 0;
} }
isMagique() { isMagique() {
return Misc.templateData(this).magique; return this.system.magique;
} }
getEncTotal() { getEncTotal() {
@ -121,8 +118,7 @@ export class RdDItem extends Item {
if (this.isPotion()) { if (this.isPotion()) {
this.prepareDataPotion() this.prepareDataPotion()
} }
const itemData = Misc.data(this); this.system.actionPrincipale = this.getActionPrincipale({ warnIfNot: false });
itemData.data.actionPrincipale = this.getActionPrincipale({ warnIfNot: false });
} }
} }

View File

@ -105,7 +105,6 @@ export class Misc {
return params.reduce((a, b) => a + separator + b); return params.reduce((a, b) => a + separator + b);
} }
static data(it) { static data(it) {
if (it instanceof Actor || it instanceof Item || it instanceof Combatant) { if (it instanceof Actor || it instanceof Item || it instanceof Combatant) {
return it.system return it.system

View File

@ -153,7 +153,7 @@ export class RdDCombatManager extends Combat {
/** Retourne une liste triée d'armes avec le split arme1 main / arme 2 main */ /** Retourne une liste triée d'armes avec le split arme1 main / arme 2 main */
static finalizeArmeList(armes, competences, carac) { static finalizeArmeList(armes, competences, carac) {
// Gestion des armes 1/2 mains // Gestion des armes 1/2 mains
let armesEquipe = []; let armesEquipe = []
for (const arme of armes) { for (const arme of armes) {
let armeData = duplicate(arme) let armeData = duplicate(arme)
if (armeData.data.equipe) { if (armeData.data.equipe) {
@ -667,6 +667,7 @@ export class RdDCombat {
if (!await this.accorderEntite('avant-attaque')) { if (!await this.accorderEntite('avant-attaque')) {
return; return;
} }
console.log("ATTACK", competence, arme)
if (arme.data.cac == 'empoignade' && this.attacker.isCombatTouche()) { if (arme.data.cac == 'empoignade' && this.attacker.isCombatTouche()) {
ChatMessage.create({ ChatMessage.create({
alias: this.attacker.name, alias: this.attacker.name,
@ -676,7 +677,7 @@ export class RdDCombat {
competence: competence competence: competence
}) })
}); });
return; return
} }
let rollData = this._prepareAttaque(competence, arme); let rollData = this._prepareAttaque(competence, arme);
@ -703,7 +704,7 @@ export class RdDCombat {
{ condition: RdDCombat.isEchecTotal, action: r => this._onAttaqueEchecTotal(r) }, { condition: RdDCombat.isEchecTotal, action: r => this._onAttaqueEchecTotal(r) },
] ]
}); });
dialog.render(true); dialog.render(true)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -47,7 +47,7 @@ export class RdDRoll extends Dialog {
carac: actor.system.carac, carac: actor.system.carac,
finalLevel: 0, finalLevel: 0,
diffConditions: 0, diffConditions: 0,
diffLibre: rollData.competence?.data.default_diffLibre ?? 0, diffLibre: rollData.competence?.system.default_diffLibre ?? 0,
malusArmureValue: actor.getMalusArmure(), malusArmureValue: actor.getMalusArmure(),
surencMalusFlag: actor.isPersonnage() ? (actor.system.compteurs.surenc.value < 0) : false, surencMalusFlag: actor.isPersonnage() ? (actor.system.compteurs.surenc.value < 0) : false,
surencMalusValue: actor.computeMalusSurEncombrement(), surencMalusValue: actor.computeMalusSurEncombrement(),
@ -73,6 +73,7 @@ export class RdDRoll extends Dialog {
RollDataAjustements.calcul(rollData, actor); RollDataAjustements.calcul(rollData, actor);
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
static getDiviseurSignificative(rollData) { static getDiviseurSignificative(rollData) {
let facteurSign = 1; let facteurSign = 1;
@ -163,14 +164,14 @@ export class RdDRoll extends Dialog {
console.log(rollData); console.log(rollData);
// Update html, according to data // Update html, according to data
if (rollData.competence) { if (rollData.competence) {
const defaut_carac = Misc.templateData(rollData.competence).defaut_carac; const defaut_carac = rollData.competence.system.defaut_carac
// Set the default carac from the competence item // Set the default carac from the competence item
rollData.selectedCarac = rollData.carac[defaut_carac]; rollData.selectedCarac = rollData.carac[defaut_carac]
$("#carac").val(defaut_carac); $("#carac").val(defaut_carac)
} }
if (rollData.selectedSort) { if (rollData.selectedSort) {
dialog.setSelectedSort(rollData.selectedSort); dialog.setSelectedSort(rollData.selectedSort)
$(".draconic").val(rollData.selectedSort.data.listIndex); // Uniquement a la selection du sort, pour permettre de changer $(".draconic").val(rollData.selectedSort.data.listIndex) // Uniquement a la selection du sort, pour permettre de changer
} }
RdDItemSort.setCoutReveReel(rollData.selectedSort); RdDItemSort.setCoutReveReel(rollData.selectedSort);
$("#diffLibre").val(Misc.toInt(rollData.diffLibre)); $("#diffLibre").val(Misc.toInt(rollData.diffLibre));
@ -338,7 +339,7 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
_computeFinalLevel(rollData) { _computeFinalLevel(rollData) {
return RollDataAjustements.sum(rollData.ajustements); return RollDataAjustements.sum(rollData.ajustements)
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
_computeDiffCompetence(rollData) { _computeDiffCompetence(rollData) {
@ -374,16 +375,16 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
_getTitle(rollData) { _getTitle(rollData) {
const carac = rollData.selectedCarac.label; const carac = rollData.selectedCarac.label
if (!rollData.competence) { if (!rollData.competence) {
return carac; return carac
} }
const compName = rollData.competence.name; const compName = rollData.competence.name
if (rollData.draconicList && rollData.selectedSort) { if (rollData.draconicList && rollData.selectedSort) {
return compName + " - " + rollData.selectedSort.name; return compName + " - " + rollData.selectedSort.name
} }
// If a weapon is there, add it in the title // If a weapon is there, add it in the title
const niveau = Misc.toSignedString(rollData.competence.data.niveau); const niveau = Misc.toSignedString(rollData.competence.system.niveau)
if (compName == carac) { if (compName == carac) {
// cas des créatures // cas des créatures
return carac + " Niveau " + niveau return carac + " Niveau " + niveau

View File

@ -19,9 +19,9 @@ import { ReglesOptionelles } from "./regles-optionelles.js";
*/ */
export const referenceAjustements = { export const referenceAjustements = {
competence: { competence: {
isUsed: (rollData, actor) => Misc.data(rollData.competence), isUsed: (rollData, actor) => rollData.competence,
getLabel: (rollData, actor) => Misc.data(rollData.competence)?.name, getLabel: (rollData, actor) => rollData.competence?.name,
getValue: (rollData, actor) => Misc.data(rollData.competence)?.data?.niveau, getValue: (rollData, actor) => rollData.competence?.system.niveau,
}, },
meditation: { meditation: {
isUsed: (rollData, actor) => rollData.meditation, isUsed: (rollData, actor) => rollData.meditation,
@ -33,7 +33,7 @@ export const referenceAjustements = {
getLabel: (rollData, actor) => rollData.selectedSort?.name ?? rollData.attackerRoll ? 'Imposée' : 'Libre', getLabel: (rollData, actor) => rollData.selectedSort?.name ?? rollData.attackerRoll ? 'Imposée' : 'Libre',
getValue: (rollData, actor) => rollData.selectedSort getValue: (rollData, actor) => rollData.selectedSort
? RdDItemSort.getDifficulte(rollData.selectedSort, rollData.diffLibre) ? RdDItemSort.getDifficulte(rollData.selectedSort, rollData.diffLibre)
: rollData.diffLibre ?? Misc.data(rollData.competence)?.data.default_diffLibre ?? 0 : rollData.diffLibre ?? rollData.competence?.system.default_diffLibre ?? 0
}, },
diffConditions: { diffConditions: {
isUsed: (rollData, actor) => rollData.diffConditions != undefined, isUsed: (rollData, actor) => rollData.diffConditions != undefined,
@ -95,10 +95,10 @@ export const referenceAjustements = {
getDescr: (rollData, actor) => rollData.diviseurSignificative > 1 ? `Facteur significative <span class="rdd-diviseur">&times;${Misc.getFractionHtml(rollData.diviseurSignificative)}</span>` : '' getDescr: (rollData, actor) => rollData.diviseurSignificative > 1 ? `Facteur significative <span class="rdd-diviseur">&times;${Misc.getFractionHtml(rollData.diviseurSignificative)}</span>` : ''
}, },
isEcaille: { isEcaille: {
isVisible: (rollData, actor) => Misc.data(rollData.arme)?.data.magique && Number(Misc.data(rollData.arme)?.data.ecaille_efficacite) > 0, isVisible: (rollData, actor) => rollData.arme?.data.magique && Number(rollData.arme?.data.ecaille_efficacite) > 0,
isUsed: (rollData, actor) => Misc.data(rollData.arme)?.data.magique && Number(Misc.data(rollData.arme)?.data.ecaille_efficacite) > 0, isUsed: (rollData, actor) => rollData.arme?.data.magique && Number(rollData.arme?.data.ecaille_efficacite) > 0,
getLabel: (rollData, actor) => "Ecaille d'Efficacité: ", getLabel: (rollData, actor) => "Ecaille d'Efficacité: ",
getValue: (rollData, actor) => Math.max(Number(Misc.data(rollData.arme)?.data.ecaille_efficacite), 0), getValue: (rollData, actor) => Math.max(Number(rollData.arme?.data.ecaille_efficacite), 0),
}, },
finesse: { finesse: {
isUsed: (rollData, actor) => RdDBonus.isDefenseAttaqueFinesse(rollData), isUsed: (rollData, actor) => RdDBonus.isDefenseAttaqueFinesse(rollData),

View File

@ -43,9 +43,9 @@
{{#if arme}} {{#if arme}}
{{#unless attackerRoll}} {{#unless attackerRoll}}
<div class="flexrow"> <div class="flexrow">
{{#if (eq arme.data.mortalite 'non-mortel')}} {{#if (eq arme.system.mortalite 'non-mortel')}}
<label>D&eacute;gats:</label><label class="dmg-arme-actor"></label> <label>D&eacute;gats:</label><label class="dmg-arme-actor"></label>
{{else if (eq arme.data.mortalite 'empoignade')}} {{else if (eq arme.system.mortalite 'empoignade')}}
<label>D&eacute;gats:</label><label>Empoignade</label> <label>D&eacute;gats:</label><label>Empoignade</label>
{{else}} {{else}}
<label>D&eacute;gats:</label> <label>D&eacute;gats:</label>