Skip to content

Latest commit

 

History

History
97 lines (81 loc) · 2.24 KB

File metadata and controls

97 lines (81 loc) · 2.24 KB

Usage

This page will show you how to run this simulation tool on your own custom decklists and objectives.

Examples

Please consult the fixtures directory for working examples of each data structure.

Requirements

  • go 1.22
  • Decklist
  • Test Objective
  • Game Configuration

Defining a Decklist

This simulation primarily works on the concept of "lands" which produce mana and "nonlands" which do not. MTG has many different nonlands (artifacts, creatures, etc) which produce mana but these are currently "out of scope" for the current release. Using this simulation in its current form requires a user to define a JSON decklist with the lands and non-lands separated. These will then be converted into an instance of a Deck during the simulation and tested against.

Sample Lotus Field decklist can be found here.

Lands

The current land structure is documented here.

NOTE: untappedCondition and activationCost are optional and are not currently used. It is recommended at this time to leave them out.

Sample

{
  "name": "Steam Vents",
  "colors":  ["red", "blue"],
  "entersTapped":  true,
  "untappedCondition": {
    "type": "ShockLand"
  },
  "activationCost":  {
    "life": 3,
    "manaCost": {
      "colorRequirements": ["white", "white"],
      "genericCost": 1
    }
  },
  "quantity":  2
}

Non-Lands

The current non-land structure is documented here.

{
  "name": "Llanowar Elves",
  "castingCost": [
    {
      "colorRequirements": ["white", "white", "white"],
      "genericCost": 1
    }
  ],
  "quantity":  34
}

Defining a Test Objective

The current test objective structure is documented here.

Example

{
  "targetTurn": 3,
  "manaCosts": [
    {
      "colorRequirements": ["white", "white"],
      "genericCost": 1
    }
  ]
}

Defining a Game Configuration

The current test objective structure is documented here.

Example

{
  "initialHandSize": 7,
  "cardsDrawnPerTurn": 1,
  "onThePlay": true
}

Running the Simulation

To run the simulation, you will need to have Go 1.22 and make installed.

make run