Greetings, developers!
I'm trying to make a skill that deals damage against a Target and, if it's remaining hit poins are lesser than the damage taken, it dies instantly, but i don't know how to check, inside the skill effect itself, how much damage was dealt. Any help? I'm using Yanfly Engine Plugins, so it May be easier to be done.
"it does intantly" what?
Somehow your topic is missing what you want it to do, so we can only give general help ;-)
That said, most probably it could be done by using javascript code inside the damage formula - there is a topic for this pinned in this forum, where examples of conditional damages and other options are given.
For more complex cases you might have to use javascript with Yanfly's "Lunatic code" options, or request a specified plugin if it goes even beyond that - without more details on what should happen in the case we can't point you to a ready solution.
Sorry for the typo, i meant "dies instantly". Already edited the original Post.
yes code in the damage formula is all you need.
Basically compare the current target HP with the planned damage and either add state #1 (death) or deal damage depending on result.
Sorry, I can't give you the required javascript code, but it should be in the topic I mentioned.
Thanks for trying to help, but sadly planned damage != damage dealt, 'cause of damage variation and defense. What i'm trying to do is to check how much HP the Target has after the damage is dealt.
How stringent are your timing requirements?
If it is enough to have the enemy die at the end of the battleturn, you can use damage code in combination with a common event, but that still requires creative coding and eventing.
If it needs to be done during the skill sequence, then you need to use the action sequence plugins from Yanfly, no way to do that without plugins.