Boss's AI Rotating Through Summoning minions

Hi everyone,

I'm trying to recreate a boss mechanic inspired by the Satan fight from Shin Megami Tensei V: Vengeance.

Concept:​

  • A main boss remains on the battlefield the entire fight.
  • He summons minions, but only 2 can be present at a time.
  • When a minion is defeated or devoured by the boss:
    • The boss heals based on that minion’s remaining HP
    • On the following turn, the boss uses that minion’s race-specific skill.
    • Will be replaced by the next minion on the rotation

I’m looking for help on how to implement the rotating minion summon system, especially:

My Main Questions:​

  1. How do I set up a rotating list of specific enemies to be summoned in order?
  2. How do I restrict it to always keeping 2 minions on the field, and trigger the next summon only when one is defeated or devoured?

Appreciate any advice or workarounds. Thank you in advance!
Yanfly Plugins included in the project
Hime has enemy reinforcements plugin. You can just use a variable to go through a list of enemies (add +1 to the variable when summoning and if it reaches a certain value return it to the 1). You can use Yanfly AI (or maybe just skill availability) to only use the summon skill if like $gameTroop.aliveMembers() < 3 The devour skill targets allies, it stores the target enemy id with like b.enemyId() and kills the target and then you can use a common event depending on the target to manipulate a switch or state or whatever to make the boss gain and use the specific skill with high priority.

Original thread: https://forums.rpgmakerweb.com/threads/bosss-ai-rotating-through-summoning-minions.178466/