Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
2a3760a4
Commit
2a3760a4
authored
May 13, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added match_rule to replace filter_rule + {input!=""};
Default color for lands does not look at costs
parent
9c5f0a41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
data/magic-default-image.mse-include/scripts
data/magic-default-image.mse-include/scripts
+2
-0
data/magic.mse-game/game
data/magic.mse-game/game
+15
-7
No files found.
data/magic-default-image.mse-include/scripts
View file @
2a3760a4
...
@@ -16,12 +16,14 @@ default_image := {
...
@@ -16,12 +16,14 @@ default_image := {
else if input == "red" then default_image_1("red.jpg")
else if input == "red" then default_image_1("red.jpg")
else if input == "black" then default_image_1("black.jpg")
else if input == "black" then default_image_1("black.jpg")
else if input == "green" then default_image_1("green.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 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 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 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 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 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 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 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 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" )
else if input == "hybrid 2 color black / red" then default_image_2(image1:"black.jpg", image2:"red.jpg" )
...
...
data/magic.mse-game/game
View file @
2a3760a4
...
@@ -89,7 +89,15 @@ init script:
...
@@ -89,7 +89,15 @@ init script:
}
}
# color based on land text box, input = textbox contents
# 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 := {
land_to_color := {
# Based on watermark
# Based on watermark
if card.watermark = "mana symbol white" then "land 1 color white"
if card.watermark = "mana symbol white" then "land 1 color white"
...
@@ -122,10 +130,10 @@ init script:
...
@@ -122,10 +130,10 @@ init script:
# Index for sorting, white cards are first, so white->A, blue->B, .. ,
# Index for sorting, white cards are first, so white->A, blue->B, .. ,
# multi->F, hybrid->G, arti->H, land->J, basic land->I
# multi->F, hybrid->G, arti->H, land->J, basic land->I
is_multicolor :=
filter_rule(match: "^multicolor") + {input != ""};
is_multicolor :=
match_rule(match: "^multicolor")
is_hybrid :=
filter_rule(match: "^hybrid") + {input != ""};
is_hybrid :=
match_rule(match: "^hybrid")
is_colorless :=
filter_rule(match: "^colorless") + {input != ""};
is_colorless :=
match_rule(match: "^colorless")
is_artifact :=
filter_rule(match: "^artifact") + {input != ""};
is_artifact :=
match_rule(match: "^artifact")
sort_index := {
sort_index := {
if card.casting_cost_2 !="" and card.card_color != card.card_color_2 then "H"
if card.casting_cost_2 !="" and card.card_color != card.card_color_2 then "H"
else if card.card_color=="white" then "A"
else if card.card_color=="white" then "A"
...
@@ -141,8 +149,8 @@ init script:
...
@@ -141,8 +149,8 @@ init script:
};
};
# The color of a card
# The color of a card
is_artifact :=
filter_rule(match: "(?i)Artifact") + {input != ""};
is_artifact :=
match_rule(match: "(?i)Artifact")
is_land :=
filter_rule(match: "(?i)Land") + {input != ""};
is_land :=
match_rule(match: "(?i)Land")
card_color := {
card_color := {
# usually the color of mana
# usually the color of mana
mana_color := mana_to_color(casting_cost);
mana_color := mana_to_color(casting_cost);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment