PvP Battle Game Design for Loot Universe

MOBA Game by far has been the most popular and fascinating game experience around the world where different players cooperate with each other to defeat the opponent. We are interested in bringing this battle experience to the loot universe.
WX20210909-175347

Introduction: We create a Solidity contract that allows OG Loot owner and mLoot owner can use their adventurer bags to battle with each other. This contract will reward the player who win the battle based on their loot and loot derivatives (will launch later). We hope our battle game experiment will help and inspire builders and community members to create more interesting experience on top of our “lego piece”.

The project would work as follows:
Stake and Cross Chain
We will provide a place to allow both OG Loot and mLoot owner to stake their LOOT bag into the Polygon’s PoS chain via Polygon Bridge. Players will get pLoot or pmLoot which are mapped token in the polygon network. Moreover, once the mapping transfer of tokens is completed, all of the tokens are done ‘approve()’ calling with the battle contract. Therefore, players could get started to interact with the battle contract immediately, instead of approving the battle contract in advance (part of the code as follows).


function deposit(address account, bytes calldata depositData) external {
	require(childChainManagerProxy == _msgSender(), "deposit: you're not allowed to deposit");
	_mint(account, tokenId);
	emit Transfer(address(0), account, tokenId);
}

Battle
Adventurers now can participate in the battle by calling the contracts ‘registerRole()’ function to save rarity data for the following battle game. We utilize the public data from dhot-loot to guarantee game fairness and ERC712 to sign register messages.

After register, players could start to play by randomly match another adventurer to have a 1 vs 1 PvP battle game (Because OG Loot and mLoot have different value, we now open 2 battlefields(via two contracts) for different Loot. So mLoot player will only battle with mLoot player, and so as the OG Loot player).

For loot player:

function pvpBattle() external {
	        address challengerAddress = _msgSender();
	        require(currentIndex[challengerAddress] != 0, "pvpBattle: please register your role at first");
	        
	        // pvp battle
	        uint256 warriorPower = _calculateRandomScore(challenger.initialPower, challenger.originalTokenId) ;
	        battleDetails[challengerAddress].acceptorAddress = acceptor.warriorAddress;
	
	        if(warriorPower > acceptorPower) {
	            battleDetails[challengerAddress].result = true;       
	            rewardToken.transfer(challengerAddress, rewardAmountPerRound);
	        } else {
	            battleDetails[challengerAddress].result = false;
	        }
	    }

for mloot player, we have two way to battle, one is based on the rarity ranking, and the other is based on rarity score.


function pvpBattleByRanking(uint256 tokenId) external returns (bool result) {
	        address challengerAddress = _msgSender();
	        require(warriorsIndex[challengerAddress] != 0, "pvpBattleByRanking: please register your role at first");
	     
	        // pvp battle
	        result = _battleByRanking(challengerAddress, acceptorAddress, challengerRanking, acceptorRanking);
	        emit pvpBattledByRanking(challengerAddress, acceptorAddress, result);
	    }

function pvpBattleByRarityIndex(uint256 tokenId) external returns (bool result) {
	        address challengerAddress = _msgSender();
	        require(warriorsIndex[challengerAddress] != 0, "pvpBattleByRarityIndex: please register your role at first");
		
	        // pvp battle
	        uint256 challengerPower = _calculateRandomScore(challengerRarityIndex, tokenId);
	        emit pvpBattledByRarityIndex(challengerAddress, acceptorAddress, result);
	    }

To determine which player will win, we use the Anish’s rarity score to decide which OG Loot has a higher rarity score from the 8 components, while in the meantime we add some random mechanism for low rarity players has a chance to win over high rarity player.

 function _calculateRandomScore(uint256 _rarityScore, uint256 tokenId) internal view returns (uint256 randomScore) {
	        uint256 rand = uint256(keccak256(abi.encodePacked(toString(tokenId), toString(_rarityScore), toString(block.timestamp))));  
	        return randomScore = (rand % levelRange) + minScore;
	    }

We will reward the player who wins the battle using our battle game token bAGLD, every adventurer can battle 20 times in a day to win the rewards

bAGLD
The battle AGLD is the economic token throughout the game, we are developing more usage scenario like level up and loot components refinery to enhance the game experience

We plan to supply 1 billion bAGLD in the coming 3 years:
1st 40% 0.4 billion
2nd 35% 0.35 billion
3rd 25% 0.25 billion

While in the first year, we plan to allocate the 0.4 billion token in the following places:
55% for game, 0.22 billion
10% for airdrop, 0.04 billion
10% for community contributor, 0.04 billion
25% for original team, 0.1 billion (which will be unlocked during the first 6 months)

Conclusion / Future works
Can battle experience be more fun to play? is it more interesting to have a team vs team battle, lets say 3v3, so every Loot has different attributes and can become different role when battling.
How to design bAGLD economic mechanism to better incentive player enjoy the game while not having huge inflation.
How can we make it more “fair” ? Right now holders of rare loot would have a significant advantage.
Since mLoot and OG Loot is so different, we want to make mLoot battle to be the entry level battle, and OG Loot to be the epic battle. How to design these 2 battlefields to be interesting with different experience?
Since it is the demo version, and we would like all the community members who are interested in this game participate this project and build it to be the battle lego piece of Loot.
We are planing to make V2 version, which has 1) airdrop to the OG Loot adventurer, 2) mirror loot level up, 3) stake farming and liquidity farming, 4) PvP battle championship

Please feel free to leave any helpful comments and feedback here! We just build our twitter and discord:

https://twitter.com/BattleforLoot

1 Like

sounds great, how much could I get per win?

For each battle, the OG Loot winner will earn 200 bAGLD, while the mLoot winner will earn 40 bAGLD, the reward amount will change depends on the situation

1 Like

cool !!!, I am looking forward to the first version of this product :grinning:

thanks , will release the contract soon after full testing the prototype :grinning:

I think I can try to exchange Agld for bAgld, and then the game needs to consume Agld and produce Bagld, otherwise Bagld will not be trusted.

2 Likes

Whether it will give LOOT some skills, such as dizziness, heavy hits, etc.

1 Like

yes, we are designing the next version of the game, will involve more skills or other loot derivatives

thats a great suggestion , we can discuss about this :grinning:

1 Like

we are also considering this issue : how to associate the game economy with agld.

from the case of axie infinity, they have 2 tokens, AXS and SLP, we want to follow their economy design: when people play the game we will reward bagld, when people want to level up or make some refining they need use agld + bagld

for exchange of agld and bagld, one way is to create a liquidity pool, and we will release a guiding exchange rate. to maintain the rate to be stable, bagld also need to have restrictions to claim, any good idea for this?

so for the game economy design, we still not come to a final plan, any suggestion will be highly appreciated :slight_smile:

1 Like