Closed Aeristoka closed 2 years ago
Humm... Is anything non-common magical?
I also see it say "common" but the code checks for "Common", shouldn't it be all lower case and use item_type.toLowerCase()
for the comparison?
I think we can also probably just do it with /, common(?! \(requires attunement\))/i.test(item_type)
as that checks for common
and can't be followed by (requires attunement)
and ignores case.
Much appreciated!
Original code checked to make sure that the weapon being used did not have "Common" in the
item_type
, as Arcane Jolt requires a Magic Weapon.However, when an Artificer uses their Infusion on a weapon, the weapon still has an
item_type
of "Common", but with modified text.This change causes the "common (requires attunement)" check to be added and done first, so it supersedes the exclusion of strictly common items.