regen potion stacking, the right way
tl;dr: an investigation into how multiple Regen Potions interact in Slay the Spire 2 in which I run out of useful information after like three paragraphs and just start talking about absurd hypotheticals. Yay math!
The Regen Potion is an uncommon, all classes potion that gives you 5 Regen. Regen heals you by 1 HP for each stack of Regen that you have at the end of your turn, and the healing proc reduces the number of Regen stacks you have by 1.
If you pop a Regen Potion during a fight and then stick it out for five turns, you'll heal HP. Of course, you may not be able to make it the full five turns without taking more damage than you'd be healing; in practice, it's often not worth trying to get through those last two turns to recover a measly 3 additional HP unless your deck has really consistent block. For the purposes of this post, however, I'm going to assume that you can benefit from the full effect of Regen without taking additional damage for prolonging the fight.
This is all pretty straightforward, but things get a little more interesting when we look at ways in which you can combine multiple Regen potions. Intuitively, since we're just adding positive integer sequences, you might think that every Regen Potion is worth 15 HP regardless of how it's used. As it turns out, however, that's not how numbers work!
Obviously, if you were to use one Regen Potion, wait for all stacks of Regen to wear off, and then use another Regen Potion, you'd be healing for
Pop both Regen Potions at the same time, however, and that total almost doubles:
This makes more sense when you look at the sums side-by-side:
If we subtract out that second sum, we can see why Regen Potion stacking is more effective than successive potion uses:
This also applies to stacking two Regen Potions with a turn offset. If you were to pop one Regen Potion, wait a turn, and then pop the second, you'd be healing for
From there, it's easy to check that increasing the turn offset only further decreases the amount of healing; that first sum is just always going to be smaller than the first sum you'd be getting by popping the potions at the same time.
Incidentally, there's a formula for the sum of the first positive integers,1 :
Let's rewrite this in terms of HP and potions used. Let be the number of Regen Potions drunk at the same time and be the total healing you'd get from drinking those potions:
So, what's the most healing you can get out of Regen Potions? The maximum number of potions you can hold at the same time is, on the current beta patch as of the time of writing, 10: 3 base slots on Ascension 3 or lower, 1 from the Phial Holster Neow relic, 2 from the relic Potion Belt, and a 4 from Orobas' Alchemical Coffer ancient relic. Assuming that you can somehow fill all 10 of those slots with Regen Potions, that would net you
which is already a comical number. It's also basically useless: if you already have more than 1,000 max HP, you're not going to need the healing to win the run.
However, if we had astronomical luck,2 we could make that stupid number even stupider.
There's a rare potion called the Entropic Brew that fills all of your empty potion slots with random potions. Let's assume that we have 10-slot potion belt stocked with 1 Regen Potion and 9 Entropic Brews (already something that will probably never happen) and let's also assume that each Entropic Brew will only generate more Regen Potions (this is the astronomical luck part). We use our Regen Potion, then pop the first Entropic Brew and get two more Regen Potions (remember, the slot that was occupied by the Entropic Brew that you just consumed will also be filled with a potion). We drink those two, then we use the next Entropic Brew to get three more Regen Potions. It's easy to see that this is another sum of the first positive integers situation; the final Entropic Brew you consume will generate 10 additional Regen Potions. We already saw above that , so under these impossible circumstances, we could potentially heal for
Of course, benefiting from all of this healing would require stalling for 275 turns, so good luck with that.
Edit: I realized some time after writing this post that you can theoretically create an infinite number of potions in any combat with two copies of Nightmare and one copy of Alchemize. So, for the sake of this post, let's just assume that you don't do this.
If you stuck it out to the end of this post, thank you for indulging me and my hyperfixation. The information presented here might be entirely useless to you, but writing it has reinvigorated my interest in , so hey, at least it was useful for one of us!
I probably wrote a proof for this when I was in undergrad, so just trust me on this.↩
STS2's seeds are based on a 32 bit integer, which means there are only about 4 billion total seeds. That might seem like a lot, but it's actually a rather small number from a computational perspective, so there are a lot of hypothetically possible scenarios that the player will never be able to encounter. All that is to say that the scenario I'm about to describe is almost definitely impossible to achieve in vanilla STS2, even if you did have astronomical luck.↩