I am writing a game where you have a monster and fight it against others very similar to how pokemon works. I have some experience with C++ and just started learning how to properly do things in Java so that I can eventually work on Android apps.
Basically, I will have a monster class that contains all the stats for the two monsters that I will have fighting. I plan on having them fight like in pokemon, you choose a move, it happens then the computer responds until one dies. I'm having trouble figuring out generally how I will do this. Visually I want to change screens and go to the battle screen. But I can't think of the right way to code it. At the moment I want to just keep it text based while I figure it out (ie press 1 to use attack 1 or press 2 to use attack 2). Should I make a battle class or should I just code everything in my main file. I can give you a better idea if you have questions.
This is a general idea on how I want the battle to flow:
/* 1. Initialize Battle
* - get monster data
* inherit monster object from main or where ever
* - display data/moves (health, attack power, name of move)
* - receive input
* buttons set up (prompt for now 1 for attack1, 2 for attack2)
* 2. Player Attack
* - retrieve move info
* - calculate damage/stat change
* - display damage/change
* - check status (is it dead?)
* 3. Monster Attack (timer)
* - roll for move
* - calculate damage/stat change
* - display damage/change
* - check status
* 4. Repeat until monster dies
* 5. When battle is done
* - calculate xp
* - display level up or whatever
* - prompt or return to main screen
*/