Skill Requirement

Hello guys!


I want to be able to use a skill only if the target has a certain status ailment such as poison for example.

Is that possible? I hope you can help me.



Thank you!
Hello!


You can try using Yanfly's Skill Core:


http://yanfly.moe/2015/10/13/yep-8-skill-core/


And then try this Lunatic Code:


<Custom Requirement>
if (user.isStateAffected(4)) {
value = true;
} else {
value = false;
}
</Custom Requirement>




4 will be the id of your Poison.


Hope that helps!


- Riff


EDIT: Sorry, just realised the requirement is for Poisoned target. For this, you'll have to wait for Target Core to be available next Friday. Alternatively, you can check for target state and set damage to 0 if they are not Poisoned.
Since Yanfly will release the plugin soon, I'll wait for it. It seems to be exactly what I need!

Thank you for the reply Riff!

Original thread: https://forums.rpgmakerweb.com/threads/skill-requirement.57164/