Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Battles are performed turn based, one player hits and after him other player hits. So be sure when it's one player's turn, other player has

Battles are performed turn based, one player hits and after him other player hits. So
be sure when it's one player's turn, other player has to wait and can not attack.
In the figure as you see, since it's Player 1's turn (Player 1 starts the game) buttons
of Player 2 are disabled.
Players have two options: physical attack and elemental attack. Difference of physical
and elemental attack is like as follows (do not forget to multiply by 5 the health value
of Pokemons given in the csv):
Physical: Can give damage between 75%-100% of Pokemon's attack value.
Elemental: Can give damage between 50%-100% of Pokemon's attack value, if
attacker is elementally stronger than defender Pokemon, damage will
be doubled with a 80% chance.
Here you need to add the functionality to buttons, they will do the calculations of
attack and decrease the HP of opponent, and visually represent it on the screen. Health
bars of Pokemons will be updated after every attack (Don't forget to take 5** health of
Pokemons from dataset!!!).
See the sample screenshots of the battles below:if any player lose , an infobox should appear: in title side of tkinter symbol should be written as : Lose! then ( charmander lost! Player 2 chooses a pokemon and player 1 gets evolved! ) Here you need to implement evolution mechanic, loser will choose a pokemon again but winner will not choose a new pokemon, instead winner will have the same pokemon but evolved version of it. See the example of evolution below: First Player 1 starts with Squirtle and Player 2 starts with Charmander: Then Player 1 wins and gets evolved, since squirtle evolves to Wartortle, now he is Wartortle and player 2 chooses a new pokemon. Finally in the round 3, since player 1 won again, he got his last evolution and Wartortle became a Blastoise and player 2 choose a new pokemon. Also see players scores, player 1s score increases every round but player 2s dont, when a player wins and gets evolved, his score increases. Who reaches to 3 first wins the whole game.
Here the logic is, winner gets evolved and gets stronger, but if he loses, he loses evolution and again chooses a level 1 pokemon. So if a player wants to be successful, he should be careful that he doesnt break the win streak, so gets evolved again and again, then
10
win easily. Dont forget we only have 3 levels of pokemons; level 1 we choose from the listbox, if he wins once it gets level 2 and if wins again he gets level 3.
Before a new round begins, evolved player should revive with %70 of his max health, or it will be impossible to beat evolved pokem:on.When a player reaches score 3, game should end and an infobox should appear:infobox: in title side of tkinetr symbol : Win! then (Player 2 Won!) infobox: in title side of tkinter symbol : Game over! then ( Player 2 Won! Now you can analyze players performance.)f game flow seemed confusing, definitely watch the video about the game flow, see how it should be implemented. also there is a code of 18
import pandas as pd
df = pd.read_csv('pokemon.csv')
pokemon_list =[
'Bulbasaur', 'Ivysaur', 'Venusaur', 'Charmander', 'Charmeleon', 'Charizard',
'Squirtle', 'Wartortle', 'Blastoise', 'Caterpie', 'Metapod', 'Butterfree',
'Weedle', 'Kakuna', 'Beedrill', 'Pidgey', 'Pidgeotto', 'Pidgeot'
]
df = df[df['Name'].isin(pokemon_list)]
df = df.rename(columns={'Type 1': 'Element'})
df = df[['Name', 'Element', 'HP', 'Attack']]
df.reset_index(drop=True, inplace=True) After getting the clean dataset, now we are ready to build the GUI for the game flow.
First, players needs to choose their Pokemons, so we are going to need a Pokemon selection screen. Here you can build your own beautiful GUIs but it doesnt need to be too much detailed, or specifically the same with the selection screen system below, just create something that will do the task, which is just the selection of Pokemons.
Above you see the selection window for Player 1, player 1 will going to choose the name of Pokemon from the ListBox and then see the image of the Pokemon in the question marked place.
Image will change when player click any of the Pokemons in the ListBox. When player 1 decides the Pokemon he wants, then needs to click Choose button and then selection window for player 2 will appear.
Above figures you see only 6 Pokemons for each player, but cleaned dataset had 18 of them? Where are the rest 12 Pokemons?
If you are not familiar with Pokemon universe, pokemons can evolve as they grow up or fight and get stronger. In the dataset we cleaned actually has 6 different Pokemons, and every Pokemons has their evolution level 2 and 3. In the battles, the Pokemon who won the round will get evolved and both its attributes and image will change. So other 12 Pokemon will appear in the next phases of the battles.
After both players choose battle will begin .
write gui for me please as fast as possible .
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions