jackpoz / gobcog

RPG Adventure Cog for Red v3
0 stars 0 forks source link

[Bug] different level on items in inventory than when equipped #1

Closed jackpoz closed 8 months ago

jackpoz commented 8 months ago

[Bug] different level on items in inventory than when equipped

jackpoz commented 8 months ago
 def equip_level(self, item: Item, rebirths=None):
        level = getattr(self, "rebirths", rebirths)
        return item.lvl if item.rarity is Rarities.event else max(item.lvl - min(max(level // 2 - 1, 0), 50), 1)

Number of rebirths affects the level an item can be equipped. With 17 rebirths, I can equip items 7 levels higher, which is what !backpack shows, while !stats shows the original item level