C++代写:FIT1048 Monster Evolution

用C++代写一个完整的RPG游戏,考察OOP的理解和熟练程度。

Game Overview

You have woken up in a strange dungeon. It is full of weird monsters that you are able to catch and look after! You will wander the dungeon, finding monsters and evolving them into more powerful and special versions of themselves. Can you evolve a monster that you can fight against the evil boss that guards the exit of the dungeon?

Basic Play

  • The dungeon is a room that is 20 x 10 squares in size (20 wide by 10 high). In “normal” mode, the player cannot see the contents of a square in the dungeon. In “test” mode, the player can see the whole dungeon and the contents of each spot.
  • The player starts at a random spot along the left hand wall. The exit to the dungeon is at a random spot on the right hand wall. Your aim is to find the exit.
  • In this dungeon are 5 types of monster: “Bugbear”, “Platypie”, “Emoo”, “Octopod”, and “Skeletor”. The first three monsters are friendly, while the fourth and fifth type are not, and will attack you. In the dungeon there are 10 of each type of monster, except for “Skeletor” of which there is only 1, and it is located directly in front of the dungeon exit.
  • The player will move around the dungeon. They can move either up, down, left or right. If they move into the square of a friendly monster they can try to catch it. When five of one type of monster is caught, it will evolve to a special monster. This is explained below.
  • If the player comes across an unfriendly monster, there is a battle, also described below.
  • When the player meets the “Skeletor” monster, a battle also takes place, but it is between an evolved monster and “Skeletor” and is described separately below.
  • If the player beats the “Skeletor” monster, then they exit the dungeon and win the game. If the player is beaten in battle the game is also over and the player loses.

Players

The player is represented by the following:

  • A name
  • A skill level. This is set to 6 at the start of the game
  • A health. This is set to 10 at the start of the game
  • A collection of normal monsters
  • One (maximum) evolved monster

Monsters

Monsters are represented by the following:

  • A type
  • A skill level. This is set to a random value from 1-3 at the start of the game
  • A health. This is set to a random value from 3-6 at the start of the game

Evolved Monsters

Evolved Monsters are born when 5 of one type of monster has been found and added to a players collection. These 5 monsters then join up (so are removed from the players collection) and create one evolved monster. They are represented by the following:

  • A type. This is the same as the base monster type.
  • A skill level. This is set to the sum of all skill levels from the base monsters.
  • A health. This is set to the sum of all health values from the base monsters.
  • A special power modifier. This is a number that is added to battles each turn. Its value is 1 if monster type “Bugbear”, 2 if type “Platypie” or 3 if type “Emoo”.

“Skeletor” Monster

The “Skeletor” monster (the boss monster) is represented by the following:

  • A skill level. This is initially set to 10.
  • A health. This is initially set to 20.
  • A special power modifier. This is a number added to battles each turn. Its value is set to 2.

Finding a friendly monster

This describes what happens when the player finds a friendly monster:

  • The player must try to “catch” the monster.
  • To catch the monster, the player generates a random number from 1 to 6. If the number is equal to or higher than the monsters skill level, the monster has been caught. If not the monster runs away. If the monster has been caught, it is removed from the dungeon and goes into the players monster collection. If it runs away, the monster is simply removed from the dungeon.
  • As soon as 5 monsters of the same type are caught, then they immediately change into an evolved monster. When this happens, a new Evolved Monster is created with the values described earlier, and the 5 normal monsters are removed from the player’s collection.
  • If a player collects 5 of a different type of monster, it will evolve and replace the current evolved monster.

Finding an Unfriendly Monster

This describes what happens when the player finds an unfriendly monster:

  • The player must fight the unfriendly monster
  • To fight the monster, the player generates a random number between 1 and 6. It is added to the player’s skill level. Another random number 1-6 is generated for the monster and added to its skill level. If the player’s total is higher than the monsters total, the monster loses 1 health point. If the monsters total is higher, the player loses a health point. If it is a draw, neither loses any health. This continues until either the player or monster runs out of health.

Finding the “Skeletor” Monster

This describes what happens when the player finds the “Skeletor” monster:

  • The player can fight the monster only if they have an Evolved Monster. If they do not have an evolved monster, the player is returned to their start point of the dungeon.
  • To fight the monster, the battle happens between the players Evolved Monster and the “Skeletor” monster. The player generates a random number between 1 and 6. It is added to the Evolved Monster’s skill level. Another random number 1-6 is generated for the “Skeletor” monster and added to its skill level. If the Evolved Monster’s total is higher than the “Skeletor” monsters total, the “Skeletor” monster loses 1 health point. If the “Skeletor” monsters total is higher, the Evolved Monster loses a health point. If it is a draw, neither loses any health. This continues until a monster runs out of health.
  • If the Evolved Monster wins, the player has found the exit of the dungeon and the game is over. They win!
  • If the “Skeletor” monster wins, the player is eaten by the monster and they lose!

Game Modes

Your game should have two modes that can be chosen at the beginning of your program:

  1. Normal Mode – In this mode the game plays as described, with the dungeon hidden from the player
  2. Test Mode – In this mode the game plays as described, with the contents of the dungeon always shown to the player

Extra Functionality

The marking criteria indicates that you should make some individual additions to this in order to achieve the final 20% of the mark. This is up to you. You should aim to add some additional creative elements to the gameplay, as well as advanced object-oriented design elements or advanced use of pointers.

Program Design Diagram

In this final assignment you are able to design your program in any way you like. You must provide a diagram with annotation that shows the classes you have in your program and how they interact. It should contain any relevant notes that describe the classes. This diagram does not have to be formal UML or any other specific notation, however you may refer to basic class diagram notation.

Program Reflection

You must provide a 300-word written reflection of your object-oriented design and how well you believe it was to implement. You should cover the following areas:

  • Why you designed it the way you did
  • How well you were able to code it, highlighting any issues you found once you tried to implement your design
  • How you might change your design to make your solution easier to implement, more efficient, or better for code reuse.

Suggested Development Process

Phew! This is a lot to digest! Below is a suggested process you might use to develop your assignment piece by piece so that it is not too overwhelming. Feel free to follow this if you think it will help (or not!):

  1. Design the program on paper… decide what classes you think you need and how they will relate to each other. Write down your thoughts on why you think this is the best design. You need to do this for the assignment anyway!

  2. Think about how you will represent your dungeon, as well as the things in it. This might influence your approach.

  3. Write the basics of your Main function… very basic, but just so that you have it working (even if it is hello world).

  4. Think about one basic game functionality that you want to get working and do that… Remember that you don’t have to try and get everything working all at once! Having the Monster and Player battle might be one way to do it.

  5. If you choose to battle, write the classes you need for that… hint, you probably need the Player and Monsters! Remember though, you don’t have to put everything into each class, just put in the attributes and functions that the classes need.

  6. For battling, include the classes you have written in the Main function and get that working standalone… again, you don’t have to have all the functionality working (like finding monsters) to have battles working! Focus on one small sub-task.

  7. Repeat the process for each additional function… either add to existing classes or write new ones if you need to. Remember, just focus on the small specific task!

I hope this helps. Important thing is to focus on small sub-tasks one at a time and build up functionality that way.