The battle system implementation
There are many moving parts in implementing a battle system for an RPG, but we will walk through the implementation step by step, starting with a high-level overview of the relationships between the new classes for this chapter and delving into specific details when warranted.
We will start with the following screenshot (Figure 1), which represents the battle screen when a player encounters a monster in BludBourne:
The classes that make this interaction from Figure 1 happen are outlined in this chapter, taking you step by step in its implementation. There are some extra features, such as consuming health potions, which are discussed in further detail as well. The following class diagram (Figure 2) represents the relationships between the new classes for the implementation of our battle system:
The grey-colored classes represent classes that we have already discussed in the previous chapters, and are added to fully describe the relationships with...