mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.207.0
This commit is contained in:
@@ -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}));
|
||||
|
||||
Reference in New Issue
Block a user