ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ Π½Π° Ρ++. ΠΠΎΡΠ°Π±ΠΎΡΠΊΠ° ΡΡΡΠ΅ΡΡΠ²ΡΡΡΠ΅Π³ΠΎ ΠΏΡΠΎΠ΄ΡΠΊΡΠ°. Overview: In this assignment, you will develop a C++ program that simulates a medieval fantasy story. Your program will create characters, weapons, and spells that interact within a dynamic story. The story progresses through a series of events such as attacks, spawns, and deaths, with each event written to an output file to narrate the unfolding adventure. Entities These are the entities in this task: Narrator. Characters: Character, Fighter, Wizard, Archer. Physical items: PhysicalItem, Weapon, Potion, SpellSheet (Spell). Containers: Container, Arsenal (a container of weapons), MedicalBag (a container of potions), SpellBook (a container of SpellSheets). Each event causes some text in the output file. Specifications: One Narrator should be created, at the beginning. It's guaranteed that no character is going to be named Narrator. Names of items and characters are unique. Physical Item with owner property. Weapon: each weapon has a certain damage value. Potion: drink increases HP. Each potion has a certain healing value. A character can drink another character's potion. SpellSheet. Kills one of a given set of characters. A character can cast a spell as long as they have the associated SpellSheet in their SpellBook. When cast, the spell causes its sheet to burn (the owner can't use it anymore). A potion can be drunk once. Unlike weapons, each potion and spell can be used only once, whereas weapons can be used indefinitely. Container Arsenal (a container of weapons). Each Arsenal has a different set of weapons. MedicalBag (a container of potions). Each MedicalBag has a different set of potions. SpellBook (a container of spells). Each SpellBook has a different set of spellSheets. Character has health points. Fighter: Arsenal of 3 Weapons at max. MedicalBag of 5 potions at max. Wizard: can cast spell and drink SpellBook of 10 spells at max. MedicalBag of 10 potions at max. Archer: Arsenal of 2 weapons at max. MedicalBag of 3 potions at max. SpellBook of 2 spells at max. When a character dies, all their items get destroyed. A dead character should be considered a non-existent character in the subsequent events after his/her death. We strongly encourage you to use declaration and definition principles. The main function in your solution shouldn't have direct access (pointers) to items or containers. It should have access to characters only. Deleting a character destroys all his/her items. Errors to be handled: Character doesn't exist (Attack, Cast, Drink, Create item, spell target is not a character, Dialogue) Character doesn't own an item (Attack, Cast, Drink). Negative value or zero for a potion healValue (Create item potion). Negative value or zero for a weapon's damageValue (Create item weapon). Target is not in the list of allowed targets in casting spells (Cast). Arsenal, MedicalBag, or SpellBook are full (Create item) Character can't carry or use a certain item, e.g., wizards can't have weapons (show $itemType $characterName, Create Item, Attack, Cast). The input is guaranteed to be valid except for the possible errors mentioned above. In the output file in case of any of the previous errors, just add a line which contains “Error caught“ and continue the execution of the program skipping the event that caused the error. Requirements: You are required to meet the following criteria for the design specifics:. ΠΠΎΠΆΠ΅Π»Π°Π½ΠΈΡ ΠΈ ΠΎΡΠΎΠ±Π΅Π½Π½ΠΎΡΡΠΈ: Overview: In this assignment, you will develop a C++ program that simulates a medieval fantasy story. Your program will create characters, weapons, and spells that interact within a dynamic story. The story progresses through a series of events such as attacks, spawns, and deaths, with each event written to an output file to narrate the unfolding adventure. Entities These are the entities in this task: Narrator. Characters: Character, Fighter, Wizard, Archer. Physical items: PhysicalItem, Weapon, Potion, SpellSheet (Spell). Containers: Container, Arsenal (a container of weapons), MedicalBag (a container of potions), SpellBook (a container of SpellSheets). Each event causes some text in the output file. Specifications: One Narrator should be created, at the beginning. It's guaranteed that no character is going to be named Narrator. Names of items and characters are unique. Physical Item with owner property. Weapon: each weapon has a certain damage value. Potion: drink increases HP. Each potion has a certain healing value. A character can drink another character's potion. SpellSheet. Kills one of a given set of characters. A character can cast a spell as long as they have the associated SpellSheet in their SpellBook. When cast, the spell causes its sheet to burn (the owner can't use it anymore). A potion can be drunk once. Unlike weapons, each potion and spell can be used only once, whereas weapons can be used indefinitely. Container Arsenal (a container of weapons). Each Arsenal has a different set of weapons. MedicalBag (a container of potions). Each MedicalBag has a different set of potions. SpellBook (a container of spells). Each SpellBook has a different set of spellSheets. Character has health points. Fighter: Arsenal of 3 Weapons at max. MedicalBag of 5 potions at max. Wizard: can cast spell and drink SpellBook of 10 spells at max. MedicalBag of 10 potions at max. Archer: Arsenal of 2 weapons at max. MedicalBag of 3 potions at max. SpellBook of 2 spells at max. When a character dies, all their items get destroyed. A dead character should be considered a non-existent character in the subsequent events after his/her death. We strongly encourage you to use declaration and definition principles. The main function in your solution shouldn't have direct access (pointers) to items or containers. It should have access to characters only. Deleting a character destroys all his/her items. Errors to be handled: Character doesn't exist (Attack, Cast, Drink, Create item, spell target is not a character, Dialogue) Character doesn't own an item (Attack, Cast, Drink). Negative value or zero for a potion healValue (Create item potion). Negative value or zero for a weapon's damageValue (Create item weapon). Target is not in the list of allowed targets in casting spells (Cast). Arsenal, MedicalBag, or SpellBook are full (Create item) Character can't carry or use a certain item, e.g., wizards can't have weapons (show $itemType $characterName, Create Item, Attack, Cast). The input is guaranteed to be valid except for the possible errors mentioned above. In the output file in case of any of the previous errors, just add a line which contains “Error caught“ and continue the execution of the program skipping the event that caused the error. Requirements: You are required to meet the following criteria for the design specifics:.