Create a player and non-playable character objects

Assignment Help C/C++ Programming
Reference no: EM131755073

Topic: Project C++: A player engine for RPG fighting

An engine is needed to create a player and non-playable character objects. Players will require an inventory of Weapons, Armor, and potions. Each fighter can equip armor and a weapon. Characters will start at a level one. At this will give them an attack power of 1, and a defense of 1.

Health is the number of health points player has.

Attack is the damage done to an enemy

Defense is how well you defend when attacked. The enemy must roll better than this to hit you.

Experience is the minimum needed to reach a specified level.

Player stats level 1 level 2 level 3 level 4 level 5 level 6 level 7 level 8 level 9

Health 10 15 20 25 30 35 40 45 50

Attack Power 1 2 3 4 5 6 7 8 9

Defense 1 2 3 4 5 6 7 8 9

Experience 0 20 40 80 160 220 440 880 1760

Weapons tell how well you can attack. The weapon must be equipped to use. Power bonus is added to players attack power during attack. This determines how much damage is dealt with an enemy if hit.

Weapon Sword Axe Dagger of Striking

Roll min 0 1 5

Roll max 10 10 15

Power bonus 0 1 3

Armor, when equipped, adds to defense, making player harder to hit during an attack.

Armor None Leather Chainmail

Defense bonus 0 1 3

Potions can be part of inventory and are needed for healing. (restoring health points of player).

For part one create player objects and inventory objects. Use test driver function calls to test that they are being created and that accessors and mutators work.

(Driver functions are functions used for testing and debugging.)

After creating your objects, the game needs to have a controller (or engine) to run. This is a recommended model of how to manage the game flow. (note if you have a different method that is ok as long as requirements are met.)

Note that I have a separate function called test that will allow me to run test code. I have made the choice value for this 99 (const int TEST = 99). I did this so I can call the test without the user knowing the debug option.

When the game starts, you should have a display similar to this:

Text Fighter v0.1

(((Press Enter)))

1: Play Game

2: Quit

Playing the game will then run the actual game. Thus generate the player character set the level, health, beginning armor.

A scenario should output; something like "An enemy comes into view ready to attack you. What do you do?" At this point a menu of options can show with options to attack, take potion (this is usually to heal), or run.

Attack will commence player to run an attack function against the enemy. Something like player.Attack(enemy);

After the player attack, the program should check if the enemy has health remaining. If not battle is over and rewards can be issued to the player. The player should have the option to equip and new weapons or armor (this can be done automatically if that's simpler.) experience should be rewarded. And then the player goes to next battle.

If the enemy does not die (enemy.currentHealth!=0 ) then enemy should attack; enemy.Attack(player);

If player health falls below 0 then player dies and the current game run should end. This should send the game back to the main menu.

Requirements for Grade:

These need to be present:

Player Object Class

Weapon Object class

Armor Object Class

Title Screen

Test Function

Used to test object creation and unit test functions

/> Game Engine

In game menu (or help display with control options)

Battle logic

Reward logic

Header file structure

These standards need to be met:

Program runs (no syntax errors)

Code is readable

Logic is clean (clean of most logical errors)

Attachment:- Assignment File.rar

Reference no: EM131755073

Questions Cloud

Present the given data in a well-labeled bar graph : Birth days Births are not evenly distributed across the days of the week. Here are the average numbers of babies born on each day of the week in the United.
Sports-related head injuries : There has been increased attention lately to sports-related head injuries. Frontline recently published an article about the NFL's "concussion crisis
What is the adjusted basis of mr. ds stock on december : No distributions were made in 2015 or 2016 by the corporation. What is the adjusted basis of Mr. D's stock on December 31, 2016
Make a bar graph to display the given data : Deaths among young people Among persons aged 15 to 24 years in the United States, the leading causes of death and number of deaths in a recent year.
Create a player and non-playable character objects : Topic: Project C++: A player engine for RPG fighting. An engine is needed to create a player and non-playable character objects
Contrast the information from the video with actual outcomes : This video was developed just as the Patient Protection and Affordable Care Act (commonly referred to as ACA) was due to be implemented.
What amount of net operating loss will be available taylor : What amount of net operating loss will be available to Taylor for the year ended December
What percent of students plan to major in business : Which major? About 1.6 million first-year students enroll in colleges and universities each year. What do they plan to study?
Assume solange uses a perpetual system : Assume Solange uses a perpetual system, Assume Solange uses the perpetual system and a count

Reviews

len1755073

12/7/2017 6:23:39 AM

Detailed Question: Hello everyone, I'm beginner programmer and got a task to finish but I'm lost. Please help me to start the project. After creating your objects, the game needs to have a controller (or engine) to run. This is a recommended model of how to manage the game flow. (note if you have a different method that is ok as long as requirements are met.) Note that I have a separate function called test that will allow me to run test code. I have made the choice value for this 99 (const int TEST = 99). I did this so I can call the test without the user knowing the debug option.

Write a Review

C/C++ Programming Questions & Answers

  Write code that declares an int array named month

Write code that declares an int array named month with 5 rows and 7 coloumns and initializes every element to -1.

  Basic game of battleship

Basic Game of Battleship - Analyze a basic set of requirements and apply top-down design principles for a problem and eliminate redundancy within a program by applying loops and functions

  Write a function that will calculate the current persons bmi

Write a function that will prompt for the current person's height in FEET and INCHES and return total height in INCHES. Write a function that will calculate and return the current person's BMI.

  Calculate the circumference a circle

Calculate the Circumference a circle. Input: one number 3)Convert the temperature from Celcius to Farenheit Input: one number.

  Proposals using the calculations above to explain

Jamie Oliver is considering expanding his restaurant trade. He has the following two proposals to consider. A minimum of a 12% return on investment is required from the recommended project.

  Program that print out the contents of the file

Write a program that will prompt for a file name to open for writing. Prompt the user for 5 lines of text, writing each to the file. When finished, print out the contents of the file.

  What did you learn about group work from your experience

Describe your experiences on writing and testing your first C program. What difficulties you faced? What did you learn from this experience?

  What difference between sequential access and direct access

What is the difference between sequential access and direct access? What do the seekg() and seekp() functions do? What do the read() and write() functions do?

  Declare a 1-dimensional array of integers

In pseudocode and in C code, declare a 1-dimensional array of Integers called InternetHits that will hold up to 10 Integer values representing the number of hits a Web site receives.

  Computes the average of five exam scores

Write a program that calculates and prints the take-home pay for a commissioned sales employee and write a program that computes the average of five exam scores.

  What will be the output of the program code

What will be the output of the program code?

  Database management

MIS3100 - DATABASE MANAGEMENT INDIVIDUAL PROJECT DEFINITION 2015-2016 Bhuiya PERSONAL PICTURE DATABASE You love to take pictures. However, with digital technology, instead of taking one or two pictures, you take hundreds. You have been collecting and..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd