Iv'e heard many times that RPG battles are essintally a race to see who can lower the others HP to zero the quickest
I want to challange this notion and ask is an enemy that deals no damage is really that boring and uninteresting? Does an enemy really have to deal damage to be a threat? Sure, the first thing that comes to mind might be an enemy that stunlocks the player or lowers actors offensive stats. Thats no fun for anyone, drags out the battle, and there are other forms of disruption. Thoughts?
Of course not. For example, healers on the enemy side are a common occurrence in my game. There are plenty of other examples of non-dps enemies, but I can't seem to remember off the top of my head rn...
Depends on your definition on "damage" here, if an enemy only uses OHKO or DOT states but does not deal direct damage, does that also count? If the player is in no immediate danger, then fights just become unnecessary as a whole, unless the enemies in question serve some other purpose, such as Metal Slimes that run away on Turn 1 for example.
Breath of Fire IV has some good examples, at one point of the game you have to kill defenseless guards that do not fight back, but must do so within a single turn lest they call the alarm and throw you out the dungeon. Secondly, there are a group of ridiculously tanky enemies that regenerate half their health every turn and also do not fight back, whose sole purpose is for you to practice combo magic to unlock other stuff, and if you are strong enough to take them out, then you get hefty EXP too.
Bonus question:
Can you get game over when encountering the enemy?
An enemy that deals no damage within a troop that deals damage can be interesting, of course. Healers and Disablers are the quickest examples that come to mind. Now the player is left with an interesting option - take out the healer/disabler in order to make the fight against the rest of the troop easier, or try to take out the rest of the troop so that the healer/disabler on their own is helpless?
A troop that deals no damage would be much harder to make interesting. One way you could try to make them interesting would be as a DPS check, where they one-shot your party (in the case of something like a boss battle) or escape the fight (in the case of something like a rare encounter with great loot) if you don't reduce them to zero quickly enough. In either case, you want to signpost this mechanic by having the enemy(s) use skills that suggest they're going to use their OHKO/Escape move in advance, or show dialogue or other messages to suggest it.
OH! Also. You say that you frequently hear "RPG battles are essintally a race to see who can lower the others HP to zero the quickest". While I think that's actually the more interesting dynamic of RPG combat, I find it's rarely the case in JRPGs (though more common in WRPGs and certain hybrid games where other genres include RPG elements). In JRPGs, boss combat is more often a function of "can you consistently avoid getting spiked" (using healing skills, items, and other defensive moves) and run out the clock on the boss by accumulating damage over however long you need. There's no race element because your pace and DPS don't matter - as long as you can avoid screwing up on a turn or short series of turns, you're usually good.
First boss in one of my games actually drains the life of other enemies instead of attacking the heroes, lol. But it's also non-targettable, immune to all forms of normal damage, and can only be defeated by killing the other enemies that spawn around it fast enough to outpace its regeneration.
I feel it gives somewhat of a mistaken impression to say it's a race to see who can lower the other's HP to zero the quickest. As Wavelength pointed out, it isn't always about speed; some encounters can end up being a matter of attrition.
That said, when you break it down pretty much every meaningful combat that poses a risk to your party *is* a numbers game. That isn't to say that every participant needs to actively reduce numbers to be useful; regaining lost numbers or putting into play effects that slow down the other group's number-reduction or speed up yours are also viable.
At the end of the day, enemies who don't deal damage are fine *as long as they contribute to the numbers game in an alternative meaningful way*.
I always liked the enemies that dealt no damage, but dropped some amazing XP or treasure, and ran after a few turns.
Whenever they show up, the player is all like "oooo, get that thing!"
Another example is an encounter that's actually beneficial to the party if the enemy is not massacred in the first turn. I think a few of the Dragon Quest games had heal slimes, where if you left the heal slime alone, it'd heal your party until it was out of MP, then run.
Several examples:
Debuffer
This includes dropping states on the player (My favorites are ones that use Charm like abilities that make the party fight itself as a means of dealing damage). But, it isn't limited to states, they can affect stats of the enemy or stats of the players in order to nullify any power they might have.
Healer
Enemies that actively heal states, HP, or resurrect allies (or call reinforcements). These enemies are about prolonging the battle as long as possible or keeping allies alive as long as possible in order to maximize damage output.
Gatekeeper
Enemies that need to be killed in order to be able to attack the main target. This can be the form of "the adds just do too much damage, so you have to kill some of them to reduce damage output and make the fight manageable" as well as, "the boss has Immunity until these enemies are dead, and then you can kill the boss".
Troll
Enemies which mess with the player and how they would normally approach combat. For example: They cast "Magic Reflect" on your party so you can't use Healing Spells on your own party without reflecting it back to the enemy. Or, an enemy that does damage to you based on how many enemies a character has killed. If the White Mage has killed 0 enemies, this attack does 0 damage to them. If the Glass Canon has killed 10,000 enemies, it does 10,000 damage to them. "Roulette" attacks might fall under this category as well. They could hit their own team, or hit your team with them. Doesn't even have to be an attack, it could be a state. Or, enemies that do nothing at all in combat except use "Counter" or "Magic Reflect". The only damage they do is damage you've dealt to yourself by targeting them. Enemies with very high evade chances or that run away from combat would fall under this category as well.
Piñata
This type of enemy is very rare. It is an enemy that appears to be a threat, but never actually does anything to harm you. It's entire gimmick is providing the illusion that it is doing something while it never actually does anything. The easiest example would be "Magikarp" from Pokemon. However, you do see this from time to time in other games. Basically, the point of this enemy is just to whack it to get your treats (XP, Currency, Loot).
There's also what you're doing with the narrative.
A single simple, creepy, no-damage apparition encounter, followed by a two apparition encounter, followed by a three apparition encounter, etc. could evoke the feeling of being slowly overcome by madness, even though each fight is mechanically simple.
I have a whole set of enemies that do no damage. The catch is that they kick you out of the battle after a number of turns so you have to figure out how to beat them quickly. They're also optional so I can make they as (seemingly) unfair as I want.
Spells like domination, summoning, curses, potential death spells (unless you are consider that 'damage' could all make this enemy interesting. An enemy that is hard to kill and flees quick but has good loot could be interesting to the player and keep them invested in the battle. Think slimes in Dragon Warrior.
Enemies that paralyze constantly are most interesting for they create interesting reactions in streamers.