It is currently 08 Apr 2020, 21:15
   
Text Size

Magic Data

General Discussion of the Intricacies

Moderator: CCGHQ Admins

Re: Magic Data

Postby friarsol » 09 Nov 2015, 04:19

Thanks for the hardwork over the years Arch. Good luck on your next projects.
friarsol
Global Moderator
 
Posts: 7516
Joined: 15 May 2010, 04:20
Has thanked: 242 times
Been thanked: 945 times

Re: Magic Data

Postby Marek14 » 10 Nov 2015, 09:05

OK, until someone continues the project, I'll provide some basic service.

This file is modified by hand and has some problems, but it should have all missing set codes fixed and has C15 cards inputted.
Attachments
mtg-data_per.zip
(687.2 KiB) Downloaded 290 times
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby icePatronus » 17 Nov 2015, 15:01

Thanks for everything Arch!
I've been using your database for a homebrew MagicSimulator for the last years. Therefore I'm considering to take a look into your Code although I have no clue of Clojure yet. At least I managed to compile and run it^^
icePatronus
 
Posts: 2
Joined: 17 Nov 2015, 14:51
Has thanked: 1 time
Been thanked: 0 time

Re: Magic Data

Postby icePatronus » 28 Jan 2016, 14:23

I think I managed to update the tool for Oath of the Gatewatch. Only had to the Colorless symbol which is abbreviated {C}.

Updated english-only version:
Attachments
mtg-data-2016-01-28.zip
(1.22 MiB) Downloaded 245 times
icePatronus
 
Posts: 2
Joined: 17 Nov 2015, 14:51
Has thanked: 1 time
Been thanked: 0 time

Re: Magic Data

Postby Marek14 » 28 Jan 2016, 14:45

Here's my updated text list:
Attachments
mtg-data_per.zip
(702.34 KiB) Downloaded 229 times
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby Max mtg » 23 Feb 2016, 23:22

icePatronus wrote:I think I managed to update the tool for Oath of the Gatewatch. Only had to the Colorless symbol which is abbreviated {C}.

Updated english-only version:
Thanks for keeping it up!

Unfortunatelly, release date and set names are missing for Commander 2015, Expeditions, a new duel decks and FTV sets.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: Magic Data

Postby Marek14 » 20 Apr 2016, 07:38

My hand-updated text list: contains Blessed vs. Cursed, Shadows over Innistrad and Welcome 2016.
Attachments
mtg-data_per.zip
(717.28 KiB) Downloaded 222 times
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby chandra90 » 09 May 2016, 21:38

Plasm Capture still does not work
chandra90
 
Posts: 3
Joined: 09 May 2016, 21:16
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby Marek14 » 10 May 2016, 05:15

chandra90 wrote:Plasm Capture still does not work
Where?
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby chandra90 » 10 May 2016, 08:39

In manalink during creation a deck
chandra90
 
Posts: 3
Joined: 09 May 2016, 21:16
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby Marek14 » 10 May 2016, 08:49

chandra90 wrote:In manalink during creation a deck
Then you should post that in Manalink forums.
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby silly freak » 12 Feb 2017, 16:16

Quick question: how is the current demand for a new structured source of Card Data? It's been over a year and the world is still spinning, so if everyone's fine, I don't want to put too much effort into it.

Anyway, I have some results to show already ;)

  • I'm not trying to be compatible with Arch's format (for one thing, I'm serializing to JSON).
  • Most likely I won't maintain actual periodic data dumps, but I like working on my software, so I can maintain the downloader to keep up with Gatherer changes. If someone would actually make the regular dumps, I'm happy to coordinate.
  • For now it's just Oracle data. When there's interest, I would add printings (card variants such as Brothers Yamazaki; Sets, Card Numbers & Rarities; Artists). Personally, I don't find printed text as interesting though (other languages, non-Oracle original wordings, flavor text).
  • I try to avoid duplication in the data; other than that, I'm open for format changes.

Here's what my data looks for a few edge case cards (Leveler cards are not cleaned up yet):

Code: Select all
[
  {
    "front": {
      "layout": "simple",
      "name": "Forest",
      "type_line": {
        "types": [
          "Land"
        ],
        "supertypes": [
          "Basic"
        ],
        "subtypes": [
          "Forest"
        ]
      },
      "text_box": [
        "G"
      ]
    }
  },
  {
    "front": {
      "layout": "split",
      "faces": [
        {
          "layout": "simple",
          "name": "Battery",
          "mana_cost": "{3}{G}",
          "type_line": {
            "types": [
              "Sorcery"
            ],
            "supertypes": [],
            "subtypes": []
          },
          "text_box": [
            "Create a 3/3 green Elephant creature token."
          ]
        },
        {
          "layout": "simple",
          "name": "Assault",
          "mana_cost": "{R}",
          "type_line": {
            "types": [
              "Sorcery"
            ],
            "supertypes": [],
            "subtypes": []
          },
          "text_box": [
            "Assault deals 2 damage to target creature or player."
          ]
        }
      ]
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Extricator of Sin",
      "mana_cost": "{2}{W}",
      "type_line": {
        "types": [
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Human",
          "Cleric"
        ]
      },
      "text_box": [
        "When Extricator of Sin enters the battlefield, you may sacrifice another permanent. If you do, create a 3/2 colorless Eldrazi Horror creature token.",
        "Delirium \u2014 At the beginning of your upkeep, if there are four or more card types among cards in your graveyard, transform Extricator of Sin."
      ],
      "power": 0,
      "toughness": 3
    },
    "back": {
      "layout": "simple",
      "name": "Extricator of Flesh",
      "type_line": {
        "types": [
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Eldrazi",
          "Horror"
        ]
      },
      "text_box": [
        "Eldrazi you control have vigilance.",
        "{2}, {T}, Sacrifice a non-Eldrazi creature: Create a 3/2 colorless Eldrazi Horror creature token."
      ],
      "power": 3,
      "toughness": 5
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Gisela, the Broken Blade",
      "mana_cost": "{2}{W}{W}",
      "type_line": {
        "types": [
          "Creature"
        ],
        "supertypes": [
          "Legendary"
        ],
        "subtypes": [
          "Horror",
          "Angel"
        ]
      },
      "text_box": [
        "Flying, first strike, lifelink",
        "At the beginning of your end step, if you both own and control Gisela, the Broken Blade and a creature named Bruna, the Fading Light, exile them, then meld them into Brisela, Voice of Nightmares."
      ],
      "power": 4,
      "toughness": 3
    },
    "back": {
      "layout": "simple",
      "name": "Brisela, Voice of Nightmares",
      "type_line": {
        "types": [
          "Creature"
        ],
        "supertypes": [
          "Legendary"
        ],
        "subtypes": [
          "Eldrazi",
          "Angel"
        ]
      },
      "text_box": [
        "Flying, first strike, vigilance, lifelink",
        "Your opponents can't cast spells with converted mana cost 3 or less."
      ],
      "power": 9,
      "toughness": 10
    },
    "meld_half_top": true
  },
  {
    "front": {
      "layout": "flip",
      "normal": {
        "name": "Bushi Tenderfoot",
        "mana_cost": "{W}",
        "type_line": {
          "types": [
            "Creature"
          ],
          "supertypes": [],
          "subtypes": [
            "Human",
            "Soldier"
          ]
        },
        "text_box": [
          "When a creature dealt damage by Bushi Tenderfoot this turn dies, flip Bushi Tenderfoot."
        ],
        "power": 1,
        "toughness": 1
      },
      "flipped": {
        "name": "Kenzo the Hardhearted",
        "type_line": {
          "types": [
            "Creature"
          ],
          "supertypes": [
            "Legendary"
          ],
          "subtypes": [
            "Human",
            "Samurai"
          ]
        },
        "text_box": [
          "Double strike; bushido 2 (Whenever this creature blocks or becomes blocked, it gets +2/+2 until end of turn.)"
        ],
        "power": 3,
        "toughness": 4
      }
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Brimstone Mage",
      "mana_cost": "{2}{R}",
      "type_line": {
        "types": [
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Human",
          "Shaman"
        ]
      },
      "text_box": [
        "Level up {3}{R} ({3}{R}: Put a level counter on this. Level up only as a sorcery.)",
        "LEVEL 1-2",
        "2/3",
        "{T}: Brimstone Mage deals 1 damage to target creature or player.",
        "LEVEL 3+",
        "2/4",
        "{T}: Brimstone Mage deals 3 damage to target creature or player."
      ],
      "power": 2,
      "toughness": 2
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Transguild Courier",
      "mana_cost": "{4}",
      "color_indicator": [
        "Black",
        "Red",
        "Blue",
        "White",
        "Green"
      ],
      "type_line": {
        "types": [
          "Artifact",
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Golem"
        ]
      },
      "power": 3,
      "toughness": 3
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Darksteel Colossus",
      "mana_cost": "{11}",
      "type_line": {
        "types": [
          "Artifact",
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Golem"
        ]
      },
      "text_box": [
        "Trample, indestructible",
        "If Darksteel Colossus would be put into a graveyard from anywhere, reveal Darksteel Colossus and shuffle it into its owner's library instead."
      ],
      "power": 11,
      "toughness": 11
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Advice from the Fae",
      "mana_cost": "{2/U}{2/U}{2/U}",
      "type_line": {
        "types": [
          "Sorcery"
        ],
        "supertypes": [],
        "subtypes": []
      },
      "text_box": [
        "({2/U} can be paid with any two mana or with {U}. This card's converted mana cost is 6.)",
        "Look at the top five cards of your library. If you control more creatures than each other player, put two of those cards into your hand. Otherwise, put one of them into your hand. Then put the rest on the bottom of your library in any order."
      ]
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Fire-Lit Thicket",
      "type_line": {
        "types": [
          "Land"
        ],
        "supertypes": [],
        "subtypes": []
      },
      "text_box": [
        "{T}: Add {C} to your mana pool.",
        "{R/G}, {T}: Add {R}{R}, {R}{G}, or {G}{G} to your mana pool."
      ]
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Gilder Bairn",
      "mana_cost": "{1}{G/U}{G/U}",
      "type_line": {
        "types": [
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Ouphe"
        ]
      },
      "text_box": [
        "{2}{G/U}, {Q}: Double the number of each kind of counter on target permanent. ({Q} is the untap symbol.)"
      ],
      "power": 1,
      "toughness": 3
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Blinding Souleater",
      "mana_cost": "{3}",
      "type_line": {
        "types": [
          "Artifact",
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Cleric"
        ]
      },
      "text_box": [
        "{W/P}, {T}: Tap target creature. ({W/P} can be paid with either {W} or 2 life.)"
      ],
      "power": 1,
      "toughness": 3
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Rage Extractor",
      "mana_cost": "{4}{R/P}",
      "type_line": {
        "types": [
          "Artifact"
        ],
        "supertypes": [],
        "subtypes": []
      },
      "text_box": [
        "({R/P} can be paid with either {R} or 2 life.)",
        "Whenever you cast a spell with {P} in its mana cost, Rage Extractor deals damage equal to that spell's converted mana cost to target creature or player."
      ]
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Chandra, Pyromaster",
      "mana_cost": "{2}{R}{R}",
      "type_line": {
        "types": [
          "Planeswalker"
        ],
        "supertypes": [],
        "subtypes": [
          "Chandra"
        ]
      },
      "text_box": [
        "+1: Chandra, Pyromaster deals 1 damage to target player and 1 damage to up to one target creature that player controls. That creature can't block this turn.",
        "0: Exile the top card of your library. You may play it this turn.",
        "\u22127: Exile the top ten cards of your library. Choose an instant or sorcery card exiled this way and copy it three times. You may cast the copies without paying their mana costs."
      ],
      "loyalty": 4
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Chandra, Flamecaller",
      "mana_cost": "{4}{R}{R}",
      "type_line": {
        "types": [
          "Planeswalker"
        ],
        "supertypes": [],
        "subtypes": [
          "Chandra"
        ]
      },
      "text_box": [
        "+1: Create two 3/1 red Elemental creature tokens with haste. Exile them at the beginning of the next end step.",
        "0: Discard all the cards in your hand, then draw that many cards plus one.",
        "\u2212X: Chandra, Flamecaller deals X damage to each creature."
      ],
      "loyalty": 4
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Tarmogoyf",
      "mana_cost": "{1}{G}",
      "type_line": {
        "types": [
          "Creature"
        ],
        "supertypes": [],
        "subtypes": [
          "Lhurgoyf"
        ]
      },
      "text_box": [
        "Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1."
      ],
      "power": "*",
      "toughness": "1+*"
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Sanctum of Serra",
      "type_line": {
        "types": [
          "Plane"
        ],
        "supertypes": [],
        "subtypes": [
          "Serra\u2019s Realm"
        ]
      },
      "text_box": [
        "When you planeswalk away from Sanctum of Serra, destroy all nonland permanents.",
        "Whenever you roll {CHAOS}, you may have your life total become 20."
      ]
    }
  },
  {
    "front": {
      "layout": "simple",
      "name": "Arcbound Overseer Avatar",
      "type_line": {
        "types": [
          "Vanguard"
        ],
        "supertypes": [],
        "subtypes": []
      },
      "text_box": [
        "At the beginning of your upkeep, you may put a +1/+1 counter on target creature you control.",
        "At the beginning of your upkeep, you may put a charge counter on target permanent you control."
      ],
      "hand_modifier": 0,
      "life_modifier": 3
    }
  }
]
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: Magic Data

Postby randian » 12 Feb 2017, 18:52

silly freak wrote:Quick question: how is the current demand for a new structured source of Card Data? It's been over a year and the world is still spinning, so if everyone's fine, I don't want to put too much effort into it.
I've been missing it a lot. What you have looks good. You have some spurious unicode in your data that should be cleaned up. I prefer UTF-8.
randian
 
Posts: 15
Joined: 05 Jun 2012, 17:30
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby Arcanist » 13 Feb 2017, 10:22

silly freak wrote:Quick question: how is the current demand for a new structured source of Card Data? It's been over a year and the world is still spinning, so if everyone's fine, I don't want to put too much effort into it.
I was using the data available in this thread originally, but I switched to MtGJSON at some point because parsing flat text files was very error prone. The JSON format offers more reliability so that I don't have to second guess the data I extract from the files.

MtGJSON's files have a few issues: They don't cover everything and there are a few errors here and there, but overall the quality is pretty good overall. Could you elaborate which information you think those files are missing, and that your data source would contain?
Arcanist
 
Posts: 73
Joined: 20 Jun 2015, 20:12
Has thanked: 7 times
Been thanked: 10 times

Re: Magic Data

Postby silly freak » 13 Feb 2017, 11:49

Arcanist wrote:Could you elaborate which information you think those files are missing, and that your data source would contain?
I wasn't aware of MtGJSON; I enjoy writing the software, but currently have no use for the data myself, so I didn't search for other data sources. So as there's a good data source already (definitely more comprehensive than I intended to provide), I'll spare myself the work of making this "production ready". Thanks for pointing that out!
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

PreviousNext

Return to Magic Rules Engine Programming

Who is online

Users browsing this forum: No registered users and 10 guests


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 1371 on 09 Feb 2020, 16:22

Users browsing this forum: No registered users and 10 guests

Login Form