LackeyCCG

LackeyCCG Forum => Plugins & Plugin Creation Forum => Topic started by: CrazyChucky on December 30, 2018, 09:13:40 PM

Title: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
Post by: CrazyChucky on December 30, 2018, 09:13:40 PM
According to the tutorial (http://'http://www.lackeyccg.com/packdefinitions.html'), 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?
Title: Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
Post by: MasterJediAdam on December 31, 2018, 11:06:33 AM
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)?
Title: Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
Post by: CrazyChucky on December 31, 2018, 11:11:39 AM
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.)
Title: Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
Post by: MasterJediAdam on December 31, 2018, 11:18:48 AM
Roger. I have little experience with ISLESSTHAN or ISGREATERTHAN. I have a working pack definition that I could quickly experiment on.
Title: Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
Post by: CrazyChucky on December 31, 2018, 11:22:00 AM
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.
Title: Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
Post by: MasterJediAdam on December 31, 2018, 11:33:32 AM
This this supposed to be a randomly generated pack of cards?
Title: Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
Post by: CrazyChucky on December 31, 2018, 12:11:16 PM
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>