Skill dependent on state?

So I've got an enemy that has an attack that causes paralysis. Is there a way to make it not be able to use that attack again until the player is no longer paralyzed?


(I'm sorry if this double posts, my internet keeps messing up and I'm not seeing it in the forums...)
Well, this isn't quite what you wanted (I wouldn't know how to do exactly what you want, unfortunately. I think there is a plug-in by Yanfly that can help with this, though. I'm pretty sure it would be her "Battle AI Core"), but you could do something like this if you don't want to use plug-ins:


You make the skill and plug this in to the damage formula:


b.isStateAffected(x)? (formula) : b.applyState(x)


Where 'x' is the state ID for your Paralysis state and (formula) would be whatever your base attack formula (or any formula you wanted to put in, for that matter)


What this is (read: should be) saying is, 'If target is affected by state x, deal (formula) damage. If not, apply state x to target.


I do realize this is not quite what you have in mind, but it could work if you cannot find a more elegant solution to your problem.
Okay, I couldn't seem to get it to work.


And also, the point is that it's a multiple enemy scenario (one monster but with a bunch of limbs) and I just want one to be able to constrict and paralyze the player for like 2 turns once in a while. But when the enemy is able to continuously use that move against the player, they have absolutely no chance of recovery because it will continue to stack on the paralysis.
Okay, I couldn't seem to get it to work.


And also, the point is that it's a multiple enemy scenario (one monster but with a bunch of limbs) and I just want one to be able to constrict and paralyze the player for like 2 turns once in a while. But when the enemy is able to continuously use that move against the player, they have absolutely no chance of recovery because it will continue to stack on the paralysis.

To your first part, I realized my mistake: Try "b.state(x)? (formula) : b.add_state(x)"


I was using the MV formula... Not sure how I got in to the RX Ace side of the site, haha XD


If that still doesn't work, try adding "; 0" to the end of the formula.


Your second part can be handled partially (due to limitations of the actual RM program) in the Monster tab. When you add the skill to the monster, set the condition on the skill to something like "Turn No.: 2 + 3X".


This would mean that the skill will be executed on the second turn, and then every three turns after.


Unfortunately, the program really is limited in places: without scripts I'm not sure what could be done to do exactly what you want.

Original thread: https://forums.rpgmakerweb.com/threads/skill-dependent-on-state.63164/