This commit is contained in:
TheGiddyLimit
2024-05-21 22:49:09 +01:00
parent 9c8ae15ff7
commit d2f2daa34e
58 changed files with 44706 additions and 397 deletions

View File

@@ -225,9 +225,15 @@ class ItemParser extends BaseParser {
const isGenericWeaponArmor = this._setCleanTaglineInfo_mutIsGenericWeaponArmor({stats, part, partLower, options});
if (isGenericWeaponArmor) continue;
const mBaseWeapon = /^(?<ptPre>weapon|staff) \((?<ptParens>[^)]+)\)$/i.exec(part);
const mBaseWeapon = /^(?<ptPre>weapon|staff|rod) \((?<ptParens>[^)]+)\)$/i.exec(part);
if (mBaseWeapon) {
if (mBaseWeapon.groups.ptPre.toLowerCase() === "staff") stats.staff = true;
if (mBaseWeapon.groups.ptPre.toLowerCase() === "rod") {
if (stats.type) {
throw new Error(`Multiple types! "${stats.type}" -> "${mBaseWeapon.groups.ptParens}"`);
}
stats.type = "RD";
}
if (mBaseWeapon.groups.ptParens === "spear or javelin") {
(stats.requires ||= []).push(...this._setCleanTaglineInfo_getGenericRequires({stats, str: "spear", options}));