Finishing touches
fixed intending and extra linebreak on related changed name to Cockatrice v2
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
mse version: 0.3.8
|
||||
short name: Cockatrice
|
||||
full name: CS/ECH 2.0
|
||||
full name: Exporter v2.0
|
||||
position hint: 007
|
||||
icon: icon.png
|
||||
version: 2023-01-22
|
||||
version: 2023-02-05
|
||||
installer group: magic/Export/cockatrice
|
||||
|
||||
depends on:
|
||||
@@ -21,7 +21,7 @@ file type: *.xml|*.xml|*.*|*.*
|
||||
option field:
|
||||
type: choice
|
||||
name: info
|
||||
choice: CS/ECH 2.0, guide: https://tinyurl.com/ctexportv2
|
||||
choice: Updated 2023/02, guide: https://tinyurl.com/ctexportv2
|
||||
option field:
|
||||
type: text
|
||||
name: cockatrice Set Type
|
||||
@@ -148,7 +148,7 @@ script:
|
||||
replace@(match:"!",replace: "") + #blank out the command ender
|
||||
|
||||
#for every other card name, surround it with reverse-related tags and put in relevant attributes
|
||||
{for each entry in (break_text(match:related_entry_regex, input)) do ("\<reverse-related" + add_related_count(entry) + add_attachment(entry) + add_persistent(entry) + ">" + xml_escape(strip_card_name(entry)) + "\</reverse-related>\n")}
|
||||
{for each entry in (break_text(match:related_entry_regex, input)) do ("\n \<reverse-related" + add_related_count(entry) + add_attachment(entry) + add_persistent(entry) + ">" + xml_escape(strip_card_name(entry)) + "\</reverse-related>")}
|
||||
|
||||
#remove accidentily created empty <reverse-related> XML blocks
|
||||
remove_empty := replace@(match:" \<(reverse-)?related>\</(reverse-)?related>", replace:"")
|
||||
@@ -162,7 +162,7 @@ script:
|
||||
replace@(match:"!",replace: "") + #blank out the command ender
|
||||
|
||||
#for every other card name, surround it with reverse-related tags and put in relevant attributes
|
||||
{for each entry in (break_text(match:related_entry_regex, input)) do ("\<related" + add_related_count(entry) + add_attachment(entry) + add_persistent(entry) + ">" + xml_escape(strip_card_name(entry)) + "\</related>\n")}
|
||||
{for each entry in (break_text(match:related_entry_regex, input)) do ("\n \<related" + add_related_count(entry) + add_attachment(entry) + add_persistent(entry) + ">" + xml_escape(strip_card_name(entry)) + "\</related>")}
|
||||
|
||||
|
||||
filter_related := filter_text@(match:"!relate ?[^!]+!?")
|
||||
@@ -258,7 +258,7 @@ script:
|
||||
+ CIPT()
|
||||
# Rules Text
|
||||
+"\n "+"\<text>"+xml_escape(card_rules_text())+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
write_token := {
|
||||
@@ -293,7 +293,7 @@ script:
|
||||
+ "\n "+"\<token>1\</token>"
|
||||
# Reverse Related
|
||||
#if there is a !related block in the cards notes, set up the reverse-related XML elements
|
||||
+ (if filter_related(card.notes) != "" then remove_empty("\n " + convert_related(filter_related(card.notes))))
|
||||
+ (if filter_related(card.notes) != "" then remove_empty(convert_related(filter_related(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
write_flip := {
|
||||
@@ -365,7 +365,7 @@ script:
|
||||
+"\</tablerow>"
|
||||
# Rules Text
|
||||
+"\n "+"\<text>"+xml_escape(card_rules_text()+"\n--- \n"+card_rules_text_2())+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
write_double := {
|
||||
@@ -409,7 +409,7 @@ script:
|
||||
+"\n---\n(Back): "+strip_card_name(card.name_2))+"\</text>"
|
||||
# Name of the related card
|
||||
+"\n "+"\<related attach=\"attach\">"+xml_escape(strip_card_name(card.name_2))+"\</related>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
+"\n "+"\<card>"
|
||||
# Name II
|
||||
@@ -449,7 +449,7 @@ script:
|
||||
# Rules Text II
|
||||
+"\n "+"\<text>"+xml_escape(card_rules_text_2()
|
||||
+"\n---\n(Front): "+strip_card_name(card_name()))+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ script:
|
||||
+(if card.loyalty_cost_4 !="" then ": ")
|
||||
+(if contains(paragraph_count(card.rule_text), match:"•••") then split_text(match:"\n", card.rule_text).3)))
|
||||
+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
write_double_walker := {
|
||||
@@ -566,7 +566,7 @@ script:
|
||||
+"\n---\n(Back): "+strip_card_name(card.name_2))+"\</text>"
|
||||
# Name of the related card
|
||||
+"\n "+"\<related attach=\"attach\">"+xml_escape(strip_card_name(card.name_2))+"\</related>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
+"\n "+"\<card>"
|
||||
# Name II
|
||||
@@ -620,7 +620,7 @@ script:
|
||||
+(if contains(paragraph_count(card.rule_text_2), match:"••") then split_text(match:"\n", card.rule_text_2).2)
|
||||
+(if contains(paragraph_count(card.rule_text_2), match:"•••") then "\n"))
|
||||
+"\n---\n(Front): "+strip_card_name(card_name()))+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
write_sparker := {
|
||||
@@ -664,7 +664,7 @@ script:
|
||||
+"\n---\n(Back): "+strip_card_name(card.name_2))+"\</text>"
|
||||
# Name of the related card
|
||||
+"\n "+"\<related attach=\"attach\">"+xml_escape(strip_card_name(card.name_2))+"\</related>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
+"\n "+"\<card>"
|
||||
# Name II
|
||||
@@ -718,7 +718,7 @@ script:
|
||||
+(if contains(paragraph_count(card.rule_text_2), match:"••") then split_text(match:"\n", card.rule_text_2).2)
|
||||
+(if contains(paragraph_count(card.rule_text_2), match:"•••") then "\n"))
|
||||
+"\n---\n(Front): "+strip_card_name(card_name()))+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
write_sacrificer := {
|
||||
@@ -777,7 +777,7 @@ script:
|
||||
+"\n---\n(Back): "+strip_card_name(card.name_2))+"\</text>"
|
||||
# Name of the related card
|
||||
+"\n "+"\<related attach=\"attach\">"+xml_escape(strip_card_name(card.name_2))+"\</related>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
+"\n "+"\<card>"
|
||||
# Name II
|
||||
@@ -817,7 +817,7 @@ script:
|
||||
# Rules Text II
|
||||
+"\n "+"\<text>"+xml_escape(card_rules_text_2()
|
||||
+"\n---\n(Front): "+strip_card_name(card_name()))+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
write_leveler := {
|
||||
@@ -869,7 +869,7 @@ script:
|
||||
+(if card.pt_3 != "" then "\n"+card.pt_3)
|
||||
+"\n"+card.rule_text_3)
|
||||
+"\</text>"
|
||||
+ (if filter_token(card.notes) != "" then remove_empty("\n " + convert_token(filter_token(card.notes))))
|
||||
+ (if filter_token(card.notes) != "" then remove_empty(convert_token(filter_token(card.notes))))
|
||||
+"\n "+"\</card>"
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
Reference in New Issue
Block a user