This commit is contained in:
TheGiddyLimit
2024-05-06 22:24:37 +01:00
parent 99cb60d804
commit 9c8ae15ff7
113 changed files with 1022 additions and 852 deletions

View File

@@ -720,7 +720,7 @@ class CreatureParser extends BaseParser {
.map(it => {
if (!it.name.trim() && !it.entries.length) return null;
const m = /can take (\d) legendary actions/gi.exec(it.entries[0]);
const m = /can take (\d) legendary actions?/gi.exec(it.entries[0]);
if (!it.name.trim() && m) {
if (m[1] !== "3") stats.legendaryActions = Number(m[1]);
return null;
@@ -1503,6 +1503,13 @@ class CreatureParser extends BaseParser {
};
}
if (/ (&|and) /.test(strType)) {
const pts = strType.split(/(?:, |,? (?:&|and) )/g);
type = {
choose: pts.map(it => it.trim()).filter(Boolean),
};
}
if (!type) type = strType;
if (typeof type === "string" && !tags && !note) return type;