Summary
You now have the power to put down even the fiercest monsters in BludBourne, and now it's up to you to be the hero that the town needs.
In this chapter, we went through the process of developing a battle system. We started by implementing the business logic class, BattleState
, to handle damage calculations, chance calculations for an encounter, and also calculating chances for escape. We then wrapped a UI, BattleUI
, around this core logic, creating random monster encounters for the player for gold, experience, and honor. We added a leveling feature, using LevelTable
, so that the player experiences progression as they discover the world of BludBourne and also enable the player to consume health scrolls and magic flasks to recover lost health and magic, respectively. Finally, we walked through the code path flow to display a game over screen when the player dies with GameOverScreen
.
In the next chapter, we will add the final features to BludBourne with sound and music and also add support...