Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
AA2 - Minimal RPG
Program a minimal RPG game that runs in the windows console using C
Main Objective
Evaluation
The position of the player must be stored as an X and Y coordinates.
It is recommended to create a struct called MapPosition to store this kind of information since it is also used with enemies and chests.
Main resource of the character, if it reaches 0 the player loses the game. It does not regenerate between fights.
When creating the character, the health value must be initialized randomly between 90 and 110.
The player can hold a maximum of 3 potions. Using a potion will restore 40% of the maximum health of the player.
Example: If I use a potion and I have 20 health out of 100, I will restore 40 health, setting my current health to 60.
● See where the player, enemies and chests are located.● Move around● Use potions
1. Scene name2. Legend of the map3. Player stats4. Map5. Player actions
● If a player wants to move left and already is on the left-most tiles of the map, the command will be invalid. The same goes for top, left and right commands.● If a player moves into an enemy, the player will start fighting that enemy.● If a player moves into a chest, the player will loot the chest.● Looting a chest or fighting does not reset the player’s moves.
● If the player tries to use a potion without potions, it will count as an invalid move.
Any command entered other than W, A, S, D and P will be considered an invalid command and will ask the player to enter a new command without consuming agility.
Main Manager (2 points)
Extended flowchart: https://drive.google.com/file/d/15zO1wCf7bnpao8uNmVuHC1V6OcCQMlvT/view?usp=sharing
As we can see, there are 4 main scenes that are connected. The Main Manager must track the current scene and store any variables needed between the scenes themselves.
Combat (3 points)
● Attack (Consumes stamina for a set amount of damage)
● Defend (Regenerates 25% stamina and mitigates 75% of the incoming damage)
● Rest (Regenerates 100% stamina but leaves you vulnerable to attacks)● Potion (Same conditions as previous descriptions)
If both characters attack, the one with the highest value will strike the other one and stamina is consumed.
● I receive 67 damage● I lose 50 stamina used for the attack● The enemy loses 67 stamina used for the attack.
● Enemy stats (visual bars are required for maximum score)● Player Stats (visual bars are required for maximum score)● Player Actions
Extended flowchart: https://drive.google.com/file/d/1q2y-RpqoCdRGLj0Dlr-G5sBXlfqhPJew/view?usp=sharing
If the player loses all the HP, the game will end. If an enemy loses all of its HP, the following things happen:
● If there are no more enemies or chests left, the game ends● If there are still enemies alive or non-looted chests, the player goes back to the dungeon.
The enemy will decide its combat action following this flowchart.
When attacking, the enemy will use between 20% of the max stamina and the current stamina level.
Gear are unique items that the player can find inside chests. Gear will modify the health, stamina and agility attributes of the player as well as having a gold value. This value counts towards the final score. Notice that gear can also reduce the player attributes!
Gear example:
Richard’s Hatred |
| 200g value |
| +20 HP +40 Stamina +1 Agility |
Swift boots |
| 10g value |
| -10 HP -5 Stamina +1 Agility |
White Powder
|
| 150g value |
| -20 HP +20 Stamina +1 Agility |
Radev’s Mug
|
| -300g value |
| -20 HP -40 Stamina -1 Agility |
Raven feather
|
| 50g value
|
| -10 HP +2 Agility
|
Red Mushroom
|
| 170g value |
| +30 HP |
Ugly Facemask
|
| 10g value |
| +5 HP |
Broken Shield
|
| 25g value |
| +10 HP |
Green mushroom
|
| -50g value |
| -10 Stamina
|
Naughty book
|
| 69g value |
|+7 Stamina
|
Flag that indicates if the chest contains a potion. 25% of the chests contain a potion.
If a chest contains a potion the player will take it if there is enough room for it. If not, the player cannot take or use the potion inside the chest.
Render
1. Amount of gold2. Gear data3. Potion data
Victory / Defeat (0.5 points)
Remember that the score displayed is equal to the gold that the player has collected plus the value of the gear.
Requirements, delivery and sancions
- AA3_“Name1Surename1”_“Name2Surename2”_PROJECT.
- AA3_”Name1Surename1“_”Name2Surename2”_SOL.