First things first. You need to know how to use variables. And multiple choices.
Create the 'main frame'. It should be a blank frame. It's complicated creating a Pokémon Battle in AAO, so I suggest you to use only one Pokémon.
1 Pokémon: Make another frame with a multiple choice, setting the action 'Ask the Player for Answer'. Set 2 or 4 answers, then label each answer with the name of the move to use. Each answer will redirect to a 'battle frame'. So make the frame 'A attacks B with X' and click on 'Merge with next frame'. The next frame will be a 'random frame', insert this code with the action 'Test an expression value' (set it in expression mode):
In the parenthesis insert numbers from 1 to 3, like this:
Then set 3 (Or 2, depending on which numbers you used) accepted values, they will be 1, 2 (and 3). Then redirect each value to a frame that says 'and does X damage!', something like:
Code: Select all
1= Does 23!
2= Does 24!
(3= Critical hit! 38 damage!)
Then you'll do the same thing for the enemy turn, but without the multiple choice.
This time f:random_int(1,2) will serve as a randomizer for the move of the opponent.
Do the same thing as before, 'And does damage X' but this thime you will set a penalty, big as how much damage he did. (For the enemy health bar, I suggest you to use 5 or so pop-ups to represent the damage.)
Now, this is NOT complicated. Create another frame after the Enemy damage one with the timer set at '1' and set the action proceed to another frame.' Set the frame with the Player Multiple choice of the move.
Finally, set, at each damage opponent's damage a variable (VA) with value 1. Then set the next frame to 'Test an expression value'. Do this for each random attack, labeling the variables like this:
each by value 1 and then set the 'Test an expression value' I mentioned before like this (EXPRESSION MODE!).
Then set the failure frame ID to the multiple choice, and the succesfull frame ID to the end of the battle, the 'Bla bla bla I lost bla bla bla revenge bla bla bla' conversation.
There's only the last step and we're finished.
Set, before the battle, the action 'Set Game Over redirection'. It will redirect to the frames 'X hasn't got any more Pokémon! X doesn't see anymore! In the confusion, he loses X Pokédollars!' and then there will be a black screen like this 'X has gone to a Pokémon Center in hurry.' Or something like this. And this ends the 'Semi-Tutorial'!