That might solve it but I was just wondering if there were any functions to return this inside the engine
I'm confused about what you're asking. What is "this" that you want a function to return? If you have an Attack State trait, yes, you can easily get the percent chance associated with that trait.
But you're talking about
changing that during gameplay, which is not easily done. You'd have to use the plugins I mentioned above and insert code someplace to define
how that is changing.
At that point, it would be just as much typing and fewer plugins to do the same calculations in your state notetags or wherever.
Create a custom parameter -> Change that parameter through variables -> use that as a condition check inside a <JS Pre-Damage as User> kind of notetag.
Sure? I'm not sure what "change that parameter through variables" means.
For example, if you want to have a 1% chance to apply bleeding plus 1% for every 10 points of ATK, it's simply:
Code:
if (Math.randomInt(100)<1+(user.atk/10))
target.addState(bleeding_id);
and that's your entire notetag.
If you need more specific help, then you'll need to be more specific about exactly what you want to do - I still don't know exactly how you want this to work. But it does seem like you're making this more complicated in your head than it needs to be
😉