mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Added match_rule to replace filter_rule + {input!=""};
Default color for lands does not look at costs git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@354 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -16,12 +16,14 @@ default_image := {
|
||||
else if input == "red" then default_image_1("red.jpg")
|
||||
else if input == "black" then default_image_1("black.jpg")
|
||||
else if input == "green" then default_image_1("green.jpg")
|
||||
else if input == "land" then default_image_2(image1:"colorless.jpg", image2:"artifact.jpg")
|
||||
else if input == "land 1 color white" then default_image_2(image1:"colorless.jpg", image2:"white.jpg")
|
||||
else if input == "land 1 color blue" then default_image_2(image1:"colorless.jpg", image2:"blue.jpg")
|
||||
else if input == "land 1 color red" then default_image_2(image1:"colorless.jpg", image2:"red.jpg")
|
||||
else if input == "land 1 color black" then default_image_2(image1:"colorless.jpg", image2:"black.jpg")
|
||||
else if input == "land 1 color green" then default_image_2(image1:"colorless.jpg", image2:"green.jpg")
|
||||
else if input == "land 1 color multicolor" then default_image_2(image1:"colorless.jpg", image2:"multicolor.jpg")
|
||||
else if is_land() then default_image_2(image1:"colorless.jpg", image2:"multicolor.jpg")
|
||||
else if input == "hybrid 2 color white / blue" then default_image_2(image1:"white.jpg", image2:"blue.jpg" )
|
||||
else if input == "hybrid 2 color blue / black" then default_image_2(image1:"blue.jpg", image2:"black.jpg")
|
||||
else if input == "hybrid 2 color black / red" then default_image_2(image1:"black.jpg", image2:"red.jpg" )
|
||||
|
||||
@@ -89,7 +89,15 @@ init script:
|
||||
}
|
||||
|
||||
# color based on land text box, input = textbox contents
|
||||
color_text_filter := filter_rule(match: "<sym[^>]*>([^<]+)") + color_filter;
|
||||
color_text_filter :=
|
||||
# remove activation costs
|
||||
replace_rule(
|
||||
match: "<sym[^>]*>[^<]+</sym[^>]*>"
|
||||
in_context: "(?ix)<match>(,|:)|(pays?|additional|costs?)[ ]<match>",
|
||||
replace: ""
|
||||
) +
|
||||
# keep only mana
|
||||
filter_rule(match: "<sym[^>]*>([^<]+)") + color_filter;
|
||||
land_to_color := {
|
||||
# Based on watermark
|
||||
if card.watermark = "mana symbol white" then "land 1 color white"
|
||||
@@ -122,10 +130,10 @@ init script:
|
||||
|
||||
# Index for sorting, white cards are first, so white->A, blue->B, .. ,
|
||||
# multi->F, hybrid->G, arti->H, land->J, basic land->I
|
||||
is_multicolor := filter_rule(match: "^multicolor") + {input != ""};
|
||||
is_hybrid := filter_rule(match: "^hybrid") + {input != ""};
|
||||
is_colorless := filter_rule(match: "^colorless") + {input != ""};
|
||||
is_artifact := filter_rule(match: "^artifact") + {input != ""};
|
||||
is_multicolor := match_rule(match: "^multicolor")
|
||||
is_hybrid := match_rule(match: "^hybrid")
|
||||
is_colorless := match_rule(match: "^colorless")
|
||||
is_artifact := match_rule(match: "^artifact")
|
||||
sort_index := {
|
||||
if card.casting_cost_2 !="" and card.card_color != card.card_color_2 then "H"
|
||||
else if card.card_color=="white" then "A"
|
||||
@@ -141,8 +149,8 @@ init script:
|
||||
};
|
||||
|
||||
# The color of a card
|
||||
is_artifact := filter_rule(match: "(?i)Artifact") + {input != ""};
|
||||
is_land := filter_rule(match: "(?i)Land") + {input != ""};
|
||||
is_artifact := match_rule(match: "(?i)Artifact")
|
||||
is_land := match_rule(match: "(?i)Land")
|
||||
card_color := {
|
||||
# usually the color of mana
|
||||
mana_color := mana_to_color(casting_cost);
|
||||
|
||||
Reference in New Issue
Block a user