mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2026-01-14 05:47:50 -06:00
v1.206.1
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user