[optional] sorting order
This commit is contained in:
@@ -832,30 +832,32 @@ color_of_card := {
|
||||
#type := card.super_type
|
||||
artifact := chosen(card_color, choice:"artifact")
|
||||
if contains(card.shape, match: "split") and
|
||||
card_color != card.card_color_2 then "I" #### Diff Color Splits
|
||||
card_color != card.card_color_2 then "K" #### Diff Color Splits
|
||||
else if chosen(choice: "land", card_color) then ( #### Lands
|
||||
if card.rarity != "basic land" then "L" #### Nonbasic Land
|
||||
if card.rarity != "basic land" then "M" #### Nonbasic Land
|
||||
else basic_land_sort() #### Basic Land
|
||||
) else if is_null_cost(casting_cost) then ( #### Non-Land Cards with no or zero costs.
|
||||
if chosen(choice: "colorless", card_color) then "A" #### Clear Colorless
|
||||
else if chosen(choice: "hybrid", card_color) then "HK" #### Hybrids
|
||||
else if is_multicolor(card_color) then "GK" #### Multicolor
|
||||
else if chosen(choice: "hybrid", card_color) then "IL" #### Hybrids
|
||||
else if is_multicolor(card_color) then "HL" #### Multicolor
|
||||
else if chosen(choice:"white", card_color) then "B" #### White
|
||||
else if chosen(choice:"blue", card_color) then "C" #### Blue
|
||||
else if chosen(choice:"black", card_color) then "D" #### Black
|
||||
else if chosen(choice:"red", card_color) then "E" #### Red
|
||||
else if chosen(choice:"green", card_color) then "F" #### Green
|
||||
else "J" #### Artifact
|
||||
else if chosen(choice:"orange", card_color) then "G" #### Orange
|
||||
else "K" #### Artifact
|
||||
) else (
|
||||
#### Cards with costs.
|
||||
colors := sort_text(casting_cost, order: "<WUBRG>")
|
||||
if colors == "" and artifact then "J" #### Artifact
|
||||
colors := sort_text(casting_cost, order: "<WUBRGO>")
|
||||
if colors == "" and artifact then "K" #### Artifact
|
||||
else if colors == "" then "A" #### Clear Colorless
|
||||
else if colors == "W" then "B" #### White
|
||||
else if colors == "U" then "C" #### Blue
|
||||
else if colors == "B" then "D" #### Black
|
||||
else if colors == "R" then "E" #### Red
|
||||
else if colors == "G" then "F" #### Green
|
||||
else if colors == "O" then "G" #### Orange
|
||||
else if is_hybrid_cost() then hybrid_color_pair_sort() #### Hybrid (by pairs)
|
||||
else if contains(casting_cost, match:"/") and artifact then "I" #### Hybrid Artifacts
|
||||
else multi_color_pair_sort() #### Multicolor (by pairs)
|
||||
@@ -890,7 +892,12 @@ hybrid_color_pair_sort := {
|
||||
else if colors == "BG" then "HH"
|
||||
else if colors == "WR" then "HI"
|
||||
else if colors == "UG" then "HJ"
|
||||
else "HK"
|
||||
else if colors == "WO" then "HK"
|
||||
else if colors == "UO" then "HL"
|
||||
else if colors == "BO" then "HM"
|
||||
else if colors == "RO" then "HN"
|
||||
else if colors == "GO" then "HO"
|
||||
else "HP"
|
||||
}
|
||||
multi_color_pair_sort := {
|
||||
colors := sort_text(casting_cost, order: "<WUBRGO>")
|
||||
@@ -905,8 +912,13 @@ multi_color_pair_sort := {
|
||||
else if colors == "BG" then "GH"
|
||||
else if colors == "WR" then "GI"
|
||||
else if colors == "UG" then "GJ"
|
||||
else if contains(card.casting_cost, match:"/") then "GL"
|
||||
else "GK"
|
||||
else if colors == "WO" then "GK"
|
||||
else if colors == "UO" then "GL"
|
||||
else if colors == "BO" then "GM"
|
||||
else if colors == "RO" then "GN"
|
||||
else if colors == "GO" then "GO"
|
||||
else if contains(card.casting_cost, match:"/") then "GQ"
|
||||
else "GP"
|
||||
}
|
||||
|
||||
#### Sort the card into its rarity tier
|
||||
|
||||
Reference in New Issue
Block a user