Make an enemy remove another enemy.

Hi

I want this special fight to have this mechanic for one of the enemies. She will kill one ally of her and this will give her a buff.

There's a troop that have 7 people and also another troop with this same character. She will get a different buff and also say a specific phrase for each ally that she "sacrifice" for her own good.

I want her to kill in this specific order ally1, ally2, ally3 ...

The thing is that I need some mechanic to check who is alive in case the player already killed ally1 or ally5. It will sound weird if she says something about ally2 and kill ally4, you know.

Do you guys have any idea/tip/trick/advice for this ?

I have HIME_EnemyReinforcements plugin in case this helps, but I'm not using it to remove the ally, I'm using it for other thing that is not related to this.
Does Control Variables : Game Data : Enemy HP give you any ideas? 😉
Does Control Variables : Game Data : Enemy HP give you any ideas? 😉


Oh sorry I forgot to say.

I tried this, but looks like when the enemy is killed it is kinda removed.

there is ally1, ally2, ally3, ally4 and special one. for example

If ally1 is killed and them the special one uses this ability, she will check if ally1 is still there. but in this case ally1 is now ally2, because ally1 died and everyone went one step forward in the "queue".

I tried using the variable with the special one being the enemy1 and also the last one, but it just don't works, I need something more accurate. If ally3 dies and special one uses the ability is ok, because one is still there, and also 2 in case she uses the ability again, but if she uses it a 3rd time she will say something related to 3 but she will murder 4.
Hmm this is kinda interesting. You can do something sneaky.
Make enemies die, THEN make enemies appear, thus the previous ones are already dead or something, and nothing goes wrong that way.
This of course prevents you from showing a mob, but it does the sequential kill trick.


There IS a way to target specific enemies in a mob though.
You can create 7 dummy states, meaning useless states. The state should not show anything. It is there so the Conditional Branch should trigger.
Because you can check for Enemy being in a specific state. It isn't elegant but it is a workaround that will allow you to target enemies correctly having a mob. I can't believe that I thought of that. It is a ridiculous way to do it, but it is possible.

Otherwise, a plugin will be needed.
Sorry it sounded way too confusing.

I'm trying with another strategy.

I created items that I will give to people in the turn 0. The item is ally1 check, ally2 check ...
I also created a status that turn the enemy immune to death, and at turn 0 all enemies get that state, all but the special one.

When the ally1 hp reach 0 it will trigger an event that will remove the ally1 item and remove his death resist state, so he dies.

I changed my troops, now I only have 2 troops that the special one appears, one with 2 other enemies and the boss fight that has 7 in total.

I always put the special one as enemy 1 and he always kills whoever is enemy 2

with the 2 enemies troop is ok, I did a conditional branch that checks if the player has the item of the enemy 2, if has he will say the phrase of enemy 2 if not will say the phrase of enemy 3. Done. Simple. Beautiful.

But in the boss troop is not that beautiful because I have the same issue. the special one will always be enemy 1, but I need a way to check who is the enemy 2, it could be the default enemy or it could have been killed by the player and now the enemy 2 could be enemy 3 or 4 or 5 or 6 or 7. But like I said every time we kill some enemy the queue run forward and enemy 5 is now 4 and so on.

OMG this is so difficult, my brain blow off yesterday.

Could you help me to create a way to check who is enemy 2 and them do the thing that needs to happen for that specific enemy.


@Dreadshadow thanks for the help, but I really don't got what you said.
If you have 5 enemies to be sacrificed, make 5 states, the states don't have any effect except just being there. On the start of the fight assign each of these sacrifice monsters a state. So the first one has state "I am Silvia", second one has state "I am Bruno" and so forth. (Names obviously can be somthing else.) Since these states don't have icons or effect the player doesn't see them. When your kind boss does their move, you can check 'does this troop member have "I am Bruno"', and if so, say what he should say for Bruno. Same for others.
@Alisu thanks I will try it
Something is not right. I really don`t know what is.

I tested with the 7 enemies troop and after killing the enemy 2, enemy one receives its buff and says what she needs to say, but I don`t happen again. She uses the spell but it don`t trigger the event. I'll print the event here below but I'll edit the image because my game uses adult/strong language, and that's against the rules here of the forum.

Spoiler
upload_2018-4-21_16-57-42.png


[\SPOILER]
From game help:
Span
Specify the timing of when the contents of the event page are allowed to run.

Battle
The event will run when a condition is first met from the start of battle. Once it has been run once, it will not be run again.
Turn
Conditions will be checked each turn, and the event will be run if there is a condition met.
Moment
The event will be run repeatedly while a condition is met. If event pages are not controlled with switches, there are cases where a battle will not progress, so please keep that in mind.

You have set the span to be Battle, so the event runs only once as per you have told it to. I'm not sure but I think you need to set the Pride event to be Turn.

I'm also not sure your logic will work as it should, if the enemies had annoying habit of changing the assigned numbers. Now you're basically checking on the assumption that the enemies are what they should be. If they have changed numbers your if clause would just pass through. If you want them to be killed in order, the one you're killing should always be enemy1 since the previous holders of that spot are dead, if I got it right that it shifts the numbers for dead one. But again, I'm not sure if it works this way, just that it might. If it does work this way it's easy to make the if-sentence to always target enemy1, and then check which of the states it has and proceed accordingly.
@Alisu thanks I will change the span. I thought battle was going to work for the whole battle.

The enemies change their position when someone dies. I will change my event again, when it didn't work in the 1st time I changed like this just to check if I understood something wrong.

Thanks for the help
@Alisu it worked, thanks a lot. I can finally move forward with my game.

Thanks everyone who helped.

Original thread: https://forums.rpgmakerweb.com/threads/make-an-enemy-remove-another-enemy.93845/