Ok, so I'm currently working on my forest dungeon for my Tactical RPG which will have these Goblins as enemies, among other woodland critters. There are 2 types of Goblins: Goblin Grunt & Goblin Mystic.
The Goblin Grunts are just standard melee units.
The Goblin Mystics, however, are casters. They are given 2 spells: Stone Skin & Fireball.
~Fireball is deals Fire damage, has a chance to Burn, and has a 3-tile radius range.
~Stone Skin increases the target's DEF and makes them immune to physical Critical Hits.
~They can also do a normal/basic attack (i.e. whack a target w/ their staff)
My issue is when the Goblin Mystic eventually runs out of Mana and resorts do using their normal/basic attack. I currently have their AI set as a "ranged" unit. This means they will try to keep their distance as much as they can. This causes a weird behavior when they don't have enough Mana to cast spells. They will get into melee range to whack a target w/ their staff and then run and distance themselves again. I'm trying to decide if this AI behavior is fine, or should they switch to being "melee" units once they run out of Mana? Also, they do have a bit of MP Regen, so they'll eventually be able to cast again. If they are set as "melee" units, they will try their best to stay adjacent to a target.
So assuming the Goblin Mystic is out of Mana and can only use their normal/basic attack and is starting from a position a couple tiles away from the target...
"Ranged" AI behavior will go like this:
approach target -> attack -> retreat
"Melee" AI behavior will go like this:
approach target -> attack -> stay next to target
The "melee" behavior will let them have an easier time hitting the target w/ their normal/basic attack in future turns due to already being closer to the target. The "ranged" behavior will provide better survivability by keeping their distance as much as possible, especially since the Goblin Mystics are squishier than their Goblin Grunt counterparts.
In short, should I add in code for them to switch behaviors depending on their Mana remaining, or just let them run as a "ranged" unit all the time?
The Goblin Grunts are just standard melee units.
The Goblin Mystics, however, are casters. They are given 2 spells: Stone Skin & Fireball.
~Fireball is deals Fire damage, has a chance to Burn, and has a 3-tile radius range.
~Stone Skin increases the target's DEF and makes them immune to physical Critical Hits.
~They can also do a normal/basic attack (i.e. whack a target w/ their staff)
My issue is when the Goblin Mystic eventually runs out of Mana and resorts do using their normal/basic attack. I currently have their AI set as a "ranged" unit. This means they will try to keep their distance as much as they can. This causes a weird behavior when they don't have enough Mana to cast spells. They will get into melee range to whack a target w/ their staff and then run and distance themselves again. I'm trying to decide if this AI behavior is fine, or should they switch to being "melee" units once they run out of Mana? Also, they do have a bit of MP Regen, so they'll eventually be able to cast again. If they are set as "melee" units, they will try their best to stay adjacent to a target.
So assuming the Goblin Mystic is out of Mana and can only use their normal/basic attack and is starting from a position a couple tiles away from the target...
"Ranged" AI behavior will go like this:
approach target -> attack -> retreat
"Melee" AI behavior will go like this:
approach target -> attack -> stay next to target
The "melee" behavior will let them have an easier time hitting the target w/ their normal/basic attack in future turns due to already being closer to the target. The "ranged" behavior will provide better survivability by keeping their distance as much as possible, especially since the Goblin Mystics are squishier than their Goblin Grunt counterparts.
In short, should I add in code for them to switch behaviors depending on their Mana remaining, or just let them run as a "ranged" unit all the time?