Author Topic: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?  (Read 208 times)

CrazyChucky

  • Full Member
  • ***
  • Posts: 157
  • MtG Plugin Maintainer
    • View Profile
packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
« on: December 30, 2018, 09:13:40 PM »
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:
Code: [Select]
<packcommoncrit><field>Number</field><eval>ISLESSTHAN</eval><data>260</data></packcommoncrit>
To troubleshoot, I tried this, which also produced zero cards:
Code: [Select]
<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

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
« Reply #1 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)?

CrazyChucky

  • Full Member
  • ***
  • Posts: 157
  • MtG Plugin Maintainer
    • View Profile
Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
« Reply #2 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:
Code: [Select]
<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

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
« Reply #3 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.

CrazyChucky

  • Full Member
  • ***
  • Posts: 157
  • MtG Plugin Maintainer
    • View Profile
Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
« Reply #4 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.

MasterJediAdam

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
« Reply #5 on: December 31, 2018, 11:33:32 AM »
This this supposed to be a randomly generated pack of cards?

CrazyChucky

  • Full Member
  • ***
  • Posts: 157
  • MtG Plugin Maintainer
    • View Profile
Re: packcommoncrits in Pack Definitions: ISLESSTHAN/ISGREATERTHAN?
« Reply #6 on: December 31, 2018, 12:11:16 PM »
Yes. For example:
Code: [Select]
<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>