In order to develop this feature, I just had to play around with my game index in my JavaScript file.
I wanted to add this feature to create a more intriguing game experience for my users.
Both, player 1 and player 2, have the option to choose between 4 Pokémon that I designed myself.
Pokémon Choices:
- Squirtle
- Charmander
- Bulbasaur
- Pikachu
After each player selects their desired Pokémon, they will be sent into a 1v1 battle.
How to Attack:
Each player will take turns attacking each other, and the attacks are randomly selected from an array of
0-6 (7 total outcomes). Each outcome also has a specific message that will be displayed.
Attacks
0 = -10hp
1 = -35hp
2 = -5hp
3 = +5hp
4 = -4hp
5 = Null
6 = -15hp