Multi-color mana source handling
The tool tracks which colors each land can produce using theProducibleManaColors property:
Mana color representation
- Single color lands:
"G"(Forest),"U"(Island), etc. - Dual lands:
"B,G"(Overgrown Tomb),"U,W"(Hallowed Fountain) - Colorless sources:
"C"(Wastes, generic colorless) - Fetch lands:
"F"(indicates fetching capability) - Five-color lands:
"B,G,R,U,W"(Command Tower)
Multi-color lands are particularly valuable because they count toward multiple color requirements simultaneously.
Fetch land support and compatibility
Fetch lands are handled with special logic to account for their color-fixing capabilities:How fetch lands work
Fetch lands have afetchOptions property that specifies which land types they can search for:
Fetch land resolution
ThemanaToFetch function determines what colors a fetch land can produce:
- Filters the deck for lands matching the fetch land’s
fetchOptions - Aggregates all colors those lands can produce
- Returns a consolidated list of producible colors
A Flooded Strand in a deck with Hallowed Fountain (W,U) and Watery Grave (U,B) can effectively produce White, Blue, or Black mana.
Fetch land integration in probability
When calculating probabilities, the algorithm:-
Separates fetch lands from other lands based on their utility for the specific card:
- Adjusts mana costs when fetch lands are drawn, reducing color requirements by the fetched colors
-
Sterilizes the deck by adding aggregate color tags to lands that can be enhanced by fetched lands:
Determining sufficient colored mana
ThecardPlayable function performs a comprehensive check to determine if your deck can support a card:
Playability conditions
FromArithmaticHelpers.js:347-375:
Color matching algorithm
The color condition check:- Iterates through each required color in the card’s cost
- Matches lands that can produce that color (including multi-color lands)
- Allocates lands to color requirements using a greedy algorithm
- Ensures all colors have sufficient sources after allocation
Example: Checking a multi-color card
Example: Checking a multi-color card
Consider casting Absorb with cost
{W}{U}{U}:Required:- 1 White mana
- 2 Blue mana
- 4 Hallowed Fountain (W,U)
- 6 Island (U)
- 3 Plains (W)
- For White requirement (1): Use 1 Hallowed Fountain
- Remaining: 3 Hallowed Fountain, 6 Island, 3 Plains
- For Blue requirement (2): Use 2 Island
- Remaining: 3 Hallowed Fountain, 4 Island, 3 Plains
ProducibleManaColors property
TheProducibleManaColors property is the foundation of mana analysis:
Creating the mana base JSON
FromArithmaticHelpers.js:297-305:
Handling split mana cards
For cards with hybrid mana costs (e.g.,{W/U}), the algorithm:
- Detects multi-character color codes in the card cost
- Sterilizes the deck by adding aggregate color properties to matching lands
- Treats the hybrid cost as satisfied by either color
This sterilization process ensures hybrid mana requirements are correctly evaluated against available mana sources.
Converting mana cost to requirements
ThecardCost function parses mana cost strings into structured requirements:
Mana cost parsing
FromArithmaticHelpers.js:309-324:
Example conversions
| Mana Cost | Parsed Object |
|---|---|
{1}{U} | {C: 1, U: 1} |
{2}{U}{U} | {C: 2, U: 2} |
{W}{U}{B} | {C: 0, W: 1, U: 1, B: 1} |
{3}{G}{G} | {C: 3, G: 2} |
C= Colorless/generic mana (can be paid with any color)W,U,B,R,G= Specific color requirements
Converted mana cost (CMC) is calculated by summing all values:
Object.keys(cost).reduce((a, b) => a + cost[b], 0)Best practices for mana base construction
Based on the optimization algorithm, follow these guidelines:1. Match land counts to color intensity
- For each colored mana symbol in your costs, aim for 5-8 sources of that color
- Cards with multiple symbols of one color (e.g.,
{U}{U}) require more sources - Use the probability percentages to identify color deficiencies
2. Leverage multi-color lands
- Dual lands count toward multiple colors simultaneously
- They’re most valuable in 2-color decks
- In 3+ color decks, prioritize lands that produce your most-required colors
3. Use fetch lands strategically
- Fetch lands provide maximum flexibility when you have multiple fetchable land types
- Pair fetch lands with dual lands (e.g., Polluted Delta + Watery Grave + Underground Sea)
- Fetch lands are most valuable in decks with 3+ colors
4. Consider converted mana cost curve
- The tool validates:
draws - 7 >= CMC - 1 - This means a 3-mana card needs to be cast by turn 3 at earliest
- Ensure you have enough lands to support your curve: generally 17-18 lands minimum
5. Test your mana base
- Look at turn 2-3 probabilities for your early game cards
- They should be 60%+ for consistent gameplay
- If probabilities are low, add more lands or adjust color sources
Identifying mana base issues
Signs your mana base needs improvement
- Low early-game probabilities: 2-3 mana cards showing less than 40% by turn 3
- Zero probabilities:
colorConditionis failing - add more sources of that color - Inconsistent colors: Some colors have high probabilities while others are low
- Too few lands:
manaConditionfailing - increase total land count
Quick fixes
- Need more of a color: Add dual lands or basic lands of that color
- Color fixing issues: Add fetch lands or multi-color lands
- Too few lands overall: Aim for 24-26 lands in most decks (40% of deck)
- Too many colors: Focus on 2-3 main colors, splash others sparingly
Related pages
Deck building
Build and manage your MTG deck
Probability calculator
Understand probability calculations
