packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?

Started by CrazyChucky, December 30, 2018, 09:13:40 PM

Previous topic - Next topic

CrazyChucky

According to the tutorial, a crit or commoncrit in a pack definition "can be IS, CONTAINS, DOESNTCONTAIN,ISGREATERTHAN, among others."

One would hope that "ISLESSTHAN" is included in that mysterious "among others". I want to exclude some cards from a pack definition, but this results in a completely empty pack: <packcommoncrit><field>Number</field><eval>ISLESSTHAN</eval><data>260</data></packcommoncrit>

To troubleshoot, I tried this, which also produced zero cards: <packcommoncrit><field>Number</field><eval>ISGREATERTHAN</eval><data>5</data></packcommoncrit>

Trying "DOESNTCONTAIN" returns cards just fine. Has anyone else had any luck with these?

MasterJediAdam

Are you trying to create a pack that could be drafted, or build something similar to a format (including whole sets that may or may not have exceptions)?

CrazyChucky

It's just a pack to be drafted.

Recent Magic sets have extra cards above the max collector number. They're technically in the set, but they're only available in the planeswalker decks rather than in packs.

Previous pack definitions in Lackey have simply listed each individual card to be excluded, like so:
<packcommoncrit><field>Name</field><eval>DOESNTCONTAIN</eval><data>Jace, Ingenious Mind-Mage</data></packcommoncrit>
<packcommoncrit><field>Name</field><eval>DOESNTCONTAIN</eval><data>Castaway's Despair</data></packcommoncrit>
[...]


But it would be a lot simpler if I could simply exclude cards above a certain number. (The Magic plugin doesn't currently have a "number" field, but I could easily add one, and have done so for the test build in which I'm trying this.)

MasterJediAdam

Roger. I have little experience with ISLESSTHAN or ISGREATERTHAN. I have a working pack definition that I could quickly experiment on.

CrazyChucky

Thanks for the offer! If you figure anything out, I'd much appreciate it. The pack definitions are the last bit of this plugin for me to figure out and update/rework.

MasterJediAdam

This this supposed to be a randomly generated pack of cards?

CrazyChucky

Yes. For example:
<pack>
<packtitle>Core Set 2019 Booster</packtitle>
<packkind>Booster</packkind>
<packcommoncrit><field>Set</field><eval>IS</eval><data>m19</data></packcommoncrit>
<packcommoncrit><field>Number</field><eval>ISLESSTHAN</eval><data>281</data></packcommoncrit>
<chance>
<prob>87</prob>
<kind><qty>1</qty><crit><field>Rarity</field><eval>IS</eval><data>R</data></crit></kind>
<kind><qty>3</qty><crit><field>Rarity</field><eval>IS</eval><data>U</data></crit></kind>
<kind><qty>11</qty><crit><field>Rarity</field><eval>IS</eval><data>C</data></crit></kind>
</chance>
<chance>
<prob>13</prob>
<kind><qty>1</qty><crit><field>Rarity</field><eval>IS</eval><data>M</data></crit></kind>
<kind><qty>3</qty><crit><field>Rarity</field><eval>IS</eval><data>U</data></crit></kind>
<kind><qty>11</qty><crit><field>Rarity</field><eval>IS</eval><data>C</data></crit></kind>
</chance>
</pack>