mirror of
https://github.com/Threnklyn/dungeon-sheets.git
synced 2026-06-06 04:38:28 +02:00
When resolving +1 weapons, replaced check for inheritance from Weapon
with check for *improved_version* method. Fixes https://github.com/canismarko/dungeon-sheets/issues/112
This commit is contained in:
@@ -136,13 +136,8 @@ class ContentRegistry:
|
||||
else:
|
||||
attr = found_attrs[0]
|
||||
# Apply weapon/etc. bonuses
|
||||
if bonus > 0:
|
||||
if (
|
||||
issubclass(attr, weapons.Weapon)
|
||||
or issubclass(attr, armor.Shield)
|
||||
or issubclass(attr, armor.Armor)
|
||||
):
|
||||
attr = attr.improved_version(bonus)
|
||||
if bonus > 0 and hasattr(attr, 'improved_version'):
|
||||
attr = attr.improved_version(bonus)
|
||||
return attr
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user