Pokemon Stats
My first task was to create a script that stores key data for each Pokémon, such as name, health, damage, defense, level, and type element. It also included methods for executing moves, which could be overridden to customize each Pokémon’s abilities. This served as the main script for all Pokémon, allowing easy inheritance for different species.
However, AI-controlled Pokémon required unique methods for specific behaviors and move logic, which didn’t fit well within the general Pokémon class.
To solve this, I created a new class inheriting from the main script, adding AI-specific methods. Both NPC and AI Pokémon could inherit from this class, enabling custom behaviors and moves while keeping the core structure intact.