################################################## Adds Most of the non-pack Masterpiece scripting ################################################## A style still needs to be added, see thread /13733 rarity_sort := { if card.shape == "token" then "T1" else if card.shape == "emblem" then "T2" else if card.shape == "rulestip" then "T3" else if card.shape == "counter" then "T4" else if card.shape == "checklist" then "T5" else if is_masterpiece() then "T6" else if set.sort_special_rarity == "with the rest" or card.rarity != "special" then " " else "S" } rarity_code := { if is_promo() then "P" else if contains(card.shape, match:"token") then "T" else if contains(card.shape, match:"emblem") then "E" else if is_masterpiece() then "S" else if card.rarity == "common" then "C" else if card.rarity == "uncommon" then "U" else if card.rarity == "rare" then "R" else if card.rarity == "mythic rare" then "M" else if card.rarity == "special" then "S" else if card.rarity == "basic land" then "L" } set_filter := { if card.shape == "token" or card.shape == "emblem" then { card.shape == "token" or card.shape == "emblem" } else if card.shape == "rulestip" then { card.shape == "rulestip" } else if card.shape == "counter" then { card.shape == "counter" } else if card.shape == "checklist" then { card.shape == "checklist" } else if is_masterpiece() then { is_masterpiece() } else if set.sort_special_rarity != "separate numbering" then { card.shape != "token" and not is_masterpiece() and card.shape != "emblem" and card.shape != "rulestip" and card.shape != "counter" and card.shape != "checklist"} else if card.rarity == "special" then { card.shape != "token" and not is_masterpiece() and card.shape != "emblem" and card.shape != "rulestip" and card.shape != "counter" and card.shape != "checklist" and card.rarity == "special" } else { card.shape != "token" and not is_masterpiece() and card.shape != "emblem" and card.shape != "rulestip" and card.shape != "counter" and card.shape != "checklist" and card.rarity != "special" } } card_number := { position ( of: card in: set order_by: { rarity_sort() + sort_index() + sort_name(card.name) } filter: set_filter() ) + 1 } card_count := { number_of_items(in: set, filter: set_filter()) } #Starting with M15, zero digits in card numbers should be shown up to three. card_number_m15 := { (if card_number() < 100 then "0" else "") + (if card_number() < 10 then "0" else "") + card_number() } card_count_m15 := { (if card_count() < 100 then "0" else "") + (if card_count() < 10 then "0" else "") + card_count() }