November - December 2022
Created with Unity Engine 
I do not own the sprites and other art assets used within this project.
Overview
I designed Pokemon's Encounter and Battle Systems within Unity Engine. The encounter system features encounter odds that are altered depending on whether the player is running or walking, routes that allow the creator to specify which Pokemon can be encountered, the range of their levels, and percent odds of encounter. The battle system features turn-based battle, type advantages, status effects, move accuracy, stat changes, catching Pokemon, switching Pokemon, and retaining HP for future battles.
Encounter System
Originally, I was designing specifically for a basic encounter system where there would be several RandomRange scripts for initiating the encounter, then also deciding what Pokemon the player would encounter. This worked but I found it to be extremely inefficient and it would not be usable past the testing phase of the game mechanic. A long list and if else statement just isn't the best way to execute this idea if there is more than one area. 
Encounter System Modifications
Changes: New Script MapArea, Selecting Pokemon, their level ranges, and encounter odds from within the editor.
I decided to scrap the original method and design a script called "MapArea" that would be separate from the Player Controller. This would allow me to attach this script to grids and create different routes and areas for Pokemon encounters to occur. I still utilize a list but I create the list using the Pokemon scriptable objects I already created. It also includes new features such as setting level ranges from within the editor and the chances of each Pokemon. This makes it much more usable outside the actual script.

Previous Encounter System

New Encounter System

Map Area Editor View

Battle System
The Battle System is designed under a number of scripts. These scripts track the changes within the battle such as HP, status inflictions, stat changes, and the Pokemon within the battle. The battle system is designed around turn-based combat where the Pokemon with the faster speed is able to attack first. The player can choose to fight with their Pokemon, switch out their Pokemon, catch the wild Pokemon, or run away. 
Choosing to fight will allow the player to select a move to use. Moves are physical, special, or status. They have power, number of uses, as well as additional effects such as a chance to inflict a status or lower stats. These moves are assigned to the Pokemon at a given level. Moves can inflict more or less damage based on type advantages. Each Pokemon is given one or 2 types. A move has one type only. Moves are affected by accuracy and evasion, these will determine whether an attack hits or misses. Moves also have a chance to critical hit, dealing additional damage.
Switching Pokemon will send the player to a screen in which they select the Pokemon they want to switch to. This costs the player their turn. 
The Bag option is to capture the wild Pokemon for now because the item system is not implemented. Pokemon have a number assigned that affects the odds of catching a pokemon. The lower the number, the less likely to catch. The pokeball will wiggle a number of times up to 3 depending on how close the number generated was to the range necessary to catch. 

Pokemon Scriptable Object Editor View

Move Scriptable Object Editor View

Back to Top