MV How do I make an actor deal more damage to a certain type of enemies?

Hi everyone,

I'm trying to add a ring in my game that would allow the actor to deal 50% increased damage to a certain type of enemies (in my case, bandits), but I have no clue how to do it.

One thing I thought about was to add a "bandit" element to said actor and make the bandit enemies 150% weak to it. Problem with this solution is that the "bandit" element would only be used by skills who use the "normal attack" element. If a skill only has Fire element attached to it, it would not interact with the bandit thing.
I'd need ALL damage coming from the person with the ring equipped to be increased (preferably without adding code on every skill just for that interaction)

Any help would be welcome, thanks 🙂
<bandit> notetag on the enemy notes, Yanfly passive state on the ring and then on the passive state like:

<Custom Confirm Effect>
if (this.isDamage() && this.isHpEffect() && $dataEnemies[target.enemyId()].meta.bandit)
value *= 1.5;
</Custom Confirm Effect>

EDIT: Corrected conditional check
Hey,

Thanks a lot for the answer 🙂

It doesn't seem to be working though. It's not giving me an error or anything, it's just that the damage isn't affected by the state at all.

I tried to see if I could see why but my coding skills are non-existant lol

If you have any idea why, please let me know 🙂

Thanks


Edit : tested a little bit more, and apparently it's the " && target.meta.bandit" that's not working properly. My damage does get increased if I remove that part and leave the rest (I did add "<bandit>" to my enemy).
Yeah, do you have to check it with:

$dataEnemies[target.enemyId()].meta.bandit
Works perfectly 🙂

Thanks a lot for the help!

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-make-an-actor-deal-more-damage-to-a-certain-type-of-enemies.179150/