Search⌘ K
AI Features

RPG Combat Engine

In this project, you will build the core backend logic for the Crimson Arena RPG Combat Engine. You will create a system that manages combatants, handles turn-based battle mechanics, and calculates damage and resource costs dynamically based on character abilities.

This is not just a coding exercise; it is a simulation of a real-world gameplay engine. You will model a combat encounter using an inheritance hierarchy to treat Heroes and Monsters differently while managing them through a single structure. You will also use modern C# 14 features like records and required members to ensure your game data remains immutable and reliable throughout the simulation.

Key concepts you will apply:

  • Records: Modeling immutable combat abilities with required properties.

  • Encapsulation: Protecting character health and mana stats using access modifiers.

  • Inheritance and polymorphism: Defining a shared entity foundation while allowing unique turn behaviors for players and AI.

  • Exception handling: Building a robust game loop that gracefully handles invalid moves and bad user input.

  • Object collaboration: Making entities, abilities, and custom exceptions work together to drive a cohesive narrative.

By the end of this project, you will have a working simulation that can configure an arena, manage turn-based interactions, enforce game rules, and provide a clear visual summary of a heroic victory or defeat.