The feature itself would work as such: If a Pixelmon is holding a held item that gets consumed (ex. berries, Focus Sash) during a trainer battle, then that item has one expendable charge. Upon use in battle, the item is not consumed, but goes to 0 charges and cannot be used for the remainder of the battle. Upon exiting the battle, the item recharges.
This feature, obviously, would have to come with some tough restrictions.
- It should be automatically non-functional in singleplayer, and should ONLY work when fighting actual human players in multiplayer. Thus, the charge system will fail and the item will be consumed if you face a wild Pixelmon or NPC trainer, even in multiplayer. I suppose in a coding context, the 'charge' variable should go to -1 instead of 0, thus deleting the item on use.
- This will not work on items used from the bag. Potions can't be used as held items anyways, so that isn't an issue, but things like berries should get consumed and destroyed if they are used from the bag and not as a held item.
- To possibly gate the acquisition of these items, it may be the right decision to make these items a little harder to get in multiplayer.
Overall, this should make events like server-wide tournaments and constant player battles more diverse and accessible, for more people who would like to use these items in said events.