Automatically generated narration. Code examples are available in the article.
Organizing combat before adding networking
In this phase, I worked on abilities and revised the character stat system. Before bringing these systems into multiplayer, I wanted their responsibilities to be easier to follow.
Abilities and targeting
I looked at skills in games such as League of Legends and grouped them by how they choose a target. A skillshot and an area-of-effect ability behave differently, but many skills can share the same targeting logic.
I used the Strategy Pattern for this part. Targeting types inherit from TargetingStrategy, while ScriptableObjects hold configuration. This lets me reuse targeting behavior when adding a skill instead of copying it each time.
Keeping stats in sync
For stats, I used the Observer Pattern so that other parts of the game can react when a value changes. The aim is to avoid spreading update logic across unrelated systems.
Design patterns are useful here when they simplify a specific problem. I still need to consider their cost in code complexity and runtime behavior.
What comes next
With these core pieces in place, I can move toward networking and a PK system inspired by MOBA combat. Those are the next tasks, rather than features completed in this version.