In my game, you collect a certain type of item that can be wagered against another player who has the same types of items. For instance, to play a "For Keeps" mode of the game, each player needs 3 common, 3 uncommon, 2 rare, 1 epic and 1 legendary. As long as you have at least this amount of each type of item, you can play this game mode. Each player takes turns trying to obtain as many of the opponents items as they can, hoping they keep as many of their own wagered items as possible. The game is won by obtaining more items than your opponent; however, even if you win, your opponent could still walk away with all of the epic and legendary items that were wagered.
My initial thought was when both players entered into the match, the items would immediately be removed from their inventory via cloud script and then awarded after the match is completed. This would prevent players from gaming the system and keeping their items by exiting a match if the match doesn't go their way, before the match is over.
How can I achieve this and do you have any recommendations on a better way to solve this kind of gameplay? Thanks in advance!