Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project Requirements: You will be writing new classes based upon the Fighter / Power classes from project 1. The new classes should be implemented in

image text in transcribed

Project Requirements:

You will be writing new classes based upon the Fighter / Power classes from project 1. The new classes should be implemented in a way that facilitates development of a Pokemon Go battling game, based upon the background information provided. You must:

  1. Write a new class for Fast Moves
  2. Write a new class for Charge Moves
  3. Write a new class for Pokemon
  4. Write a new class for Trainer
  5. Use real or near-real formulas for Pokemon Go-type damage calculations and HP calculation.
  6. Write a main function which tests all classes and functions.
  7. Document your functions / variables / test cases with comments.
  8. Use the 6 pokemon from the following list along with the powers of the 6 you choose. Use the real base attributes and their real power lists on these tables.
  9. Note: your damage calculations should work even if I make two completely different pokemon with new moves etc. It will need to work for different varieties of move and type combinations.
    1. Use the interface (.h, header) files.
      1. That is, the contents of the .h files including the class definitions, the purpose, preconditions and postconditions of functions, the prototypes for public member functions, and the private member variables.
  • Do not use "goto" statements in this or any other assignment.
  • Don't use "break" to get out of a loop. Only time you should use break is for switch / case statements. Control loops with the loop condition statements / flags instead.
030 2.50 9 Each Pokemon Species in Pokemon GO has a set of hidden Base Attributes (base ATK, baseDEF and baseSTA) which are used in calculating HP, outgoing damage, and incoming damage. Each individual Pokemon also has a set of visible Individual Values (IV) (IVATK, iVDEF, ISTA) which are also used in the calculation of HP, outgoing damage, and incoming damage Individual Values each range from 0 to 15. Each Pokemon has a level ranging from 1 to 40. In the real pokemon GO game, levels increment by 0.5. For this assignment, you can simply have them increment by 1 if you wish. The pokemon's level is used to look up a "CP Multiplier or CPM from a table of values found here: Counter Counte Attack Move PVP Base PVP Charge Attack Move NETE Attack, Type Vulnerabiliter resistent Astec AT Defense Der STA1 HP OPM Fast Moves Duration Energy Delta Pich Cecidown Gound Charge Moves Energy Ener Cooldown stamine. Esse Searc Electric 112 useles Quick 7 Rye 45 se numbers between stor sucer Sock 1 wischer 900 -49 2.60 between Character Thunderbolt 90 as 259 Horst penyimlForme Psychia BE Fert 349 STE 137 Cerem 1.30 Hiper Bean 190 -90 3.80 Der Picnic Zen Hestbut: 2 6 Thunderbot 90 -55 2.59 Sort Pano Boost 10 400 squirte Water Electric Fire 94 111 127 Trore D 2 0.50 2.60 Gas re Bubble 2 1 1.20 90 100 Bree Water Pulse 70 -50 320 WE put Fairy, Nerms I Poison Eur 30 23 Feint Atter 1 6 0.90 Syno al BC -50 239 Dark Pound 1 09 Deine Gear 110 -90 2.90 Dragon psomming voice 70 390 Ghost Clefair Fairy, Nort Peisan Bus 107 CE Pound 1 0.50 Body San BC 192 See Dark Zen Halbutt 2 6 1.30 Diarming Voice 70 -9 3.90 | Dragon Montest 290 AU . 140 118 118 2.60 2:10 230 Sultas Grass Poison , Fire Electric 33 Tecke 2 0.50 Power Whis 90 -50 Pynt Fairy Vine whip 1 0.00 Jedlom 30 Fett Sucie Bomb BC -50 Psychic Gruss Weiter This table of values can be stored in a constant array and indexed by the pokemon's level - 1. For example, CPM[7] would give the appropriate CPM value for a level 8 pokemon. Each Pokemon has a Hit Point score (HP) which tracks the amount of damage a Pokemon can suffer in battle before feigning. The total HP is calculated by the formula HP = floor( (baseSTA + ivSTA). CPM[level-1]) In C++, the floor function can be used from the library Each Pokemon species has one or two types from the following list: Rupert A Ta SCRISE TA 2. Damage to 25 Demagerrom 2...x damage to 25 Demag frem Porn Gran BEBE Bighing Grass Not very active WARTO 525 Demagate Damage from 16 Damage from Vych Ground PER VASE Weal super effective Age HERE TO amato 3. Damage from 1.0 Damege To 1025 Damer Cluste Rock Steel Janou, rych Ele Back Dark Shast ERCIALE St Damage from 1. Dumato Ix Damage From Bus DAMISE Prem purchi We 16 VIVA Damage to ark, Superche AR RET D. Image Very free All VATRICERIDE mago BE G Dmage Wake Bamagerom around Ponto diteta. We Dragon We Fale ante as Damage from LABILE WEL Damage from Linn wanamam PAIYA SISTERET puper ECHIVAGRIA BARA Water IM VAN CS Damage LLIB. SUPERVAR MART DES PR Very FIA Ye at Water CVR AGRIORE ama Wein SUDAMER Fairy TUPO AERAH Nama Dating Panel AER Damage SUR Dame To man upor The AS RAMA abre To wam Weak merem Rebel Sentya Los VORRE Namas Prom re weak Bager ht We Breme magram DON marem WE Dame From HO rama Ristel W FREE 8. Demgee PAD THE VOTEERIVAINER Damage From w GAR ram TWW W PR Very Eve A TA Free AB TOMATO Eram tant every les Very FARE DOMA Le Cameron Pa PRAVICE AB Lahat FREE tot water Fame DURGAS Duracy, Gro Stol Gamage to Lo Damage from PRIVATE WIN Bemer 1x Dame From Dragon Fud, het water Types are used in the calculations of outgoing and incoming damage based upon the weaknesses and strengths described in the chart. Two types of Moves exist in Pokemon GO: Fast Moves and Charge Moves. Each Move has a Damage Type: The list of Damage Types is the same as the list of Pokemon types from the chart above. Each Pokemon species has a list of Fast Moves they can leam Pokemon know one Fast Move from that list at any given time. Each Pokemon species also has a list of Charge Moves they can learn Pokemon know one or two Charge Moves from that list at any given time You can leam a new move from the pokemon's list by replacing an existing one (replace a fast move with a new fast move or a charge move with a new charge move) Fast Moves are basic attacks that deal damage and charge up energy. They have these main statistics in PVP: Base Power: Some non-negative integer (Used to compute total damage.] Duration: Some non-negative floating point number. [Amount of time the attack animation takes to complete.] Energy Delta: Some non-negative integer [Amount of Energy retured and stored by the Pokemon.] Move Cooldown: Some non-negative floating point number. (Amount of time following the attack animation before the move can be used again] Charge Moves are special attacks which can be used after charging enough Energy through Fast Moves. Once used, an amount of Energy is spent for the attack Charge Moves can be Shielded. Each Trainer has up to 2 Shields per battle. Charge moves have the following statistics in PvP: Base Power: Some non-negative integer. (Used to compute total damage.] Charge Energy: Some negative integer. [Amount of energy needed to activate Spent when used.] Each Pokemon has some maximum energy it can store. For this project, you may use a constart of 500 total energy for this maximum energy storage limit across all pokemon Damage from a move used by an attacker against a defender is calculated by the following formula: TotalDamage = floor(0.5 * BasePower CATK_attacker / CDEF_defender * Multipliers )+1 Where CATK_attacker = { baseATK+IVATK) CPM attackerlvi - 1] DEF_defender = (baseDEF + IVDEF) CPM defenderivl - 1) And multipliers include: Same Type Attack Bonus (STAB): * 12 multiplier if the pokemon uses an attack of its own type Example: Pikachu (an electric pokemon) using Thunderbolt (an electric move) ctiveness: Ranges depending upon the type of the move being used and the types of the defender. Refer to the type chart: Additional details on calculations can be found here: Each Trainer has a list of owned Pokemon, which can be stored as a vector of Pokemon objects. These are the pokemon the Trainer has available to choose from when battling Each Trainer has a battle team of 3 Pokemon which are chosen from the Owned list. This could be stored as an array of three integer indexes to the owned Pokemon vector. Each Trainer has 2 shields which can be used during a given battle. Shields are used to block the damage of an incoming Charge Move. Implementing a full combat system in the main fanction is optional. It is also permissible to simply test the functions and classes without having a game implemented. For some details on how combat works: In a battle between two trainers (handled at the application level), each trainer uses their battle team of 3 pokemon. When a Charge Move is used against the trainer's pokemon, the defending Trainer may choose to use a Shield if one is available. Using a shield reduces the total number of shields available by 1. A trainer battle ends when one of the two trainers' set of three pokemon have all been reduced to 0 HP On a trainer's tum, if the trainer's pokemon is not on cooldown or in the middle of using a fast move the trainer can choose to make a Fast Move, a Charge Move (if there is enough energy available), to delay (take no action), or to Switch to another pokemon from their set of 3. Only a pokemon with > 0 HP can be used in battle Pokemon HP totals should be reset back to their maximum values after the trainer battie is over. As such, you should have storage for the pokemon': MaxHP along with its CurrentHP. MaxHP is the calculated total from the formula provided. CurrentHP starts 29 equal to MasHP at the start of the battle and is depleted 29 attack damage is dealt. Damage from a Fast Move is applied after the attack animation is completed Damage from a Charge Move is applied after the defending trainer decides whether or not the Shield the attack Charge Moves have no delay other than pausing to give the defending trainer the opportunity to choose to shield or not 030 2.50 9 Each Pokemon Species in Pokemon GO has a set of hidden Base Attributes (base ATK, baseDEF and baseSTA) which are used in calculating HP, outgoing damage, and incoming damage. Each individual Pokemon also has a set of visible Individual Values (IV) (IVATK, iVDEF, ISTA) which are also used in the calculation of HP, outgoing damage, and incoming damage Individual Values each range from 0 to 15. Each Pokemon has a level ranging from 1 to 40. In the real pokemon GO game, levels increment by 0.5. For this assignment, you can simply have them increment by 1 if you wish. The pokemon's level is used to look up a "CP Multiplier or CPM from a table of values found here: Counter Counte Attack Move PVP Base PVP Charge Attack Move NETE Attack, Type Vulnerabiliter resistent Astec AT Defense Der STA1 HP OPM Fast Moves Duration Energy Delta Pich Cecidown Gound Charge Moves Energy Ener Cooldown stamine. Esse Searc Electric 112 useles Quick 7 Rye 45 se numbers between stor sucer Sock 1 wischer 900 -49 2.60 between Character Thunderbolt 90 as 259 Horst penyimlForme Psychia BE Fert 349 STE 137 Cerem 1.30 Hiper Bean 190 -90 3.80 Der Picnic Zen Hestbut: 2 6 Thunderbot 90 -55 2.59 Sort Pano Boost 10 400 squirte Water Electric Fire 94 111 127 Trore D 2 0.50 2.60 Gas re Bubble 2 1 1.20 90 100 Bree Water Pulse 70 -50 320 WE put Fairy, Nerms I Poison Eur 30 23 Feint Atter 1 6 0.90 Syno al BC -50 239 Dark Pound 1 09 Deine Gear 110 -90 2.90 Dragon psomming voice 70 390 Ghost Clefair Fairy, Nort Peisan Bus 107 CE Pound 1 0.50 Body San BC 192 See Dark Zen Halbutt 2 6 1.30 Diarming Voice 70 -9 3.90 | Dragon Montest 290 AU . 140 118 118 2.60 2:10 230 Sultas Grass Poison , Fire Electric 33 Tecke 2 0.50 Power Whis 90 -50 Pynt Fairy Vine whip 1 0.00 Jedlom 30 Fett Sucie Bomb BC -50 Psychic Gruss Weiter This table of values can be stored in a constant array and indexed by the pokemon's level - 1. For example, CPM[7] would give the appropriate CPM value for a level 8 pokemon. Each Pokemon has a Hit Point score (HP) which tracks the amount of damage a Pokemon can suffer in battle before feigning. The total HP is calculated by the formula HP = floor( (baseSTA + ivSTA). CPM[level-1]) In C++, the floor function can be used from the library Each Pokemon species has one or two types from the following list: Rupert A Ta SCRISE TA 2. Damage to 25 Demagerrom 2...x damage to 25 Demag frem Porn Gran BEBE Bighing Grass Not very active WARTO 525 Demagate Damage from 16 Damage from Vych Ground PER VASE Weal super effective Age HERE TO amato 3. Damage from 1.0 Damege To 1025 Damer Cluste Rock Steel Janou, rych Ele Back Dark Shast ERCIALE St Damage from 1. Dumato Ix Damage From Bus DAMISE Prem purchi We 16 VIVA Damage to ark, Superche AR RET D. Image Very free All VATRICERIDE mago BE G Dmage Wake Bamagerom around Ponto diteta. We Dragon We Fale ante as Damage from LABILE WEL Damage from Linn wanamam PAIYA SISTERET puper ECHIVAGRIA BARA Water IM VAN CS Damage LLIB. SUPERVAR MART DES PR Very FIA Ye at Water CVR AGRIORE ama Wein SUDAMER Fairy TUPO AERAH Nama Dating Panel AER Damage SUR Dame To man upor The AS RAMA abre To wam Weak merem Rebel Sentya Los VORRE Namas Prom re weak Bager ht We Breme magram DON marem WE Dame From HO rama Ristel W FREE 8. Demgee PAD THE VOTEERIVAINER Damage From w GAR ram TWW W PR Very Eve A TA Free AB TOMATO Eram tant every les Very FARE DOMA Le Cameron Pa PRAVICE AB Lahat FREE tot water Fame DURGAS Duracy, Gro Stol Gamage to Lo Damage from PRIVATE WIN Bemer 1x Dame From Dragon Fud, het water Types are used in the calculations of outgoing and incoming damage based upon the weaknesses and strengths described in the chart. Two types of Moves exist in Pokemon GO: Fast Moves and Charge Moves. Each Move has a Damage Type: The list of Damage Types is the same as the list of Pokemon types from the chart above. Each Pokemon species has a list of Fast Moves they can leam Pokemon know one Fast Move from that list at any given time. Each Pokemon species also has a list of Charge Moves they can learn Pokemon know one or two Charge Moves from that list at any given time You can leam a new move from the pokemon's list by replacing an existing one (replace a fast move with a new fast move or a charge move with a new charge move) Fast Moves are basic attacks that deal damage and charge up energy. They have these main statistics in PVP: Base Power: Some non-negative integer (Used to compute total damage.] Duration: Some non-negative floating point number. [Amount of time the attack animation takes to complete.] Energy Delta: Some non-negative integer [Amount of Energy retured and stored by the Pokemon.] Move Cooldown: Some non-negative floating point number. (Amount of time following the attack animation before the move can be used again] Charge Moves are special attacks which can be used after charging enough Energy through Fast Moves. Once used, an amount of Energy is spent for the attack Charge Moves can be Shielded. Each Trainer has up to 2 Shields per battle. Charge moves have the following statistics in PvP: Base Power: Some non-negative integer. (Used to compute total damage.] Charge Energy: Some negative integer. [Amount of energy needed to activate Spent when used.] Each Pokemon has some maximum energy it can store. For this project, you may use a constart of 500 total energy for this maximum energy storage limit across all pokemon Damage from a move used by an attacker against a defender is calculated by the following formula: TotalDamage = floor(0.5 * BasePower CATK_attacker / CDEF_defender * Multipliers )+1 Where CATK_attacker = { baseATK+IVATK) CPM attackerlvi - 1] DEF_defender = (baseDEF + IVDEF) CPM defenderivl - 1) And multipliers include: Same Type Attack Bonus (STAB): * 12 multiplier if the pokemon uses an attack of its own type Example: Pikachu (an electric pokemon) using Thunderbolt (an electric move) ctiveness: Ranges depending upon the type of the move being used and the types of the defender. Refer to the type chart: Additional details on calculations can be found here: Each Trainer has a list of owned Pokemon, which can be stored as a vector of Pokemon objects. These are the pokemon the Trainer has available to choose from when battling Each Trainer has a battle team of 3 Pokemon which are chosen from the Owned list. This could be stored as an array of three integer indexes to the owned Pokemon vector. Each Trainer has 2 shields which can be used during a given battle. Shields are used to block the damage of an incoming Charge Move. Implementing a full combat system in the main fanction is optional. It is also permissible to simply test the functions and classes without having a game implemented. For some details on how combat works: In a battle between two trainers (handled at the application level), each trainer uses their battle team of 3 pokemon. When a Charge Move is used against the trainer's pokemon, the defending Trainer may choose to use a Shield if one is available. Using a shield reduces the total number of shields available by 1. A trainer battle ends when one of the two trainers' set of three pokemon have all been reduced to 0 HP On a trainer's tum, if the trainer's pokemon is not on cooldown or in the middle of using a fast move the trainer can choose to make a Fast Move, a Charge Move (if there is enough energy available), to delay (take no action), or to Switch to another pokemon from their set of 3. Only a pokemon with > 0 HP can be used in battle Pokemon HP totals should be reset back to their maximum values after the trainer battie is over. As such, you should have storage for the pokemon': MaxHP along with its CurrentHP. MaxHP is the calculated total from the formula provided. CurrentHP starts 29 equal to MasHP at the start of the battle and is depleted 29 attack damage is dealt. Damage from a Fast Move is applied after the attack animation is completed Damage from a Charge Move is applied after the defending trainer decides whether or not the Shield the attack Charge Moves have no delay other than pausing to give the defending trainer the opportunity to choose to shield or not

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

More Books

Students also viewed these Databases questions

Question

Which of the following is NOT a relational operator? 1. =

Answered: 1 week ago