Calculating the Purchasing Power to Determine How to Spend your Tokens

**CALCULATING THE PURCHASING POWER TO DETERMINE HOW TO SPEND YOUR TOKENS, an article by mpmslc.**

Ever want to know how to best spend your tokens when purchasing guardian powers at the edge of infinity? Are you confused and don't know which 'online optimizer' to use? Here is an article that breaks down how to calculate what I like to call the purchasing power.

All the calculations in my optimizer http://repl.it/e2R/26 are based on everything written in this article.

To begin, I will abbreviate purchasing power with **PP** and express it in the following equation:

**PP = γΔ / ($Σ)**

This equation states that the purchasing power (**PP**) is equal to a factor (**γ**) multiplied by a change (**Δ**) divided by a cost (**$**) which is multiplied by a total (**Σ**).

There are different factors (**γ**) used to bump up or reduce the final value of the purchasing power (**PP**) depending on how much of an importance is placed on different benefits: such as DPS (damage per second), gold, tokens or time. As a default, the following factors have been assigned:

DPS Factor = 1.000

Gold Factor = 0.275

Token Factor = 5.000

Time Factor = 3.000

These values may be changed based on how important you feel one is above another. Of course, the more important the benefit, the higher you would want to assign the factor; the less important the benefit, the lower you would want to assign the factor.

When you level up a guardian power, a change (**Δ**) it’s benefit occurs. For instance, when you purchase a level in Train Heroes a change (**Δ**) of 11% is applied to it’s total DPS. This starts out with a built in value. For Prism, a corrected change (**Δ**) will be required.

The cost (**$**) is defined simply by the amount of tokens is required to level up a guardian power and is expressed in the following equation:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

This equation states that the cost (**$**) is equal to a built-in base number (**B**1) raised to the power of a built-in exponent (**E**1) and then added by a built-in number (**A**1).

The total (**Σ**) is defined by how much benefit the guardian power is currently granting you at your current level. It is the overall multiplier and is expressed in the following equation:

**Σ = LΔM**2 **+ A**2

This equation states that the total (**Σ**) is equal to the level (**L**) of the guardian power multiplied by the change (**Δ**) multiplied by a built-in number (**M**2) and then added by a built-in number (**A**2).

**GUILDED CHESTS**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 1.0** and

where **A**1 **= 0**. So therefore:

**$ = (L + 1)**1.0 **+ 0** -- Simplified:

**$ = L + 1**

Since each level gives 25% boost to amount of gold gained from chests:

**Δ = 25%'**

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= 1** and

since the benefit must be 100% (not 0%) at level 0:

**A**2 **= 100%**. So therefore:

**Σ = L \* 25% \* 1 + 100%** -- Simplified:

**Σ = L / 4 + 1**

Since this guardian power yields GOLD:

**γ = 0.275'**

**PP = γΔ / ($Σ)**

**PP = 0.275 \* 25% / [(L + 1)(L / 4 + 1)]** -- Simplified:

**PP = 0.275 / (L**2 **+ 5L + 4)**

**MIDAS TOUCH**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 1.0** and

where **A**1 **= 0**. So therefore:

**$ = (L + 1)**1.0 **+ 0** -- Simplified:

**$ = L + 1**

Since each level gives 5% boost to amount of gold gained from all sources:

**Δ = 5%**

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= 1** and

since the benefit must be 100% (not 0%) at level 0:

**A**2 **= 100%**. So therefore:

**Σ = L \* 5% \* 1 + 100%** -- Simplified:

**Σ = L / 20 + 1**

Since this guardian power yields GOLD:

**γ = 0.275**

**PP = γΔ / ($Σ)**

**PP = 0.275 \* 5% / [(L + 1)(L / 20 + 1)]** -- Simplified:

**PP = 0.275 / (L**2 **+ 21L + 20)**

**FORCE MULTIPLY**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 1.6** and

where **A**1 **= 0**. So therefore:

**$ = (L + 1)**1.6 **+ 0** -- Simplified:

**$ = (L + 1)**1.6(rounded down to the nearest integer)

Since each level gives 1% boost to amount of infinity tokens gained:

**Δ = 1%**

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= 1** and

since the benefit must be 100% (not 0%) at level 0:

**A**2 **= 100%**. So therefore:

**Σ = L \* 1% \* 1 + 100%** -- Simplified:

**Σ = L / 100 + 1**

Since this guardian power yields TOKENS:

**γ = 5.000**

**PP = γΔ / ($Σ)**

**PP = 5.000 \* 1% / [($ \* (L / 100 + 1)]** -- Simplified:

**PP = 5 / [$ \* (L + 100)]**

**PRISM**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 1.6** and

where **A**1 **= 0**. So therefore:

**$ = (L + 1)**1.6 **+ 0** -- Simplified:

**$ = (L + 1)**1.6(rounded down to the nearest integer)

Since each level gives 1% boost to amount of infinity gems gained:

**Δ = 1%** (this will require a correction later)

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= 1** and

since the benefit must be 100% (not 0%) at level 0:

**A**2 **= 100%**. So therefore:

**Σ = L \* 1% \* 1 + 100%** -- Simplified:

**Σ = L / 100 + 1** (this will require a correction later)

This guardian power requires another phase of calculations for **Δ** and **Σ**, so more information is needed:

Level which Gems begin to drop (**L**G) is the level at which gems begin to drop.

**L**G **= 105**

Wormhole Level (**L**W) is the level of your guardian power Wormhole.

Starting Level (**L**S) is the level at which to begin for loop.

**L**S **= ceiling (max (L**G**,** **L**W**), 5)**

Level at Infinity (**L**∞) is the level at which you decide to go infinity and start over again.

Frequency due to Jeweled (**F**J) is the Infinity Gem Chance found in the in-game info, assuming it's maxed out.

**F**J **= 50%**

Aidith Gems (**G**A) is the total quantity of infinity gems Aidith (the final hero) has collected.

Gems Collected at Current Level (**G**L) is the quantity of infinity gems collected during a 'run' (from starting level to level at infinity) at your current Prism level.

Gems Collected at Next Level (**G**L+1) is the quantity of infinity gems you would collect during a run at your Prism's next level.

Spell Correction Multiplier (**S**M) is a multiplier to adjust for spells casted during a run which increases your quantity of gems collected.

**S**M **= 1.6**

The following 'for' loop is how to calculate the gems collected:

**for (level = LS, level < L**∞**, level + 5)**

**G**L **+= [(level - 105) / 25]**1.1 **\* F**J**ΣS**M (rounded up to the nearest integer)

**G**L+1 **+= [(level - 105) / 25]**1.1 **\* F**J**(Σ + Δ)S**M (rounded up to the nearest integer)

New values are to be assigned to **Δ** and **Σ** as follows:

**Δ = (G**L+1 **- G**L**) \* 1% / 20**

This needs to be divided by 20 because virtually all of the time only one hero is doing nearly all of the damage at any given time. Nearly all the time it’s Aidith. This has been bar charted and proves this. The following is the above siplified:

**Δ = (G**L+1 **- G**L**) / 2000'**

**Σ = G**A **\* 1% + 100%** -- Simplified:

**Σ = G**A **/ 100 + 1**

Since this guardian power yields gems and the gems yield DPS:

**γ = 1.000**

**PP = γΔ / ($Σ)**

**PP = 1.000 \* [(G**L+1 **- G**L**) / 2000] / [$ \* (G**A **/ 100 + 1)]** -- Simplified:

**PP = (G**L+1 **- G**L**) / [5$ \* (4G**A **+ 1)]**

**BANKING**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 1.0** and

where **A**1 **= 0**. So therefore:

**$ = (L + 1)**1.0 **+ 0** -- Simplified:

**$ = L + 1**

Since each level gives 15% boost to amount of gold gained while in idle mode:

**Δ = 15%**

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= 1** and

**A**2 **= 550%**. So therefore:

**Σ = L \* 15% \* 1 + 550%** -- Simplified:

**Σ = (3L + 110) / 20**

Since this guardian power yields GOLD:

**γ = 0.275**

**PP = γΔ / ($Σ)**

**PP = 0.275 \* 15% / [(L + 1)(3L + 110) / 20]** -- Simplified:

**PP = 0.825 / (3L**2 **+ 113L + 110)**

**CONQUEST**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 1.0** and

where **A**1 **= 0**. So therefore:

**$ = (L + 1)**1.0 **+ 0** -- Simplified:

**$ = L + 1**

Since each level gives 15% boost to amount of DPS gained while in idle mode:

**Δ = 15%**

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= 1** and

**A**2 **= 550%**. So therefore:

**Σ = L x 15% x 1 + 550%** -- Simplified:

**Σ = (3L + 110) / 20**

Since this guardian power yields DPS:

**γ = 1.000**

**PP = γΔ / ($Σ)**

**PP = 1.000 \* 15% / [(L + 1)(3L + 110) / 20]** -- Simplified:

**PP = 3 / (3L**2 **+ 113L + 110)**

**TRAIN HEROES**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 0.0** and

where **A**1 **= 0**. So therefore:

**$ = (L + 1)**0.0 **+ 0** -- Simplified:

**$ = 1**

Since each level gives 11% boost to amount of DPS gained:

**Δ = 11%**

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= 1** and

since the benefit must be 100% (not 0%) at level 0:

**A**2 **= 100%**. So therefore:

**Σ = L \* 11% \* 1 + 100%** -- Simplified:

**Σ = 11L / 100 + 1**

Since this guardian power yields DPS:

**γ = 1.000**

**PP = γΔ / ($Σ)**

**PP = 1.000 \* 11% / [1 \* (11L / 100 + 1)]** -- Simplified:

**PP = 11 / (11L + 100)**

**WORMHOLE**

Cost to level is expressed as follows:

**$ = B**1**^E**1 **+ A**1 (rounded down to the nearest integer)

where **B**1 **= L + 1** (**L** = level of this guardian power) and

where **E**1 **= 1.5** and

where **A**1 **= 19**. So therefore:

**$ = (L + 1)**1.5 **+ 19** (rounded down to the nearest integer)

Since level makes you start 1 level later:

**Δ = 1**

Current total benefit is expressed as follows:

**Σ = LΔM**2 **+ A**2

where **M**2 **= -1**

Level at Infinity (**L**∞) is the level at which you decide to go infinity and start over again.

**A**2 **= L**∞. So therefore:

**Σ = L \* 1 \* -1 + L**∞ -- Simplified:

**Σ = L**∞ **- L**

Since this guardian power saves TIME:

**γ = 3.000'**

**PP = γΔ / ($Σ)**

**PP = 3.000 \* 1 / [$ \* (L**∞ **- L)]** -- Simplified:

**PP = 3 / [$ \* (L∞ - L)]**

**FINAL CALCULATIONS**

All the **PP** vaules are very small and get even smaller and smaller and approach 0 as you progress through the game, so to offset this, a scaling factor is applied to all **PP** values. I would like to set the smallest **PP** vaule to be equal to 100. So:

**PP**min **= 100**

**PP**div **= min(PP**gilded chests**, PP**midas touch**, PP**force multiply**, PP**prism**, PP**banking**, PP**conquest**, PP**train heroes**, PP**wormhole**)**

Every new **PP** values are updated as follows:

**PP**new **= PP**old **\* PP**min **/ PP**div