diff --git a/forge-gui/res/editions/Commander 2018.txt b/forge-gui/res/editions/Commander 2018.txt new file mode 100644 index 00000000000..a14f1977b2c --- /dev/null +++ b/forge-gui/res/editions/Commander 2018.txt @@ -0,0 +1,316 @@ +[metadata] +Code=C18 +Date=2018-08-09 +Name=Commander 2018 +Code2=C18 +MciCode=c18 +Type=Other + +[cards] +1 R Boreas Charger +2 R Empyrial Storm +3 R Heavenly Blademaster +4 U Loyal Unicorn +5 R Magus of the Balance +6 R Aminatou's Augury +7 R Echo Storm +8 R Estrid's Invocation +9 R Ever-Watching Threshold +10 U Loyal Drake +11 R Octopus Umbra +12 R Primordial Mist +13 R Vedalken Humiliator +14 R Bloodtracker +15 R Entreat the Dead +16 U Loyal Subordinate +17 R Night Incarnate +18 R Skull Storm +19 R Sower of Discord +20 R Emissary of Grudges +21 R Enchanter's Bane +22 R Fury Storm +23 U Loyal Apprentice +24 R Nesting Dragon +25 R Reality Scramble +26 R Saheeli's Directive +27 R Treasure Nabber +28 R Varchild, Betrayer of Kjeldor +29 R Crash of Rhino Beetles +30 R Genesis Storm +31 U Loyal Guardian +32 R Myth Unbound +33 R Nylea's Colossus +34 R Ravenous Slime +35 R Turntimber Sower +36 R Whiptongue Hydra +37 M Aminatou, the Fateshifter +38 R Arixmethes, Slumbering Isle +39 M Brudiclad, Telchor Engineer +40 M Estrid, the Masked +41 M Gyrus, Waker of Corpses +42 M Kestia, the Cultivator +43 M Lord Windgrace +44 M Saheeli, the Gifted +45 M Tawnos, Urza's Apprentice +46 M Thantis the Warweaver +47 M Tuvasa the Sunlit +48 M Varina, Lich Queen +49 R Windgrace's Judgment +50 R Xantcha, Sleeper Agent +51 M Yennet, Crypt Sovereign +52 R Yuriko, the Tiger's Shadow +53 R Ancient Stone Idol +54 R Coveted Jewel +55 R Endless Atlas +56 U Geode Golem +57 R Retrofitter Foundry +58 C Forge of Heroes +59 R Isolated Watchtower +60 R Adarkar Valkyrie +61 R Ajani's Chosen +62 R Akroma's Vengeance +63 U Banishing Stroke +64 R Celestial Archon +65 U Crib Swap +66 C Dismantling Blow +67 M Entreat the Angels +68 U Lightform +69 R Martial Coup +70 R Phyrexian Rebirth +71 U Return to Dust +72 U Sage's Reverie +73 M Serra Avatar +74 R Sigil of the Empty Throne +75 R Silent Sentinel +76 U Soul Snare +77 R Terminus +78 U Unquestioned Authority +79 R Winds of Rath +80 R Aether Gale +81 U Archetype of Imagination +82 U Brainstorm +83 U Cloudform +84 R Conundrum Sphinx +85 R Devastation Tide +86 R Dictate of Kruphix +87 R Djinn of Wishes +88 C Dream Cache +89 C Eel Umbra +90 C Etherium Sculptor +91 R Inkwell Leviathan +92 C Into the Roil +93 R Jeskai Infiltrator +94 U Mulldrifter +95 C Ninja of the Deep Hours +96 C Ponder +97 C Portent +98 U Predict +99 U Reverse Engineer +100 R Saheeli's Artistry +101 R Sharding Sphinx +102 U Sigiled Starfish +103 R Sphinx of Jwar Isle +104 R Sphinx of Uthuun +105 C Telling Time +106 U Thirst for Knowledge +107 R Thopter Spy Network +108 U Tidings +109 C Treasure Hunt +110 U Vow of Flight +111 U Whirler Rogue +112 U Whitewater Naiads +113 M Army of the Damned +114 R Moonlight Bargain +115 R Phyrexian Delver +116 U Retreat to Hagra +117 R Ruinous Path +118 M Soul of Innistrad +119 U Stitch Together +120 R Blasphemous Act +121 R Chain Reaction +122 R Chaos Warp +123 R Flameblast Dragon +124 R Hellkite Igniter +125 R Magmaquake +126 U Thopter Engineer +127 U Acidic Slime +128 C Aura Gnarlid +129 M Avenger of Zendikar +130 U Baloth Woodcrasher +131 R Bear Umbra +132 R Boon Satyr +133 C Borderland Explorer +134 R Budoka Gardener // Dokai, Weaver of Life +135 R Centaur Vinecrasher +136 U Consign to Dust +137 R Creeping Renaissance +138 C Cultivate +139 C Dawn's Reflection +140 R Eidolon of Blossoms +141 R Enchantress's Presence +142 R Epic Proportions +143 C Explore +144 U Explosive Vegetation +145 C Far Wanderings +146 C Farhaven Elf +147 C Fertile Ground +148 C Grapple with the Past +149 R Ground Seal +150 C Harrow +151 R Herald of the Pantheon +152 U Hunting Wilds +153 M Hydra Omnivore +154 C Khalni Heart Expedition +155 C Kruphix's Insight +156 R Moldgraf Monstrosity +157 C Overgrowth +158 R Rampaging Baloths +159 U Reclamation Sage +160 C Sakura-Tribe Elder +161 R Scute Mob +162 C Snake Umbra +163 R Spawning Grounds +164 U Vow of Wildness +165 C Wild Growth +166 C Yavimaya Elder +167 C Yavimaya Enchantress +168 R Aethermage's Touch +169 U Bant Charm +170 M Bruna, Light of Alabaster +171 R Charnelhoard Wurm +172 R Cold-Eyed Selkie +173 R Daxos of Meletis +174 U Deathreap Ritual +175 R Decimate +176 R Duskmantle Seer +177 R Elderwood Scion +178 R Enigma Sphinx +179 U Esper Charm +180 R Finest Hour +181 R Gaze of Granite +182 C Grisly Salvage +183 R High Priest of Penance +184 R Lavalanche +185 U Maverick Thopterist +186 U Mortify +187 U Putrefy +188 R Righteous Authority +189 R Rubblehulk +190 U Savage Twister +191 R Silent-Blade Oni +192 U Unflinching Courage +193 R Utter End +194 R Worm Harvest +195 U Zendikar Incarnate +196 U Azorius Signet +197 R Blinkmoth Urn +198 R Bosh, Iron Golem +199 U Chief of the Foundry +200 C Commander's Sphere +201 U Crystal Ball +202 R Darksteel Juggernaut +203 U Dimir Signet +204 U Dreamstone Hedron +205 R Duplicant +206 U Hedron Archive +207 U Izzet Signet +208 U Magnifying Glass +209 R Mimic Vat +210 C Mind Stone +211 R Mirrorworks +212 R Myr Battlesphere +213 C Orzhov Signet +214 C Pilgrim's Eye +215 U Prismatic Lens +216 R Prototype Portal +217 R Psychosis Crawler +218 U Scrabbling Claws +219 R Scuttling Doom Engine +220 C Seer's Lantern +221 R Seer's Sundial +222 U Sol Ring +223 M Soul of New Phyrexia +224 R Steel Hellkite +225 U Swiftfoot Boots +226 R Thopter Assembly +227 U Unstable Obelisk +228 R Unwinding Clock +229 U Vessel of Endless Rest +230 U Worn Powerstone +231 U Akoum Refuge +232 U Arcane Sanctum +233 U Azorius Chancery +234 C Azorius Guildgate +235 C Barren Moor +236 U Blighted Woodland +237 C Blossoming Sands +238 C Bojuka Bog +239 U Buried Ruin +240 C Command Tower +241 U Darksteel Citadel +242 U Dimir Aqueduct +243 C Dimir Guildgate +244 C Dismal Backwater +245 C Evolving Wilds +246 C Forgotten Cave +247 U Forsaken Sanctuary +248 U Foundry of the Consuls +249 U Golgari Rot Farm +250 C Great Furnace +251 R Grim Backwoods +252 U Gruul Turf +253 C Halimar Depths +254 C Haunted Fengraf +255 U Highland Lake +256 U Izzet Boilerworks +257 C Izzet Guildgate +258 C Jund Panorama +259 C Jungle Hollow +260 U Jwar Isle Refuge +261 U Kazandu Refuge +262 C Khalni Garden +263 U Krosan Verge +264 C Lonely Sandbar +265 U Meandering River +266 C Mortuary Mire +267 R Mosswort Bridge +268 U Mountain Valley +269 U Myriad Landscape +270 U New Benalia +271 U Orzhov Basilica +272 C Orzhov Guildgate +273 C Rakdos Carnarium +274 U Rocky Tar Pit +275 U Savage Lands +276 C Scoured Barrens +277 U Seaside Citadel +278 C Seat of the Synod +279 C Secluded Steppe +280 U Sejiri Refuge +281 C Selesnya Sanctuary +282 U Simic Growth Chamber +283 U Submerged Boneyard +284 C Swiftwater Cliffs +285 U Temple of the False God +286 C Terramorphic Expanse +287 C Thornwood Falls +288 C Tranquil Cove +289 U Tranquil Expanse +290 C Tranquil Thicket +291 C Warped Landscape +292 C Woodland Stream +293 L Plains +294 L Plains +295 L Plains +296 L Island +297 L Island +298 L Island +299 L Swamp +300 L Swamp +301 L Swamp +302 L Mountain +303 L Mountain +304 L Mountain +305 L Forest +306 L Forest +307 L Forest \ No newline at end of file diff --git a/forge-gui/tools/scryfallEditionParser.sh b/forge-gui/tools/scryfallEditionParser.sh new file mode 100644 index 00000000000..5a321da5a53 --- /dev/null +++ b/forge-gui/tools/scryfallEditionParser.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +declare -A types +types=( ["commander"]="Other" ["core"]="Core") +declare -A rarities +rarities=( ["mythic"]="M" ["rare"]="R" ["uncommon"]="U" ["common"]="C" ["rare"]="R" ) + +setname=$1 +wget -q -O /tmp/setinfo.json "https://api.scryfall.com/sets/$setname?format=json" +wget "https://api.scryfall.com/cards/search?order=set&unique=art&q=set%3D$setname" -q -O /tmp/set.json + +cat /tmp/set.json | jq ".data | .[].collector_number" | sed "s/\"//g" > /tmp/cardidlist + +hasmore=`cat /tmp/set.json | jq ".has_more" | sed "s/\"//g"` +nextpage=`cat /tmp/set.json | jq ".next_page" | sed "s/\"//g"` +while [ $hasmore ] ; do + sleep 0.01 + wget "$nextpage" -q -O /tmp/next.json + cat /tmp/next.json | jq ".data | .[].collector_number" | sed "s/\"//g" >> /tmp/cardidlist + hasmore=`cat /tmp/next.json | jq ".has_more" | sed "s/\"//g"` + nextpage=`cat /tmp/next.json | jq ".next_page" | sed "s/\"//g"` +done + + +cardIDs=($(cat /tmp/cardidlist)) + +sleep 0.1 + +echo "[metadata]" +code=`echo "$1" | awk '{print toupper($0)}'` +dateReleased=`cat /tmp/setinfo.json | jq ".released_at" | sed "s/\"//g"` +name=`cat /tmp/setinfo.json | jq ".name" | sed "s/\"//g"` +echo "Code=$code" +echo "Date=$dateReleased" +echo "Name=$name" +echo "Code2=$code" +echo "MciCode=$1" +echo "Type=Other" +echo "" +echo "[cards]" +for i in "${cardIDs[@]}" +do + sleep 0.01 + wget -q -O /tmp/$i.json "https://api.scryfall.com/cards/$setname/$i?format=json" + name=`cat /tmp/$i.json | jq .name | sed "s/\"//g"` + basiclandtype=`cat /tmp/$i.json | jq .type_line | sed "s/\"//g" | grep "Basic Land" | wc -l` + if [ $basiclandtype -gt 0 ]; then + rarity="L" + else + rarityString=`cat /tmp/$i.json | jq .rarity | sed "s/\"//g"` + rarity=${rarities[$rarityString]} + fi + cnumber=`cat /tmp/$i.json | jq .collector_number | sed "s/\"//g"` + echo "$cnumber $rarity $name" + + +done \ No newline at end of file