When an adventurer suffers damage from an obstacle, their items should receive XP. Note in #311 the adventurer receives XP regardless of whether they sustain damage but the items only receive XP if they are utilized.
Currently our primary logic for allocating XP to items is an internal function _allocate_xp_to_items function is in Beast.cairo. As such, implementing this functionality will require a little extra work:
Move the core logic in _allocate_xp_to_items to an external function in LootMarketArcade that can only be called by approved modules
Existing _allocate_xp_to_items in Beast.cairo will call ILoot.allocate_xp_to_items -> LootMarketArcade
In Adventurer.cairo when adventurer takes damage from the obstacle, we can assign xp to items via ILoot.allocate_xp_to_items too
When an adventurer suffers damage from an obstacle, their items should receive XP. Note in #311 the adventurer receives XP regardless of whether they sustain damage but the items only receive XP if they are utilized.
Currently our primary logic for allocating XP to items is an internal function _allocate_xp_to_items function is in Beast.cairo. As such, implementing this functionality will require a little extra work: