First off, I apologize if this post is in the wrong area. I don't usually post on forums.
Anyway, to explain my situation... I want to be able to have my battle system so that only one of the party characters can perform the "killing blow" on any and all enemies, but all characters can damage enemies until they reach a single point of health. In that same scenario I want to force a battle lose if said actor is incapacitated. I know that Bubble has a script for VX (Lose Battle On Actor Death) that would help with the second half of my problem if only it were a plugin for MV.
Thank you all in advance.
Plugin Releases is for completed plugins that the scripter wants to share with the community. So,
Moved to: JS Plugin Requests
For your first problem, it might be possible to solve it backways.
If an enemy has a state with the "immortal" effect (resistance against state #1, death), then it cannot die until that state is removed.
You would have to apply that state invisibly at the beginning of combat to prevent the death of all enemies by actor skills.
Then give all skills available to your main actor additional code in the damage formula that checks for enemy HP and if it is zero, remove the immortal state. If no other actor can use any of those skills then only the main actor can kill enemies.
It is a bit tricky however, it might still take some tweaking and/or plugins to work.
As for the second problem, check Tsukihime's blog - she has several plugins for special state that might help here.
Thank you! I still need to work out the losing a battle when the main actor is "dead", but with your recommendation and 2 of Hime"s plugins for ActorBattleCommands I was able to hide the regular attack for the main actor and replace it with a skill of the name of the same name that has a remove "immortal" state. The regular attack has an add "immortal" state so that fixes the first issue any actor besides the main one causing a death.
You could also have achieved this by adding a check in the damage formula for the user of the skill being the actor who can kill enemies, and if so remove the immortal state prior to calculating the damage.
I'm not good with scripting 🙁
If I were to give that a whirl, would it look something like this?
if actor_id 2 remove state_id 3