Compare commits

..

2 Commits

Author SHA1 Message Date
a27e3894a0 Fix Import entités de cauchemar&créatures
- utiliser les carac liées au type d'entités
- fix: +dom&protection 0 ou négatifs
- fix compétences (qui peuvent ne pas avoir d'init)
2024-12-02 22:21:43 +01:00
ce8616c34e Merge compétences créatures/entités
Les deux compendiums n'avaient pas de raison d'être séparés
2024-12-02 22:21:43 +01:00

View File

@ -334,11 +334,8 @@ export class RdDStatBlockParser {
}
}
}
if (actorType == "creature" && skill.init) {
items.push(comp); // Only selective push
}
if (actorType == "personnage") {
items.push(comp); // Always push
if (actorType == "personnage" || skill!= undefined){
items.push(comp)
}
}
@ -456,11 +453,11 @@ export class RdDStatBlockParser {
}
static parseCreature(statString, actorData) {
let plusDom = XRegExp.exec(statString, XRegExp("\\+dom\\s+(?<value>\\+\\d+)", 'giu'));
let plusDom = XRegExp.exec(statString, XRegExp("\\+dom\\s+(?<value>[\\+\\-]?\\d+)", 'giu'));
if (plusDom?.values) {
actorData.attributs.plusdom.value = Number(plusDom.value);
}
let protection = XRegExp.exec(statString, XRegExp("protection\\s+(?<value>\\d+)", 'giu'));
let protection = XRegExp.exec(statString, XRegExp("protection\\s+(?<value>[\\-]?\\d+)", 'giu'));
if (protection?.value) {
actorData.attributs.protection.value = Number(protection.value);
}
@ -481,7 +478,7 @@ export class RdDStatBlockParser {
}
static parseEntite(statString, actorData) {
let plusDom = XRegExp.exec(statString, XRegExp("\\+dom\\s+(?<value>\\+\\d+)", 'giu'));
let plusDom = XRegExp.exec(statString, XRegExp("\\+dom\\s+(?<value>[\\+\\-]?\\d+)", 'giu'));
if (plusDom?.values) {
actorData.attributs.plusdom.value = Number(plusDom.value);
}