Improved card sorting for Magic and Vanguard.

M10 version keywords and auto replace for both.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1382 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
pichoro
2009-06-09 15:09:17 +00:00
parent 88d528aa5a
commit a63d9bed90
5 changed files with 113 additions and 96 deletions
+7 -1
View File
@@ -191,9 +191,15 @@ sort_index := {
(if contains(card.shape, match:"split") then "S" else " ") + # split cards come after normal ones
":"
}
# Process the name for sorting rules (specifically, remove "The", "A", and "And" at the beginning, and make lowercase)
# Process the name for sorting rules
sort_name :=
# Remove "The", "A", and "And" at the beginning
replace@(match: "^(The|An?) ", replace: "") +
# Remove commas and apostrophes
replace@(match: "(,|')", replace: "") +
# Remove bold and italic tags
replace@(match: "(<b>|<i>|</b>|</i>)", replace: "") +
# Make lowercase
to_lower
is_multicolor := { chosen(choice: "multicolor") and input != "artifact, multicolor" }