12.0.29 - L'indexation d'Astrobazzarh #732

Merged
uberwald merged 6 commits from VincentVk/foundryvtt-reve-de-dragon:v11 into v11 2024-12-17 07:12:00 +01:00
Showing only changes of commit e3a858a9ef - Show all commits

View File

@ -478,14 +478,15 @@ export class RdDStatBlockParser {
} }
static parseActorType(statString) { static parseActorType(statString) {
let niveau = XRegExp.exec(statString, XRegExp("Niveau\\s+(?<value>[\\+\\-]?\\d+)", 'giu')) let force = XRegExp.exec(statString, XRegExp("Force\\s+(?<value>[\\+\\-]?\\d+)", 'giu'))
let vue = XRegExp.exec(statString, XRegExp("Vue\\s+(?<value>[\\+\\-]?\\d+)", 'giu'))
let perception = XRegExp.exec(statString, XRegExp("perception\\s+(?<value>\\d+)", 'giu')) let perception = XRegExp.exec(statString, XRegExp("perception\\s+(?<value>\\d+)", 'giu'))
if (perception?.value) { if (!force) {
return "creature"
}
if (niveau?.value) {
return "entite" return "entite"
} }
if (!vue || perception) {
return "creature"
}
return "personnage" return "personnage"
} }