AFR Update

This commit is contained in:
CajunAvenger
2021-07-09 13:58:11 -05:00
parent b582d03f6a
commit 197d52006c
799 changed files with 5992 additions and 2740 deletions

View File

@@ -1,19 +0,0 @@
MSE to Cockatrice Exporter - README
By K'yoril, using code from Pichoro, Idle Muse, Innuendo and Seeonee
Updated by Reuben Covington
Make sure you have updated cockatrice!
To install, simply copy and paste the magic-cockatrice.mse-export-template into the MSE data folder
To export, open MSE and select HTML in the export dropdown
To use standalone, save the export into the Cockatrice folder located in Users (C:\\Users\[ACCOUNT_NAME]\App Data\Local; App Data may be hidden!)
change the file path to your file under settings in Cockatrice (Cockatrice will need to restart!)
To use images, make a new folder in Cockatrice\pics\downloadedPics (name it your set code) and places you card images in it
To use with other cards, simply place the new .xml file in the customsets folder (C:\\Users\[ACCOUNT_NAME]\App Data\Local\Cockatrice\Cockatrice\customsets)
then restart cockatrice
To use DFC's export images like normal but then use an image editor to split each card into two images with the appropriate names

View File

@@ -1,853 +0,0 @@
mse version: 0.3.8
short name: Cockatrice
full name: CS/ECH 1.04
position hint: 007
icon: icon.png
version: 2018-09-29
installer group: magic/Export/cockatrice
depends on:
package: magic.mse-game
version: 2009-07-23
game: magic
create directory: true
file type: *.xml|*.xml|*.*|*.*
# By K'yoril, edited by Advent, Updated by Reuben Covington, Updated by Cajun, Updated by Zeu
# Based on code by Pichoro, Idle Muse, Innuendo and Seeonee
option field:
type: choice
name: version
choice: CS/ECH 1.04
option field:
type:choice
name: Usage Guide
choice: https://tinyurl.com/csexporter
option field:
type: text
name: cockatrice Set Type
description: The "set type" your set will appear as in Cockatrice. "Custom" should be the default.
default: Custom
option field:
type: boolean
name: export Images
description: Whether or not to export images along with the XML. These images are recommended for Cockatrice use.
initial: yes
option field:
type: choice
name: images File Type
description: Which file extension you want the images exported as. JPG is lower quality but lower file size.
choice: JPG
choice: PNG
option field:
type: boolean
name: tokens In Separate XML
description: Tokens are exported to a Separate file called "[Set Code] Tokens.xml"
initial: no
option field:
type: boolean
name: append Set Code To Tokens
description: Adds the set code to token names to differentiate them from tokens with the same name from other sets.
initial: no
option field:
type: text
name: append String To Names
description: Appended to the front of all card names and image names.
option field:
type: boolean
name: include Common
description: Whether to include common cards or not.
initial: yes
option field:
type: boolean
name: include Uncommon
description: Whether to include uncommon cards or not.
initial: yes
option field:
type: boolean
name: include Rare
description: Whether to include rare cards or not.
initial: yes
option field:
type: boolean
name: include Mythic
description: Whether to include mythic rare cards or not.
initial: yes
option field:
type: boolean
name: include Basic Land
description: Whether to include basic land rarity cards or not.
initial: yes
option field:
type: boolean
name: include Tokens
description: Whether to include tokens or not.
initial: yes
option field:
type: boolean
name: include Special
description: Whether to include special rarity cards or not.
initial: yes
script:
#determine if the card is a type that is a "token" i.e. it should be batched with tokens instead of with other cards
is_token := {contains(card.shape, match:"token") or contains(card.shape, match:"emblem") or contains(card.shape, match:"rulestip") }
#determine if the card is of a rarity that should be included
included_rarity := {
(is_token() and options.include_Tokens)
or (card.rarity == "basic land" and options.include_Basic_Land)
or (card.rarity == "common" and options.include_Common)
or (card.rarity == "uncommon" and options.include_Uncommon)
or (card.rarity == "rare" and options.include_Rare)
or (card.rarity == "mythic rare" and options.include_Mythic)
or (card.rarity == "special" and options.include_Special)
}
#Strip bad punctuation from card names
strip_card_name :=
replace@(match: "",replace:"'") + #replace bad apostrophe with good apostrophe
replace@(match:":", replace:"")+ #remove colons
replace@(match:";", replace:"")+ #remove semicolons
replace@(match:"\\.", replace:"") #remove periods
#functions for the !exportname command
exporter_name_filter := filter_text@(match:"!exporte?r?name [^\n\<]+")
exporter_name_grabber := replace@(match:"!exporte?r?name ", replace:"")
#determining what name should be used for the card
card_name := { if exporter_name_grabber(exporter_name_filter(card.notes)) != "" then exporter_name_grabber(exporter_name_filter(card.notes)) else card.name }
#determining what rules text should be used for the card
card_rules_text := { if card.special_text != "" then card.special_text else card.rule_text }
card_rules_text_2 := { if card.special_text_2 != "" then card.special_text_2 else card.rule_text_2 }
#helpers to find the correct count for this token relation, and generate the requisite XML
token_count_regex := "<([0-9]+|x)>"
filter_count := filter_text@(match: token_count_regex)
generate_count_XML := replace@(match:token_count_regex, replace:{" count=\"" + _1 + "\""})
add_related_count := {if filter_count(input) != "" then generate_count_XML(filter_count(input))}
#helpers to find if a auto-attachment is desired for this token relation, and generate the requisite XML
add_attachment := {if filter_text(match: "<attach>", input) != "" then " attach=\"attach\""}
#helper functions for converted_related later
related_entry_regex := "(.+?[^[:space:]]);"
#convert the !related command field to <reverse-related> XML blocks
convert_related :=
replace@(match: "!related ?\n?", replace:"")+ #blank out the related command itself
replace@(match: "\<",replace:"<") + #replace junk Start of Header characters with proper "less than sign"s
replace@(match: "",replace:"'") + #replace bad apostrophe with good apostrophe
replace@(match: "<X>",replace:"<x>") + #replace accidentily capital X with lowercase X
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) + ">" + strip_card_name(entry) + "\</reverse-related>\n")}
#remove accidentily created empty <reverse-related> XML blocks
remove_empty := replace@(match:"\<reverse-related>\</reverse-related>", replace:"")
filter_related := filter_text@(match:"!relate ?[^!]+!?")
#functions for the !tapped command
contains_tapped := contains@(match:"!tapped")
CIPT := {(if contains_tapped(card.notes) then "\n "+"\<cipt>" + "1" + "\</cipt>")}
card_color :=
{
if contains(card.type, match:"land") or contains(card.rule_text, match:"Devoid") then "" else
(
(if contains(card.card_color, match:"white") or contains(card.casting_cost, match:"W") then "W")
+(if contains(card.card_color, match:"blue") or contains(card.casting_cost, match:"U") then "U")
+(if contains(card.card_color, match:"black") or contains(card.casting_cost, match:"B") then "B")
+(if contains(card.card_color, match:"red") or contains(card.casting_cost, match:"R") then "R")
+(if contains(card.card_color, match:"green") or contains(card.casting_cost, match:"G") then "G")
)
}
card_color_2 :=
{
if contains(card.type, match:"land") or contains(card.rule_text_2, match:"Devoid") then "" else
(
(if contains(card.card_color_2, match:"white") or contains(card.casting_cost_2, match:"W") then "W")
+(if contains(card.card_color_2, match:"blue") or contains(card.casting_cost_2, match:"U") then "U")
+(if contains(card.card_color_2, match:"black") or contains(card.casting_cost_2, match:"B") then "B")
+(if contains(card.card_color_2, match:"red") or contains(card.casting_cost_2, match:"R") then "R")
+(if contains(card.card_color_2, match:"green") or contains(card.casting_cost_2, match:"G") then "G")
)
}
#write a normal card's XML text
write_normal := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ ">"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
#CIPT
+ CIPT()
# Rules Text
+"\n "+"\<text>"+card_rules_text()+"\</text>"
+"\n"+"\</card>"
}
write_token := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+strip_card_name(card_name())+(if options.append_Set_Code_To_Tokens then " " + set.set_code else "")+"\</name>"
# Set
+"\n "+"\<set>"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
#CIPT
+ CIPT()
# Rules Text
+"\n "+"\<text>"+card_rules_text()+"\</text>"
# Token
+ "\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))))
+"\n"+"\</card>"
}
write_flip := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())
#+" // "+strip_card_name(card.name_2)
+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ ">"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.shape, match:"flip") then
(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
else if card.card_color != "" and card.card_color != "land" and card.card_color != "artifact" and card.card_color_2 != "" and card.card_color_2 != "land" and card.card_color_2 != "artifact"then
(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") or card.card_color != card.card_color_2 then "M"
else if contains(card.card_color, match:"white") and contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color, match:"blue") and contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color, match:"black") and contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color, match:"red") and contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color, match:"green") and contains(card.card_color_2, match:"green") then "G"
else "")
else
(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") or contains(card.card_color_2, match:"multicolor") or contains(card.card_color_2, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") or contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color, match:"blue") or contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color, match:"black") or contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color, match:"red") or contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color, match:"green") or contains(card.card_color_2, match:"green") then "G"
else "")
)
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost
+(if card.casting_cost_2 != "" then " // "+card.casting_cost_2)
+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+" // "+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") and contains(card.type_2, match:"Creature") then " // ")
+(if contains(card.type_2, match:"Creature") then card.pt_2)
+(if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") or contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "2"
else if contains(card.type, match:"Land") or contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+card_rules_text()+"\n--- \n"+card_rules_text_2()+"\</text>"
+"\n"+"\</card>"
}
write_double := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())
#+" | ("+strip_card_name(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Name of the related card
+"\n "+"\<related attach=\"attach\">"+strip_card_name(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+card_rules_text()
+"\n---\n(Back): "+strip_card_name(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+"("+strip_card_name(card_name())+") | "
+strip_card_name(card.name_2)
+"\</name>"
# Set II
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+strip_card_name(card.name_2)+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color II
+"\n "+"\<color>"
+ card_color_2()
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Converted Mana Cost II
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n ")
+(if contains(card.type_2, match:"Creature") then "\<pt>")
+(if contains(card.type_2, match:"Creature") then card.pt_2)
+(if contains(card.type_2, match:"Creature") then "\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"+card_rules_text_2()
+"\n---\n(Front): "+strip_card_name(card_name())+"\</text>"
+"\n"+"\</card>"
}
# Count the number of paragraphs to detect number of walker abilities.
paragraph_count := replace@(match:"\n", replace:"•")+
filter_text@(match:"•")
write_walker := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ ">"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# Loyalty
+"\n "+"\<loyalty>"+card.loyalty+"\</loyalty>"
# Tablerow
+"\n "+"\<tablerow>"+"1"+"\</tablerow>"
#CIPT
+ CIPT()
# Rules Text
+"\n "+"\<text>"
+(if card.special_text or else "" != "" then card.special_text else
card.loyalty_cost_1
+(if card.loyalty_cost_1 !="" then ": ")
+split_text(match:"\n", card.rule_text).0
+(if contains(paragraph_count(card.rule_text), match:"•") then "\n")
+card.loyalty_cost_2
+(if card.loyalty_cost_2 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•") then split_text(match:"\n", card.rule_text).1)
+(if contains(paragraph_count(card.rule_text), match:"••") then "\n")
+card.loyalty_cost_3
+(if card.loyalty_cost_3 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"••") then split_text(match:"\n", card.rule_text).2)
+(if contains(paragraph_count(card.rule_text), match:"•••") then "\n")
+card.loyalty_cost_4
+(if card.loyalty_cost_4 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•••") then split_text(match:"\n", card.rule_text).3))
+"\</text>"
+"\n"+"\</card>"
}
write_double_walker := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())
#+" | ("+strip_card_name(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Name of the related card
+"\n "+"\<related attach=\"attach\">"+strip_card_name(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# Loyalty
+(if contains(card.type, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty+"\</loyalty>")
# P/T
+(if contains(card.type, match:"Creature") then "\n "+"\<pt>"+card.pt+"\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"
+(if card.special_text or else "" != "" then card.special_text else
card.loyalty_cost_1
+(if card.loyalty_cost_1 !="" then ": ")
+split_text(match:"\n", card.rule_text).0
+(if contains(paragraph_count(card.rule_text), match:"•") then "\n")
+card.loyalty_cost_2
+(if card.loyalty_cost_2 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•") then split_text(match:"\n", card.rule_text).1)
+(if contains(paragraph_count(card.rule_text), match:"••") then "\n")
+card.loyalty_cost_3
+(if card.loyalty_cost_3 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"••") then split_text(match:"\n", card.rule_text).2)
+(if contains(paragraph_count(card.rule_text), match:"•••") then "\n"))
+"\n---\n(Back): "+strip_card_name(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+strip_card_name(card_name())+") | "
+strip_card_name(card.name_2)+"\</name>"
# Set II
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+strip_card_name(card.name_2)+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color II
+"\n "+"\<color>"
+ card_color_2()
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Converted Mana Cost II
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# Loyalty II
+(if contains(card.type_2, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty_2+"\</loyalty>")
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n "+"\<pt>"+card.pt_2+"\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"
+(if card.special_text_2 or else "" != "" then card.special_text_2 else
card.loyalty_cost_4
+(if card.loyalty_cost_4 !="" then ": ")
+split_text(match:"\n", card.rule_text_2).0
+(if contains(paragraph_count(card.rule_text_2), match:"•") then "\n")
+card.loyalty_cost_5
+(if card.loyalty_cost_5 !="" then ": ")
+(if contains(paragraph_count(card.rule_text_2), match:"•") then split_text(match:"\n", card.rule_text_2).1)
+(if contains(paragraph_count(card.rule_text_2), match:"••") then "\n")
+card.loyalty_cost_6
+(if card.loyalty_cost_6 !="" then ": ")
+(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>"
+"\n"+"\</card>"
}
write_sparker := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())
#+" | ("+strip_card_name(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Name of the related card
+"\n "+"\<related attach=\"attach\">"+strip_card_name(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+card_rules_text()
+"\n---\n(Back): "+strip_card_name(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+strip_card_name(card_name())+") | "
+strip_card_name(card.name_2)+"\</name>"
# Set II
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+strip_card_name(card.name_2)+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color II
+"\n "+"\<color>"
+ card_color_2()
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Converted Mana Cost II
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# Loyalty II
+(if contains(card.type_2, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty_2+"\</loyalty>")
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n "+"\<pt>"+card.pt_2+"\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"
+(if card.special_text_2 or else "" != "" then card.special_text_2 else
card.loyalty_cost_4
+(if card.loyalty_cost_4 !="" then ": ")
+split_text(match:"\n", card.rule_text_2).0
+(if contains(paragraph_count(card.rule_text_2), match:"•") then "\n")
+card.loyalty_cost_5
+(if card.loyalty_cost_5 !="" then ": ")
+(if contains(paragraph_count(card.rule_text_2), match:"•") then split_text(match:"\n", card.rule_text_2).1)
+(if contains(paragraph_count(card.rule_text_2), match:"••") then "\n")
+card.loyalty_cost_6
+(if card.loyalty_cost_6 !="" then ": ")
+(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>"
+"\n"+"\</card>"
}
write_sacrificer := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())
#+" | ("+strip_card_name(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+options.append_String_To_Names+strip_card_name(card_name())+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Name of the related card
+"\n "+"\<related attach=\"attach\">"+strip_card_name(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# Loyalty
+(if contains(card.type, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty+"\</loyalty>")
# P/T
+(if contains(card.type, match:"Creature") then "\n "+"\<pt>"+card.pt+"\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"
+(if card.special_text or else "" != "" then card.special_text else
card.loyalty_cost_1
+(if card.loyalty_cost_1 !="" then ": ")
+split_text(match:"\n", card.rule_text).0
+(if contains(paragraph_count(card.rule_text), match:"•") then "\n")
+card.loyalty_cost_2
+(if card.loyalty_cost_2 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•") then split_text(match:"\n", card.rule_text).1)
+(if contains(paragraph_count(card.rule_text), match:"••") then "\n")
+card.loyalty_cost_3
+(if card.loyalty_cost_3 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"••") then split_text(match:"\n", card.rule_text).2)
+(if contains(paragraph_count(card.rule_text), match:"•••") then "\n"))
+"\n---\n(Back): "+strip_card_name(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+"("+strip_card_name(card_name())+") | "
+strip_card_name(card.name_2)
+"\</name>"
# Set II
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ " splitterPath=\""+"/"+strip_card_name(card.name_2)+".full." + to_lower(options.images_File_Type) + "\" >"+set.set_code+"\</set>"
# Color II
+"\n "+"\<color>"
+ card_color_2()
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Converted Mana Cost II
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n ")
+(if contains(card.type_2, match:"Creature") then "\<pt>")
+(if contains(card.type_2, match:"Creature") then card.pt_2)
+(if contains(card.type_2, match:"Creature") then "\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"+card_rules_text_2()
+"\n---\n(Front): "+strip_card_name(card_name())+"\</text>"
+"\n"+"\</card>"
}
write_leveler := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+options.append_String_To_Names+strip_card_name(card_name())+"\</name>"
# Set
+"\n "+"\<set rarity="
+(if contains(card.rarity,match:"uncommon") then "\"uncommon\""
else if contains(card.rarity,match:"common") then "\"common\""
else if contains(card.rarity,match:"mythic") then "\"mythic\""
else if contains(card.rarity,match:"rare") then "\"rare\""
else "\"\"")
+ ">"+set.set_code+"\</set>"
# Color
+"\n "+"\<color>"
+ card_color()
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Converted Mana Cost
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Converted Mana Cost II
+"\n "+"\<cmc>"+card.cmc+"\</cmc>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
#CIPT
+ CIPT()
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"
#Level I
+card_rules_text()
# Level II
+"\nLEVEL " + card.level_1
+(if card.pt_2 != "" then "\n"+card.pt_2)
+"\n"+card.rule_text_2
# Level III
+"\nLEVEL " + card.level_2
+(if card.pt_3 != "" then "\n"+card.pt_3)
+"\n"+card.rule_text_3
+"\</text>"
+"\n"+"\</card>"
}
write_card := { if is_token() then ""
else if not(included_rarity()) then ""
else if contains(card.shape, match:"double") and contains(card.type, match:"Planeswalker") and contains(card.type_2, match:"Planeswalker") then write_double_walker()
else if contains(card.shape, match:"double") and card.loyalty_2 != "" then write_sparker()
else if contains(card.shape, match:"double") and card.loyalty != "" then write_sacrificer()
else if contains(card.shape, match:"double") then write_double()
else if card.name_2 != "" then write_flip()
else if card.loyalty != "" then write_walker()
else if contains(card.shape, match:"leveler") then write_leveler()
else write_normal()
}
#if the currently exported card is a token, write it as a token
write_token_if_token := { if is_token() then write_token()}
#render image file
write_image :=
{
write_image_file(
card,
directory: "{set.set_code}",
file:"{options.append_String_To_Names+strip_card_name(card_name())+(if is_token() and options.append_Set_Code_To_Tokens then " " + set.set_code else "")}.full." + to_lower(options.images_File_Type),
width: (if contains(card.shape, match:"split") or contains(card.shape, match:"double") then 752 else 375),
height: 523
)
}
#if images are set to be rendered, render all images of rarities that have been selected
write_images := if options.export_Images then for each card in filter_list(cards,filter:{included_rarity(card:input)}) do write_image()
write_cards := to_text(for each card in cards do write_card())
write_all_tokens := to_text(for each card in cards do write_token_if_token())
#Main export script
#tokens in Separate XML
if (options.include_Tokens and options.tokens_In_Separate_XML) then write_text_file(file:set.set_code + " Tokens" + ".xml", to_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<cockatrice_carddatabase version=\"3\">\n<cards>\n"+write_all_tokens+"\n\n</cards>\n</cockatrice_carddatabase>"))
#other cards
to_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<cockatrice_carddatabase version=\"3\">\n<sets>\n<set>\n<name>"+set.set_code+"</name>\n<longname>"+set.title+"</longname>\n<settype>"+options.cockatrice_Set_Type+"</settype>\n</set>\n</sets>\n<cards>\n"+write_cards+if (options.include_Tokens and not(options.tokens_In_Separate_XML)) then ("\n\n<!-->Tokens</-->\n"+write_all_tokens)+"\n\n</cards>\n</cockatrice_carddatabase>")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,19 +0,0 @@
MSE to Cockatrice Exporter - README
By K'yoril, using code from Pichoro, Idle Muse, Innuendo and Seeonee
Updated by Reuben Covington
Make sure you have updated cockatrice!
To install, simply copy and paste the magic-cockatrice.mse-export-template into the MSE data folder
To export, open MSE and select HTML in the export dropdown
To use standalone, save the export into the Cockatrice folder located in Users (C:\\Users\[ACCOUNT_NAME]\App Data\Local; App Data may be hidden!)
change the file path to your file under settings in Cockatrice (Cockatrice will need to restart!)
To use images, make a new folder in Cockatrice\pics\downloadedPics (name it your set code) and places you card images in it
To use with other cards, simply place the new .xml file in the customsets folder (C:\\Users\[ACCOUNT_NAME]\App Data\Local\Cockatrice\Cockatrice\customsets)
then restart cockatrice
To use DFC's export images like normal but then use an image editor to split each card into two images with the appropriate names

View File

@@ -1,2 +0,0 @@
[.ShellClassInfo]
LocalizedResourceName=@magic-cockatrice-updated.mse-export-template,0

View File

@@ -1,666 +0,0 @@
mse version: 0.3.8
short name: Cockatrice
full name: Updated Full Exporter
position hint: 007
icon: icon.png
version: 2018-09-29
installer group: magic/Export/cockatrice
depends on:
package: magic.mse-game
version: 2009-07-23
game: magic
create directory: true
file type: *.xml|*.xml|*.*|*.*
# By K'yoril, edited by Advent, Updated by Reuben Covington, Updated by Cajun
# Based on code by Pichoro, Idle Muse, Innuendo and Seeonee
option field:
type: choice
name: reminder
choice: Include Set Code if planning to work with other sets
option field:
type: text
name: set Code
description: Set Code
option field:
type: text
name: images Location
description: Location of the Card Images
option field:
type: boolean
name: append set code
description: Adds the set code to token names to differentiate them
initial: no
script:
#####replace@(match:"\n", replace:"\</reverse-related>\n \<reverse-related>")+
#####replace@(match:";", replace:"\</reverse-related>\n \<reverse-related>")
token_export := {contains(card.shape, match:"token") or contains(card.shape, match:"emblem") or contains(card.shape, match:"rulestip")}
#Removes commas from DFC walkers
remove_commas := replace@(match:":", replace:"")+
replace@(match:"<(/|\\\\)?i>", replace:"")+
replace@(match:"[\<>:\\\\/\"\\*\\?\\|]", replace:"")
exporter_name_filter := filter_text@(match:"!exporte?r?name [^\n\<]+")
exporter_name_grabber := replace@(match:"!exporte?r?name ", replace:"")
card_name := { if exporter_name_grabber(exporter_name_filter(card.notes)) != "" then exporter_name_grabber(exporter_name_filter(card.notes)) else card.name }
convert_related := replace@(match: "!related ?(\n)?", replace:"\n")+
replace@(match:"!",replace: "")+
replace@(match:" ?; ?", replace:"\n")+
replace@(match:"(^[^\r\n\<]+)", replace:{" \<reverse-related>" + _1 + "\</reverse-related>"})+
replace@(match:"\<reverse-related>([^\r\n\<]+)\</reverse-related>\<([0-9]+)>", replace:{"\<reverse-related count=\"" + _2 + "\">" + _1 + "\</reverse-related>"})
remove_empty := replace@(match:"\<reverse-related>\</reverse-related>", replace:"")
filter_related := filter_text@(match:"!relate ?[^!]+!?")
write_normal := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+(if card.special_text != "" then card.special_text else card.rule_text)+"\</text>"
+"\n"+"\</card>"
}
write_token := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())+(if options.append_set_code then " " + options.set_Code else "")+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+card.rule_text+"\</text>"
# Token
+ "\n \<token>1\</token>"
# Reverse Related
+ convert_related(filter_related(card.notes))
+"\n"+"\</card>"
}
write_flip := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())
#+" // "+remove_commas(card.name_2)
+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.shape, match:"flip") then
(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
else if card.card_color != "" and card.card_color != "land" and card.card_color != "artifact" and card.card_color_2 != "" and card.card_color_2 != "land" and card.card_color_2 != "artifact"then
(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") or card.card_color != card.card_color_2 then "M"
else if contains(card.card_color, match:"white") and contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color, match:"blue") and contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color, match:"black") and contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color, match:"red") and contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color, match:"green") and contains(card.card_color_2, match:"green") then "G"
else "")
else
(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") or contains(card.card_color_2, match:"multicolor") or contains(card.card_color_2, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") or contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color, match:"blue") or contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color, match:"black") or contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color, match:"red") or contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color, match:"green") or contains(card.card_color_2, match:"green") then "G"
else "")
)
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost
+(if card.casting_cost_2 != "" then " // "+card.casting_cost_2)
+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+" // "+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") and contains(card.type_2, match:"Creature") then " // ")
+(if contains(card.type_2, match:"Creature") then card.pt_2)
+(if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") or contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") or contains(card.type_2, match:"Creature") then "2"
else if contains(card.type, match:"Land") or contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+card.rule_text+"\n--- \n"+card.rule_text_2+"\</text>"
+"\n"+"\</card>"
}
write_double := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())
#+" | ("+remove_commas(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Name of the related card
+"\n "+"\<related>"+remove_commas(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+(if card.special_text != "" then card.special_text else card.rule_text)
+"\n---\n(Back): "+remove_commas(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+"("+remove_commas(card_name())+") | "
+remove_commas(card.name_2)
+"\</name>"
# Set II
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color II
+"\n "+"\<color>"
+(if contains(card.card_color_2, match:"multicolor") or contains(card.card_color_2, match:"hybrid") then "M"
else if contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color_2, match:"green") then "G"
else "")
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n ")
+(if contains(card.type_2, match:"Creature") then "\<pt>")
+(if contains(card.type_2, match:"Creature") then card.pt_2)
+(if contains(card.type_2, match:"Creature") then "\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"+(if card.special_text_2 != "" then card.special_text_2 else card.rule_text_2)
+"\n---\n(Front): "+remove_commas(card_name())+"\</text>"
+"\n"+"\</card>"
}
# Count the number of paragraphs to detect number of walker abilities.
paragraph_count := replace@(match:"\n", replace:"•")+
filter_text@(match:"•")
write_walker := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# Loyalty
+"\n "+"\<loyalty>"+card.loyalty+"\</loyalty>"
# Tablerow
+"\n "+"\<tablerow>"+"1"+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"
+(if card.special_text or else "" != "" then card.special_text else
card.loyalty_cost_1
+(if card.loyalty_cost_1 !="" then ": ")
+split_text(match:"\n", card.rule_text).0
+(if contains(paragraph_count(card.rule_text), match:"•") then "\n")
+card.loyalty_cost_2
+(if card.loyalty_cost_2 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•") then split_text(match:"\n", card.rule_text).1)
+(if contains(paragraph_count(card.rule_text), match:"••") then "\n")
+card.loyalty_cost_3
+(if card.loyalty_cost_3 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"••") then split_text(match:"\n", card.rule_text).2)
+(if contains(paragraph_count(card.rule_text), match:"•••") then "\n")
+card.loyalty_cost_4
+(if card.loyalty_cost_4 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•••") then split_text(match:"\n", card.rule_text).3))
+"\</text>"
+"\n"+"\</card>"
}
write_double_walker := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())
#+" | ("+remove_commas(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Name of the related card
+"\n "+"\<related>"+remove_commas(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# Loyalty
+(if contains(card.type, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty+"\</loyalty>")
# P/T
+(if contains(card.type, match:"Creature") then "\n "+"\<pt>"+card.pt+"\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"
+(if card.special_text or else "" != "" then card.special_text else
card.loyalty_cost_1
+(if card.loyalty_cost_1 !="" then ": ")
+split_text(match:"\n", card.rule_text).0
+(if contains(paragraph_count(card.rule_text), match:"•") then "\n")
+card.loyalty_cost_2
+(if card.loyalty_cost_2 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•") then split_text(match:"\n", card.rule_text).1)
+(if contains(paragraph_count(card.rule_text), match:"••") then "\n")
+card.loyalty_cost_3
+(if card.loyalty_cost_3 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"••") then split_text(match:"\n", card.rule_text).2)
+(if contains(paragraph_count(card.rule_text), match:"•••") then "\n"))
+"\n---\n(Back): "+remove_commas(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+remove_commas(card_name())+") | "
+remove_commas(card.name_2)+"\</name>"
# Set II
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color II
+"\n "+"\<color>"
+(if contains(card.card_color_2, match:"multicolor") or contains(card.card_color_2, match:"hybrid") then "M"
else if contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color_2, match:"green") then "G"
else "")
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# Loyalty II
+(if contains(card.type_2, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty_2+"\</loyalty>")
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n "+"\<pt>"+card.pt_2+"\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"
+(if card.special_text_2 or else "" != "" then card.special_text_2 else
card.loyalty_cost_4
+(if card.loyalty_cost_4 !="" then ": ")
+split_text(match:"\n", card.rule_text_2).0
+(if contains(paragraph_count(card.rule_text_2), match:"•") then "\n")
+card.loyalty_cost_5
+(if card.loyalty_cost_5 !="" then ": ")
+(if contains(paragraph_count(card.rule_text_2), match:"•") then split_text(match:"\n", card.rule_text_2).1)
+(if contains(paragraph_count(card.rule_text_2), match:"••") then "\n")
+card.loyalty_cost_6
+(if card.loyalty_cost_6 !="" then ": ")
+(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): "+remove_commas(card_name())+"\</text>"
+"\n"+"\</card>"
}
write_sparker := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())
#+" | ("+remove_commas(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Name of the related card
+"\n "+"\<related>"+remove_commas(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+(if card.special_text != "" then card.special_text else card.rule_text)
+"\n---\n(Back): "+remove_commas(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+remove_commas(card_name())+") | "
+remove_commas(card.name_2)+"\</name>"
# Set II
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color II
+"\n "+"\<color>"
+(if contains(card.card_color_2, match:"multicolor") or contains(card.card_color_2, match:"hybrid") then "M"
else if contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color_2, match:"green") then "G"
else "")
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# Loyalty II
+(if contains(card.type_2, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty_2+"\</loyalty>")
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n "+"\<pt>"+card.pt_2+"\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"
+(if card.special_text_2 or else "" != "" then card.special_text_2 else
card.loyalty_cost_4
+(if card.loyalty_cost_4 !="" then ": ")
+split_text(match:"\n", card.rule_text_2).0
+(if contains(paragraph_count(card.rule_text_2), match:"•") then "\n")
+card.loyalty_cost_5
+(if card.loyalty_cost_5 !="" then ": ")
+(if contains(paragraph_count(card.rule_text_2), match:"•") then split_text(match:"\n", card.rule_text_2).1)
+(if contains(paragraph_count(card.rule_text_2), match:"••") then "\n")
+card.loyalty_cost_6
+(if card.loyalty_cost_6 !="" then ": ")
+(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): "+remove_commas(card_name())+"\</text>"
+"\n"+"\</card>"
}
write_sacrificer := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())
#+" | ("+remove_commas(card.name_2)+")"
+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Name of the related card
+"\n "+"\<related>"+remove_commas(card.name_2)+"\</related>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# Loyalty
+(if contains(card.type, match:"Planeswalker") then "\n "+"\<loyalty>"+card.loyalty+"\</loyalty>")
# P/T
+(if contains(card.type, match:"Creature") then "\n "+"\<pt>"+card.pt+"\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"
+(if card.special_text or else "" != "" then card.special_text else
card.loyalty_cost_1
+(if card.loyalty_cost_1 !="" then ": ")
+split_text(match:"\n", card.rule_text).0
+(if contains(paragraph_count(card.rule_text), match:"•") then "\n")
+card.loyalty_cost_2
+(if card.loyalty_cost_2 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"•") then split_text(match:"\n", card.rule_text).1)
+(if contains(paragraph_count(card.rule_text), match:"••") then "\n")
+card.loyalty_cost_3
+(if card.loyalty_cost_3 !="" then ": ")
+(if contains(paragraph_count(card.rule_text), match:"••") then split_text(match:"\n", card.rule_text).2)
+(if contains(paragraph_count(card.rule_text), match:"•••") then "\n"))
+"\n---\n(Back): "+remove_commas(card.name_2)+"\</text>"
+"\n"+"\</card>"
+"\n"+"\<card>"
# Name II
+"\n "+"\<name>"
#+"("+remove_commas(card_name())+") | "
+remove_commas(card.name_2)
+"\</name>"
# Set II
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color II
+"\n "+"\<color>"
+(if contains(card.card_color_2, match:"multicolor") or contains(card.card_color_2, match:"hybrid") then "M"
else if contains(card.card_color_2, match:"white") then "W"
else if contains(card.card_color_2, match:"blue") then "U"
else if contains(card.card_color_2, match:"black") then "B"
else if contains(card.card_color_2, match:"red") then "R"
else if contains(card.card_color_2, match:"green") then "G"
else "")
+"\</color>"
# Mana Cost II
+"\n "+"\<manacost>"+card.casting_cost_2+"\</manacost>"
# Type II
+"\n "+"\<type>"+replace(card.type_2, match:"—", replace:"-")+"\</type>"
# P/T II
+(if contains(card.type_2, match:"Creature") then "\n ")
+(if contains(card.type_2, match:"Creature") then "\<pt>")
+(if contains(card.type_2, match:"Creature") then card.pt_2)
+(if contains(card.type_2, match:"Creature") then "\</pt>")
# Tablerow II
+"\n "+"\<tablerow>"
+(if contains(card.type_2, match:"Instant") or contains(card.type_2, match:"Sorcery") then "3"
else if contains(card.type_2, match:"Creature") then "2"
else if contains(card.type_2, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text II
+"\n "+"\<text>"+(if card.special_text_2 != "" then card.special_text_2 else card.rule_text_2)
+"\n---\n(Front): "+remove_commas(card_name())+"\</text>"
+"\n"+"\</card>"
}
write_leveler := {
"\n"+"\<card>"
# Name
+"\n "+"\<name>"+remove_commas(card_name())+"\</name>"
# Set
+"\n "+"\<set picURL=\""+options.images_Location+"/"+remove_commas(card_name())+".full.jpg\" picURLHq=\"\" picURLSt=\"\">"+options.set_Code+"\</set>"
# Color
+"\n "+"\<color>"
+(if contains(card.card_color, match:"multicolor") or contains(card.card_color, match:"hybrid") then "M"
else if contains(card.card_color, match:"white") then "W"
else if contains(card.card_color, match:"blue") then "U"
else if contains(card.card_color, match:"black") then "B"
else if contains(card.card_color, match:"red") then "R"
else if contains(card.card_color, match:"green") then "G"
else "")
+"\</color>"
# Mana Cost
+"\n "+"\<manacost>"+card.casting_cost+"\</manacost>"
# Type
+"\n "+"\<type>"+replace(card.type, match:"—", replace:"-")+"\</type>"
# P/T
+(if contains(card.type, match:"Creature") then "\n ")
+(if contains(card.type, match:"Creature") then "\<pt>")
+(if contains(card.type, match:"Creature") then card.pt)
+(if contains(card.type, match:"Creature") then "\</pt>")
# Tablerow
+"\n "+"\<tablerow>"
+(if contains(card.type, match:"Instant") or contains(card.type, match:"Sorcery") then "3"
else if contains(card.type, match:"Creature") then "2"
else if contains(card.type, match:"Land") then "0"
else "1")
+"\</tablerow>"
# Rules Text
+"\n "+"\<text>"+ if card.special_text != "" then card.special_text else ""
#Level I
+card.rule_text
# Level II
+"\nLEVEL " + card.level_1
+(if card.pt_2 != "" then "\n"+card.pt_2)
+"\n"+card.rule_text_2
# Level III
+"\nLEVEL " + card.level_2
+(if card.pt_3 != "" then "\n"+card.pt_3)
+"\n"+card.rule_text_3
+"\</text>"
+"\n"+"\</card>"
}
write_card := { if token_export() then ""
else if contains(card.shape, match:"double") and contains(card.type, match:"Planeswalker") and contains(card.type_2, match:"Planeswalker") then write_double_walker()
else if contains(card.shape, match:"double") and card.loyalty_2 != "" then write_sparker()
else if contains(card.shape, match:"double") and card.loyalty != "" then write_sacrificer()
else if contains(card.shape, match:"double") then write_double()
else if card.name_2 != "" then write_flip()
else if card.loyalty != "" then write_walker()
else if contains(card.shape, match:"leveler") then write_leveler()
else write_normal()
}
write_tokens := { if token_export() then write_token()}
write_images := for each card in sort_list(cards, order_by: {card.card_number}) do write_image_file(card, directory: "{options.set_Code}", file:"{remove_commas(card_name())+(if token_export() and options.append_set_code then " " + options.set_Code else "")}.full.jpg", width: (if contains(card.shape, match:"double") then 752 else 375), height: 523)
write_cards := to_text(for each card in sort_list(cards, order_by: {input.card_number}) do write_card())
write_all_tokens := to_text(for each card in sort_list(cards, order_by: {input.card_number}) do write_tokens())
write_text_file(file:"tokens" + options.set_Code + ".xml", to_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<cockatrice_carddatabase version=\"3\">\n<cards>\n"+write_all_tokens+"\n\n</cards>\n</cockatrice_carddatabase>"))
to_string("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<cockatrice_carddatabase version=\"3\">\n<sets>\n<set>\n<name>"+options.set_Code+"</name>\n<longname>"+set.title+"</longname>\n</set>\n</sets>\n<cards>\n"+write_cards+"\n\n</cards>\n</cockatrice_carddatabase>")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -3,7 +3,7 @@ game: magic
short name: M15 Counters
full name: After M15 Counters
icon: card-sample.png
position hint: 963
position hint: 999
installer group: magic/counter cards
version: 2017-05-03

View File

@@ -3,7 +3,7 @@ game: magic
short name: MBS Counters
full name: from Mirrodin Besieged
icon: card-sample.png
position hint: 999
position hint: 998
installer group: magic/counter cards/mbs
version: 2014-06-20

View File

@@ -3,7 +3,7 @@ game: magic
short name: NPH Counters
full name: from New Phyrexia
icon: card-sample.png
position hint: 999
position hint: 998
installer group: magic/counter cards/nph
version: 2014-06-20

View File

@@ -3,7 +3,7 @@ game: magic
short name: SOM Counters
full name: from Scars of Mirrodin
icon: card-sample.png
position hint: 999
position hint: 998
installer group: magic/counter cards/som
version: 2014-06-20

View File

@@ -4,7 +4,7 @@ short name: Jumpstart Front Card
full name: Jumpstart Front Card
icon: card-sample.png
installer group: magic/m15 style/Emblems
position hint: 001
position hint: 090
version: 2018-02-22
depends on:

View File

@@ -4,7 +4,7 @@ short name: GoodBad M15 style
full name: Good and Bad After M15
icon: card-sample.png
installer group: magic/m15 style/normal cards
position hint: 013
position hint: 021
version: 2018-02-09
depends on:

View File

@@ -159,6 +159,7 @@ styling field:
description: Other options for the frame
choice: godzilla style alias
choice: pokemon evobar
choice: prerelease stamp
styling field:
type: boolean
name: remove from autocount
@@ -714,6 +715,11 @@ extra card field:
save value: true
editable: true
description: Where they put mtgstory.com on story spotlights.
extra card field:
type: text
name: promo label
save value: true
description: The golden promo label.
extra card style:
card code:
left: 24
@@ -726,6 +732,17 @@ extra card style:
size: 7
color: white
weight: bold
promo label:
left: {if is_spot() then 65 else 40}
top: 262
width: {if chosen(styling.other_options, choice:"prerelease stamp") then (if is_spot() then 245 else 295) else 0}
height: 29
alignment: middle right
z index: 4
font:
name: ModMatrix
size: 14
color: rgb(223,169,41)
artist arrow:
left: { 28 + card_style.set_code.content_width }
top: 500

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -53,10 +53,10 @@ init script:
#Should multicolor lands with basic land types have a colored name?
mask_multi_land_with_color := { styling.colored_multicolor_land_name }
base_template_prefix := [card: "" alias: "alias/" snow:"snow/" snowtexture:"snow/" devoid:"devoid/" nyx: "nyx/" miracle: "miracles/" node:"nodes/" promo: "promo/" crown: "legend/" cons:"conspiracy/" curtain: "curtains/" fnm: "fnm/", fnmpt: "paradox/", map: "maps/" energy: "energies/", mappt: "maps/" pt: "", slide: "masks/", slide2: "masks/", arrow: "arrows/", arrow2: "arrows/", arrow3: "arrows/", season: "season/" stamp: "" identity: "/magic-identity-new.mse-include/"]
shifted_template_prefix := [card: "shifted/" alias: "shifted/" snow:"snow/" snowtexture:"snow/" devoid:"devoid/" nyx: "nyx/" miracle: "shifted/" node:"shifted/" promo: "promo/" crown: "shifted/" cons:"conspiracy/" curtain: "curtains/" fnm:"fnm/", fnmpt: "paradox/", map: "maps/" energy: "energies/", mappt: "maps/" pt: "shifted/", slide: "shifted/", slide2: "shifted/", arrow: "arrows/", arrow2: "arrows/", arrow3: "arrows/", season: "season/" stamp: "shifted/" identity: "/magic-identity-new.mse-include/"]
base_template_prefix := [card: "" alias: "alias/" snow:"snow/" snowtexture:"snow/" devoid:"devoid/" nyx: "nyx/" miracle: "miracles/" node:"nodes/" promo: "promo/" crown: "legend/" cons:"conspiracy/" curtain: "curtains/" fnm: "fnm/", fnmpt: "paradox/", map: "maps/" energy: "energies/", mappt: "maps/" pt: "", slide: "masks/", slide2: "masks/", slide3: "masks/", arrow: "arrows/", arrow2: "arrows/", arrow3: "arrows/", season: "season/" stamp: "" identity: "/magic-identity-new.mse-include/"]
shifted_template_prefix := [card: "shifted/" alias: "shifted/" snow:"snow/" snowtexture:"snow/" devoid:"devoid/" nyx: "nyx/" miracle: "shifted/" node:"shifted/" promo: "promo/" crown: "shifted/" cons:"conspiracy/" curtain: "curtains/" fnm:"fnm/", fnmpt: "paradox/", map: "maps/" energy: "energies/", mappt: "maps/" pt: "shifted/", slide: "shifted/", slide2: "shifted/", slide3: "shifted/", arrow: "arrows/", arrow2: "arrows/", arrow3: "arrows/", season: "season/" stamp: "shifted/" identity: "/magic-identity-new.mse-include/"]
template_prefix := { if type == "miracle" and pure_snow() then [miracle:"snow/"] else if is_shifted() then shifted_template_prefix else base_template_prefix }
template_suffix := [card: "card.jpg" node:"node.png" alias:"alias.png" devoid:"card.png" snow:"card.jpg" snowtexture:"snow.png" nyx: "nyx.png" miracle: "miracle.png" promo: "card.jpg" crown: "crown.png" cons:"cons.png" curtain: "card.png" fnm:"card.png", fnmpt: "pt.png", map: "card.png", energy: "card.png", mappt: "pt.png" pt: "pt.png", slide: "slide.png", slide2: "slide2.png", stamp: "stamp.jpg", arrow: "arrow.png", arrow2: "arrow2.png", arrow3: "arrow3.png", season: "flag.png" identity: "identity.png"]
template_suffix := [card: "card.jpg" node:"node.png" alias:"alias.png" devoid:"card.png" snow:"card.jpg" snowtexture:"snow.png" nyx: "nyx.png" miracle: "miracle.png" promo: "card.jpg" crown: "crown.png" cons:"cons.png" curtain: "card.png" fnm:"card.png", fnmpt: "pt.png", map: "card.png", energy: "card.png", mappt: "pt.png" pt: "pt.png", slide: "slide.png", slide2: "slide2.png", slide3: "slide3.png", stamp: "stamp.jpg", arrow: "arrow.png", arrow2: "arrow2.png", arrow3: "arrow3.png", season: "flag.png" identity: "identity.png"]
template := { crown_lead(type) + template_prefix()[type] + input + crown_follow(type) + template_suffix[type] }
land_template := { crown_lead(type) + template_prefix()[type] + (if input == "a" then "c" else input) + (if landless(type) then "" else "l") + crown_follow(type) + template_suffix[type] }
# Use land templates for previews because they show more contrast
@@ -100,6 +100,7 @@ init script:
cons_background := { color_background(type:"cons", base_hybrid: card_hybrid)}
background_slide := { color_background(type:"slide", base_hybrid: card_hybrid)}
background_slide_2 := { color_background(type:"slide2", base_hybrid: card_hybrid)}
background_slide_3 := { color_background(type:"slide3", base_hybrid: card_hybrid)}
season_background := { color_background(type:"season", base_hybrid:card_hybrid) }
# Use the normal tap symbol
mana_t := {
@@ -151,7 +152,38 @@ init script:
override_clear := replace@(match:"</color>(</b></code>)?", replace: "")+
replace@(match:"(<code><b>)?<color:black>", replace: "")
override_filter := replace@(match:"\\[([^\\]]+)]", replace: "<code><b><color:black>[\\1]</color></b></code>")
text_filter := text_filter + override_clear + {if chosen(styling.other_options, choice:"override-style text") then override_filter(input) else input}
is_d20 := {styling.d20_dividers != "off" and not is_leveler()}
is_all_break := {contains(styling.d20_dividers, match:"all breaks")}
d20string := "^(<b>)?(((</sym>)?[-0-9 ,+>\<](<sym>)?)+|[Ee]lse|[Oo]ther) ?(</b>)?[|]"
d20_array :=
filter_text@(match:"(\n|"+d20string+")")
+split_text@(match:d20string)
number_of_rolls := {if is_all_break() then 1+length(filter_text(card.rule_text, match:"\n"))-rolls_start(card.text) else length(d20_array(input))-1}
rolls_start := {
if styling.d20_dividers == "all breaks +3" then 4
else if styling.d20_dividers == "all breaks +2" then 3
else if styling.d20_dividers == "all breaks +1" then 2
else if styling.d20_dividers == "all breaks" then 0
else if is_d20() then length(d20_array(input).0)
else 0
}
d20_filter := replace@(match:"^([Ee]lse ?|[Oo]ther ?|((</sym>)?[-0-9 ,+>\<](<sym>)?)+)[|]", replace:"<b>\\1</b>|")
top_of_para := {
input := input + no_roll(card.text)
if card_style.text.layout.paragraphs[input].top or else 0 > 0 then
card_style.text.top + card_style.text.layout.paragraphs[input].top - 0.5*(card_style.text.layout.paragraphs[input].top-card_style.text.layout.paragraphs[input-1].bottom)
else 0
}
height_of_para := {
input := input + no_roll(card.text)
if card_style.text.layout.paragraphs[input].bottom or else 0 > 0 then
card_style.text.layout.paragraphs[input].bottom + 1.3*(card_style.text.layout.paragraphs[input].top-card_style.text.layout.paragraphs[input-1].bottom) - card_style.text.layout.paragraphs[input].top
else 0
}
no_roll := {if styling.d20_dividers == "all breaks" then 1 else if rolls_start(input) == 0 then 1 else 0}
text_filter := text_filter + override_clear + d20_filter + {if chosen(styling.other_options, choice:"override-style text") then override_filter(input) else input}
center_map := {is_map() and (card.casting_cost == "" or chosen(styling.other_options, choice:"always center map names"))}
use_evobar := {chosen(styling.other_options, choice:"pokemon evobar")}
is_skinned := {chosen(styling.other_options, choice:"godzilla style alias")}
@@ -173,19 +205,24 @@ init script:
lv_1_height := {lv_2_coordinate()}
lv_2_coordinate := {max(min(52 + to_number(pull_comma_array(styling.level_offset, cell:0))+(if is_full_art() then 20 else if is_mutate() then 12 else nil),152), 0)}
lv_3_coordinate := {max(min(101 + to_number(pull_comma_array(styling.level_offset, cell:1)+(if is_full_art() then 10 else if is_mutate() then 12 else nil)),152), lv_2_coordinate())}
lv_4_coordinate := {max(min(152 + to_number(pull_comma_array(styling.level_offset, cell:2)+(if is_full_art() then 10 else if is_mutate() then 12 else nil)),152), lv_3_coordinate())}
lv_2_height := {lv_3_coordinate() - lv_2_coordinate()}
lv_3_height := {152-lv_3_coordinate()}
lv_3_height := {lv_4_coordinate()-lv_3_coordinate()}
lv_4_height := {152-lv_4_coordinate()}
l1_center := {327 + (if is_full_art() then 16 else 0) + 0.5*lv_1_height()}
l2_center := {327 + lv_2_coordinate() + 0.5*lv_2_height()}
l3_center := {327 + lv_3_coordinate() + 0.5*lv_3_height()}
overlay1 := {slice_crop(background_slide(), height: lv_2_height(), width:314, distance:(152-lv_2_coordinate()))}
overlay2 := {slice_crop(background_slide_2(), height: lv_3_height(), width:314, distance:lv_3_height())}
mask_height := {if input == "one" then lv_1_height() else if input == "two" then lv_2_height() else if input == "three" then lv_3_height() else 0}
l4_center := {327 + lv_4_coordinate() + 0.5*lv_4_height()}
overlay1 := {if is_d20() then "d20slice.png" else slice_crop(background_slide(), height: lv_2_height(), width:314, distance:(152-lv_2_coordinate()))}
overlay2 := {if is_d20() then "d20slice.png" else slice_crop(background_slide_2(), height: lv_3_height(), width:314, distance:lv_3_height())}
overlay3 := {if is_d20() then "d20slice.png" else slice_crop(background_slide_3(), height: lv_4_height(), width:314, distance:lv_4_height())}
mask_height := {if input == "one" then lv_1_height() else if input == "two" then lv_2_height() else if input == "three" then lv_3_height() else if input == "four" then lv_4_height() else 0}
lone_pt := {chosen(styling.other_options, choice:"regular pt on levelers") and not starting_loyalty()}
starting_loyalty := {chosen(styling.other_options, choice:"use starting loyalty")}
choose_ptbox := {if is_fnm() then fnm_ptbox() else card_ptbox()}
lv_2_ptbox := { if is_vehicle() then "vpt.png" else if is_clear() then "cpt.png" else if is_fnm() then fnm_ptbox() else leveler_ptbox2() }
lv_3_ptbox := { if is_vehicle() then "vpt.png" else if is_clear() then "cpt.png" else if is_fnm() then fnm_ptbox() else leveler_ptbox3() }
lv_4_ptbox := { if is_vehicle() then "vpt.png" else if is_clear() then "cpt.png" else if is_fnm() then fnm_ptbox() else color_background(type:"pt", base_hybrid:leveler_pt_hybrid3) }
arrow_left := {if box_leveler() then -3 else if loy_leveler() then 10 else 18}
arrow_width := {if box_leveler() then 84 else if loy_leveler() then 42 else 56}
arrow_height := {if aug_leveler(input) then 42 else if box_leveler() then 50 else if loy_leveler() then 40 else 40}
@@ -197,9 +234,10 @@ init script:
special_text := {if is_leveler() then ((if card.level_0 != "" then "[" + level_label(0) + " " + card.level_0 + "] " else "") + card.level_1_text + (if card.pt != "" then " [" + card.pt + "]" else "") + "\n"
+ (if card.level_1 != "" then "[" + level_label(1) + " " + card.level_1 + "] " else "") + card.level_2_text + (if card.pt_2 != "" then " [" + card.pt_2 + "]" else "") + "\n"
+ (if card.level_2 != "" then "[" + level_label(2) + " " + card.level_2 + "] " else "") + card.level_3_text + (if card.pt_3 != "" then " [" + card.pt_3 + "]" else "")
+ (if card.level_2 != "" then "[" + level_label(2) + " " + card.level_2 + "] " else "") + card.level_3_text + (if card.pt_3 != "" then " [" + card.pt_3 + "]" else "") + (if card.level_4_text != "" then "\n" else "")
+ (if card.level_3 != "" then "[" + level_label(3) + " " + card.level_3 + "] " else "") + card.level_4_text + (if card.pt_7 != "" then " [" + card.pt_7 + "]" else "")
) else if is_mutate() then
card.level_1_text + "\n" + card.text
card.level_1_text + "\n" + card.rule_text
else ""
}
card_shape := {if is_leveler() then "leveler" else "normal"}
@@ -306,6 +344,16 @@ styling field:
type: text
name: font cap
description: Caps the font size of all text boxes to allow consistent sizes. Default is 14.
styling field:
type: choice
name: d20 dividers
choice: d20 mode
choice: off
choice: all breaks
choice: all breaks +1
choice: all breaks +2
choice: all breaks +3
description: Do dice levels normally, off, on all linebreaks, on all but the first linebreak, etc.
styling field:
type: text
name: arrow or bullet offsets
@@ -313,7 +361,7 @@ styling field:
styling field:
type: text
name: level offset
description: Formatted as 1,2,3,. Move the level boxes down X pixels. Use negative to move up.
description: Formatted as 1,2,3,. Move the level boxes down X pixels. Use negative to move up. For 4 equal levels, use -14,-25,-38,
styling field:
type: text
name: level label
@@ -694,7 +742,7 @@ card style:
left: {if card.level_2 != "" then (if loy_leveler() then 57 else if box_leveler() then 78 else 75) else if is_map() then 40 else 29}
top: {331 + lv_3_coordinate()}
right: {if card.pt_3 != "" then 277 else 342}
height: {if not is_leveler() then 0 else lv_3_height()-2}
height: {if not is_leveler()then 0 else lv_3_height()-2}
font:
name: MPlantin
italic name: MPlantin-Italic
@@ -725,6 +773,41 @@ card style:
line height soft: 0.9
line height hard max: {if is_modal(card.level_3_text) then 1.0 else 1.3 }
line height line max: 1.6
level 4 text:
left: {if card.level_3 != "" then (if loy_leveler() then 57 else if box_leveler() then 78 else 75) else if is_map() then 40 else 29}
top: {331 + lv_4_coordinate()}
right: {if card.pt_7 != "" then 277 else 342}
height: {if not is_leveler() then 0 else lv_4_height()-2}
font:
name: MPlantin
italic name: MPlantin-Italic
size: {if styling.font_cap != "" then to_number(styling.font_cap) else 14}
scale down to: 6
color: { if is_full_art() or is_fnm() then "white" else "black"}
shadow color: {if is_full_art() or is_fnm() then "black" else rgba(0,0,0,0)}
shadow displacement x: -1
shadow displacement y: 1
symbol font:
name: { styling.text_box_mana_symbols }
size: {if styling.font_cap != "" then to_number(styling.font_cap) else 14}
scale down to: 6
alignment:
script:
if (styling.center_text == "short text only" and
not contains(match:"\n", card.rule_text) and
card.flavor_text == "<i-flavor></i-flavor>" and
card_style.text.content_lines <= 2) or
styling.center_text == "always"
then "middle center"
else "middle left"
z index: 3
padding left: 6
padding right: 4
line height hard: {if is_modal(card.level_4_text) then 0.9 else 1.2 }
line height line: 1.5
line height soft: 0.9
line height hard max: {if is_modal(card.level_4_text) then 1.0 else 1.3 }
line height line max: 1.6
watermark:
left: { if is_map() then 40 else 19 }
top: { if is_full_art() then 359 else 330 }
@@ -787,6 +870,23 @@ card style:
symbol font:
name: { styling.level_mana_symbols }
size: {12 + if center_label(0) then 0.5 else 0}
level 3:
z index: 7
left: {if box_leveler() then 8 else if loy_leveler() then 14 else 21}
top: {l4_center() - (if aug_leveler(3) then 4 else 2) - (if center_label(3) then 6 else 0) + arrow_offset(3)}
width: {if is_leveler() or card.level_2 != "" then (34 + (if box_leveler() then 30 else 0)) else 0}
height: { if card_style.level_4_text.height < 10 and card.level_3 == "" then 0 else 22}
alignment: center middle shrink-overflow
font:
name: Beleren Bold
size: {if loy_leveler() then 11 else 12 + if center_label(0) then 2 else 0}
weight: bold
color: {if loy_leveler() then "white" else "black"}
shadow color: { if loy_leveler() then rgba(0,0,0,0) else "white"}
shadow blur: 2
symbol font:
name: { styling.level_mana_symbols }
size: {12 + if center_label(0) then 0.5 else 0}
############################# PT
pt:
z index: 4
@@ -834,6 +934,21 @@ card style:
shadow color: {if is_shifted() or is_fnm() then rgb(0,0,0) else rgba(0,0,0,0)}
shadow displacement x: -1
shadow displacement y: 1
pt 7:
z index: 4
left: 291
top: {(l4_center() - 12)}
width: {if is_leveler() and not lone_pt() or card.pt_7 != "" then 60 else 0}
height: {if card_style.level_4_text.height < 10 and card.pt_7 == "" then 0 else 28}
alignment: center middle shrink-overflow
font:
name: Beleren Bold
size: {if is_map() then 14 else 16}
color: {if is_shifted() or is_fnm() then "white" else if is_vehicle() and (not is_legend() or chosen(styling.other_options, choice:"brown legendary vehicle pt")) then "white" else "black"}
separator color: red
shadow color: {if is_shifted() or is_fnm() then rgb(0,0,0) else rgba(0,0,0,0)}
shadow displacement x: -1
shadow displacement y: 1
loyalty:
z index: 7
left: 326
@@ -914,6 +1029,12 @@ extra card field:
script: card.card_color
editable: false
save value: false
extra card field:
type: choice
name: pt box 4
script: card.card_color
editable: false
save value: false
extra card field:
type: choice
name: stamp
@@ -1050,12 +1171,6 @@ extra card field:
script: card.card_color
save value: false
editable: false
extra card field:
type: choice
name: flash indicator
choice: dot
save value: false
editable: false
# Add the word "LEVEL" to the top arrow.
extra card field:
type: text
@@ -1063,20 +1178,27 @@ extra card field:
editable: false
save value: false
script: if loy_leveler() then ":" else level_label(0)
# Add the word "LEVEL" to the first arrow.
# Add the word "LEVEL" to the second arrow.
extra card field:
type: text
name: lvl label 1
editable: false
save value: false
script: if loy_leveler() then ":" else level_label(1)
# Add the word "LEVEL" to the second arrow.
# Add the word "LEVEL" to the third arrow.
extra card field:
type: text
name: lvl label 2
editable: false
save value: false
script: if loy_leveler() then ":" else level_label(2)
# Add the word "LEVEL" to the fourth arrow.
extra card field:
type: text
name: lvl label 3
editable: false
save value: false
script: if loy_leveler() then ":" else level_label(2)
extra card field:
type: choice
name: level 2 overlay
@@ -1091,6 +1213,13 @@ extra card field:
choice: mask
editable: false
show statistics: false
extra card field:
type: choice
name: level 4 overlay
script: card.card_color
choice: mask
editable: false
show statistics: false
extra card field:
type: choice
name: arrow 1
@@ -1112,6 +1241,13 @@ extra card field:
editable: false
save value: false
show statistics: false
extra card field:
type: choice
name: arrow 4
script: card.card_color
editable: false
save value: false
show statistics: false
extra card field:
type: choice
name: mutbar
@@ -1264,6 +1400,15 @@ extra card style:
visible: { card.pt_3 != "" }
render style: image
image: {if is_map() then mappt_background() else combine_blend(image1: lv_3_ptbox(), image2: "ptbox_multiply_2.png", combine: "multiply")}
pt box 4:
left: 278
top: { l4_center() - (if is_map() then 26 else 15)}
width: { if (is_leveler() and not lone_pt()) or card.pt_3 != "" then (if is_map() then 90 else 81) else 0}
height: { if (is_leveler() and not lone_pt()) or card.pt_3 != "" then (if is_map() then 54 else 42) else 0}
z index: 3
visible: { card.pt_7 != "" }
render style: image
image: {if is_map() then mappt_background() else combine_blend(image1: lv_4_ptbox(), image2: "ptbox_multiply_3.png", combine: "multiply")}
loyalty box:
right: 362
top: 466
@@ -1487,24 +1632,46 @@ extra card style:
color: black
weight: {if loy_leveler() then "" else "bold"}
visible: {card.level_2 != ""}
lvl label 3:
left: {if box_leveler() then 8 else if loy_leveler() then 48 else 21}
top: {l4_center() - (if loy_leveler() then 2 else 10) + arrow_offset(3)}
width: {if is_leveler() or card.level_3 != "" then (if loy_leveler() then 10 else 34 + (if box_leveler() then 30 else 0)) else 0}
height: {if loy_leveler() then 10 else if center_label(3) then 0 else 10}
z index: 6
alignment: middle center
font:
name: {if loy_leveler() then "MPlantin" else "Beleren Small Caps"}
size: {if loy_leveler() then 15 else if length(level_label(2)) < 8 or box_leveler() then 7 else 6}
color: black
weight: {if loy_leveler() then "" else "bold"}
visible: {card.level_3 != ""}
level 2 overlay:
left: 29
top: { 329 + lv_2_coordinate()}
height: { lv_2_height()}
top: { if is_d20() then top_of_para(rolls_start(card.text)) else 329 + lv_2_coordinate()}
height: { if is_d20() then height_of_para(rolls_start(card.text)) else lv_2_height()}
width: 314
z index: 0
render style: image
image: {overlay1()}
visible: {is_leveler() and not is_full_art() and not is_map() and not is_fnm()}
visible: {(is_d20() and number_of_rolls(card.text) > 0) or is_leveler() and not is_full_art() and not is_map() and not is_fnm()}
level 3 overlay:
left: 29
top: { 329 + lv_3_coordinate()}
height: { lv_3_height()}
top: { if is_d20() then top_of_para(rolls_start(card.text)+2) else 329 + lv_3_coordinate()}
height: { if is_d20() then height_of_para(rolls_start(card.text)+2) else lv_3_height()}
width: 314
z index: 0
render style: image
image: {overlay2()}
visible: {is_leveler() and not is_full_art() and not is_map() and not is_fnm()}
visible: {(is_d20() and number_of_rolls(card.text)-no_roll(card.text) > 2) or is_leveler() and not is_full_art() and not is_map() and not is_fnm()}
level 4 overlay:
left: 29
top: { if is_d20() then top_of_para(rolls_start(card.text)+4) else 329 + lv_4_coordinate()}
height: { if is_d20() then height_of_para(rolls_start(card.text)+4) else lv_4_height()}
width: 314
z index: 0
render style: image
image: {overlay3()}
visible: {(is_d20() and number_of_rolls(card.text)-no_roll(card.text) > 4) or is_leveler() and not is_full_art() and not is_map() and not is_fnm()}
arrow 1:
z index: 5
left: {arrow_left()}
@@ -1529,6 +1696,14 @@ extra card style:
height: {arrow_height(2)}
render style: image
image: {if loy_leveler() then loyalty_image(card.level_2) else if box_leveler() then choose_ptbox() else arrow_background()}
arrow 4:
z index: 5
left: {arrow_left()}
top: {l4_center() - 16 + arrow_offset(3)}
width: {if card.level_3 != "" then arrow_width() else 0}
height: {arrow_height(3)}
render style: image
image: {if loy_leveler() then loyalty_image(card.level_3) else if box_leveler() then choose_ptbox() else arrow_background()}
mutbar:
z index: 2
left: 28

View File

@@ -3,7 +3,7 @@ game: magic
short name: M15 Clear Artifact
full name: After M15 Clear Artifact
icon: card-sample.png
position hint: 002
position hint: 023
installer group: magic/m15 style/normal cards/Clear
version: 2020-04-25

View File

@@ -34,14 +34,14 @@ init script:
# Load scripts that are redefined from the blends package
include file: blends_scripts
# Load scripts for image box
include file: /magic-default-image.mse-include/scripts
# Load font profiles
include file: font_new
include file: font_phyrexian
include file: font_old
include file: font_m15
# Load scripts for image box
include file: /magic-default-image.mse-include/scripts
# Should hybrids have a grey name?
mask_hybrid_with_land := { contains(styling.regular_options, match:"grey hybrid names") }
@@ -78,29 +78,32 @@ init script:
}
font_field := {
if font_profile() == "m15" then (
if field == "name" then font_name_m15[value]
else if field == "type" then font_type_m15[value]
else if field == "text" then font_text_m15[value]
else if field == "pt" then font_pt_m15[value]
)
else if font_profile() == "new" then (
if font_profile() == "new" then (
if field == "name" then font_name_new[value]
else if field == "type" then font_type_new[value]
else if field == "text" then font_text_new[value]
else if field == "pt" then font_pt_new[value]
else font_pt_new[value]
)
else if font_profile() == "phyrexian" then (
if field == "name" then font_name_phyrexian[value]
else if field == "type" then font_type_phyrexian[value]
else if field == "text" then font_text_phyrexian[value]
else if field == "pt" then font_pt_phyrexian[value]
else font_pt_phyrexian[value]
)
else if font_profile() == "old" then (
if field == "name" then font_name_old[value]
else if field == "type" then font_type_old[value]
else if field == "text" then font_text_old[value]
else if field == "pt" then font_pt_old[value]
else font_pt_old[value]
)else(
if field == "name" then font_name_m15[value]
else if field == "type" then font_type_m15[value]
else if field == "text" then font_text_m15[value]
else if field == "pt" then font_pt_m15[value]
else font_pt_m15[value]
)
}

View File

@@ -78,29 +78,32 @@ init script:
}
font_field := {
if font_profile() == "m15" then (
if field == "name" then font_name_m15[value]
else if field == "type" then font_type_m15[value]
else if field == "text" then font_text_m15[value]
else if field == "pt" then font_pt_m15[value]
)
else if font_profile() == "new" then (
if font_profile() == "new" then (
if field == "name" then font_name_new[value]
else if field == "type" then font_type_new[value]
else if field == "text" then font_text_new[value]
else if field == "pt" then font_pt_new[value]
else font_pt_new[value]
)
else if font_profile() == "phyrexian" then (
if field == "name" then font_name_phyrexian[value]
else if field == "type" then font_type_phyrexian[value]
else if field == "text" then font_text_phyrexian[value]
else if field == "pt" then font_pt_phyrexian[value]
else font_pt_phyrexian[value]
)
else if font_profile() == "old" then (
if field == "name" then font_name_old[value]
else if field == "type" then font_type_old[value]
else if field == "text" then font_text_old[value]
else if field == "pt" then font_pt_old[value]
else font_pt_old[value]
)else(
if field == "name" then font_name_m15[value]
else if field == "type" then font_type_m15[value]
else if field == "text" then font_text_m15[value]
else if field == "pt" then font_pt_m15[value]
else font_pt_m15[value]
)
}
@@ -123,6 +126,10 @@ styling field:
type: text
name: chop text
description: Shrinks the textbox, formatted as "top,bottom". This must end in a comma.
styling field:
type: text
name: flavor bar offset
description: Move the flavor bar down X pixels. Use negative to move up.
styling field:
type: choice
name: font style
@@ -685,6 +692,13 @@ extra card field:
save value: false
editable: false
show statistics: false
extra card field:
type: choice
name: flavor bar
choice: bar
editable: false
save value: false
show statistics: false
extra card style:
card code:
left: 24
@@ -855,4 +869,13 @@ extra card style:
name: Matrix
size: 7
color: white
weight: bold
weight: bold
flavor bar:
left: 0
top: { bar_equation() }
width: 375
height: 1
z index: 3
render style: image
image: bar.png
visible: { card.rule_text != "" and remove_tags(card.flavor_text) != "" and set.use_flavor_bar }

View File

@@ -123,6 +123,9 @@ init script:
chop_top := {if styling.chop_top == "" then 0 else if comma_count(styling.chop_top) == "," or comma_count(styling.chop_top) == ",," then split_text(match:",", styling.chop_top).0 else styling.chop_top}
chop_bot := {if comma_count(styling.chop_top) == ",," then split_text(match:",", styling.chop_top).1 else if styling.chop_bottom == "" then 0 else styling.chop_bottom}
bar_offset := {if styling_offset() == "-" then 0 else if styling_offset() != "" then -styling_offset() else 0}
styling_offset := { replace(styling.flavor_bar_offset, match:"(u|d)+", replace: "") }
offset_lines := {offset_counter(styling.flavor_bar_offset)}
############################################################## Set info fields
set info style:
@@ -142,6 +145,10 @@ styling field:
type: text
name: chop bottom
description: Shrinks the textbox X pixels from the bottom.
styling field:
type: text
name: flavor bar offset
description: Move the flavor bar down X pixels. Use negative to move up.
styling field:
type: boolean
name: use holofoil stamps
@@ -607,12 +614,6 @@ extra card field:
choice: stamp
save value: false
editable: false
extra card field:
type: text
name: vorthos box
save value: true
editable: true
description: Where they put mtgstory.com on story spotlights.
extra card style:
card code:
left: 24
@@ -727,15 +728,3 @@ extra card style:
render style: image
image: bar.png
visible: { card.rule_text != "" and remove_tags(card.flavor_text) != "" and set.use_flavor_bar }
vorthos box:
right: { if card.pt != "" then 275 else 350 }
top: 488
left: 210
height: 10
z index: 3
alignment: middle right
font:
name: Relay-Medium
size: 7
color: white
weight: bold

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -4,7 +4,7 @@ short name: GZ Walkers
full name: Godzilla Planeswalkers
installer group: magic/m15 style/planeswalkers
icon: card-sample.png
position hint: 002
position hint: 018
version: 2020-06-08
depends on:
@@ -538,6 +538,12 @@ extra card field:
save value: false
script: card.card_color
show statistics: false
extra card field:
type: choice
name: cover
choice: cover
editable: false
save value: false
extra card style:
alias:
left: 0
@@ -738,4 +744,12 @@ extra card style:
line height soft: 0.9
line height hard max: 1.3
line height line max: 1.6
visible: { has_four_abilities() }
visible: { has_four_abilities() }
cover:
left: 0
top: 0
width: 375
height: 523
z index: 1
render style: image
image: {"cover/" + (if has_four_abilities() then "4" else "3") + (if not show_alias() then "" else "_alias") + ".png"}

View File

@@ -4,7 +4,7 @@ short name: Godzilla Saga
full name: M15 Godzilla Saga
installer group: magic/m15 style/sagas
icon: card-sample.png
position hint: 010
position hint: 018
version: 2020-05-10
depends on:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,4 @@
you can create subfolders and then specifiy them in the styling options
or just put the custom crown here if you only have one you wanna use
If you're using a custom crown, you need your images to be named "xcrown.png", where x is w, u, b, r, g, c, m, or a.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 771 KiB

Some files were not shown because too many files have changed in this diff Show More