Draft:Two Worlds:Mana Cost

The Two Worlds Wiki - Documenting Two Worlds since 2008.
Jump to navigation Jump to search

The Mana Cost of a spell is the amount of mana points required and used up when casting that spell. Every cost follows one of two formulas:<syntaxhighlight lang="julia"> floor(initial_cost + (level - 1) * increase) </syntaxhighlight><syntaxhighlight lang="julia"> floor(base_cost + increase + max(0, level - 2) * increase) </syntaxhighlight>Where:

  • floor(x) = Function, returns the greatest integer less than or equal to x.
  • max(x,y) = Function, returns the greater number among its arguments.
  • initial_cost = cost of the spell at level 1.
  • base_cost = cost of the spell at level 1 minus increase.
  • increase = amount increased every level.
  • level = The spell's Spell Level.
  • initial_level = skill level for the spell's school of magic at which the spell is unlocked.


Spells that use the first formula include Firebolt, Ring of Fire, and Lightning. Here are some examples using Firebolt, which has a initial cost of 15, initial level of 1, and cost increase of 5.

  • 1 card, 0 spell boosters, and with Fire Magic level 1: <syntaxhighlight lang="julia">

floor(15 + (1 - 1) * 5) MP = floor(15 + 0) MP = 15 MP </syntaxhighlight>

  • 2 cards, 0 spell boosters, and with Fire Magic level 1:<syntaxhighlight lang="julia">

floor(15 + (2 - 1) * 5) MP = floor(15 + 1 * 5) MP = 20 MP </syntaxhighlight>

  • 3 cards, 0 spell boosters, and with Fire Magic level 1:<syntaxhighlight lang="julia">

floor(15 + (3 - 1) * 5) MP = floor(15 + 2 * 5) MP = floor(15 + 10) MP = 25 MP </syntaxhighlight>

  • 3 cards, 0 spell boosters, and with Fire Magic level 8:<syntaxhighlight lang="julia">

floor(15 + (10 - 1) * 5) MP = floor(15 + 9 * 5) MP = floor(15 + 45) MP = 60 MP </syntaxhighlight>

  • 3 cards, 2 spell boosters, and with Fire Magic level 8: <syntaxhighlight lang="julia">

floor(15 + (13 - 1) * 5) MP = floor(15 + 12 * 5) MP = floor(15 + 60) MP = 75 MP </syntaxhighlight>


Spells that use the second formula include Heal, Summon Octogron, and Summon Soul Defender. Here are some examples using Heal, which has a base cost of 40, initial level of 1, and cost increase of 40/7.

  • 1 card, 0 spell boosters, and with Air Magic level 1:<syntaxhighlight lang="julia">

floor(40 + 40/7 + max(0, 1 - 2) * 40/7) MP = floor(40 + 40/7 + max(0, -1) * 40/7) MP = floor(40 + 40/7 + 0 * 40/7) MP = floor(40 + 40/7) MP = floor(40 + 5.72...) MP = floor(45.72...) MP = 45 MP </syntaxhighlight>

  • 2 cards, 0 spell boosters, and with Air Magic level 1:<syntaxhighlight lang="julia">

floor(40 + 40/7 + max(0, 2 - 2) * 40/7) MP = floor(40 + 40/7 + max(0, 0) * 40/7) MP = floor(40 + 40/7 + 0 * 40/7) MP = floor(40 + 40/7) MP = floor(40 + 5.72...) MP = floor(45.72...) MP = 45 MP </syntaxhighlight>

  • 3 cards, 0 spell boosters, and with Air Magic level 1:<syntaxhighlight lang="julia">

floor(40 + 40/7 + max(0, 3 - 2) * 40/7) MP = floor(40 + 40/7 + max(0, 1) * 40/7) MP = floor(40 + 40/7 + 1 * 40/7) MP = floor(40 + 80/7) MP = floor(40 + 11.42...) MP = floor(51.42...) MP = 51 MP </syntaxhighlight>

  • 3 cards, 0 spell boosters, and with Air Magic level 8:<syntaxhighlight lang="julia">

floor(40 + 40/7 + max(0, 10 - 2) * 40/7) MP = floor(40 + 40/7 + max(0, 8) * 40/7) MP = floor(40 + 40/7 + 8 * 40/7) MP = floor(40 + 360/7) MP = floor(40 + 51.42...) MP = floor(91.42...) MP = 91 MP </syntaxhighlight>

  • 3 cards, 2 spell boosters, and with Air Magic level 8:<syntaxhighlight lang="julia">

floor(40 + 40/7 + max(0, 13 - 2) * 40/7) MP = floor(40 + 40/7 + max(0, 11) * 40/7) MP = floor(40 + 40/7 + 11 * 40/7) MP = floor(40 + 480/7) MP = floor(40 + 68.57...) MP = floor(108.57...) MP = 108 MP </syntaxhighlight>

You can tell which spells use the second formula by checking if there's no cost change between spell level 1 and 2. For example, Heal has 45 cost at Air Magic level 1 when using either 1 or 2 cards, so it uses the second formula; meanwhile, Firebolt changes cost from 15 to 20 at Fire Magic level 1 when changing from 1 to 2 cards, so it uses the first formula.