Page 1 of 1

Parse Oracle Text

PostPosted: 29 Oct 2009, 16:51
by mtgrares
Hi, I heard a crazy rumor that you guys actually parse the oracle text to generate the python card code? Is that correct or partly correct?

And just for my own curiousity, how many cards does Incantus have now? I'm guessing 8,000?

Re: Parse Oracle Text

PostPosted: 29 Oct 2009, 22:13
by Marek14
mtgrares wrote:Hi, I heard a crazy rumor that you guys actually parse the oracle text to generate the python card code? Is that correct or partly correct?

And just for my own curiousity, how many cards does Incantus have now? I'm guessing 8,000?
Well, it's some time since I made cards for Incantus (still waiting for new version), but there is a simple generator, which at least places (mostly correctly) blocks for activated, triggered, and static abilities. Maybe it can handle simple keywords, not sure about that.

Also, it automatically compiles the header including fields of name, types, etc.

Re: Parse Oracle Text

PostPosted: 30 Oct 2009, 17:09
by mtgrares
Thanks for answering. I try to keep track of what other projects are doing.

Re: Parse Oracle Text

PostPosted: 20 Dec 2009, 19:50
by MageKing17
mtgrares wrote:Hi, I heard a crazy rumor that you guys actually parse the oracle text to generate the python card code? Is that correct or partly correct?
It was actually that I was planning on having Incantus parse oracle text (or something like Oracle text but perhaps with extra information (like expansion symbols, for those particularly wierd cards that care about that)) automagically generating Python code, since Magic templating is rigid enough that a computer ought to be able to parse it. However, this idea never got beyond a "wouldn't it be nice" stage (although I still think a more global ability definition system would beat the hell out of our current "each card redefines every non-keyword ability over and over again" system).