I'm having a difficult time to understand , how to implement the behavior of an enemy in a tile based game,
- movement
- attack
- behavior per enemy level ( higher level enemies should be hard to kill)
- defend
- other behavior
since the game is a tile game written in javascript, the behavior of the enemies shouldcould be implement as functions like
Chaser
- hunts its opponentsBrave
- does not start running if with low HPSensitive
- when damaged might take additional damage
and using the standard entity class , based on the configuration ofdefined for the enemy, could it be extend
the as the behavior?
Or write like standard enemy behavior and additionally write separate scripts per enemy on how they should behave against the opponent, surroundings, etc..