The head of ArchFable, a single-player role-playing video game to which we design a prototype for their new title, ArchLegends. The game is set in a time where a demon named Lionfang and his lieutenants have taken over the kingdom of Thunderforge. The purpose of the game is to allow the user to start as a hero and then defeat Lionfang.
We have to implement some more functionalities in the game than the version 1, ArchLegends. They want the hero of the game to have a Sidekick. Sidekick has attributes XP and HP. The user can get a sidekick by exchanging some of the hero’s XP in return for a sidekick (explained below). The more XP the hero is ready to give up, the stronger is the attack of the sidekick. For each extra XP (above the base cost associated with each type of sidekicks) that the hero gives up, the damage done by the sidekick to the opponent increases by 0.5 HP.