Post by Deleted on May 23, 2014 16:49:29 GMT
Introduction
I've wanted to design a card game for a long time but never felt confident enough to do it. Discovering the "Jedi Curve" employed by Magic: the Gathering, I began to get hope I could grasp the math involved. In short, the Jedi Curve is a formula governing cost of a card vs its power. This ensures balance. However, many cards deviate slightly from this equation prompting players to identify which cards beat the system and which cards are underpowered. Mind you, these variations are small gnerally, but every bit helps when looking for an edge. For some reason I decided to use Hearthstone to see if I could figure out their formula...it may've been the ridiculous amount of rares the game has. To put that in perspective, most card games have 3 types of cards - common, uncommon and rare. Hearthstone has - uncolored (common & class-specific), white, blue, purple and orange. The only trade off is being able to disenchant extra cards to make more of ones you've unlocked.
Anyway...
I've begun decoding Hearthstone's formula and I'll be updating this post as I go with that information for the rest of you. Since I don't hate myself enough, I will not be evaluating every single card and printing that information. Instead, I will give you the formulas to evaluate abilities that you can then use on cards. So far I've only been working on creatures, but I expect to look at spells next week.
The Method
First, I needed to get a baseline. That meant looking at creatures that had no abilities and looking to plot that information to a graph. I took a chance and added Health and Attack values into one number pared with the creature's cost and then plotted those numbers to a graph. For all examples, the Cost is on the Y-axis and the Stat values are on the X-axis. What you get is the graphs on the LEFT:
It's a fairly straight looking line, small bumps and few of them indicate those (sub)optimization deviations I mentioned above. So, I simply extrapolated on the line, straightened it out and then figured out a algebraic formula that would produce that line. That resulted in the 2nd graph on the RIGHT, the straightened line is in red and is overlaid over the original blue line for comparison. If you're confused by any of this, it's low-level calculus work dealing with functions. You create an equation with an X and a Y variable. Then you solve the equation assigning any number to one of the variables. You then plot the X and Y values. Repeat the process, connect the dots and that'll draw you all sorts of lines. This is pretty much what graphing calculators do, is run that equation over and over for all the values of X and Y and then draws you a graph.
With a stable baseline, I then isolate creatures that have a single ability in common and then plot a line for then in comparison to the original. I look for a pattern and create an additional expression to the original formula that would mimic this new line.
The Formula
The formula always begins with: Health + Attack =
All entries below are tacked on the end of that equation. I should also point out any combination of Health vs Attack seems to be valid.
A creature with no abilities: 2(Mana Cost) + 1
Charge: -2 (cannot cause Health + Attack to be less than 2)
Taunt: No change (creatures with Taunt have very subtle deviations on both sides of the line so it seems a free ability)
Silence: -2
Divine Shield: -(Mana Cost-1)
Enrage: -1 (It is unclear at current how the enrage values are determined and balanced)
Freeze: Inconclusive (only 2 creatures have this ability at current and no pattern can be discerned from that)
Spellpower: -1 or -2 (not enough examples currently to clearly indicate which it should be)
Windfury: -((Mana Cost+1)/2) (Round the result up)
Overload: Inconclusive (only 2 creatures have this ability currently)
Stealth: -1
Battlecry: Summon creature with X/X: No change, but the summoned creatures stats are detracted from the cast creature
Battlecry: Draw a card: -2
Battlecry: Heal X: -(1/2 of Heal value)
Draw a card when X happens: -3
How to Apply the Formula
Start by mapping your own graph using the following numbers - these are derived from the base creature formula:
Then take a card you want to evaluate and run it through the formulas above tacking on whatever is needed. Plot its Mana Cost and number derived from the equation. If that point falls under the line, it is more powerful then it should be for its cost. If it is over the line, is weaker then it should be. Those 2 statements are dependent upon the Mana Cost being plotted on the Y-axis and the Health + Attack being plotted on the X-axis. If you reverse those plots, reverse the analysis as well.
Or you could skip the whole graphing part and simply compare the numbers. If the formula's result is lower then it should be when referenced against the above chart, then the card is weak and vice-versa.
I've wanted to design a card game for a long time but never felt confident enough to do it. Discovering the "Jedi Curve" employed by Magic: the Gathering, I began to get hope I could grasp the math involved. In short, the Jedi Curve is a formula governing cost of a card vs its power. This ensures balance. However, many cards deviate slightly from this equation prompting players to identify which cards beat the system and which cards are underpowered. Mind you, these variations are small gnerally, but every bit helps when looking for an edge. For some reason I decided to use Hearthstone to see if I could figure out their formula...it may've been the ridiculous amount of rares the game has. To put that in perspective, most card games have 3 types of cards - common, uncommon and rare. Hearthstone has - uncolored (common & class-specific), white, blue, purple and orange. The only trade off is being able to disenchant extra cards to make more of ones you've unlocked.
Anyway...
I've begun decoding Hearthstone's formula and I'll be updating this post as I go with that information for the rest of you. Since I don't hate myself enough, I will not be evaluating every single card and printing that information. Instead, I will give you the formulas to evaluate abilities that you can then use on cards. So far I've only been working on creatures, but I expect to look at spells next week.
The Method
First, I needed to get a baseline. That meant looking at creatures that had no abilities and looking to plot that information to a graph. I took a chance and added Health and Attack values into one number pared with the creature's cost and then plotted those numbers to a graph. For all examples, the Cost is on the Y-axis and the Stat values are on the X-axis. What you get is the graphs on the LEFT:
It's a fairly straight looking line, small bumps and few of them indicate those (sub)optimization deviations I mentioned above. So, I simply extrapolated on the line, straightened it out and then figured out a algebraic formula that would produce that line. That resulted in the 2nd graph on the RIGHT, the straightened line is in red and is overlaid over the original blue line for comparison. If you're confused by any of this, it's low-level calculus work dealing with functions. You create an equation with an X and a Y variable. Then you solve the equation assigning any number to one of the variables. You then plot the X and Y values. Repeat the process, connect the dots and that'll draw you all sorts of lines. This is pretty much what graphing calculators do, is run that equation over and over for all the values of X and Y and then draws you a graph.
With a stable baseline, I then isolate creatures that have a single ability in common and then plot a line for then in comparison to the original. I look for a pattern and create an additional expression to the original formula that would mimic this new line.
The Formula
The formula always begins with: Health + Attack =
All entries below are tacked on the end of that equation. I should also point out any combination of Health vs Attack seems to be valid.
A creature with no abilities: 2(Mana Cost) + 1
Charge: -2 (cannot cause Health + Attack to be less than 2)
Taunt: No change (creatures with Taunt have very subtle deviations on both sides of the line so it seems a free ability)
Silence: -2
Divine Shield: -(Mana Cost-1)
Enrage: -1 (It is unclear at current how the enrage values are determined and balanced)
Freeze: Inconclusive (only 2 creatures have this ability at current and no pattern can be discerned from that)
Spellpower: -1 or -2 (not enough examples currently to clearly indicate which it should be)
Windfury: -((Mana Cost+1)/2) (Round the result up)
Overload: Inconclusive (only 2 creatures have this ability currently)
Stealth: -1
Battlecry: Summon creature with X/X: No change, but the summoned creatures stats are detracted from the cast creature
Battlecry: Draw a card: -2
Battlecry: Heal X: -(1/2 of Heal value)
Draw a card when X happens: -3
How to Apply the Formula
Start by mapping your own graph using the following numbers - these are derived from the base creature formula:
Mana Cost | Health + Attack |
1 | 3 |
2 | 5 |
3 | 7 |
4 | 9 |
5 | 11 |
6 | 13 |
7 | 15 |
8 | 17 |
9 | 19 |
10 | 21 |
Then take a card you want to evaluate and run it through the formulas above tacking on whatever is needed. Plot its Mana Cost and number derived from the equation. If that point falls under the line, it is more powerful then it should be for its cost. If it is over the line, is weaker then it should be. Those 2 statements are dependent upon the Mana Cost being plotted on the Y-axis and the Health + Attack being plotted on the X-axis. If you reverse those plots, reverse the analysis as well.
Or you could skip the whole graphing part and simply compare the numbers. If the formula's result is lower then it should be when referenced against the above chart, then the card is weak and vice-versa.