Weird problem with Damage Formula and addState(1)

Hello everyone!

I am trying to make a skill (Crippling blow) that deals a certain amount of damage and kills if the opponent is not a boss and is frozen. Now, in theory this sounded very easy. I didn't even use any plug-in, simply I put in the damage formula:
if(b.isStateAffected(44)) b.addState(1)

I never changed state 1's behaviour, but for some reason it just... doesn't add it to the enemy? I tried the same exact code adding state 5 and it works perfectly. I tried to deactivate all plug-ins and I noticed that by putting YEP_BattleEngineCore on OFF the skill works as intended. This is my plug-in setup. I need to know why BattleEngineCore causes this issue.

Screenshot (195).png


I never touched the plug-in's parameters, but just in case I will add screenshots of them.

Screenshot (196).png


Screenshot (197).png


Screenshot (198).png


I realize that a few are missing, but they are just battle log stuff and shouldn't matter.

Thanks to anyone who has the patience to help me. This is my last non-magical skill of the entire damn game and I thought it was going to be easy. Instead, it got suddenly much more complicated...
By the way, I managed to make it work by simply setting the enemy's hp to 0 and then performing collapse, but I still want to know why addState(1) didn't work, if there's some problem with my plug-ins I need to know how to solve this problem before worst trouble starts...
By the way, I managed to make it work by simply setting the enemy's hp to 0 and then performing collapse, but I still want to know why addState(1) didn't work, if there's some problem with my plug-ins I need to know how to solve this problem before worst trouble starts...
It could be to do with action sequences. I believe by default the action sequence sets the enemy's immortal flag to true so that it doesn't die mid-sequence when you don't want it to, and immortal enemies can't have the Dead/KO state.
It could be to do with action sequences. I believe by default the action sequence sets the enemy's immortal flag to true so that it doesn't die mid-sequence when you don't want it to, and immortal enemies can't have the Dead/KO state.
Ah, I see. If you are right, then it's not a problem and I can happily say that I just finished programming half of my combat system. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/weird-problem-with-damage-formula-and-addstate-1.159025/