From fe81a406171cb2412e9f53a39d0103664559ac9d Mon Sep 17 00:00:00 2001 From: pichoro Date: Sat, 8 Aug 2009 14:47:53 +0000 Subject: [PATCH] Yugioh Template Update Courtesy of artfreakwiu. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1419 0fc631ac-6414-0410-93d0-97cfa31319b6 --- data/yugioh-standard.mse-style/style | 43 +- data/yugioh.mse-game/card_fields | 204 ++++++++++ data/yugioh.mse-game/game | 564 +-------------------------- data/yugioh.mse-game/packs | 81 ++++ data/yugioh.mse-game/script | 187 +++++++++ data/yugioh.mse-game/set_fields | 41 ++ data/yugioh.mse-game/word_lists | 41 ++ 7 files changed, 591 insertions(+), 570 deletions(-) create mode 100644 data/yugioh.mse-game/card_fields create mode 100644 data/yugioh.mse-game/packs create mode 100644 data/yugioh.mse-game/script create mode 100644 data/yugioh.mse-game/set_fields create mode 100644 data/yugioh.mse-game/word_lists diff --git a/data/yugioh-standard.mse-style/style b/data/yugioh-standard.mse-style/style index 9f05d8e1..01741e0b 100644 --- a/data/yugioh-standard.mse-style/style +++ b/data/yugioh-standard.mse-style/style @@ -1,14 +1,14 @@ -mse version: 0.3.7 +mse version: 0.3.8 game: yugioh short name: Standard installer group: Yugioh/Standard icon: card-sample.png position hint: 01 -version: 2008-10-27 +version: 2009-08-08 depends on: package: yugioh.mse-game - version: 2008-10-27 + version: 2009-08-08 depends on: package: yugioh-standard-levels.mse-symbol-font version: 2007-10-27 @@ -16,7 +16,6 @@ depends on: package: yugioh-text-replacements.mse-symbol-font version: 2008-01-04 -card background: white card width: 361 card height: 523 card dpi: 152.6265 @@ -27,9 +26,19 @@ styling field: type: choice name: rules alignment description: Should the rules text be justified? WARNING: Justification is not perfect. - initial: not justified + initial: justified choice: not justified choice: justified +styling field: + type: boolean + name: image frame + description: Choosing "no" will omit the image frame like on Anniversary Edition cards. + initial: yes +styling field: + type: boolean + name: bold effect text + description: Should effect text be bold as seen on some cards such as those from The Dark Emperor? + initial: no ############################################################## Card fields card style: ############################# Background stuff @@ -56,10 +65,10 @@ card style: spell card: card-spell.jpg trap card: card-trap.jpg foils: - left: { if card.rarity=="parallel rare" then 0 else if card.rarity=="gold tech" then 0 else 51 } - top: { if card.rarity=="parallel rare" then 0 else if card.rarity=="gold tech" then 0 else 114 } - width: { if card.rarity=="parallel rare" then 361 else if card.rarity=="gold tech" then 361 else 259 } - height: { if card.rarity=="parallel rare" then 523 else if card.rarity=="gold tech" then 523 else 259 } + left: { if card.rarity=="parallel rare" then 0 else if card.rarity=="gold tech" then 0 else if styling.image_frame=="no" then 45 else 51 } + top: { if card.rarity=="parallel rare" then 0 else if card.rarity=="gold tech" then 0 else if styling.image_frame=="no" then 106 else 114 } + width: { if card.rarity=="parallel rare" then 361 else if card.rarity=="gold tech" then 361 else if styling.image_frame=="no" then 272 else 259 } + height: { if card.rarity=="parallel rare" then 523 else if card.rarity=="gold tech" then 523 else if styling.image_frame=="no" then 273 else 259 } z index: 5 render style: image popup style: in place @@ -131,10 +140,10 @@ card style: size: 7.5 ############################# Image image: - left: 51 - top: 113 - width: 260 - height: 260 + left: { if styling.image_frame=="no" then 45 else 51 } + top: { if styling.image_frame=="no" then 106 else 113 } + width: { if styling.image_frame=="no" then 272 else 260 } + height: { if styling.image_frame=="no" then 273 else 260 } z index: 1 ############################# Card type monster type: @@ -175,8 +184,8 @@ card style: height: 15 z index: 2 font: - name: Palatino Linotype Bold - size: 8 + name: { if card.edition=="DUEL TERMINAL" then "BankGothic Md BT" else "Palatino Linotype Bold" } + size: { if card.edition=="DUEL TERMINAL" then "10" else "8" } color: script: if card.card_type=="dark synchro monster" then rgb(255,255,255) else rgb(0,0,0) @@ -189,8 +198,8 @@ card style: height: script: if is_nmonster() then 92 else 62 font: - name: MatrixBook - size: 8 + name: { if styling.bold_effect_text=="yes" then "Matrix-Bold" else "MatrixBook" } + size: { if styling.bold_effect_text=="yes" then "9" else "8" } scale down to: 4 color: rgb(0,0,0) symbol font: diff --git a/data/yugioh.mse-game/card_fields b/data/yugioh.mse-game/card_fields new file mode 100644 index 00000000..5d294945 --- /dev/null +++ b/data/yugioh.mse-game/card_fields @@ -0,0 +1,204 @@ + +############################################################## Card fields +############################# Background stuff +card field: + type: choice + name: card type + choice: normal monster + choice: effect monster + choice: ritual monster + choice: synchro monster + choice: dark synchro monster + choice: fusion monster + choice: token monster + choice: obelisk + choice: slifer + choice: ra + choice: legendary dragons + choice: spell card + choice: trap card + default: card_type() + choice colors cardlist: + normal monster: rgb(120,18,0) + effect monster: rgb(120,18,0) + ritual monster: rgb(26,26,26) + synchro monster: rgb(26,26,26) + dark synchro monster: rgb(26,26,26) + fusion monster: rgb(26,26,26) + token monster: rgb(120,18,0) + obelisk: rgb(26,26,26) + slifer: rgb(26,26,26) + ra: rgb(26,26,26) + legendary dragons: rgb(26,26,26) + spell card: rgb(80,80,80) + trap card: rgb(30,110,0) +card field: + type: choice + name: foils + editable: false + choice: none + choice: holo image + choice: secret holo image + choice: parallel holo image + choice: gold tech holo image + default: foil() +############################# Name line +card field: + type: text + name: name + identifying: true + show statistics: false + card list visible: true + card list column: 1 +card field: + type: choice + name: attribute + choice: none + choice: earth + choice: water + choice: fire + choice: wind + choice: light + choice: dark + choice: divine + choice: spell + choice: trap + default: attribute() + card list visible: true + card list column: 2 +card field: + type: text + name: level + description: `=] * = star, % = continuous, ! = counter, + = equipment, & = field, $ = quickplay, # = ritual + script: level_filter(value) + +############################# Image +card field: + type: image + name: image + show statistics: false +############################# Card type +card field: + type: text + name: type1 + script: monster_type_filter(value) + default: " " + editable: false +card field: + type: text + name: separator + script: " / " + show statistics: false + editable: false +card field: + type: text + name: type2 + script: card_class_filter(value) + editable: false +card field: + type: text + name: monster type + script: + # Either just monster, monster / type1 + combined_editor( + field1: card.type1, + separator: card.separator, + field2: card.type2, + soft_before_empty: true, + hide_when_empty: true, + type_over1: " /", + type_over2: "/" + ) + card list visible: true + card list column: 3 +############################# Edition and Card ID +card field: + type: text + name: number + script: + set.code + + "-" + + set.language + + 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 + card list name: # + editable: false + save value: false + show statistics: false +card field: + type: text + name: edition + default: set.edition + show statistics: false +############################# Text box +card field: + type: text + name: rules + script: text_filter(value) + editable: false + show statistics: false +card field: + type: text + name: rule text + multi line: true + save value: true + show statistics: false + script: + if nm_ext_querry(value) then flavor_text_filter(value) + else text_filter(value) + default: card.rules +############################# Attack/Defense +card field: + type: text + name: attack + save value: true + script: a_and_d_filter(value) + card list visible: true + card list column: 4 + card list width: 33 + card list name: ATK +card field: + type: text + name: defense + save value: true + script: a_and_d_filter(value) + card list visible: true + card list column: 5 + card list width: 33 + card list name: DEF + +############################# Copyright stuff +card field: + type: text + name: gamecode + show statistics: false +card field: + type: choice + name: rarity + show statistics: true + choice: common + choice: rare + choice: super rare + choice: ultra rare + choice: secret rare + choice: ultimate rare + choice: parallel rare + choice: gold tech + choice: promo + card list visible: true + card list column: 7 +card field: + type: choice + name: corner foil + choice: stamp + editable: false +card field: + type: text + name: copyright + default: set.copyright + script: copyright_filter(value) + show statistics: false diff --git a/data/yugioh.mse-game/game b/data/yugioh.mse-game/game index 82535f50..564157d2 100644 --- a/data/yugioh.mse-game/game +++ b/data/yugioh.mse-game/game @@ -1,563 +1,21 @@ mse version: 0.3.8 +full name: Yu-Gi-Oh! short name: Yu-Gi-Oh! -installer group: Yugioh/Game Files +installer group: Yugioh/game files icon: card-back.png position hint: 4 -version: 2009-01-09 +version: 2009-08-08 -############################################################## Functions & filters -## Copied and Pasted from vs.mse-game, with a few modifications -# General functions -init script: - # the rule text filter - # - adds continuous symbols - # - adds counter symbols - # - adds equipment symbols - # - adds field symbols - # - adds quickplay symbols - # - adds ritual symbols - # - adds level symbols - # - adds infinity symbols - # - makes text in parentheses italic - text_filter := - # step 1 : remove all automatic tags - tag_remove_rule(tag: "") + - # 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 4 : symbols - replace_rule( - match: "[|@|*|?|]", - replace: "&" ); - level_filter := - # step 1 : remove all automatic tags - tag_remove_rule(tag: "") + - # step 2 : symbols - replace_rule( - match: "[|%|!|+|&|$|#|*|^|]", - replace: "&" ); - a_and_d_filter := - # step 1 : remove all automatic tags - tag_remove_rule(tag: "") + - # step 2 : infinity - replace_rule( - match: "@", - replace: "&" ) + - # step 3 : question mark - replace_rule( - match: "\\?", - replace: "&" ); - copyright_filter := - # step 1 : trademark symbol - replace_rule( - match: "TM", - replace: "™") + - # step 2 : copyright symbol - replace_rule( - match: "CR|\\(C\\)", - replace: "©") - - # the flavor text filter - flavor_text_filter := - # step 1 : remove italic tags - tag_remove_rule(tag: "") + - # step 2 : surround by tags - { "" + input + "" }; - - type_over_list := replace_rule(match:" ?-$", replace:"") - - monster_type_filter := - tag_remove_rule(tag: "{input}" } - - space_to_wltags := replace_rule(match:"( +| )", - replace:{"{_1}"}) - - card_class_filter := - tag_remove_rule(tag: "{input}" } - - # Determine type of card - card_type := { - if card.attribute == "spell" then "spell card" - else if contains(card.level, match:"Spell Card") then "spell card" - else if card.attribute == "trap" then "trap card" - else if contains(card.level, match:"Trap Card") then "trap card" - else if card.type1 == "Divine-Beast" then "obelisk" - else if card.type1 == "Legendary Dragon" then "legendary dragons" - else if contains(card.type2, match:"Fusion") then "fusion monster" - else if contains(card.type2, match:"Ritual") then "ritual monster" - else if contains(card.type2, match:"Dark Synchro") then "dark synchro monster" - else if contains(card.type2, match:"Dark Tuner") then "effect monster" - else if contains(card.type2, match:"Synchro") then "synchro monster" - else if contains(card.type2, match:"Effect") then "effect monster" - else if contains(card.type2, match:"Spirit") then "effect monster" - else if contains(card.type2, match:"Toon") then "effect monster" - else if contains(card.type2, match:"Tuner") then "effect monster" - else if contains(card.type2, match:"Union") then "effect monster" - else "normal monster" - } - # Default 'attribute' of card - attribute := { - if is_spell_card() then "Spell" - else if is_trap_card() then "Trap" - else "none" - } - # Default foil for a card - foil := { - if card.rarity == "super rare" then "holo image" - else if card.rarity == "ultra rare" then "holo image" - else if card.rarity == "secret rare" then "secret holo image" - else if card.rarity == "ultimate rare" then "holo image" - else if card.rarity == "parallel rare" then "parallel holo image" - else if card.rarity == "gold tech" then "gold tech holo image" - else if card.rarity == "promo" then "secret holo image" - else "none" - } - - ############### Type of card - - nm_ext_querry := { - if set.gods_have_effects == "no" then is_normal_monster_extended(value) - else is_normal_monster(value) - } - is_nmonster := { - card.card_type == "spell card" or - card.card_type == "trap card" - } - is_monster := { - card.card_type == "normal monster" or - card.card_type == "effect monster" or - card.card_type == "ritual monster" or - card.card_type == "dark synchro monster" or - card.card_type == "synchro monster" or - card.card_type == "fusion monster" or - card.card_type == "token monster" or - card.card_type == "obelisk" or - card.card_type == "slifer" or - card.card_type == "ra" or - card.card_type == "legendary dragons" - } - is_normal_monster_extended := { - card.card_type == "normal monster" or - card.card_type == "obelisk" or - card.card_type == "slifer" or - card.card_type == "ra" or - card.card_type == "legendary dragons" - } - is_normal_monster := { - card.card_type == "normal monster" - } - is_spell_card := { - card.card_type == "spell card" or - card.attribute == "spell" or - card.level == "Spell" - } - is_trap_card := { - card.card_type == "trap card" or - card.attribute == "trap" or - card.level == "Trap" - } - ############### Determine Card Position - - type_sort := { - type := card.card_type - if chosen(choice:"normal monster", type) then "A" - else if chosen(choice:"ra", type) then "B" - else if chosen(choice:"effect monster", type) then "C" - else if chosen(choice:"slifer", type) then "D" - else if chosen(choice:"ritual monster", type) then "E" - else if chosen(choice:"obelisk", type) then "F" - else if chosen(choice:"fusion monster", type) then "G" - else if chosen(choice:"synchro monster", type) then "H" - else if chosen(choice:"dark synchro monster", type) then "I" - else if chosen(choice:"token monster", type) then "J" - else if chosen(choice:"legendary dragons", type) then "K" - else if chosen(choice:"spell card", type) then "L" - else if chosen(choice:"trap card", type) then "M" - else "N" - } - - pos_of_card := { - position( - of: card - in: set - order_by: { - type_sort() + card.attribute + card.monster_type + card.name - }) + 1 - } +############################################################## The script -############################################################## Set fields -set field: - type: info - name: Set Information -set field: - type: text - name: title - description: This information will not appear on the card. -set field: - type: text - name: code - description: Recommended only 3 Capital digits. Will appear before card number. ex: LOB-XX101 -set field: - type: text - name: language - description: Recommended 2 - 3 Captital digits. Will appear before the card number, after the code. ex: XXX-EN101 -set field: - type: text - name: description - multi line: true - description: This information will not appear on the card. -set field: - type: text - name: edition - description: Editting this will set 1 edition for all the cards and will appear in the edition bar below the picture. ex-> LIMITED EDITION -set field: - type: text - name: copyright - description: Copyright information. This will not appear on the card. -set field: - type: boolean - name: gods have effects - description: Should god cards have effects? - initial: yes -############################# Default style -default set style: - title: - padding left: 2 - font: - size: 16 -############################################################## Card fields -############################# Background stuff -card field: - type: choice - name: card type - choice: normal monster - choice: effect monster - choice: ritual monster - choice: synchro monster - choice: dark synchro monster - choice: fusion monster - choice: token monster - choice: obelisk - choice: slifer - choice: ra - choice: legendary dragons - choice: spell card - choice: trap card - default: card_type() - choice colors cardlist: - normal monster: rgb(120,18,0) - effect monster: rgb(120,18,0) - ritual monster: rgb(26,26,26) - synchro monster: rgb(26,26,26) - dark synchro monster: rgb(26,26,26) - fusion monster: rgb(26,26,26) - token monster: rgb(120,18,0) - obelisk: rgb(26,26,26) - slifer: rgb(26,26,26) - ra: rgb(26,26,26) - legendary dragons: rgb(26,26,26) - spell card: rgb(80,80,80) - trap card: rgb(30,110,0) -card field: - type: choice - name: foils - editable: false - choice: none - choice: holo image - choice: secret holo image - choice: parallel holo image - choice: gold tech holo image - default: foil() -############################# Name line -card field: - type: text - name: name - identifying: true - show statistics: false - card list visible: true - card list column: 1 -card field: - type: choice - name: attribute - choice: none - choice: earth - choice: water - choice: fire - choice: wind - choice: light - choice: dark - choice: divine - choice: spell - choice: trap - default: attribute() - card list visible: true - card list column: 2 -card field: - type: text - name: level - description: `=] * = star, % = continuous, ! = counter, + = equipment, & = field, $ = quickplay, # = ritual - script: level_filter(value) +init script: include file: script -############################# Image -card field: - type: image - name: image - show statistics: false -############################# Card type -card field: - type: text - name: type1 - script: monster_type_filter(value) - default: " " - editable: false -card field: - type: text - name: separator - script: if nm_ext_querry(value) then " " else " / " - show statistics: false - editable: false -card field: - type: text - name: type2 - script: card_class_filter(value) - editable: false -card field: - type: text - name: monster type - script: - # Either just monster, monster / type1 - combined_editor( - field1: card.type1, - separator: card.separator, - field2: card.type2, - soft_before_empty: true, - hide_when_empty: true, - type_over1: " /", - type_over2: "/" - ) - card list visible: true - card list column: 3 -############################# Edition and Card ID -card field: - type: text - name: number - script: - set.code - + "-" + - set.language + - 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 - card list name: # - editable: false - save value: false - show statistics: false -card field: - type: text - name: edition - default: set.edition - show statistics: false -############################# Text box -card field: - type: text - name: rules - script: text_filter(value) - editable: false - show statistics: false -card field: - type: text - name: rule text - multi line: true - save value: true - show statistics: false - script: - if nm_ext_querry(value) then flavor_text_filter(value) - else text_filter(value) - default: card.rules -############################# Attack/Defense -card field: - type: text - name: attack - save value: true - script: a_and_d_filter(value) - card list visible: true - card list column: 4 - card list width: 33 - card list name: ATK -card field: - type: text - name: defense - save value: true - script: a_and_d_filter(value) - card list visible: true - card list column: 5 - card list width: 33 - card list name: DEF +############################################################## Lots of lists -############################# Copyright stuff -card field: - type: text - name: gamecode - show statistics: false -card field: - type: choice - name: rarity - show statistics: true - choice: common - choice: rare - choice: super rare - choice: ultra rare - choice: secret rare - choice: ultimate rare - choice: parallel rare - choice: gold tech - choice: promo - card list visible: true - card list column: 7 -card field: - type: choice - name: corner foil - choice: stamp - editable: false -card field: - type: text - name: copyright - default: set.copyright - script: copyright_filter(value) - show statistics: false +include file: card_fields +include file: set_fields +include file: packs +include file: word_lists -############################################################## Word lists - -word list: - name: monster - word: Aqua - word: Beast - word: Beast-Warrior - word: Dinosaur - word: Divine-Beast - word: Dragon - word: Fairy - word: Fiend - word: Fish - word: Insect - word: Legendary Dragon - word: Machine - word: Plant - word: Pyro - word: Psychic - word: Reptile - word: Rock - word: Sea Serpent - word: Spellcaster - word: Thunder - word: Warrior - word: Winged Beast - word: Zombie -word list: - name: card - word: Dark Synchro - word: Dark Tuner - word: Effect - word: Fusion - word: Ritual - word: Spirit - word: Synchro - word: Toon - word: Tuner - word: Union -############################################################## Card pack items -pack type: - name: rare - filter: card.rarity != "common" -pack type: - name: common - filter: card.rarity == "common" -pack type: - name: gold - filter: card.rarity == "gold tech" -pack type: - name: card - filter: card.number != "" -############################################################## Card packs -pack type: - name: booster pack - item: - name: rare - amount: 1 - item: - name: common - amount: 8 -pack type: - name: champion pack - item: - name: rare - amount: 1 - item: - name: common - amount: 2 -pack type: - name: duelist pack - item: - name: rare - amount: 1 - item: - name: common - amount: 5 -pack type: - name: gold series - item: - name: gold - amount: 3 - item: - name: common - amount: 22 -pack type: - name: movie pack - item: - name: rare - amount: 3 - item: - name: common - amount: 5 -pack type: - name: premium pack - item: - name: rare - amount: 5 -pack type: - name: tournament pack - item: - name: card - amount: 3 -pack type: - name: additional rare - item: - name: rare -pack type: - name: additional common - item: - name: common -pack type: - name: additional gold - item: - name: gold -pack type: - name: additional card - item: - name: card +############################################################## Other stuff \ No newline at end of file diff --git a/data/yugioh.mse-game/packs b/data/yugioh.mse-game/packs new file mode 100644 index 00000000..ef0e667a --- /dev/null +++ b/data/yugioh.mse-game/packs @@ -0,0 +1,81 @@ + +############################################################## Card pack items +pack type: + name: rare + filter: card.rarity != "common" +pack type: + name: common + filter: card.rarity == "common" +pack type: + name: gold + filter: card.rarity == "gold tech" +pack type: + name: card + filter: card.number != "" +############################################################## Card packs +pack type: + name: booster pack + item: + name: rare + amount: 1 + item: + name: common + amount: 8 +pack type: + name: champion pack + item: + name: rare + amount: 1 + item: + name: common + amount: 2 +pack type: + name: duelist pack + item: + name: rare + amount: 1 + item: + name: common + amount: 5 +pack type: + name: gold series + item: + name: gold + amount: 3 + item: + name: common + amount: 22 +pack type: + name: movie pack + item: + name: rare + amount: 3 + item: + name: common + amount: 5 +pack type: + name: premium pack + item: + name: rare + amount: 5 +pack type: + name: tournament pack + item: + name: card + amount: 3 +pack type: + name: additional rare + item: + name: rare +pack type: + name: additional common + item: + name: common +pack type: + name: additional gold + item: + name: gold +pack type: + name: additional card + item: + name: card diff --git a/data/yugioh.mse-game/script b/data/yugioh.mse-game/script new file mode 100644 index 00000000..64f5d59a --- /dev/null +++ b/data/yugioh.mse-game/script @@ -0,0 +1,187 @@ + # the rule text filter + # - adds continuous symbols + # - adds counter symbols + # - adds equipment symbols + # - adds field symbols + # - adds quickplay symbols + # - adds ritual symbols + # - adds level symbols + # - adds infinity symbols + # - makes text in parentheses italic + text_filter := + # step 1 : remove all automatic tags + tag_remove_rule(tag: "") + + # 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 4 : symbols + replace_rule( + match: "[|@|*|?|]", + replace: "&" ); + level_filter := + # step 1 : remove all automatic tags + tag_remove_rule(tag: "") + + # step 2 : symbols + replace_rule( + match: "[|%|!|+|&|$|#|*|^|]", + replace: "&" ); + a_and_d_filter := + # step 1 : remove all automatic tags + tag_remove_rule(tag: "") + + # step 2 : infinity + replace_rule( + match: "@", + replace: "&" ) + + # step 3 : question mark + replace_rule( + match: "\\?", + replace: "&" ); + copyright_filter := + # step 1 : trademark symbol + replace_rule( + match: "TM", + replace: "™") + + # step 2 : copyright symbol + replace_rule( + match: "CR|\\(C\\)", + replace: "©") + + # the flavor text filter + flavor_text_filter := + # step 1 : remove italic tags + tag_remove_rule(tag: "") + + # step 2 : surround by tags + { "" + input + "" }; + + type_over_list := replace_rule(match:" ?-$", replace:"") + + monster_type_filter := + tag_remove_rule(tag: "{input}" } + + space_to_wltags := replace_rule(match:"( +| )", + replace:{"{_1}"}) + + card_class_filter := + tag_remove_rule(tag: "{input}" } + + # Determine type of card + card_type := { + if card.attribute == "spell" then "spell card" + else if contains(card.level, match:"Spell Card") then "spell card" + else if card.attribute == "trap" then "trap card" + else if contains(card.level, match:"Trap Card") then "trap card" + else if card.type1 == "Divine-Beast" then "obelisk" + else if card.type1 == "Legendary Dragon" then "legendary dragons" + else if contains(card.type2, match:"Fusion") then "fusion monster" + else if contains(card.type2, match:"Ritual") then "ritual monster" + else if contains(card.type2, match:"Dark Synchro") then "dark synchro monster" + else if contains(card.type2, match:"Dark Tuner") then "effect monster" + else if contains(card.type2, match:"Synchro") then "synchro monster" + else if contains(card.type2, match:"Effect") then "effect monster" + else if contains(card.type2, match:"Spirit") then "effect monster" + else if contains(card.type2, match:"Toon") then "effect monster" + else if contains(card.type2, match:"Tuner") then "effect monster" + else if contains(card.type2, match:"Union") then "effect monster" + else "normal monster" + } + # Default 'attribute' of card + attribute := { + if is_spell_card() then "Spell" + else if is_trap_card() then "Trap" + else "none" + } + # Default foil for a card + foil := { + if card.rarity == "super rare" then "holo image" + else if card.rarity == "ultra rare" then "holo image" + else if card.rarity == "secret rare" then "secret holo image" + else if card.rarity == "ultimate rare" then "holo image" + else if card.rarity == "parallel rare" then "parallel holo image" + else if card.rarity == "gold tech" then "gold tech holo image" + else if card.rarity == "promo" then "secret holo image" + else "none" + } + + ############### Type of card + + nm_ext_querry := { + if set.gods_have_effects == "no" then is_normal_monster_extended(value) + else is_normal_monster(value) + } + is_nmonster := { + card.card_type == "spell card" or + card.card_type == "trap card" + } + is_monster := { + card.card_type == "normal monster" or + card.card_type == "effect monster" or + card.card_type == "ritual monster" or + card.card_type == "dark synchro monster" or + card.card_type == "synchro monster" or + card.card_type == "fusion monster" or + card.card_type == "token monster" or + card.card_type == "obelisk" or + card.card_type == "slifer" or + card.card_type == "ra" or + card.card_type == "legendary dragons" + } + is_normal_monster_extended := { + card.card_type == "normal monster" or + card.card_type == "obelisk" or + card.card_type == "slifer" or + card.card_type == "ra" or + card.card_type == "legendary dragons" + } + is_normal_monster := { + card.card_type == "normal monster" + } + is_spell_card := { + card.card_type == "spell card" or + card.attribute == "spell" or + card.level == "Spell" + } + is_trap_card := { + card.card_type == "trap card" or + card.attribute == "trap" or + card.level == "Trap" + } + ############### Determine Card Position + + type_sort := { + type := card.card_type + if chosen(choice:"normal monster", type) then "A" + else if chosen(choice:"ra", type) then "B" + else if chosen(choice:"effect monster", type) then "C" + else if chosen(choice:"slifer", type) then "D" + else if chosen(choice:"ritual monster", type) then "E" + else if chosen(choice:"obelisk", type) then "F" + else if chosen(choice:"fusion monster", type) then "G" + else if chosen(choice:"synchro monster", type) then "H" + else if chosen(choice:"dark synchro monster", type) then "I" + else if chosen(choice:"token monster", type) then "J" + else if chosen(choice:"legendary dragons", type) then "K" + else if chosen(choice:"spell card", type) then "L" + else if chosen(choice:"trap card", type) then "M" + else "N" + } + + pos_of_card := { + position( + of: card + in: set + order_by: { + type_sort() + card.monster_type + card.name + card.attribute + }) + 1 + } diff --git a/data/yugioh.mse-game/set_fields b/data/yugioh.mse-game/set_fields new file mode 100644 index 00000000..744428e4 --- /dev/null +++ b/data/yugioh.mse-game/set_fields @@ -0,0 +1,41 @@ + +############################################################## Set fields +set field: + type: info + name: Set Information +set field: + type: text + name: title + description: This information will not appear on the card. +set field: + type: text + name: code + description: Recommended only 3 Capital digits. Will appear before card number. ex: LOB-XX101 +set field: + type: text + name: language + description: Recommended 2 - 3 Captital digits. Will appear before the card number, after the code. ex: XXX-EN101 +set field: + type: text + name: description + multi line: true + description: This information will not appear on the card. +set field: + type: text + name: edition + description: Editting this will set 1 edition for all the cards and will appear in the edition bar below the picture. ex-> LIMITED EDITION +set field: + type: text + name: copyright + description: Copyright information. This will not appear on the card. +set field: + type: boolean + name: gods have effects + description: Should god cards have effects? + initial: yes +############################# Default style +default set style: + title: + padding left: 2 + font: + size: 16 diff --git a/data/yugioh.mse-game/word_lists b/data/yugioh.mse-game/word_lists new file mode 100644 index 00000000..ac1bab1f --- /dev/null +++ b/data/yugioh.mse-game/word_lists @@ -0,0 +1,41 @@ + +############################################################## Word lists + +word list: + name: monster + word: Aqua + word: Beast + word: Beast-Warrior + word: Dinosaur + word: Divine-Beast + word: Dragon + word: Fairy + word: Fiend + word: Fish + word: Insect + word: Legendary Dragon + word: Machine + word: Plant + word: Pyro + word: Psychic + word: Reptile + word: Rock + word: Sea Serpent + word: Spellcaster + word: Thunder + word: Warrior + word: Winged Beast + word: Zombie +word list: + name: card + word: Dark Synchro + word: Dark Tuner + word: Effect + word: Fusion + word: Gemini + word: Ritual + word: Spirit + word: Synchro + word: Toon + word: Tuner + word: Union