Project Overview
This discord bot consists of 2 main components; the coin collecting/spending system and the Pokemon trading/battling system. Participating users in a discord server can use a channel dedicated to the discord bot to collect coins, use those coins to place a bet, and spend coins to roll for Pokemon. Pokemon obtained by a user are able to evolve, be traded to another user, sold for coins, and be used to battle other users. Pokemon's attributes and statistics are directly taken from PokeAPI. Since there were no values for the rarity of a Pokemon in the PokeAPI, the drop rate of each Pokemon from the gotcha were manually inputted based on a guideline created by the contributors which took in factors such as number of evolutions, total of the base stats, and whether if its a novelty Pokemon or not.
Project Features
A user can collect coins every 22 hours by using the command "!collect". The amount obtained is random, in the range of 50-100. These coins can be used to roll for a new Pokemon.
There are currently 4 pools of available gachas to roll from, with each pool containing pokemons from the first 4 generations of the original video games. Every 22 hours, a user can roll for a free Pokemon from all available pools of Pokemon by using the command "!freeroll".
A user can spend 50 coins to roll from a specific gacha by using the command "!roll#"" with the "#" being a number between 1 to 4. In the example above, user "kosukay" rolled a generation 3 Pokemon by typing !roll3. Typing !roll will roll from all available pools.
Using the command !inv will display all Pokemon that a user owns. You can look at other user's inventory by typing "!inv [username]".
A user can click on the image to open up a clearer image of the inventory on a webbrowser.
A user can initiate a trade by using the command "!trade [Pokemon user owns] [Pokemon user wants]". In the example above, a user traded their Glaceon for a Leafeon.
A user can initiate a battle by using the command "!battle". When another user responds with "!baccept", both players may then declare their Pokemon that will be used in the battle by using the command, "!declare [Pokemon]", with up to 6 Pokemon to fight for them. Once both party declares their Pokemon, the person who initialized the battle may start the battle by using the command "!bstart".
The combat works by using Pokemon stats from PokeAPI (HP, attack, defense, etc). Faster Pokemon will move first, and each turn both Pokemon attacks once. The attack is determined by a random number genetrator to determine whether it ues the "attack" stat or "special attack" stat. Critical hits are calculated using the speed difference between the fighting Pokemon.
A player can set a prediction by using the command "!predict [what is being predicted]". Then, other users may type either "!believe [amount]" or "!doubt [amount]" to set the amount of coins they are betting. The prediction may be closed by typing "!close" to prevent further users from joining. Once the prediction results come in, the user who initialized the bet may pay out the winners by using the command "!WINBELIEVE" or "!WINDOUBT". All coins in the pool will be paid out and evenly distributed to the winning side.