Skip to main content

What Works And Why: Juicy maths in Slay The Spire

Numbers crunch back

What Works And Why is a monthly column where Gunpoint and Heat Signature designer Tom Francis digs into the design of a game or mechanic and analyses what makes it good.

When games offer you abilities and perks that boost your stats, they often do it in a meager, fiddly way:

5% chance to deal 10% extra damage for 5 seconds. Does not stack.

This is dry, fussy and boring to me. A 5% chance is so low I can never bank on it happening, 10% extra damage is so small I won't notice it, and lasting 5 seconds means there's this extra state I now need to know about and track. And 'does not stack' might be the saddest phrase in game design.

So here's an example of what I mean by juicy maths: Corpse Explosion from roguelike card game Slay the Spire.

Enemy loses all Poison. Deal damage equal to twice the amount lost to ALL enemies.

All. Twice. ALL. Yes, this is just straight up a more powerful ability, and it's easier to make the maths on those juicy. But Slay the Spire still gets credit for it, because it doesn't really have any wimpy, equivocating X% chance of Y% buff cards. Every card does something clean, whole, and distinct.

Slay the Spire is able to offer you these big, powerful abilities partly because it's a roguelike. You play about 50 fights, with a few story events in between, and then the game ends. Between each fight, you're offered three random cards and choose one. A lot of the time you won't find the super-powerful combination of cards that lets your damage or defense get out of control, and even when you do, that glorious winning streak only lasts for the rest of this run. That's long enough to enjoy it, but not so long it gets dull to trivially win every fight. Games like Diablo and World of Warcraft have to be more conservative with the abilities they offer you, because finding a truly killer combo could make the game too easy forever.

Corpse Explosion is the spectacular punchline of a gloriously juicy setup with Slay the Spire's poison maths. Its poison system is the simplest I've seen: 3 poison will deal 3 damage this turn, 2 next turn, 1 the turn after, then wear off. The number is both its current damage per turn and its remaining duration.

So it's easy to grasp, but it has some interesting consequences. If an enemy has no poison, adding 3 poison to them ultimately does 6 damage: 3 + 2 + 1. But if they already have 100 poison, adding 3 more eventually deals 306 extra damage. They're going to take 103 + 102 + 101 more than they otherwise would. Because fuck yes it stacks.

Noxious Fumes

Noxious Fumes is a power that adds 2 poison to every enemy every turn. That's faster than it wears off, so everyone gets more poisoned all the time - albeit slowly.

Catalyst is a card that doubles one enemy's poison, then is used up. The more they have, the more you add - but you can only do it once. So you wait for Noxious Fumes and other poison-dealing cards to stack their deadly stink, until that critical turning point where doubling that number will kill or nearly kill them.

Corpse Explosion we've covered: 2x their current poison value, dealt as damage to everyone. By itself it's satisfying but not crazy. It's when you combine it with Catalyst that it gets crazy.

If you have both, you can double the enemy's poison then corpse-explode them to deal 4x that damage to everyone.

But! Catalyst can be upgraded to triple the poison instead of doubling it, letting you deal 6x that damage if you use both.

Catalyst upgrade

But! So can Corpse Explosion. So now you're tripling their poison, then tripling that as damage, for a 9x multiplier, to everyone.

But! Let me tell you about Burst. Burst causes the next skill you play to be played twice. Catalyst is a skill. It's usually used up after it's cast, but Burst lets you play Catalyst twice. And Catalyst triples poison. So now we're looking at tripling it twice before we triple it again with Corpse Explosion - 27x their poison, as damage, to all enemies. If an 80 health enemy has even 3 poison, this combo kills them - and probably every other enemy in the fight.

That kind of giddy, out-of-control equation is what I love about Slay the Spire. It makes the game feel rife with powerful secrets, if you're smart enough to work them out. So what makes it work?

Stackable Statuses: The pleasingly simple poison system I described above is a principle Slay the Spire sticks to throughout. Each buff, debuff, and basically everything else can be expressed as two tiny pieces of information: the name of the status, and a simple whole number. How much of it you have. If you apply 1 Vulnerable to an enemy who already has 2 Vulnerable, now they have 3 Vulnerable. What that means can be different for different status types, and is explained in a popup description when you mouse over it. But it's critical that the status itself is simple to express, and simple to do maths with.

In another game you might have one attack that does 3 poison damage per second for 5 seconds, and another that does 5 per second for 3 seconds. The result of stacking those is a mess I can't summarise with 2 numbers, let alone 1. It makes it harder to reason about what combining two skills will do, and that makes it harder to get excited about the possibilities.

Whole Multipliers: Adding things can be satisfying, but all of Slay the Spire's nerdiest thrills involve doubling, tripling, or even X-iplying big, important numbers. Tripling your Poison! Doubling your Strength! Casting your next orb once for every energy point you have left! Whole numbers, whole multipliers, huge effect. These spectacular multiplications are so gloriously powerful that even the chance of getting the right cards to produce them is tantalising and intoxicating.

Rulebreakers: Catalyst can only be played once. That's the trade-off for its huge upside - tripling their poison. But Burst lets you play ANY skill twice - it doesn't care if the card is used up, it doesn't care if you've run out of energy for the second cast, it just does it. That lets you break Catalyst's golden rule, its only downside. Slay the Spire is full of loopholes like this, and intentionally so. Some decks literally let you play an infinite number of cards per turn.

Breaking rules like this feels like discovering some forbidden magic, it's an illicit thrill. Not least because the rule you're breaking is usually there for good reason: tripling poison is powerful, but times nine? That's ridiculous, it shouldn't be allowed. But you've found a way to do it, and that feels good and wrong and bad and good.

Scarcity: It pains me to admit it, because this is also the root of the game's biggest flaw, but one reason these combos are so satisfying is that it's so rare to pull them off. Most of the time they're just an alluring possibility, pushing you to take a card that will be terrifyingly powerful if you find the others it works with, and useless if not. It's a flaw that you're always being asked to make this decision with no knowledge of what the future holds - whether you should take Catalyst is entirely dependent on whether you'll eventually be offered good poison cards to go with it, but you have no way of knowing or controlling that. The game could use more foreknowledge to reduce that crapshoot element. But the scarcity itself, the fact that it so rarely comes together, is part of what makes that poison explosion so magical when it does happen.

The poison explosion is one of many ridiculously juicy combos in Slay the Spire. The Ironclad, its warrior, can build their strength to the point that they can kill any boss in the game with a single strike. Its newest character, the Defect, can become essentially invulnerable by magnifying and multiplying their wizardy orbs. Its daily challenge adds frankly silly modifiers to mix things up, tripling every card you add to your deck, or giving you one of every rare card in the game. It feels rife with dark and terrible equations to be discovered, and there's a lot to be learned from how it makes maths, of all things, so appealing.

Tom Francis is the designer of Gunpoint and Heat Signature and a former games journalist. You can find more of his thoughts on making games on his blog.

Read this next