Apply states on attacker

How would I apply states to an attacker like the effect spore/static/poison point ability in Pokémon?
Id be easiest with a plugin like Turan's Eval Tags or the visustella battle core. theyd let you make states with effects via script that get ran as the affected battler is struck, and youd use those to add the resulting states to the attacker
Alright, I have the Battle Core plugin from Visustella. I suspect the relevant tag is

<JS Post-Damage as Target>

code

code

code

</JS Post-Damage as Target>
I am just unsure how to give, say, a 30% chance to poison an attacker if struck by a physical move.
So as I pointed out in the other thread, take the time to describe what you really want? Not everybody knows what “spore/static/poison point ability in Pokémon” is (I certainly don’t), and it’s not optimal to expect people to go searching the web to figure out what you want. Also do mention in your opening post what plugins you’re using.

Do read the template please, it’s there to help everyone.

I am just unsure how to give, say, a 30% chance to poison an attacker if struck by a physical move.
So you want the attacker to be poisoned if the attacker performs a successful attack?
Right, these are the Plugins I am using. And yes, what I want is to give an enemy the ability to poison an attacker if struck by a physical attack. Or other negative status effects, but I figure if I can get one state, I can get the others. And the enemy still takes the damage from the attack.
So, I haven't tested this but seeing as the docs say that you can use "user" and "target" in the formula, I'd say somthing like:

JavaScript:
<JS Post-Damage as Target>
if(Math.random() < 0.3) {
    user.addState(4)
}
</JS Post-Damage as Target>

Off-topic: are you sure you need all those plugins? Probably best practice to not have any plugins that you don't intend to use.
So, I haven't tested this but seeing as the docs say that you can use "user" and "target" in the formula, I'd say somthing like:

JavaScript:
<JS Post-Damage as Target>
if(Math.random() < 0.3) {
    user.addState(4)
}
</JS Post-Damage as Target>

Off-topic: are you sure you need all those plugins? Probably best practice to not have any plugins that you don't intend to use.
Hmmmm, I don't think I need the horror one. I am using most of them, though. I thought I was going to be using some horror effects in a cutscene.

Original thread: https://forums.rpgmakerweb.com/threads/apply-states-on-attacker.180351/