From c8112ba6b8be653453396f2ea9c87a13bc0abbeb Mon Sep 17 00:00:00 2001 From: pichoro Date: Sat, 8 Sep 2007 16:27:12 +0000 Subject: [PATCH] More Updating to Yu-Gi-Oh, by artfreakwiu. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@671 0fc631ac-6414-0410-93d0-97cfa31319b6 --- .../symbol-font | 4 +- .../symbol-font | 2 +- data/yugioh.mse-game/game | 136 +++++++++--------- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/data/yugioh-standard-levels.mse-symbol-font/symbol-font b/data/yugioh-standard-levels.mse-symbol-font/symbol-font index 0a547189..b339be38 100644 --- a/data/yugioh-standard-levels.mse-symbol-font/symbol-font +++ b/data/yugioh-standard-levels.mse-symbol-font/symbol-font @@ -24,11 +24,11 @@ symbol: symbol: code: [ image: leftbracket.png - image font size: 24 + image font size: 28 symbol: code: ] image: rightbracket.png - image font size: 24 + image font size: 28 symbol: code: * image: star.png diff --git a/data/yugioh-text-replacements.mse-symbol-font/symbol-font b/data/yugioh-text-replacements.mse-symbol-font/symbol-font index 7e630924..4f3f1da7 100644 --- a/data/yugioh-text-replacements.mse-symbol-font/symbol-font +++ b/data/yugioh-text-replacements.mse-symbol-font/symbol-font @@ -13,5 +13,5 @@ symbol: code: @ image: infinity.png symbol: - code: ` + code: :: image: dot.png \ No newline at end of file diff --git a/data/yugioh.mse-game/game b/data/yugioh.mse-game/game index b91c6d40..451d22db 100644 --- a/data/yugioh.mse-game/game +++ b/data/yugioh.mse-game/game @@ -7,8 +7,6 @@ position hint: 4 ## Copied and Pasted from vs.mse-game, with a few modifications # General functions init script: - # level codes - level_sort := sort_rule(order: "[%!+&$#*@]") # the rule text filter # - adds continuous symbols # - adds counter symbols @@ -22,54 +20,44 @@ init script: text_filter := # step 1 : remove all automatic tags tag_remove_rule(tag: "") + - tag_remove_rule(tag: "") + - # step 2a : fill in atom fields + # step 2 : expand shortcut words ~ and CARDNAME + replace_rule( + match: "~|~THIS~|CARDNAME", + in_context: "(^|[[:space:]]|\\()", # TODO: Allow any punctuation before + replace: "" + ) + + # step 3 : fill in the cardname atom field tag_contents_rule( tag: "", contents: { if card.name=="" then "CARDNAME" else card.name } ) + - # step 2b : explict non symbols + # step 4 : symbols replace_rule( - match: "\\][\\[@\\]]+\\[", - replace: {"" +level_sort() + ""} ) + - # step 2c : add symbols - replace_rule( - match: "[\\[@\\]]+", - replace: {"" + level_sort() + ""} ) + - # step 2d : add explict symbols - replace_rule( - match: "\\[[\\[@\\]]+\\]", - replace: {"" + level_sort() + ""} ); + match: "[|@|::|]", + replace: "&" ); level_filter := # step 1 : remove all automatic tags tag_remove_rule(tag: "") + - # step 3b : explict non symbols + # step 2 : symbols replace_rule( - match: "\\][\\[%!+&$#*\\]]+\\[", - replace: {"" +level_sort() + ""} ) + - # step 3c : add symbols - replace_rule( - match: "[\\[%!+&$#*\\]]+", - replace: {"" + level_sort() + ""} ) + - # step 3d : add explict symbols - replace_rule( - match: "\\[[\\[%!+&$#*\\]]+\\]", - replace: {"" + level_sort() + ""} ); + match: "[|%|!|+|&|$|#|*|]", + replace: "&" ); a_and_d_filter := # step 1 : remove all automatic tags tag_remove_rule(tag: "") + - # step 2b : explict non symbols + # step 2 : symbols replace_rule( - match: "\\][\\[@\\]]+\\[", - replace: {"" +level_sort() + ""} ) + - # step 2c : add symbols + match: "@", + replace: "&" ); + copyright_filter := + # step 1 : trademark symbol replace_rule( - match: "[\\[@\\]]+", - replace: {"" + level_sort() + ""} ) + - # step 2d : add explict symbols + match: "TM", + replace: "™") + + # step 2 : copyright symbol replace_rule( - match: "\\[[\\[@\\]]+\\]", - replace: {"" + level_sort() + ""} ); + match: "CR|\\(C\\)", + replace: "©") # the flavor text filter flavor_text_filter := @@ -80,36 +68,38 @@ init script: # Determine type of card card_type := { - if card.type2 == "Effect]" then "effect monster" - else if card.type2 == "Fusion]" then "fusion monster" - else if card.type2 == "Fusion/Effect]" then "fusion monster" - else if card.type2 == "Ritual]" then "ritual monster" - else if card.type2 == "Ritual/Effect]" then "ritual monster" - else if card.type1 == "[Legendary Dragon" then "legendary dragon" - else if card.type1 == "[Divine-Beast" then "obelisk" - else if card.attribute == "spell" then "spell card" - else if card.level == "[Spell Card]" then "spell card" - else if card.level == "[Spell Card%]" then "spell card" - else if card.level == "[Spell Card!]" then "spell card" - else if card.level == "[Spell Card+]" then "spell card" - else if card.level == "[Spell Card&]" then "spell card" - else if card.level == "[Spell Card$]" then "spell card" - else if card.level == "[Spell Card#]" then "spell card" - else if card.attribute == "trap" then "trap card" - else if card.level == "[Trap Card]" then "trap card" - else if card.level == "[Trap Card%]" then "trap card" - else if card.level == "[Trap Card!]" then "trap card" - else if card.level == "[Trap Card+]" then "trap card" - else if card.level == "[Trap Card&]" then "trap card" - else if card.level == "[Trap Card$]" then "trap card" - else if card.level == "[Trap Card#]" then "trap card" - else "normal monster" + if card.type2 == "Effect]" then "effect monster" + else if card.type2 == "Fusion]" then "fusion monster" + else if card.type2 == "Fusion / Effect]" then "fusion monster" + else if card.type2 == "Fusion/Effect]" then "fusion monster" + else if card.type2 == "Ritual]" then "ritual monster" + else if card.type2 == "Ritual / Effect]" then "ritual monster" + else if card.type2 == "Ritual/Effect]" then "ritual monster" + else if card.type1 == "[Legendary Dragon" then "legendary dragon" + else if card.type1 == "[Divine-Beast" then "obelisk" + else if card.attribute == "spell" then "spell card" + else if card.level == "[Spell Card]" then "spell card" + else if card.level == "[Spell Card%]" then "spell card" + else if card.level == "[Spell Card!]" then "spell card" + else if card.level == "[Spell Card+]" then "spell card" + else if card.level == "[Spell Card&]" then "spell card" + else if card.level == "[Spell Card$]" then "spell card" + else if card.level == "[Spell Card#]" then "spell card" + else if card.attribute == "trap" then "trap card" + else if card.level == "[Trap Card]" then "trap card" + else if card.level == "[Trap Card%]" then "trap card" + else if card.level == "[Trap Card!]" then "trap card" + else if card.level == "[Trap Card+]" then "trap card" + else if card.level == "[Trap Card&]" then "trap card" + else if card.level == "[Trap Card$]" then "trap card" + else if card.level == "[Trap Card#]" then "trap card" + else "normal monster" } # Default 'attribute' of card attribute := { if is_spell_card() then "Spell" else if is_trap_card() then "Trap" - else "" + else "none" } ############### Type of card @@ -145,6 +135,15 @@ init script: card.attribute == "trap" or card.level == "Trap" } + ############### Determine Card Position + pos_of_card := { + position( + of: card + in: set + order_by: { + card.card_type + card.attribute + card.monster_type + card.name + }) + 1 + } ############################################################## Set fields @@ -244,12 +243,13 @@ card field: choice: divine choice: spell choice: trap + default: attribute() card list visible: true card list column: 2 card field: type: text name: level - description: Level, * = star, % = continuous, ! = counter, + = equipment, & = field, $ = quickplay, # = ritual + description: `=] * = star, % = continuous, ! = counter, + = equipment, & = field, $ = quickplay, # = ritual script: level_filter(value) ############################# Image @@ -263,11 +263,13 @@ card field: type: text name: type1 script: a_and_d_filter(value) + default: "[" editable: false card field: type: text name: type2 script: a_and_d_filter(value) + default: "]" editable: false card field: type: text @@ -276,7 +278,7 @@ card field: # Either just monster, monster / type1 combined_editor( field1: card.type1, - separator: "/", + separator: " / ", field2: card.type2, soft_before_empty: true, hide_when_empty: true, @@ -292,12 +294,9 @@ card field: set.code + "-" + set.language + - position( - of: card - in: set - order_by: { - card.name - }) + if pos_of_card()<=9 then "00" + pos_of_card(value) else + if pos_of_card()>=9 and pos_of_card()<=99 then "0" + pos_of_card(value) else + "" + pos_of_card(value) card list visible: true card list column: 6 card list width: 55 @@ -364,6 +363,7 @@ card field: type: text name: copyright default: set.copyright + script: copyright_filter(value) show statistics: false