Reduce enemy stats for specific actor

I have a hero that has seductive powers. I'd like to add traits and skills that reduce the enemy's stats, but only when attacking her. I thought about increasing her stats instead, but that would also make her stronger against enemies not affected by her seduction traits and skills.


Is there a way to do this?
by stats, do you mean defense and accuracy too or just damage they give?


Either way, I think I have an idea of how to do it if it is the later...


I'll use two of Yanfly's plugins and make a code to put into a state Seduced. I think you'll need both their Battle Engine Core and Buffs & States Core to make it work.


I didn't test yet. Try adding this in the comment box and tell me if it works:

Code:
<Custom Confirm Effect>
if (this.isHpEffect() && value > 0 && target === origin) {
  value *= 0.8;
  value = Math.floor(value);
}
</Custom Confirm Effect>

<Custom React Effect>
if (this.isHpEffect() && value > 0 && attacker === origin) {
  value *= 1.25;
  value = Math.ceil(value);
}
</Custom React Effect>
I meant all stats, but I see how that could be confusing.


I'd like to reduce the standard parameters: atk, def, matk, mdef, agi, and luk.


I'd also like to reduce evasion rate and hit rate, but if that's more difficult to do, I can use Yanfly's that allows luk to affect those rates and just reduce luk.


What exactly does that code do? I can't test it out until later.


Thank you, by the way. At this rate I'm gonna have to give you a producer credit on the game. Lol.
If I coded it right, the enemy gives 80% of every damage to the character that gave it the state, and takes 125% of every damage.


Hmm... Thing is, I can't see much more use for stats that would affect only one character...
Oh wait! State and Critical chances and Evasion and Magical Evasion? Do you want those too? They'll be harder, I never played with those plugins before...


[EDIT] Actually, watching Yangly's video about those... they are not affected by the usual stats... for some reason...
It's a seduction ability. She's naturally weak and doesn't have armor so her seductive abilities make up for that. She seduces the enemies so that when they target her, their attacks are less effective, and their defenses are down. But they're not seduced by the other characters in the oarty, so interactions with them would be normal.


"Actually, watching Yangly's video about those... they are not affected by the usual stats... for some reason..."


I don't follow.
Yeah... the extra stats are unrelated to the base stats. Hit, Evade, Critical... they are their own stats. So, changing the base stats changes nothing in the extras... unless you use a plugin to change the calculation.

It's a seduction ability. She's naturally weak and doesn't have armor so her seductive abilities make up for that. She seduces the enemies so that when they target her, their attacks are less effective, and their defenses are down. But they're not seduced by the other characters in the oarty, so interactions with them would be normal.

If the "lunatic code" I posted works (you know, those codes of Yanfly to add to the notebox), that is exactly what the state you add them to does, though... no matter the stat the technique uses, or even a combination, what will change is the resulting damage. But only between the person who cause the state (her) and the person affected.
Alright, I understand. I know Yanfly has a plugin that lets you change the state calculations so luck can affect things like critical rate, hit rate, and evasion rate. But if I'm following you, that code affects the resulting damage, not any stats, right? I have a wicked headache right now, so I'm just making sure I read it right.
Yup. If I did it right, since I based it in a mix of Yanfly's Power Charge and Leech Seed, it affects the total damage.


Test it with a tech without variance, since they are easier to calculate.
Will do. Now that you've talked me through this, I'm thinking a combination of reduced damage to Aphrodite and reduced accuracy in general would be pretty cool. That would make her abilities a little more dynamic.


Her passive trait could use the code you gave me, then skills could increase the effect of that code and reduce overall hit, critical, and evasion.


I'm excited. Lol. Thanks so much for your help.
You're welcome! ^_^

Too bad I couldn't find a way to change it on the monsters with Yanfly's plugins. the Extra Parameters only has codes for changing actors'. Maybe it could be used for enemies too, but not sure. And none of the Tips & Tricks seem to talk about it yet.
Doing it on the actor achieves the same effect, so it's all good.


I'm gonna have fun playing around with this one. Her style is going to be so unique because it relies almost entirely on defense. One of her party mates is all about attack and the other is blanaced, so it'll be an interesting play style.
The code doesn't work in battle testing, but it works in normal playtesting. Sweet!


Now, how do I make it so that state is inflicted on enemies at the start of a battle?
...wait, what?


Did you try it in battle test after it worked in playtest? first time I heard of this happening...


Oh, if you want it on start of battle... I think you'll have to add as a passive state to all enemies she'll meet and the code will be a bit different, to check if target/attacker is equal to the right gameActor instead of just origin... I thought you wanted it to be inflicted by her with a seduction technique.
Hm. It works now. Must have been an error on my part.

Oh, if you want it on start of battle... I think you'll have to add as a passive state to all enemies she'll meet and the code will be a bit different, to check if target/attacker is equal to the right gameActor instead of just origin... I thought you wanted it to be inflicted by her with a seduction technique.



I want both. Lol. All my characters have some sort of passive ability. Hers is seduction. But she will also have skills that make the seduction worse. That code is perfect for having a skill  do what I need it to. I'm very happy with it. Thank you, again.

I've used passive states with one of my heroes, so I'm slightly familiar with the plugin (just not the coding). How would I achieve a passive state for enemies she meets?
I meant all the enemies her party shall meet.


Just add it to Enemy Passives in the plugin configurations.


So, yeah, if that one worked for the active this one should too for the passive... Just change the numbers, specially the 1 for her real id number.

Code:
<Custom Confirm Effect>
if (this.isHpEffect() && value > 0 && target.actorId() === 1) {
  value *= 0.8;
  value = Math.floor(value);
}
</Custom Confirm Effect>

<Custom React Effect>
if (this.isHpEffect() && value > 0 && attacker.actorId() === 1) {
  value *= 1.25;
  value = Math.ceil(value);
}
</Custom React Effect>
So this will only work if she's in the party? And we're talking about Yanfly's Auto Passive States, right?
Yes, Yanfly's Auto Passive States.


Well, I made it only to work against her, did you want it to work for the whole party with her in it?
No, that's why I was asking. If she's knocked out or if she doesn't enter the battle at all, I didn't want the states to apply. I was just making sure.


I'll try that code out in the morning. Gotta get to bed. Thank you so much.
You're welcome! Hope it works for you!
It works!!!! Holy crap! Thank you! I have some other passive traits that I'm going to need help with. Is it okay if I PM you? Or should I just keep posting topics?

Original thread: https://forums.rpgmakerweb.com/threads/reduce-enemy-stats-for-specific-actor.69092/