It is currently 05 Apr 2020, 14:04
   
Text Size

Magic Data

General Discussion of the Intricacies

Moderator: CCGHQ Admins

Re: Magic Data

Postby Marek14 » 21 Jul 2010, 10:47

The list is still about as short as full list of land types :)
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby Marek14 » 23 Jul 2010, 21:57

It seems that the Ongoing Schemes have an empty line in the latest version.
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby Arch » 26 Jul 2010, 08:15

So it does. Will fix in next release.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Marek14 » 26 Jul 2010, 14:52

Dovescape has an empty line as well...

...and Selesnya Guildmage and Spectral Procession.

Utopia Sprawl has not only an empty line, but actual missing text.

The land type "Urza's" is written as "Urza’s"
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby Arch » 26 Jul 2010, 19:24

Good finds Marek. There was regexp that was a little to specific which caused rules containing parentheses to be omitted. I also escaped the tick in the typeline for Urza's and made a minor fix to hybrid mana. All in all affecting some 100-150 cards.

ZIP

I also put up the source for the parser at http://github.com/karmag/loa
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby rocketnia » 02 Aug 2010, 15:19

Thanks a lot for showing the code. :) I've been casually porting it to Arc just to help myself search the data and build some decks. I'd fork your code on GitHub, but there's no open-source license, so even if I get your permission, I'm not sure what restrictions you might like me to place on my own sharing of the code. :?

Anyway, Balduvian Shaman, which is sorta unique in that it has two pieces of reminder text in one ability, is being treated in the XML as though the last part of that ability's rules text is part of the reminder text:

Code: Select all
<rule reminder="For example, you may change &quot;counters black spells&quot; to &quot;counters blue spells.&quot;) That enchantment gains &quot;Cumulative upkeep {1}.&quot; (At the beginning of its controller&apos;s upkeep, that player puts an age counter on it, then sacrifices it unless he or she pays its upkeep cost for each age counter on it.">{T}: Change the text of target white enchantment you control that doesn&apos;t have cumulative upkeep by replacing all instances of one color word with another.</rule>
User avatar
rocketnia
 
Posts: 4
Joined: 29 Sep 2009, 00:23
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby Arch » 02 Aug 2010, 19:10

rocketnia wrote:Thanks a lot for showing the code. :) I've been casually porting it to Arc just to help myself search the data and build some decks. I'd fork your code on GitHub, but there's no open-source license, so even if I get your permission, I'm not sure what restrictions you might like me to place on my own sharing of the code. :?
Always nice to see some more lisp.

Never liked licenses, especially the ones that use five pages to specify how free the code is. I do understand why you might need them though. I added a license.txt with the WTFPL license since it's the best I know of.

rocketnia wrote:Anyway, Balduvian Shaman, which is sorta unique in that it has two pieces of reminder text in one ability, is being treated in the XML as though the last part of that ability's rules text is part of the reminder text:
Thanks for reporting. That's a pretty tricky problem to solve given the current structure of the data. Chances are I'm going to leave the first reminder text in the rule and just extract the second one, or just delete it. We'll see...

There are actually a couple of rules that have reminder text that I've choosen to leave as they were. "in addition to the mana the land produces" specifically as it doesn't really make sense as a stand-alone reminder text. (Just noticed that Transguild Courier and Mistform Ultimus have similar reminders.)
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Marek14 » 07 Aug 2010, 19:59

Seems that the Oracle changes are now up.
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby Arch » 08 Aug 2010, 08:08

Updated

Balduvian Shaman has not been fixed yet.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby rocketnia » 09 Aug 2010, 15:03

Well, porting your code to Arc wasn't as simple as I expected, and I've basically lost interest. Clojure has proper namespaces, and I haven't come up with a good way to translate lazy seqs and agents to idiomatic Arc. I'd also have to get my hands on a comparable lazy XML library, and once I have that set up, I think I'd rather just parse your XML files directly. :-p Doing this has at least given me a much better understanding of Clojure, so thanks for that. ^_^

I wonder if you've considered doing searches for all the cards at once rather than all the cards from each set. The URLs I'm thinking of are just the same as what you have, but with name=[m/^/] instead of set=["whatever"]. If two predefined URLs are sufficient, that'll probably simplify the code quite a bit. On the other hand, a 25+ MB HTML page might be cumbersome.
User avatar
rocketnia
 
Posts: 4
Joined: 29 Sep 2009, 00:23
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby Arch » 09 Aug 2010, 18:12

rocketnia wrote:Well, porting your code to Arc wasn't as simple as I expected, and I've basically lost interest. Clojure has proper namespaces, and I haven't come up with a good way to translate lazy seqs and agents to idiomatic Arc. I'd also have to get my hands on a comparable lazy XML library, and once I have that set up, I think I'd rather just parse your XML files directly. :-p Doing this has at least given me a much better understanding of Clojure, so thanks for that. ^_^
Yeah, introducting lazyness into a language that does not intrinsically support it is probably going to be hard - or not pretty. Clojure's lazyness is bootstrapped in java. On the other hand neither lazy nor agents are needed. I don't use them for anything fundamental in the program and you could easily get away with not using such constructs. The problem might rather be that I'm using additional clojure libraries (for lazy-xml and fetching urls amongst others) which would increase the workload quite significantly unless equivilent functionality exists.

rocketnia wrote:I wonder if you've considered doing searches for all the cards at once rather than all the cards from each set. The URLs I'm thinking of are just the same as what you have, but with name=[m/^/] instead of set=["whatever"]. If two predefined URLs are sufficient, that'll probably simplify the code quite a bit. On the other hand, a 25+ MB HTML page might be cumbersome.
Have not thought about that before. The reason it is the way it is now is because at the time it felt like the most natural way of working with it, set by set. Doing one search would remove a bunch of duplicate work that's being done right now with parsing reoccuring cards multiple times. The filesize shouldn't have much impact, I'll just have to implement it and try it out.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby Marek14 » 14 Aug 2010, 06:06

From the Vault: Relic is now on the Gatherer.
Marek14
Tester
 
Posts: 2674
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 268 times

Re: Magic Data

Postby Arch » 14 Aug 2010, 08:47

ZIP

Only change is adding of FTV: Relics.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

Re: Magic Data

Postby atastypie » 05 Sep 2010, 01:56

Fantastic work here Arch. Giving it away is pretty awesome. Really appreciate it, you're really helping the MTG community with this.

I just wanted to post that it appears unglued and unhinged are not included--at least, not in mtg-data-2010-08-14.zip. I haven't gone back in the past to see if they exist in older releases.
atastypie
 
Posts: 2
Joined: 05 Sep 2010, 01:53
Has thanked: 0 time
Been thanked: 0 time

Re: Magic Data

Postby Arch » 05 Sep 2010, 11:23

Thanks.

Unglued/hinged are not included because they require extra work to properly fit in with the rest of the data. (Such as BFM, 0.5 mana/pow-tgh creatures, Atinlay Igpay.) It not really that hard to fix, I just have more interesting things to play around with. Also since Marek is the only one I know that use the data and he doesn't seem to mind I've had no real incentive to fix it.

If anyone really wants this just make a post.
User avatar
Arch
Programmer
 
Posts: 206
Joined: 04 Jul 2009, 09:35
Has thanked: 0 time
Been thanked: 15 times

PreviousNext

Return to Magic Rules Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest


Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (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 1 guest

Login Form