I am working on making the game above work like an Undertale fight.
It is a work in progress for sure haha
Steps for creating a turn-based battle system in your game:
Create an array of enemy objects: You can populate this array with randomly generated enemies or via a map editor.
Write functions to handle turns, attacks, and damage calculations: These functions need to calculate how much damage is done, who is attacking and how they are attacking, and what effects the attack has.
Set up a UI to manage player and enemy health and stats: This UI should include health bars, hit points, and any relevant stats for the battle.
Create a system that allows for input to be read and processed: This allows the player to select their desired actions