I'm wondering how it would be best to define these different kinds of attacks. If I should be defining a ton of procs under my base Enemy mob, or be utilizing datums to create custom attacks for each person...
I could do this
mob/enemy |
or I could hold each proc call in a list, being associative, since I want my attacks to be chosen by probability if there are enemies in view (the thing is, sometimes, I'll want to have my enemy be making the smarter-decision attack instead of one chosen at random)
mob/enemy |
I'm also thinking I could maybe use datums to solve this situation?...just an idea...
_attack |
So basically, I need some help with the design of this feature. I want my enemy to select an attack either by
1) Randomness or
2) Intelligence
Some enemies will be utilizing the same attacks, such as a basic "strike" attack that will hit mobs in view. May I get some advice on how I should be going about this? Thanks!
tl;dr features:
-Random selected attacks
-Attacks selected by analyzing the situation
-Some enemies will utilize the same attacks
-Code needs to be efficient and organized
"What *is* an intelligent attack?"
Do your characters have... 'types'? Like, Fire, Water, Ice?
Then you could simple check the enemy's 'type' and pick an attack with the counter-type attack.
Or if it's simply by distance, then calculate the distance from the enemy, and pick the attack that deals the most damage at that distance.