Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Simplified version of Pokemon Cpp - Develop classes to represent Pokmon and their Moves. Implement interactions between Pokmon objects using member functions - All

Simplified version of Pokemon Cpp - Develop classes to represent Pokmon and their Moves. Implement

Simplified version of Pokemon Cpp - Develop classes to represent Pokmon and their Moves. Implement interactions between Pokmon objects using member functions - All Classes must be set up with a header and implementation file separate from the main file Pokemon Class: Member Variables: Name, Type (to begin with only assume 4 types: fire, water, grass, normal), Health, Attack, Defense. Moves (Array of Move Objects, max 4). Don't forget accessors and mutators, variables should be private! Member Functions: Constructor, performMove, receiveDamage, displayStatus Moves Class: Members: Name, type (again just 4 basic types), damage (assume all moves are damaging moves to begin with) . Constructor Accessor and Mutator Damge formula: Calculates damge and type effectiveness: Damage = (MoveDamage + AttackerAttack) * TypeEffectiveness TargetDefense = max (Damage, 0) Max is used since you should never deal negative damage Type effectives: Fire is super effective against Grass and resists itself and Grass Grass is super effective against Water and resists itself and Water Water is super effective against Fire and resists itself and Fire Normal is not effective or resisted by any type. Main Function: Create 2 object pokemon, and set them to battle each other in a loop taking turns until HP is reduced to 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres a simplified version of the Pokemon battle system in C using classes to represent Pokemon and their moves Pokemonh ifndef POKEMONH define POKEMO... 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

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions