Skip to content
This repository has been archived by the owner on May 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #7 from tritoch/EMN
Browse files Browse the repository at this point in the history
EMN
  • Loading branch information
dev-id authored Jul 17, 2016
2 parents f5cacea + b15135a commit b49a246
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 61 deletions.
8 changes: 4 additions & 4 deletions public/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ let App = {
isPrivate: false,
type: 'draft',
sets: [
'EMN',
'EMN',
'SOI',
'SOI',
'SOI',
'SOI',
'SOI',
'EMN',
'EMN',
'SOI'
],
list: '',
Expand Down
1 change: 1 addition & 0 deletions public/src/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
40 changes: 36 additions & 4 deletions src/make/cards.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand All @@ -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": [
Expand Down
122 changes: 69 additions & 53 deletions src/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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)
Expand Down

0 comments on commit b49a246

Please sign in to comment.