How is death being applied? That will determine the causes and fixes.
Ok. And is the state you apply also state 1 in the database? When you take significant HP damage and die due to that, that is what the engine forces to apply is state 1.
I feel like this has been addressed ad nauseum in your threads - there is never anything that happens "for literally no reason."
I know you have some number of scripts added to your project, have you tested this with your scripts disabled? It's entirely possible something is altering how the state resist is supposed to work. Have you tested it in a new project?
Especially if it works on enemies but not actors, there should be no differentiation between them in the code - they're all just battlers.
(Side note - "engulfs" does not have an apostrophe)
Except the battler does die or at least is unable to act. The resistant state even gets removed.
I'm trying to figure out what you're actually doing.
Just based on the information presented here:
You have a troop command that triggers your "Immortal" state on a single character.
You then force the enemy via troop command to hit the entire party with an attack that reduces all their HP to zero.
At which point, all the characters "die" instead of one of them still standing with 0 HP.
My guess would be... it's either a plugin or something in your troop events. My guess with the "troop events" is you have something somewhere that says "remove immortal state" and it's triggering early. I'd have to dig through all your troop events and probably the database as well in order to diagnose an "engine issue" problem.
Fortunately, plugin issues are easy to diagnose. Create a new project, recreate the event, commands, etcetera, and see if it works. If it does work... plugin causing problem. If it doesn't... engine issue.
My other question is also one born of practicality:
Why bother with a state at all when you don't need to?
Create an attack that literally does nothing (no damage), but is incredibly flashy (unless for some reason you NEED the damage numbers to appear), and then just set each actor's HP to where you want it. Just check "allow knockout" on the HP to allow them to hit zero HP, and then on the one you want to "stay standing at one HP", you leave the "allow knockout" box unchecked, so they're reduced to just 1 HP only.
I've been noticing this for a while. I don't remember if we talked about it before.
My best suggestion would be for you to start a new project.
If in your script section you have japanese characters, then you likely have a pirated version of VX Ace. ( I know, I use to have that as well before I bought it )
If you use the steam version or the one from the forums and start a new project and you install it for english, then you will not get any japanese characters in the script list.
This will fix most problems. I noticed several bugs that were resolved when converting to a paid version (but you have to start a new project as copying over files will keep the bad data).
Other than that, if you really have a paid version then you have something seriously wrong with the installation.
I also advise on testing the death function in a new project.
The code actually kills the character and then sees that you have death resist and removes death state and sets the hp to 1.
what could be altering things is if somewhere you have code that alters the Game_Battler on_restrict method.
It's the latest paid version, but the project was started on a pirated version until I bought it when it was on sale some months ago. The Japanese text is just left over.
But adding +1 HP after Devouring Inferno fixed the issue anyway.
Being that I am really far in development and it is a big game already, I will just work around the issues for the time being because recreating all that I have created will take months.
But I already have ideas for other games so those will probably run more smoothly since they are going to be started on this latest paid version.
But, thanks for your help anyway. At least I figured out what to do to fix this