News Shop
Events Chat

How many deck combinations (including starter deck choice) in total? (3084)

The following question has been bothering me, and my math skills are too lame for me to figure it out myself. Many of you are clearly very smart, so: When you factor in starting deck choice as well, how many possible combination of decks can you have in Codex? (extra credit if you show your work! :grin:)

1 Like

First you pick your starting deck one of 20 ways. Then you have to choose two more specs from the remaining 19, which you can do in 19!/2!17! = 171 ways, for a total of 20*171=3420 possible spec combinations.

1 Like

does that capture the fact that Peace/Truth/Law is the same as Law/Truth/Peace?

1 Like

Ah, no it doesn’t. I forgot to account for each faction sharing a starter deck.

THAT is the bit that has been blowing my mind.

So, we’re closing in on the number: more than 1140 but less than 3420.

I believe there are 1,140 possible codices. I used the formula n!/(r!(n-r)!) where n is the number of items in a set and r is the size of the subset you are looking for.

1 Like

After corrections, I get 3084 unique decks. Here is my math.

I broke it down by 1 color, 2 color, and 3 color.

1 color decks: there are 6 of these (red, green, black, white, blue, purple)

2 color decks: there are 648 of these.

Excluding neutral, there are 3 different ways you can get a combination of 2 specs from a given color (e.g. fire + blood, fire + anarchy, blood + anarchy). There are 6 colors, which means there are 18 unique combinations of 2 specs that share a color. Each of those 18 can be paired with one of 17 unique off-color specs (5 x 3 in the regular colors + 2 neutral), for 18 x 17 = 306 unique spec combinations. Each of those can choose one of 2 starters, so there are 612 unique decks with 2 specs of a non-neutral color + a spec of a different color.

There is only 1 way to get a combination of 2 specs from neutral. That combo can be paired with one of the 18 other specs, yielding 18 unique 3 spec combinations. Each of those can choose of of 2 starters, so there are 36 unique decks with 2 neutral specs + 1 other deck.

Adding those together gives 612 + 36 = 648 unique 2 color decks.

3 color: there are 2430 of these
Again breaking up decks with and without neutral separately. Without neutral, there are 20 unique ways to get 3 unique colors (6 choose 3). Each color has 3 unique options for a spec, so there are 20 x 3 x 3 x 3 = 540 unique spec combos. Each of those combos can have one of 3 starters, so there are 1620 unique decks that have 3 non-neutral colors.

If neutral is one of the colors, there are 15 unique ways to get 3 unique colors (1 neutral x 6 choose 2). Neutral has 2 unique spec options, and the other colors have 3, so there are 15 x 2 x 3 x 3 = 270 unique spec combos. Each of those has 3 starter options, so there are 810 unique decks that have a neutral spec + 2 other colors.

Adding those together gives 1620 + 810 = 2430 unique 3 color decks.

6 monocolor decks + 648 2-color decks + 2430 3-color decks = 3084 unique decks.


That’s 20 choose 3, isn’t it? I don’t think that accounts for the starter decks. For example, for my purposes: [Bashing]/Fire/Blood with a neutral starter is different than [Fire]/Blood/Bashing with a red starter.

(However, [Fire]/Blood/Bashing with red starter would not count as a separate deck as [Blood]/Fire/Bashing with a red starter.)

I think the number is somewhere between 1,140 and 3,420 but I still can’t figure out the exact calculation.


Fair, I didn’t account for starter decks.

1 Like

Actually, the way I calculated the number of color combinations is wrong. Fixing now

Edit: fixed above. I get 3184, which is within dontmindlosing’s parameters.


I think Barrelfish has it. I was working on it in the other direction, subtracting out decks that were duplicates from 3420, which is the silly way of doing what barrelfish did.

1 Like

@Barrelfish Thank you! I want to give you 3184 likes for this. My mind can at last stop fruitlessly mulling this problem over.

And thank you to all others who thought about it and contributed as well! I appreciate the quick response.

3184. What a fantastic number. :slight_smile:



I think you over-counted by 100, but your logic looks good to me, so I’m not sure how. I used a simpler method:

Say you want to use the Green starting deck. Either you have all three green heroes, or only two, or only one:
There’s 1 way to have three green heroes (3C3).
There are 3 ways to have two green heroes (3C2) and 17 ways to have one non-green (17C1), so that makes 317=51.
There are 3 ways to have one green hero (3C1) and 136 ways to have two non-green (17C2), so that makes 3

So we have 1 + 51 + 408 = 460 ways to use the green starting deck.

Since the calculations for any of the other colors (excepting neutral) are the same, and there are 6 colors, we have 6*460 = 2760 ways to have a colored starting deck.

Now we consider the case where you want to have the neutral starting deck. You can either have two neutral heroes and one non-neutral, or one neutral and two non-neutrals:
There’s 1 way to have two neutrals (2C2) and 18 ways to have one non-neutral (18C1), so you have 118 = 18.
There are 2 ways to have one neutral (2C1) and 153 ways to have two non-neutrals (18C2), so you have 2

So we have 18 + 306 = 324 ways to have a neutral starting deck.

2760 + 324 = 3084 different combinations of codex and starting deck.

Still, any way you slice it, over 3000 possible combinations is fantastic. I wonder how many of those are truly viable?

1 Like

Is it this line? 306 X 2 would be 612 instead of 712, accounting for the extra hundred?

Either way, I want to give @Barrelfish 3184 likes and @ARMed_PIrate 3084 + 100 likes. And then a pile of likes for everyone else.

1 Like

You are correct. I somehow turned 306 x 2 = 712 instead of 612, which is where the extra 100 came from. I will fix my post above (again).

This is a good lesson on why it’s good to use multiple different methods on problems like this.


3084 What a beautiful Duwang… I mean number.

1 Like