From 6a615bb47ef3c94e2e4f18fd198af4ddb0053abc Mon Sep 17 00:00:00 2001 From: pichoro Date: Sat, 14 Aug 2010 17:55:51 +0000 Subject: [PATCH] Changes to Magic: Big keyword update. Update to allow new flip card technology. Update to allow 4-ability planeswalkers, textless lands, and levelers. More statistics that are related to card type. Custom subtype tracking for all card types. Planeswalker types included. Creature type updates. New symbol variation for set symbol watermarks; more like what appears on real cards. Updated card sorting. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1494 0fc631ac-6414-0410-93d0-97cfa31319b6 --- data/magic-blends.mse-include/include | 4 +- data/magic-blends.mse-include/new-blends | 134 ++++++++++++++++++ data/magic-watermarks.mse-include/include | 6 +- data/magic-watermarks.mse-include/watermarks | 2 +- .../watermarks-old | 2 +- data/magic.mse-game/card_fields | 57 +++++++- data/magic.mse-game/game | 6 +- data/magic.mse-game/keywords | 52 +++++-- data/magic.mse-game/language | 2 + data/magic.mse-game/script | 112 ++++++++------- data/magic.mse-game/set_fields | 6 + data/magic.mse-game/statistics | 102 ++++++++----- data/magic.mse-game/word_lists | 42 ++++-- 13 files changed, 403 insertions(+), 124 deletions(-) diff --git a/data/magic-blends.mse-include/include b/data/magic-blends.mse-include/include index c8e32288..31bfbe3a 100644 --- a/data/magic-blends.mse-include/include +++ b/data/magic-blends.mse-include/include @@ -1,6 +1,6 @@ mse version: 0.3.8 full name: Magic The Gathering, card blend utilities -version: 2009-04-09 +version: 2010-04-07 # This file doesn't do anything, other files in this directory can be included # in game/style files: @@ -9,4 +9,4 @@ version: 2009-04-09 # blend-scripts Defines card_hybrid, family of functions # Use in init script of style # card-backgrounds Uses the blend scripts to make choice images for card backgrounds -# Template names can be redefined \ No newline at end of file +# Template names can be redefined diff --git a/data/magic-blends.mse-include/new-blends b/data/magic-blends.mse-include/new-blends index 5eebc0c3..17c3c818 100644 --- a/data/magic-blends.mse-include/new-blends +++ b/data/magic-blends.mse-include/new-blends @@ -404,6 +404,128 @@ flip_pt_hybrid2 := [ overlay: overlay_hybrid ] + +######################################################################## +# P/T boxes for leveler cards +######################################################################## + +leveler_pt_hybrid := [ + radial: [ + 0: { template("c") } + 1: { template(colors[0]) } + 2: { template(colors[1]) } + 3: { linear_blend( + image1: template(colors[1]) + image2: template(colors[2]) + x1: 0, y1: 0 + x2: 0, y2: 1 + )} + 4: { template(colors[2]) } + 5: { template(colors[2]) } + 6: { template(colors[2]) } + 7: { template(colors[4]) } + ] + horizontal: horizontal_pt_hybrid + vertical: [ + 1: { template(colors[0]) } + 2: { template(colors[1]) } + 3: { linear_blend( + image1: template(colors[1]) + image2: template(colors[2]) + x1: 0, y1: 0 + x2: 0, y2: 1 + )} + 4: { template(colors[2]) } + 5: { template(colors[3]) } + 6: { linear_blend( + image1: template(colors[3]) + image2: template(colors[4]) + x1: 0, y1: 0 + x2: 0, y2: 0.25 + )} + 7: { template(colors[5]) } + ] + overlay: overlay_hybrid +] + +leveler_pt_hybrid2 := [ + radial: [ + 0: { template("c") } + 1: { template(colors[0]) } + 2: { template(colors[1]) } + 3: { template(colors[2]) } + 4: { template(colors[2]) } + 5: { template(colors[2]) } + 6: { template(colors[2]) } + 7: { template(colors[4]) } + ] + horizontal: horizontal_pt_hybrid + vertical: [ + 1: { template(colors[0]) } + 2: { template(colors[1]) } + 3: { template(colors[2]) } + 4: { linear_blend( + image1: template(colors[2]) + image2: template(colors[3]) + x1: 0, y1: 0 + x2: 0, y2: 1 + )} + 5: { linear_blend( + image1: template(colors[3]) + image2: template(colors[4]) + x1: 0, y1: 0 + x2: 0, y2: 0.75 + )} + 6: { template(colors[4]) } + 7: { template(colors[5]) } + ] + overlay: overlay_hybrid +] + +leveler_pt_hybrid3 := [ + radial: [ + 0: { template("c") } + 1: { template(colors[0]) } + 2: { template(colors[1]) } + 3: { template(colors[2]) } + 4: { template(colors[2]) } + 5: { linear_blend( + image1: template(colors[2]) + image2: template(colors[3]) + x1: 0, y1: 0 + x2: 0, y2: 1 + )} + 6: { linear_blend( + image1: template(colors[2]) + image2: template(colors[3]) + x1: 0, y1: 0 + x2: 0, y2: 1 + )} + 7: { template(colors[4]) } + ] + horizontal: horizontal_pt_hybrid + vertical: [ + 1: { template(colors[0]) } + 2: { template(colors[1]) } + 3: { template(colors[2]) } + 4: { template(colors[3]) } + 5: { linear_blend( + image1: template(colors[3]) + image2: template(colors[4]) + x1: 0, y1: 0 + x2: 0, y2: 0.5 + )} + 6: { linear_blend( + image1: template(colors[4]) + image2: template(colors[5]) + x1: 0, y1: 0 + x2: 0, y2: 0.5 + )} + 7: { template(colors[5]) } + ] + overlay: overlay_hybrid +] + ######################################################################## # Textbox and typeline for FPM templates and Futureshifts ######################################################################## @@ -554,9 +676,21 @@ card_background := { color_background(type:"card", base_hybrid:card_hybrid) card_ptbox := { color_background(type:"pt", base_hybrid:pt_hybrid) } flip_ptbox := { color_background(type:"pt", base_hybrid:flip_pt_hybrid) } flip_ptbox2 := { color_background(type:"pt2", base_hybrid:flip_pt_hybrid2) } +leveler_ptbox := { color_background(type:"pt", base_hybrid:leveler_pt_hybrid) } +leveler_ptbox2 := { color_background(type:"pt", base_hybrid:leveler_pt_hybrid2) } +leveler_ptbox3 := { color_background(type:"pt", base_hybrid:leveler_pt_hybrid3) } card_textbox := { color_background(type:"textbox", base_hybrid:textbox_hybrid) } card_typeline := { color_background(type:"typeline", base_hybrid:typeline_hybrid) } +flip_background := { + linear_blend( + image1: card_background(top) + image2: card_background(bottom) + x1: 0, y1: 0.4 + x2: 0, y2: 0.6 + ) +} + ######################################################################## # Font colors ######################################################################## diff --git a/data/magic-watermarks.mse-include/include b/data/magic-watermarks.mse-include/include index 14fda2a0..e2ca632d 100644 --- a/data/magic-watermarks.mse-include/include +++ b/data/magic-watermarks.mse-include/include @@ -1,7 +1,7 @@ -mse version: 0.3.6 +mse version: 0.3.8 full name: Magic The Gathering, textbox watermarks -version: 2008-05-21 +version: 2009-08-28 # This file doesn't do anything, other files in this directory can be included # in game/style files: -# watermarks Includes references to the watermark images, to be used in a style file \ No newline at end of file +# watermarks Includes references to the watermark images, to be used in a style file diff --git a/data/magic-watermarks.mse-include/watermarks b/data/magic-watermarks.mse-include/watermarks index 9c37fe66..41f3acd4 100644 --- a/data/magic-watermarks.mse-include/watermarks +++ b/data/magic-watermarks.mse-include/watermarks @@ -63,7 +63,7 @@ choice images: #symbol_variation(symbol: set.symbol, variation: "common") drop_shadow(offset_x: -0.01, offset_y: 0.03, blur_radius: 0.02, alpha: 1, color: rgb(0,0,0), enlarge(border_size: 0.03, - symbol_variation(symbol: set.symbol, border_radius: 0, fill_color:rgb(255,255,255), border_color:rgb(0,0,0)) + symbol_variation(symbol: set.symbol, variation: "watermark") ) ) ) diff --git a/data/magic-watermarks.mse-include/watermarks-old b/data/magic-watermarks.mse-include/watermarks-old index 94460ef9..15d26b95 100644 --- a/data/magic-watermarks.mse-include/watermarks-old +++ b/data/magic-watermarks.mse-include/watermarks-old @@ -63,7 +63,7 @@ choice images: #symbol_variation(symbol: set.symbol, variation: "common") drop_shadow(offset_x: -0.01, offset_y: 0.03, blur_radius: 0.02, alpha: 1, color: rgb(0,0,0), enlarge(border_size: 0.03, - symbol_variation(symbol: set.symbol, border_radius: 0, fill_color:rgb(255,255,255), border_color:rgb(0,0,0)) + symbol_variation(symbol: set.symbol, variation: "watermark") ) ) ) diff --git a/data/magic.mse-game/card_fields b/data/magic.mse-game/card_fields index 2b3356aa..d0709daf 100644 --- a/data/magic.mse-game/card_fields +++ b/data/magic.mse-game/card_fields @@ -1,5 +1,4 @@ - -############################################################## Card fields +############################################################## Card fields ############################# Automatic fields @@ -17,6 +16,7 @@ card field: choice: planeswalker choice: shifted choice: rulestip + choice: leveler script: stylesheet # indicate that this value should be updated when the stylesheet changes card_shape() # determined by the style @@ -32,7 +32,6 @@ card field: card list width: 150 description: The name of the card script: if contains(card.shape, match:"split") then card.name + " // " + card.name_2 else card.name - ############################# Background stuff card field: type: color @@ -90,7 +89,7 @@ card field: name: reversed enabled: { card_color_color_count(card.card_color) >= 2 and not chosen(choice:"overlay",card.card_color) } script: card_color_filter(value) - default: card_color(casting_cost: card.casting_cost, rules_text: card.rule_text, type: card.super_type, watermark: card.watermark, card_name: card.name) + default: card_color(casting_cost: card.casting_cost, rules_text: card.rule_text, type: card.super_type, watermark: card.watermark, card_name: card.name, default: "colorless") show statistics: false description: The frame of the card, used to indicate card color. @@ -153,6 +152,7 @@ card field: icon: stats/card_type.png position hint: 30 script: super_type_filter(value) + show statistics: false card field: type: text name: sub type @@ -265,6 +265,17 @@ card field: show statistics: false description: The loyalty cost for the fifth ability of a planeswalker default: card.toughness_2 #For back compatibility with past templates. Take out a couple versions after 0.3.8 +############################# Levels +card field: + type: text + name: level 1 + description: The first level of a creature + show statistics: false +card field: + type: text + name: level 2 + description: The second level of a creature + show statistics: false ############################# PT card field: type: text @@ -382,7 +393,7 @@ card field: name: reversed enabled: { card_color_color_count(card.card_color) >= 2 and not chosen(choice:"overlay",card.card_color_2) } script: card_color_filter(value) - default: card_color(casting_cost: card.casting_cost_2, type: card.super_type_2, rules_text: card.rule_text_2, watermark: card.watermark_2, card_name: card.name_2) + default: card_color(casting_cost: card.casting_cost_2, type: card.super_type_2, rules_text: card.rule_text_2, watermark: card.watermark_2, card_name: card.name_2, default: card.card_color) show statistics: false description: The frame of a card card field: @@ -462,6 +473,13 @@ card field: show statistics: false multi line: true description: The rules text of the card +card field: + type: text + name: rule text 3 + script: text_filter(input: value, card_name: card.name) + show statistics: false + multi line: true + description: The rules text of the card card field: type: text name: flavor text 2 @@ -519,6 +537,35 @@ card field: card list name: P/T2 show statistics: false description: Power/Toughness of a creature +card field: + type: text + name: power 3 + icon: stats/power.png + show statistics: false + script: type_over_pt(value) + description: The power of a creature +card field: + type: text + name: toughness 3 + icon: stats/toughness.png + show statistics: false + description: The toughness of a creature +card field: + type: text + name: pt 3 + save value: false + script: + combined_editor( + field1: card.power_3, + separator: language().pt_separator, + field2: card.toughness_3, + soft_before_empty: true, + hide_when_empty: true + ) + card list width: 50 + card list name: P/T3 + show statistics: false + description: Power/Toughness of a creature card field: type: text name: illustrator 2 diff --git a/data/magic.mse-game/game b/data/magic.mse-game/game index 1926a194..c305e599 100644 --- a/data/magic.mse-game/game +++ b/data/magic.mse-game/game @@ -5,8 +5,8 @@ installer group: magic/game files icon: card-back.png position hint: 01 -version: 2009-08-10 -depends on: magic-blends.mse-include 2007-09-23 +version: 2010-06-11 +depends on: magic-blends.mse-include 2010-04-07 depends on: magic-watermarks.mse-include 2007-09-23 ############################################################## The script @@ -15,6 +15,8 @@ init script: include file: script ############################################################## Lots of lists +################## There be dragons here. -Liosan ########################## + include file: card_fields include file: set_fields include file: statistics diff --git a/data/magic.mse-game/keywords b/data/magic.mse-game/keywords index 9974443d..42f8baca 100644 --- a/data/magic.mse-game/keywords +++ b/data/magic.mse-game/keywords @@ -127,7 +127,7 @@ keyword parameter type: keyword parameter type: name: a - match: [ ]*|[ ][an?]* + match: [an?]* ############################# All Magic keywords # By JrEye and Neko_Asakami, Updated by Pichoro and Buttock1234 @@ -266,7 +266,7 @@ keyword: keyword: Amplify match: Amplify number mode: expert - reminder: As this card enters the battlefield, put {english_number_a(param1)} +1/+1 counter(s) on it for each {separate_words(spacer: " and/or ", card.sub_type)} card you reveal in your hand. + reminder: As this creature enters the battlefield, put {english_number_a(param1)} +1/+1 counter(s) on it for each {separate_words(spacer: " and/or ", card.sub_type)} card you reveal in your hand. keyword: keyword: Double strike match: Double strike @@ -380,7 +380,7 @@ keyword: keyword: Ninjutsu match: Ninjutsu cost mode: expert - reminder: {param1}, Return an unblocked attacker you control to hand: This card enters the battlefield from your hand tapped and attacking. + reminder: {param1}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking. keyword: keyword: Epic match: Epic @@ -405,7 +405,7 @@ keyword: keyword: Transmute match: Transmute cost mode: expert - reminder: {param1}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Activate only as a sorcery. + reminder: {param1}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery. keyword: keyword: Dredge match: Dredge number @@ -480,7 +480,7 @@ keyword: keyword: Deathtouch match: Deathtouch mode: core - reminder: Creatures dealt damage by this creature are destroyed. You can divide this creature’s combat damage among any of the creatures blocking or blocked by it. + reminder: Any amount of damage this deals to a creature is enough to destroy it. keyword: keyword: Reach match: Reach @@ -506,7 +506,7 @@ keyword: match: Fateseal number mode: action reminder: - Look at the top { + To fateseal {param1}, look at the top { if param1.value==1 then "card of an opponent’s library, then you may put it on the bottom of that player’s library." else "{english_number(param1)} cards of an opponent’s library, then put any number of them on the bottom of that player’s library and the rest on top in any order." } @@ -514,7 +514,7 @@ keyword: keyword: Transfigure match: Transfigure cost mode: expert - reminder: {param1}, Sacrifice this creature: Search your library for a creature card with the same converted mana cost as this creature and have that card enter the battlefield. Then shuffle your library. Activate only as a sorcery. + reminder: {param1}, Sacrifice this creature: Search your library for a creature card with the same converted mana cost as this creature and put that card onto the battlefield. Then shuffle your library. Transfigure only as a sorcery. keyword: keyword: Aura swap match: Aura swap cost @@ -544,7 +544,7 @@ keyword: keyword: Fortify match: Fortify cost mode: expert - reminder: {param1}: Attach to target land you control. Fortify only as a sorcery. This card enters the battlefield unattached and stays in the battlefield if the land exits the battlefield. + reminder: {param1}: Attach to target land you control. Fortify only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the land leaves. keyword: keyword: Grandeur match: Grandeur @@ -557,9 +557,9 @@ keyword: reminder: You may cast this spell for its evoke cost. If you do, it’s sacrificed when it enters the battlefield. keyword: keyword: Champion - match: Championaname + match: Champion a name mode: expert - reminder: When this enters the battlefield, sacrifice it unless you exile another{param2} you control. When this exits the battlefield, return that card to the battlefield. + reminder: When this enters the battlefield, sacrifice it unless you exile another {param2} you control. When this leaves the battlefield, return that card to the battlefield. keyword: keyword: Clash match: Clash @@ -619,7 +619,7 @@ keyword: keyword: Unearth match: Unearth cost mode: expert - reminder: {param1}: Return this card from your graveyard to the battlefield. {if has_pt() then "It gains haste. " else "" }Exile it at the beginning of the end step or if it would exit the battlefield. Unearth only as a sorcery. + reminder: {param1}: Return this card from your graveyard to the battlefield. {if has_pt() then "It gains haste. " else "" }Exile it at the beginning of the end step or if it would leave the battlefield. Unearth only as a sorcery. keyword: keyword: Devour match: Devour number @@ -645,3 +645,33 @@ keyword: match: Intimidate mode: core reminder: This creature can’t be blocked except by artifact creatures and/or creatures that share a color with it. +keyword: + keyword: Landfall + match: Landfall + mode: pseudo + rules: Landfall — Whenever a land enters the battlefield under your control, [effect]. +keyword: + keyword: Multikicker + match: Multikicker cost + mode: expert + reminder: You may {for_mana_costs(add:"pay an additional ", param1)} any number of times as you cast this spell. +keyword: + keyword: Annihilator + match: Annihilator number + mode: expert + reminder: Whenever this creature attacks, defending player sacrifices {english_number_a(param1)} permanent(s). +keyword: + keyword: Rebound + match: Rebound + mode: expert + reminder: If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost. +keyword: + keyword: Totem armor + match: Totem armor + mode: expert + reminder: If enchanted creature would be destroyed, instead remove all damage from it and destroy this Aura. +keyword: + keyword: Level up + match: Level up cost + mode: expert + reminder: {param1}: Put a level counter on this. Level up only as a sorcery. diff --git a/data/magic.mse-game/language b/data/magic.mse-game/language index d95f8472..3b25bec7 100644 --- a/data/magic.mse-game/language +++ b/data/magic.mse-game/language @@ -14,6 +14,7 @@ languages := [ is_land : match@(match: "(?i)Land") is_enchantment : match@(match: "(?i)Enchantment") is_spell : match@(match: "(?i)Instant|Sorcery") + is_planeswalker : match@(match: "(?i)Planeswalker") ], Français: [ @@ -28,6 +29,7 @@ languages := [ is_land : match@(match: "(?i)Land") is_enchantment : match@(match: "(?i)Enchantment") is_spell : match@(match: "(?i)Instant|Sorcery") + is_planeswalker : match@(match: "(?i)Planeswalker") ] ] diff --git a/data/magic.mse-game/script b/data/magic.mse-game/script index 00158333..528bbd7c 100644 --- a/data/magic.mse-game/script +++ b/data/magic.mse-game/script @@ -1,5 +1,4 @@ - -############################################################## Localization +############################################################## Localization include file: language @@ -153,6 +152,7 @@ card_color := { mana_color := mana_to_color(colors: color_filter(casting_cost), hybrid: color_filterH(casting_cost)) if mana_color == "colorless" and is_land (type) then land_to_color(watermark) else if mana_color == "colorless" and is_artifact(type) then "artifact" + else if mana_color == "colorless" and contains(card.shape, match:"flip") then default else mana_color ) else text_color @@ -206,72 +206,75 @@ is_multicolor := { chosen(choice: "multicolor") and input != "artifact, multicol is_null_cost := { input == "" or input == "0" } is_hybrid_cost := { contains(card.casting_cost, match: "W/") or contains(card.casting_cost, match: "U/") or contains(card.casting_cost, match: "B/") or contains(card.casting_cost, match: "R/") or contains(card.casting_cost, match: "G/") } basic_land_sort := { - if contains(card.name, match:"Plains") then "LB" # Plains - else if contains(card.name, match:"Island") then "LC" # Islands - else if contains(card.name, match:"Swamp") then "LD" # Swamps - else if contains(card.name, match:"Mountain") then "LE" # Mountains - else if contains(card.name, match:"Forest") then "LF" # Forests - else "LA" # other basic lands + if contains(card.name, match:"Plains") then "MB" # Plains + else if contains(card.name, match:"Island") then "MC" # Islands + else if contains(card.name, match:"Swamp") then "MD" # Swamps + else if contains(card.name, match:"Mountain") then "ME" # Mountains + else if contains(card.name, match:"Forest") then "MF" # Forests + else "MA" # other basic lands } hybrid_color_pair_sort := { + colors := sort_text(casting_cost, order: "") + if colors = "WU" then "HA" + else if colors = "UB" then "HB" + else if colors = "BR" then "HC" + else if colors = "RG" then "HD" + else if colors = "WG" then "HE" + else if colors = "WB" then "HF" + else if colors = "UR" then "HG" + else if colors = "BG" then "HH" + else if colors = "WR" then "HI" + else if colors = "UG" then "HJ" + else "HK" +} +multi_color_pair_sort := { colors := sort_text(casting_cost, order: "") if colors = "WU" then "GA" else if colors = "UB" then "GB" else if colors = "BR" then "GC" else if colors = "RG" then "GD" - else if colors = "GW" then "GE" + else if colors = "WG" then "GE" else if colors = "WB" then "GF" else if colors = "UR" then "GG" else if colors = "BG" then "GH" - else if colors = "RW" then "GI" - else if colors = "GU" then "GJ" + else if colors = "WR" then "GI" + else if colors = "UG" then "GJ" + else if contains(card.casting_cost, match:"/") then "GL" else "GK" } -multi_color_pair_sort := { - colors := sort_text(casting_cost, order: "") - if colors = "WU" then "FA" - else if colors = "UB" then "FB" - else if colors = "BR" then "FC" - else if colors = "RG" then "FD" - else if colors = "GW" then "FE" - else if colors = "WB" then "FF" - else if colors = "UR" then "FG" - else if colors = "BG" then "FH" - else if colors = "RW" then "FI" - else if colors = "GU" then "FJ" - else if contains(card.casting_cost, match:"/") then "FL" - else "FK" -} # A code for the color of the card color_of_card := { card_color := card.card_color casting_cost := card.casting_cost + type := card.super_type if card.shape == "split" and - card_color != card.card_color_2 then "H" # Diff Color Splits - else if chosen(choice: "land", card_color) then ( - if card.rarity != "basic land" then "K" # Nonbasic Land - else basic_land_sort() - ) else if is_null_cost(casting_cost) then ( - if chosen(choice: "hybrid", card_color) then "GK" # Hybrids - else if is_multicolor(card_color) then "F" # Multicolor - else if chosen(choice:"white", card_color) then "A" # White - else if chosen(choice:"blue", card_color) then "B" # Blue - else if chosen(choice:"black", card_color) then "C" # Black - else if chosen(choice:"red", card_color) then "D" # Red - else if chosen(choice:"green", card_color) then "E" # Green - else "I" # Colorless / Artifact + card_color != card.card_color_2 then "I" # Diff Color Splits + else if chosen(choice: "land", card_color) then ( # Lands + if card.rarity != "basic land" then "L" # Nonbasic Land + else basic_land_sort() # Basic Land + ) else if is_null_cost(casting_cost) then ( # Non-Land Cards with no or zero costs. + if chosen(choice: "colorless", card_color) then "A" # Clear Colorless + else if chosen(choice: "hybrid", card_color) then "HK" # Hybrids + else if is_multicolor(card_color) then "GK" # Multicolor + else if chosen(choice:"white", card_color) then "B" # White + else if chosen(choice:"blue", card_color) then "C" # Blue + else if chosen(choice:"black", card_color) then "D" # Black + else if chosen(choice:"red", card_color) then "E" # Red + else if chosen(choice:"green", card_color) then "F" # Green + else "J" # Artifact ) else ( - # use the casting cost + # Cards with costs. colors := sort_text(casting_cost, order: "") - if colors == "" then "I" # Colorless / Artifact - else if colors == "W" then "A" # White - else if colors == "U" then "B" # Blue - else if colors == "B" then "C" # Black - else if colors == "R" then "D" # Red - else if colors == "G" then "E" # Green - else if is_hybrid_cost() then hybrid_color_pair_sort() #Hybrid (by pairs) - else if contains(casting_cost, match:"/") and contains(card_color, match:"artifact") then "I" # Colorless/Artifact - else multi_color_pair_sort() # Multicolor (by pairs) + if colors == "" and contains(type, match:"Artifact") then "J" # Artifact + else if colors == "" then "A" # Clear Colorless + else if colors == "W" then "B" # White + else if colors == "U" then "C" # Blue + else if colors == "B" then "D" # Black + else if colors == "R" then "E" # Red + else if colors == "G" then "F" # Green + else if is_hybrid_cost() then hybrid_color_pair_sort() # Hybrid (by pairs) + else if contains(casting_cost, match:"/") and contains(type, match:"Artifact") then "I" # Hybrid Artifacts + else multi_color_pair_sort() # Multicolor (by pairs) ) } @@ -455,7 +458,7 @@ text_filter := replace: {"" + mana_filter_t() + ""} ) + # step 6 : curly quotes curly_quotes + - # step 7 : ??? + # step 7 : italicize text in parenthesis replace@( match: "[(]([^)\n]|[(][^)\n]*[)])*[)]?", in_context: "(^|[[:space:]])|