How to make a skill that can instantly kill an enemy if the enemy has not a 'Boss' state

So Hi, I don't know if it is the right thread/forum to post this.

So, I already made a 'Boss' State which is if applied to an enemy it will give a huge increase amount of stats.
And I'm in progress making a Skill which is when the Enemy is not possesed/affected by a 'Boss' state, Then it will kill an enemy instantly, but when the targeted enemy is has the 'Boss' state. Then, the skill will only damage 25% of the boss health. And also, Tell me or help me to setup that. Because I don't have any knowledge about 'javascript' or programming(I only use Python which is no use in here.) Please help me.

And also, How can i apply the 'Boss' state into the enemies so they will become a boss? THANKKSSSS. 🙂
You can do this with a simple branching skill formula. No need for a script.

if (b.isStateAffected(xx)) {b.mhp*0.75} else {b.addState(1)}

Untested, but should be something along those lines... With 'xx' being the database number of the custom boss state.
shouldn't it be b.hp * 0.25 for 25% of the boss's health?

Or, if you mean the boss's maximum health, then it would be b.mhp * 0.25.

Not sure if you can just add a state, or if you need to reduce the hp to 0.

If the above doesn't work, try something like this:
b.isStateAffected(x) ? b.mhp * 0.25 : b.mhp

where you replace x with the id of the "boss" state, without any leading zeros.
u just make the skill have chance of causing State 1. and anything immune to insta death skills give them "State Rate: State 1 = 0%

DO NOT use State Resist or else they will become immortal.
with State Rate they can still die from 0HP but the insta death skills wont be able to add the state that kills them

as for ur boss state, and any other state want to auto apply when fight starts
http://yanfly.moe/2015/10/17/yep-13-auto-passive-states/
<Passive State: X> note tag

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-skill-that-can-instantly-kill-an-enemy-if-the-enemy-has-not-a-boss-state.94657/