When I started brainstorming after waking myself up with Ideas at about 2am after being linked to Foxfire by someone I'm still in contact with from the old PokéBattles community, this was one of the original ideas I had for this incarnation of Sandy Version. I don't have that initial spreadsheet still available (it's instead morphed into what I'm using for my schedule), but I believe after writing the idea down I put the note of "This is a terrible idea. Do not do this." and yet I'd finished writing the bulk of it prior to publishing Battle 1, with some minor stuff I needed to test or redo before I was able to send it to anyone to test read it. Incidentally, a huge thanks to Comic, formerly of Digital Version, for test reading this bit of nonsense.
The writing process was a bit peculiar, there are a couple of sequences that would have flowed really naturally in a linear battle that may or may not flow naturally depending on what the player decides to do at any given time, and didn't even write those bits consecutively, it was a case of keeping an eye out for those potential flows as I was writing the disparate pieces and then leaving the actual pacing to the player, rather than building a natural flow via my writing process. Having two options for how one attack would be handled depending on what had previously happened was also an odd experience, but I suppose that's the nature of writing a playable Battle in this particular way.
The fact that you can get Rockruff to trade two yellow cards for a red card, and also feint attack, providing a special win condition and a special loss condition respectfully are perhaps my favourite parts of it, though I also like Thunder Aid which leads Rockruff to be crispy on the inside - In fact all of the Thunder related stuff I enjoy.
Selecting attacks, with the exception of Thunder Aid, was just a case of going through the actual Pokémon's moveset in level order, and writing jokes for each, again an unusual experience. Even when I'm going a bit more 'canon Pokémon' for attack selection (Mostly Youngster Joey and Youngster Ben battles, since most of my original characters don't use... Conventional... Pokémon) I'm still having them respond to events of the battle and whatever nonsense the Narrator up to. This wasn't possible with this battle, since I had no ability to actually know what had happened previously, and repeating the same attack multiple times felt like a terrible idea, for the same reason I only do that if there's a Good Reason to when writing a battle - Very few jokes benefit from repetition, after all.
There were, however, advantages to the approach I used over a more naive approach to writing branching narratives - Unless there were natural convergence points between branches, every choice point - which for this game was every single player attack - would have required essentially splitting the text into as many pieces as options. And since I consciously chose to make the player options mirror that of a Pokémon battle, giving the player four attack options each turn, even if I had managed to keep each fully scripted path to 3 attacks per side, that would have required the core of the story to contain 84 passages conveying two attacks each, which is a scope that, despite the brevity of most of each chunk, would be terrifying to contemplate. For additional context, counting attacks that have multiple effects depending on what has already happened as two attacks, Pikachu has 14 attacks, while Rockruff has 9 (one of which, Struggle, is basically an 'out of content' error handling attack), for 23 passages each containing half of what each of those 84 passages would have had.
Now, I'm sure some would have been a bit shorter than that because I'd have been able to make the jokes flow more naturally, and I wouldn't have been thinking in terms of 'damage' because I never do that when writing a PB. Thunder Aid in the actual game does 5 damage, had I been writing it into an actual battle, or had this piece of IF had a more traditionally branching structure, there's a very real chance it would have been an instant win for Pikachu.
Incidentally, for an idea of how long this was as is - The word count, if inky is to be believed, would be about 3x the size of Joey and his Top Percentage Rattata if the text were arranged linearly.
24 hours after publishing I found a way of reducing Pikachu's attacks to three, meaning Pikachu should have had a 15th attack. This is entirely my fault, I don't think I specifically asked Comic when he was test reading if he ever was reduced to 3 attacks, so even if he did find that path through to that, he wouldn't have necessarily registered it as a bug since the game not only keeps working, but the player still has options.
Sucks to be me, I guess, but this isn't as big a deal as it might otherwise be since you cannot get Pikachu to 0 attacks due to the nature of how Feint Attack is implemented, so I decided it wasn't worth fixing (although if I'd have found it before publishing, I'd have fixed it).
The reason I went with Ink rather than Twine for this project is that while Twine is a fantastic tool for quickly writing branching narrative fiction, my experience of Twine is that as soon as you start putting actual code into things, the way it interprets whitespace causes the layout to get ugly, and this piece of IF has at its core a code loop rather than a flowchart. I've also got a slight background in code, nothing I've actually used, so the layout of Ink isn't remotely intimidating to me. It's a language that I suspect is easy to pick up for folk without a coding background, for sure, but it is laid out like code and that's going to be more intimidating for someone not familiar with code than the default layout of Twine as 'a series of boxes you type paragraphs into'.
As a rank amateur in both, I consider both languages about as powerful as each other, although I've managed to figure out how to randomize things that change the flow of the game in Ink, which is something I haven't managed to do in Twine.
Behind the scenes, in case anyone cares, the logic for the battle loop that's propelling the bulk of the story is that Rockruff and Pikachu both start with 10hp, most attacks to 3 damage (although a couple do more), if Rockruff ever doesn't skip its turn when Pikachu is in critical condition, the enemy trainer will capture Pikachu, and if ever a turn transition happens when either Pokémon has 0 or less hp, that Pokémon faints. Healing cannot go above 10hp, and anything that would trigger a loss or a win, either due to that logic or from a special jumps the story out of the loop.
If folk want to have a look at the Ink code, particularly the core loops for both Player and Rockruff, I'm willing to share, but as I made a joke about in Battle 11, I do consider this to be a beginner project so I doubt it's of much interest to anyone who isn't looking to do pretty much this exact thing themselves. Just ask for a stripped-down version of it on Discord; you can find me on Foxfire Version's discord which is linked to (with permission) both on Sandy Version's main page and Foxfire Version.
The default Ink CSS creates an excellent layout, but I found it an absolute nightmare to get working into the site design I had going for Sandy, for some reason the main text of the IF was 'faded' rather than the colour it was meant to be, and I couldn't find anything reducing opacity. As such it's using a botched together CSS combining elements from Ink's default CSS and Sandy's normal CSS and has its own stylesheet as a result. This was probably the part of writing this thing that I found most stressful.