Working on a game where the player controls five different characters at once. It is intended to follow the standard holy trinity of tank/healer/dps. I need some tips on how to create a threat system. Since I will only have a maximum of 5 characters attacking at one time, should enemy classes have 5 variables that track the total damage of each character and switch targets to one if it exceeds the current target's damage by ~10%? Or is there a 'cleaner' way of programming this that wouldn't require 5 individual instance variables on every enemy instance?
Develop games in your browser. Powerful, performant & highly capable.