Compare commits

..

2 Commits

Author SHA1 Message Date
64e48dd3ce Merge compétences créatures/entités
Les deux compendiums n'avaient pas de raison d'être séparés
2024-12-02 22:07:20 +01:00
cbbd8ed4ba Import entités de cauchemar 2024-12-02 21:59:55 +01:00

View File

@ -334,8 +334,11 @@ export class RdDStatBlockParser {
} }
} }
} }
if (actorType == "personnage" || skill!= undefined){ if (actorType == "creature" && skill.init) {
items.push(comp) items.push(comp); // Only selective push
}
if (actorType == "personnage") {
items.push(comp); // Always push
} }
} }
@ -453,11 +456,11 @@ export class RdDStatBlockParser {
} }
static parseCreature(statString, actorData) { 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) { if (plusDom?.values) {
actorData.attributs.plusdom.value = Number(plusDom.value); 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) { if (protection?.value) {
actorData.attributs.protection.value = Number(protection.value); actorData.attributs.protection.value = Number(protection.value);
} }
@ -478,7 +481,7 @@ export class RdDStatBlockParser {
} }
static parseEntite(statString, actorData) { 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) { if (plusDom?.values) {
actorData.attributs.plusdom.value = Number(plusDom.value); actorData.attributs.plusdom.value = Number(plusDom.value);
} }