diff --git a/public/src/app.js b/public/src/app.js index cd0cf7f..f1bc703 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -25,11 +25,11 @@ let App = { isPrivate: false, type: 'draft', sets: [ + 'EMN', + 'EMN', 'SOI', - 'SOI', - 'SOI', - 'SOI', - 'SOI', + 'EMN', + 'EMN', 'SOI' ], list: '', diff --git a/public/src/data.js b/public/src/data.js index 49f4245..2d632d7 100644 --- a/public/src/data.js +++ b/public/src/data.js @@ -3,6 +3,7 @@ export default { "Random Set": "RNG" }, expansion: { + "Eldritch Moon": "EMN", "Shadows Over Innistrad": "SOI", "Oath of the Gatewatch": "OGW", "Battle for Zendikar": "BFZ", diff --git a/src/make/cards.js b/src/make/cards.js index 8979a53..d9d01b8 100644 --- a/src/make/cards.js +++ b/src/make/cards.js @@ -49,23 +49,22 @@ function before() { }) var card + for (card of raw.EMN.cards) + if (card.layout === 'double-faced' || card.layout === 'meld') + card.rarity = 'special' for (card of raw.SOI.cards) if (card.layout === 'double-faced') card.rarity = 'special' - for (card of raw.ISD.cards) if (card.layout === 'double-faced') card.rarity = 'special' - for (card of raw.DGM.cards) if (/Guildgate/.test(card.name)) card.rarity = 'special' - for (card of raw.CNS.cards) if ((card.type === 'Conspiracy') || /draft/.test(card.text)) card.rarity = 'special' - for (card of raw.FRF.cards) if (card.types[0] === 'Land' && (card.name !== 'Crucible of the Spirit Dragon')) @@ -81,6 +80,39 @@ function before() { } function after() { + var {EMN} = Sets + EMN.special = { + "mythic":[ + "gisela, the broken blade", + "ulrich of the krallenhorde" + ], + "rare":[ + "voldaren pariah", + "docent of perfection", + "bruna, the fading light", + "hanweir garrison", + "hanweir battlements" + ], + "common":[ + "ulvenwald captive", + "vildin-pack outcast", + "midnight scavengers", + "graf rats" + ], + "uncommon":[ + "tangleclaw werewolf", + "shrill howler", + "conduit of storms", + "extricator of sin", + "kessig prowler", + "smoldering werewolf", + "curious homunculus", + "grizzled angler", + "lone rider", + "cryptolith fragment" + ] + } + EMN.size = 8 var {SOI} = Sets SOI.special = { "mythic": [ diff --git a/src/pool.js b/src/pool.js index 3d35363..cb967ed 100644 --- a/src/pool.js +++ b/src/pool.js @@ -26,7 +26,7 @@ function toPack(code) { if (mythic && !_.rand(8)) rare = mythic //make small sets draftable. - if (size < 9 && code != 'SOI') + if (size < 9 && code != 'SOI' && code != 'EMN') size = 10 var pack = [].concat( _.choose(size, common), @@ -43,62 +43,78 @@ function toPack(code) { pack.push(_.choose(1, special.rare)) else pack.push(_.choose(1, common)) + if (code == 'EMN') + if (_.rand(8) == 0) + if (_.rand(5) < 1) + pack.push(_.choose(1, special.mythic)) + else + pack.push(_.choose(1, special.rare)) + else + pack.push(_.choose(1, common)) + let specialrnd switch (code) { - case 'SOI': - if (_.rand(106) < 38) - special = special.uncommon - else - special = special.common - break - case 'DGM': - special = _.rand(20) - ? special.gate - : special.shock - break - case 'MMA': - special = selectRarity(set) - break - case 'MM2': - special = selectRarity(set) - break - case 'VMA': - //http://www.wizards.com/magic/magazine/article.aspx?x=mtg/daily/arcana/1491 - if (_.rand(53)) + case 'EMN': + if (_.rand(2) < 1) + special = special.uncommon + else + special = special.common + break + + case 'SOI': + if (_.rand(106) < 38) + special = special.uncommon + else + special = special.common + break + case 'DGM': + special = _.rand(20) + ? special.gate + : special.shock + break + case 'MMA': special = selectRarity(set) - break - case 'FRF': - special = _.rand(20) - ? special.common - : special.fetch - break - case 'ISD': - //http://www.mtgsalvation.com/forums/magic-fundamentals/magic-general/327956-innistrad-block-transforming-card-pack-odds?comment=4 - //121 card sheet, 1 mythic, 12 rare (13), 42 uncommon (55), 66 common - specialrnd = _.rand(121) - if (specialrnd == 0) - special = special.mythic - else if (specialrnd < 13) - special = special.rare - else if (specialrnd < 55) - special = special.uncommon - else - special = special.common - break - case 'DKA': - //http://www.mtgsalvation.com/forums/magic-fundamentals/magic-general/327956-innistrad-block-transforming-card-pack-odds?comment=4 - //80 card sheet, 2 mythic, 6 rare (8), 24 uncommon (32), 48 common - specialrnd = _.rand(80) - if (specialrnd <= 1) - special = special.mythic - else if (specialrnd < 8) - special = special.rare - else if (specialrnd < 32) - special = special.uncommon - else - special = special.common - break + break + case 'MM2': + special = selectRarity(set) + break + case 'VMA': + //http://www.wizards.com/magic/magazine/article.aspx?x=mtg/daily/arcana/1491 + if (_.rand(53)) + special = selectRarity(set) + break + case 'FRF': + special = _.rand(20) + ? special.common + : special.fetch + break + case 'ISD': + //http://www.mtgsalvation.com/forums/magic-fundamentals/magic-general/327956-innistrad-block-transforming-card-pack-odds?comment=4 + //121 card sheet, 1 mythic, 12 rare (13), 42 uncommon (55), 66 common + specialrnd = _.rand(121) + if (specialrnd == 0) + special = special.mythic + else if (specialrnd < 13) + special = special.rare + else if (specialrnd < 55) + special = special.uncommon + else + special = special.common + break + case 'DKA': + //http://www.mtgsalvation.com/forums/magic-fundamentals/magic-general/327956-innistrad-block-transforming-card-pack-odds?comment=4 + //80 card sheet, 2 mythic, 6 rare (8), 24 uncommon (32), 48 common + specialrnd = _.rand(80) + if (specialrnd <= 1) + special = special.mythic + else if (specialrnd < 8) + special = special.rare + else if (specialrnd < 32) + special = special.uncommon + else + special = special.common + break } if (special)