You are creating a simple RPG video game, and you need to work out some details for your crafting menu. Your characters can craft two potions with simple
ingredients: Minor Mana, and Minor Healing. The two potions have similar ingredients with some slight differences shown below.
Ingredients
Amount for Minor Health
Potion:
Amount for Minor Mana
Potion:
Honeycomb
5
5
Dandelions
0
3
Coal
2
1
Toadstools
3
0
You want to add a "Craft All Potions" option, which will ask the user if they would like to prioritize Healing or Mana potions. It will then tell you how many you can
produce of your priority potion, and then with the leftovers it will craft the other type of potion if it is possible. First ask for the priority potion, and then the
quantities of the ingredients as an input. Then output how many of the priority potion you can make, and how many of the other potion. If the user provides an
invalid input, ask them again.
Answer: (penalty regime: 0%)
1 #include <iostream>
2
3 using namespace std;
4
5//function Main
6 int main()
//declaring variables
7{
8
9 int choice = 0;
10 int honeyCombs, dandelions, coals, toadstools;
11 int healingPotions = 0;
12 int manaPotions = 0;
13
14
15 //while loop to validate choice input from the user
16 while(true) {
17
18 //printing menu for user input
19 cout<<"Select a potion crafting priority:\n";
20 cout<<"1. Minor Mana\n";
21 cout<<"2. Minor Healing\n";