
############################################################## Card pack types

pack type:
	name: basic land
	select: cyclic
	filter: card.rarity == "basic land" and not is_token_card() # can be shifted
pack type:
	name: common
	filter: card.rarity == "common" and not is_token_card() and not is_shifted_card()
pack type:
	name: uncommon
	filter: card.rarity == "uncommon" and not is_token_card() and not is_shifted_card()
pack type:
	name: rare
	filter: card.rarity == "rare" and not is_token_card() and not is_shifted_card()
pack type:
	name: mythic rare
	filter: card.rarity == "mythic rare" and not is_token_card() and not is_shifted_card()
pack type:
	name: special
	filter: card.rarity == "special" and not is_token_card() # can be shifted

pack type:
	name: shifted common
	filter: card.rarity == "common" and not is_token_card() and is_shifted_card()
pack type:
	name: shifted uncommon
	filter: card.rarity == "uncommon" and not is_token_card() and is_shifted_card()
pack type:
	name: shifted rare
	filter:
		( card.rarity == "rare" or
		  card.rarity == "mythic rare" # We've got to put shifted mythic rares somewhere
		) and not is_token_card() and is_shifted_card()

pack type:
	name: token / rulestip
	filter: is_token_card()

############################################################## shifted/special if possible

# shifted common if they exist, otherwise a normal common
pack type:
	name: shifted common or else common
	selectable: false
	select: first
	item: shifted common
	item: common

# basic land if it exist, otherwise a common
pack type:
	name: basic land or else common
	selectable: false
	select: first
	item: basic land
	item: common

# special if it exist, otherwise a common
pack type:
	name: special or else common
	selectable: false
	select: first
	item: special
	item: common

# shifted uncommon/rare if they exist, otherwise a normal uncommon
pack type:
	name: shifted uncommon or rare or else uncommon
	selectable: false
	select: first
	item: shifted uncommon or rare
	item: uncommon

############################################################## Randomized selections

pack type:
	name: mythic rare or rare
	selectable: false
	# In Shards of Alara there are 15 mythic rares and 53 rares.
	# Each booster has a 1/8 chance of containing a mythic rare.
	# This means that looking at single mythics : rares, the proportion is
	#  1*53 : 7*15 = 53 : 105
	# this is almost exactly 1 : 2,
	# So, a a single mythic is 2 times as rare as a single normal rare.
	# 
	# We use this proportional system instead of a fixed 1:7 system,
	#  because it copes better with cases where there are few mythics.
	# For example, if a set has 1 mythic and 20 rares, you would actually
	# be MORE likely to find the mythic card with the 1:7 system!
	select: proportional
	item:
		name: mythic rare
		probability: 1
	item:
		name: rare
		probability: 2

pack type:
	name: shifted uncommon or rare
	selectable: false
	select: nonempty
	item:
		name: shifted uncommon
		probability: 3
	item:
		name: shifted rare
		probability: 1

############################################################## Common proportions of cards

# of the common slots, 3/10 will be shifted, 1/10 will be special
pack type:
	name: common sometimes shifted or special
	selectable: false
	# TODO: Perhaps use some kind of proportional system here as well?
	select: cyclic
	item: common
	item: common
	item: shifted common or else common
	item: common
	item: common
	item: shifted common or else common
	item: common
	item: common
	item: shifted common or else common
	item: special or else common

# of the uncommon slots, 1/3 will be shifted, 1/4 of that will be shifted rares instead
pack type:
	name: uncommon sometimes shifted
	selectable: false
	select: cyclic
	item: uncommon
	item: uncommon
	item: shifted uncommon or rare or else uncommon

############################################################## Card packs

pack type:
	name: tournament pack
	item:
		name: mythic rare or rare
		amount: 3
	item:
		name: uncommon sometimes shifted
		amount: 9
	item:
		name: common sometimes shifted or special
		amount: 33
	item:
		name: basic land
		amount: 30
	item:
		name: token / rulestip
pack type:
	name: booster pack
	item:
		name: mythic rare or rare
		amount: 1
	item:
		name: uncommon sometimes shifted
		amount: 3
	# a total of 11 common-likes
	item:
		name: common sometimes shifted or special
		amount: 10
	item:
		name: basic land or else common
	item:
		name: token / rulestip

pack type:
	name: additional land
	item: basic land
pack type:
	name: additional common
	item: common sometimes shifted or special
pack type:
	name: additional uncommon
	item: uncommon sometimes shifted
pack type:
	name: additional rare
	item: mythic rare or rare
pack type:
	name: additional token / rulestip
	item: token / rulestip
