By energy, are you perhaps referring to MP or TP?
You could use the custom MP/TP cost notetags in all skills that should be affected by the state.
Code:
<Custom MP Cost>
if(user.isStateAffected(n) && Math.random() < 0.3)
{
cost=0;
}
</Custom MP Cost>
Replace 'n' with the ID of the state. This would give a 30% chance for the skill to cost 0 MP if the user is affected by said state. You can also replace 0.3 with any other values between 0 and 1 if you'd like a different success rate. (0 = 0%, 1 = 100%)
While not necessary, I'd suggest using Victor's notes text file plugin if you're going to have a lot of skills, for convenience sake.
Plugin Download This plugin allows to use the content of text files to be used as notetags. Requires the Victor Engine – Basic Module Learn how to Install Victor Engine Plugins Was this usefu…
victorenginescripts.wordpress.com