A Baton Pass System in XP?

People here like JRPGS. Persona 5's a popular JRPG. People like its combat, "people" includes me. I'm trying to craft something similar with a feature akin to the Baton Pass mechanic in it.

For the unfamiliar:

Spoiler: Thorough Explanation of Baton Passing. Credit goes to Megami Tensei Wiki
The Baton Pass command is made available after the current active character has gained One More turn by Downing an enemy, whether it is from scoring a critical hit or by exploiting the enemy's weakness. When selected, another party member will have to be chosen to pass it to. Characters need to have the Baton Pass ability unlocked in order to receive the baton. Additionally, allies that have been affected by status conditions cannot be recipients of Baton Pass. The ability is also disabled if the user has an ailment themselves.When Baton Pass is initiated, the two respective allies do a high five, and the one receiving the turn has their attack and recovery power boosted for that turn. If that boosted party member also Downs another enemy and hence receives One More themselves, they can then pass on their turn to another ally, further increasing the power of the boost. The effects of the Baton Pass last until the user no longer receives a One More, and hence the next combatant's turn begins. However, when passing subsequent turns after the initial pass, the characters used previously in the sequence are unable to be recipients of more than one Baton Pass, preventing an endless loop. The party can achieve up to three consecutive passes, maxing out the strength of the boost on the third recipient. Using the Baton Pass does not consume that character's turn in battle and can lead to them technically having two consecutive turns without scoring a 1 More themselves.



Spoiler: Example Fight
In P5 when a party member lands a critical hit or hits an enemy with an element it's weak against, it's knocked down and can't move. This gives the member a "One More" a.k.a. an extra turn. Say Billy lands a fire skill on Jack Frost, this then gives him an extra turn, from there he can use that extra turn, or he can baton pass it to another party member, let's call her Trisha. He baton passes it to Trisha.

This gives her that extra turn and a buff to her attack and healing power. Now Trisha can use this extra turn to...

A. Obliterate the knocked down Jack Frost with an attack that exploits one of his weaknesses. She won't get a "One More" from this since Jack is already down.

B. Or use an ice skill on Jack's cousin, Weektu Frost. This WILL get her a "One More" and will knock down that guy Weektu Frost.

She goes with B and gains another bonus turn. She could hypothetically keep this going for herself by using fire skills on the two remaining enemies Jill Frost and Jerry Frost and knock them down. But she doesn't have fire skills, and she can't baton pass back to Billy. She baton passes to their lovable and fire affinity dog, Steak.

Steak gets the extra turn and an even more powerful buff to its attack and healing powers. It uses a fire skill on Jill Frost, knocking her down, yadda yadda. Steak isn't really concerned with the optimal play of just using its extra turn to use a fire skill on Jerry Frost and baton passes like his owners to the fourth and last member of the team, Jim.

Jim gets the strongest possible buff and is now able to perform skills at no cost. He casts OBLITERATE EXAMPLE FIGHT for zero sp and wipes out the enemies and the team.

I think I have a pretty clear idea of how I could go around implementing something like this mostly just using custom states and attacks.
The knock down thing is seemingly pretty obvious to me. I could make states for each "buff level" of a baton pass chain.

What's left me stumped is the extra turns and when the player is allowed to baton pass and how to check if a baton pass has been used before.

I want to be able to check if a baton pass had been used before so the proper "buff level" can be applied to the member that the baton is passed to.

How could I go about implementing 1more's?

How can I prevent players from using baton pass until they land a crit or exploit a weakness?

These are likely very newbie questions, I'm inexperienced with any even slightly complex coding. The only experience I have with the stuff is from a Renpy game I made. It was mostly just a short slideshow with some music that I cobbled together under a two-week deadline. Even then most of the code was just stuff I copied from a (very helpful) Youtube tutorial... Under the hood the thing was probably a bunch of spaghetti.
Wait a second here. What happens if the boosted ally defeats another enemy?

And yeah, Ren'py games usuallly make you use spaghetti code. Actually it's more like a watered down version of a series of RM's event commands executed as direct script calls.
Oh, dang that Wiki quote broke.
Spoiler: the bit that broken quote didn't show.
The ability is also disabled if the user has an ailment themselves.When Baton Pass is initiated, the two respective allies do a high five, and the one receiving the turn has their attack and recovery power boosted for that turn. If that boosted party member also Downs another enemy and hence receives One More themselves, they can then pass on their turn to another ally, further increasing the power of the boost. The effects of the Baton Pass last until the user no longer receives a One More, and hence the next combatant's turn begins. However, when passing subsequent turns after the initial pass, the characters used previously in the sequence are unable to be recipients of more than one Baton Pass, preventing an endless loop. The party can achieve up to three consecutive passes, maxing out the strength of the boost on the third recipient. Using the Baton Pass does not consume that character's turn in battle and can lead to them technically having two consecutive turns without scoring a 1 More themselves.

If I'm understanding your question correctly...

If the boosted ally brings an enemy HP to zero without landing a crit or exploiting an enemy's elemental weakness then they can't baton pass.

Like the formerly broken bit of the wiki quote had put it, the effects of the baton pass stop when the one mores do.
Let me see if I got it right this time.

If you kill the enemy under those conditions, you pass the baton to the next ally. And right after that the first member gets an extra turn or not? Or when do they get the chance to attack the foes or heal a member once again?
If you kill the enemy under those conditions...
The mechanic has nothing to do with killing enemies.

The only thing that matters is that the enemy was hit either with a critical hit or their elemental weakness. Whether they're alive or not is irrelevant.
You don't necessarily need to kill the enemy, if you hit an enemy with an attack that crits or its weak to you get the One More. Knocking Down the enemy is different from KOing/Killing, when you knock an enemy down the enemy falls over and is unable to move for a turn.

Ninja'd : I must type faster lol!

1711233490440.png

(Screenshot to illustrate)
Same rules apply to party members, like the Santa costumed boy above. But the enemies don't get the baton passes. Some enemies recovering from being knocked down faster

When you baton pass to an ally it immediately becomes that ally's turn and they get the boost.
4a693ea64285a30384648cddb72d5fded6157d5f.gifv

Then if they get another one more using that turn, they can then perform a stronger baton pass. (Seen above.)

An example of a strong chain of passes. For clarity I picture the game only having four characters in battle at once.

Member 1 - Gets One More. LV1. Baton Passes to Member 2.
Member 2 - Gains the LV1. Buff, they get the extra turn and are now in play. Gets One More with that turn. LV2 Baton Passes to Member 3.
Member 3 - Gains LV2 Buff, gets an extra turn, gets one more with that turn. LV3 Baton Passes to Member 4.
Member 4 - Gains LV3 Buff, the strongest one increasing attack and recovery power, while also decreasing the costs of any of their skills to zero, gets the extra turn, there are no more members to baton pass to. They attack.

The chains ends, the buffs are lost. Now it's the turn of whatever enemy or ally was gonna come after Member 1 if they hadn't gotten that One More.

If Member 2 and 3 didn't get the One More the chain would break.

Poor wording on my part, apologies. I also failed to bring up that this also applies to the player party earlier. Should've explained in more detail besides quoting a wiki and giving a simple example fight ^^'. Hope this clears it up, if not let me know.
So this Baton Pass mechanic interrupts the normal flow of the battle till no more heroes get some One More state... before continuing with the predetermined order. How curious!

The thing is that your request will heavily depend on the battle system you're using at that time.
Making one for the default system only to later find out that you want another to implement BS might break that feature in no time. :S

My advise would be that you gotta be sure you won't be changing battle systems every so often before expecting anybody to start working on it.
So this Baton Pass mechanic interrupts the normal flow of the battle till no more heroes get some One More state... before continuing with the predetermined order. How curious!
To further clarify, the player has to choose to initiate a Baton Pass. The player may very well decide to eschew the mechanic in favor of continuing to attack with the currently active character. I've included a video of it in action. Things move quick, so slow it down if you need to.
It doesn't really interupt the game flow cuz...
Ninja'd : I should've shown a video of it in action, how'd that idea slip my mind? (x_x)

But yeah, the baton pass system provides a very smooth game flow for the stylish fun charming title that is P5, if it didn't, I don't think I would ever gotten through that over 100 hour behemoth.

...People have made alternate battle systems? Like full blown, change the game, new battle systems? I've only seen things that add really small things to the default one, but I guess I haven't searched well enough. It feels like I'm constantly hopping from overestimating and underestimating this engine's power haha.

Original thread: https://forums.rpgmakerweb.com/threads/a-baton-pass-system-in-xp.167093/