From 5bc421a1dd03712d267cfc03791b17a09400d03b Mon Sep 17 00:00:00 2001 From: pichoro Date: Thu, 10 May 2007 04:20:59 +0000 Subject: [PATCH] Updated Vanguard Keywords. Added some fields that are necessary for modern tokens and futureshifts. Altered card sorting script to sort cards with super type "Basic Land" but common rarity as non-basic lands. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@330 0fc631ac-6414-0410-93d0-97cfa31319b6 --- data/magic.mse-game/game | 47 ++++++++++++-- data/vanguard.mse-game/game | 123 ++++++++++++++++++++++++------------ 2 files changed, 123 insertions(+), 47 deletions(-) diff --git a/data/magic.mse-game/game b/data/magic.mse-game/game index b78278ae..4a482f3d 100644 --- a/data/magic.mse-game/game +++ b/data/magic.mse-game/game @@ -127,16 +127,16 @@ init script: is_colorless := filter_rule(match: "^colorless") + {input != ""}; is_artifact := filter_rule(match: "^artifact") + {input != ""}; sort_index := { - if card.card_color=="white" then "A" + if card.card_color=="white" then "A" else if card.card_color=="blue" then "B" else if card.card_color=="black" then "C" else if card.card_color=="red" then "D" else if card.card_color=="green" then "E" else if is_multicolor(card.card_color) then "F" else if is_hybrid (card.card_color) then "G" - else if is_colorless (card.card_color) or is_artifact (card.card_color) then "H" - else if card.super_type!="Basic Land" then "I" - else "J" + else if is_colorless (card.card_color) or is_artifact (card.card_color) then "I" + else if card.rarity!="basic land" then "J" + else "K" }; # The color of a card @@ -528,6 +528,43 @@ card field: choice: none choice: tombstone description: Symbol for this card (tombstone) +#for use in futureshifts +card field: + type: choice + name: type symbol + choice: none + choice: creature + choice: enchantment + choice: sorcery + choice: instant + choice: artifact + choice: land + choice: multitype + description: Symbol for the type of this card (claw marks, chalice, lightning bolt) +# Part of Name box for new token template +card field: + type: choice + name: name box + choice: black + editable: false + save value: false + show statistics: false +# Part of Name box for new token template +card field: + type: choice + name: name box left + choice: black + editable: false + save value: false + show statistics: false +# Part of Name box for new token template +card field: + type: choice + name: name box right + choice: black + editable: false + save value: false + show statistics: false ############################# Image card field: @@ -570,7 +607,6 @@ card field: name: type image include file: magic-blends.mse-include/card-colors script: card.card_color - editable: false card field: type: choice name: rarity @@ -612,7 +648,6 @@ card field: name: textbox include file: magic-blends.mse-include/card-colors script: card.card_color - editable: false save value: false show statistics: false card field: diff --git a/data/vanguard.mse-game/game b/data/vanguard.mse-game/game index 17174c49..f941326d 100644 --- a/data/vanguard.mse-game/game +++ b/data/vanguard.mse-game/game @@ -19,8 +19,11 @@ init script: replace: "Æ") + # step 2 : longdash for keywords replace_rule( - match: "--| - ", + match: "--", replace: "—") + + replace_rule( + match: " - ", + replace: " — ") + # step 3 : trademark symbol replace_rule( match: "TM", @@ -38,8 +41,11 @@ init script: replace: "Æ") + # step 2 : longdash for keywords replace_rule( - match: "--| - ", - replace: "—") + match: "--", + replace: "—") + + replace_rule( + match: " - ", + replace: " — ") # correctly sort a mana symbol (no guild mana) mana_sort := sort_rule(order: "XYZ[0123456789]S(WUBRG)") @@ -63,12 +69,17 @@ init script: # replaces — correctly alternative_cost := replace_rule(match:"—|\\.", replace:"") + replace_rule(match:"[A-Z]", in_context:"", replace: { to_lower() }) - mana_cost := replace_rule(match:" ", in_context:"\\>", replace: "") + mana_cost := replace_rule(match:" ", replace: "") + add := "" # default is nothing format_cost := { if substring(begin: 0, end: 13)=="—" then - alternative_cost(input:input) - else add + "" + mana_cost(input:input) + "" + alternative_cost() + else add + mana_cost() }; + format_cost_start := replace_rule(match:"^()?[ ]?-", replace:"\\1—") + # Utilities for keywords + has_cc := { card.casting_cost != "" } + has_pt := { card.pt != "" } # Filters for the text box # context in which mana symbols are found @@ -102,8 +113,10 @@ init script: tag_remove_rule(tag: "") + # step 2 : reminder text for keywords expand_keywords_rule( - default_expand: { contains(match:mode, set.automatic_reminder_text, match:mode) }, - combine: { "{keyword} ({process_english_hints(reminder)})" } + default_expand: { contains(match:mode, set.automatic_reminder_text) }, + combine: { + if mode == "pseudo" then "{keyword}" + else "{keyword} ({process_english_hints(reminder)})" } ) + # step 3 : expand shortcut words ~ and CARDNAME replace_rule( @@ -131,8 +144,11 @@ init script: replace: {"" + mana_filter_t() + ""} ) + # step 6 : longdash replace_rule( - match: "--| - ", - replace: "—" ) + + match: "--", + replace: "—") + + replace_rule( + match: " - ", + replace: " — ") + # step 6b : Æ replacement replace_rule( match: "AE", @@ -141,10 +157,6 @@ init script: replace_rule( match: "s" replace: "" ) + - # step 6d : period remover for action param keywords - replace_rule( - match: ".<.>" - replace: "" ) + # step 6e : p/t detector, needed for suspend tag_contents_rule( tag: "" @@ -208,6 +220,7 @@ set field: choice: old choice: core choice: expert + choice: pseudo choice: custom initial: old, core, expert, custom # Convert from older mse versions @@ -369,6 +382,9 @@ keyword mode: keyword mode: name: expert description: Expert level keywords (Cycling, Vanishing, etc.) +keyword mode: + name: pseudo + description: Pseudo keyword / named ability (Hellbent, Threshold, etc.) keyword mode: is default: true name: custom @@ -376,27 +392,28 @@ keyword mode: keyword parameter type: name: mana - match: [XYZ0-9WUBRGS/]+ + match: [STXYZ0-9WUBRG/|]+ # By pichoro and bunnierein keyword parameter type: name: cost - match: [:space:]?[^(\n]+ + match: [ ][STXYZ0-9WUBRG/|]*|[-—][^(\n]* refer script: name: normal description: standard cost script: \{{input}\} refer script: - name: add = nothing - description: parses dual costs without pay an additional - script: \{format_cost({input},add:"")\} + name: add nothing for mana costs + description: When using mana only costs, doesn't include anything extra in the reminder text + script: \{format_cost({input})\} refer script: - name: add = "pay an additional " - description: parses dual costs without pay an additional - script: \{format_cost({input},add:"pay an additional ")\} + name: add "pay an additional " for mana costs + description: When using mana only costs, words the reminder text as "pay an additional " + script: \{format_cost(add:"pay an additional ",{input})\} refer script: - name: add = "pay " - description: parses dual costs without pay an additional - script: \{format_cost({input},add:"pay ")\} + name: add "pay " for mana costs + description: When using mana only costs, words the reminder text as "pay " + script: \{format_cost(add:"pay ",{input})\} + script: format_cost_start() keyword parameter type: name: number match: [XYZ0-9]+ @@ -461,7 +478,7 @@ keyword: keyword: Cycling match: Cyclingcost mode: core - reminder: {format_cost(param1,add:"")}, Discard this card: Draw a card. + reminder: {format_cost(param1)}, Discard this card: Draw a card. keyword: keyword: Trample match: Trample @@ -496,7 +513,7 @@ keyword: keyword: Cumulative upkeep match: Cumulative upkeepcost mode: old - reminder: At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you {format_cost(param1,add:"pay ")} for each age counter on it. + reminder: At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you {format_cost(add:"pay ",param1)} for each age counter on it. keyword: keyword: Horsemanship match: Horsemanship @@ -521,7 +538,7 @@ keyword: keyword: Buyback match: Buybackcost mode: expert - reminder: You may pay {format_cost(param1,add:"pay ")} in addition to any other costs as you play this spell. If you do, put this card into your hand as it resolves. + reminder: You may {format_cost(add:"pay ",param1)} in addition to any other costs as you play this spell. If you do, put this card into your hand as it resolves. keyword: keyword: Echo match: Echocost @@ -531,7 +548,7 @@ keyword: keyword: Cardcycling match: prefixcyclingcost mode: expert - reminder: {format_cost(param2,add:"")}, Discard this card: Search your library for a {param1} card, reveal it, and put it into your hand. Then shuffle your library. + reminder: {format_cost(param2)}, Discard this card: Search your library for a {param1} card, reveal it, and put it into your hand. Then shuffle your library. keyword: keyword: Fading match: Fading number @@ -541,7 +558,7 @@ keyword: keyword: Kicker match: Kickercost mode: expert - reminder: You may {format_cost(param1,add:"pay an additional ")} as you play this spell. + reminder: You may {format_cost(add:"pay an additional ",param1)} as you play this spell. keyword: keyword: Madness match: Madnesscost @@ -591,7 +608,7 @@ keyword: keyword: Equip match: Equipcost mode: expert - reminder: {format_cost(param1,add:"")}: Attach to target creature you control. Equip only as a sorcery. + reminder: {format_cost(param1)}: Attach to target creature you control. Equip only as a sorcery. keyword: keyword: Imprint match: Imprint—action @@ -599,7 +616,7 @@ keyword: reminder: The removed card is imprinted on this artifact. keyword: keyword: Modular - match: Modular number + match: Modular number mode: expert reminder: This comes into play with {english_number_a(param1)} +1/+1 counter(s) on it. When it’s put into a graveyard, you may put its +1/+1 counters on target artifact creature. keyword: @@ -612,6 +629,7 @@ keyword: match: Sunburst mode: expert reminder: This comes into play with a +1/+1 counter on it for each color of mana used to pay its cost. If it is not a creature, use charge counters instead. +#Two versions of splice needed because if there's no separator, the program doesn't know when to switch from param1 to param2. keyword: keyword: Splice (Mana Cost) match: Splice onto name mana @@ -636,7 +654,7 @@ keyword: keyword: Ninjutsu match: Ninjutsucost mode: expert - reminder: {format_cost(param1,add:"")}, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking. + reminder: {format_cost(param1)}, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking. keyword: keyword: Soulshift match: Soulshift number @@ -656,7 +674,7 @@ keyword: keyword: Transmute match: Transmutecost mode: expert - reminder: {format_cost(param1,add:"")}, 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. Play only as a sorcery. + reminder: {format_cost(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. Play only as a sorcery. keyword: keyword: Haunt match: Haunt @@ -672,7 +690,6 @@ keyword: match: Replicatecost mode: expert reminder: When you play this spell, copy it for each time you paid its replicate cost. You may choose new targets for the copies. -#Denimwalk was a casualty of my fixing landwalk to work right keyword: keyword: Denimwalk match: Denimwalk @@ -692,7 +709,7 @@ keyword: keyword: Dredge match: Dredge number mode: expert - reminder: As long as you have at least {english_number(param1)} card(s) in your library, if you would draw a card, you may instead put exactly {param1} card(s) from the top of your library into your graveyard and return this card from your graveyard to your hand. + reminder: As long as you have at least {english_number(param1)} card(s) in your library, if you would draw a card, you may instead put exactly {english_number(param1)} card(s) from the top of your library into your graveyard and return this card from your graveyard to your hand. keyword: keyword: Graft match: Graft number @@ -707,7 +724,7 @@ keyword: keyword: Recover match: Recovercost mode: expert - reminder: When a creature is put into your graveyard from play, you may {format_cost(param1,add:"pay ")}. If you do, return this card from your graveyard to your hand. Otherwise, remove this card from the game. + reminder: When a creature is put into your graveyard from play, you may {format_cost(add:"pay ",param1)}. If you do, return this card from your graveyard to your hand. Otherwise, remove this card from the game. keyword: keyword: Ripple match: Ripple number @@ -727,7 +744,7 @@ keyword: keyword: Suspend match: Suspend numbermana mode: expert - reminder: Rather than play this card from your hand, you may pay {param2} and remove it from the game with {english_number_a(param1)} time counter(s) on it. At the beginning of your upkeep, remove a time counter. When the last is removed, play it without paying its mana cost. It has haste. + reminder: Rather than play this card from your hand, you may pay {param2} and remove it from the game with {english_number_a(param1)} time counter(s) on it. At the beginning of your upkeep, remove a time counter. When the last is removed, play it without paying its mana cost. If it's a creature, it has haste. keyword: keyword: Vanishing match: Vanishing number @@ -767,12 +784,12 @@ keyword: keyword: Transfigure match: Transfigurecost mode: expert - reminder: {format_cost(param1,add:"")}, Sacrifice this creature: Search your library for a creature card with the same converted mana cost as this creature and put that card into play. Then shuffle your library. Play only as a sorcery. + reminder: {format_cost(param1)}, Sacrifice this creature: Search your library for a creature card with the same converted mana cost as this creature and put that card into play. Then shuffle your library. Play only as a sorcery. keyword: keyword: Aura swap match: Aura swapcost mode: expert - reminder: {format_cost(param1,add:"")}: Exchange this Aura with an Aura card in your hand. + reminder: {format_cost(param1)}: Exchange this Aura with an Aura card in your hand. keyword: keyword: Frenzy match: Frenzy number @@ -793,8 +810,32 @@ keyword: match: Shroud mode: expert reminder: This permanent can't be the target of spells or abilities. +keyword: + keyword: Hellbent + match: Hellbent + mode: pseudo +keyword: + keyword: Channel + match: Channel + mode: pseudo +keyword: + keyword: Sweep + match: Sweep + mode: pseudo +keyword: + keyword: Threshold + match: Threshold + mode: pseudo +keyword: + keyword: Radiance + match: Radiance + mode: pseudo +keyword: + keyword: Gotcha + match: Gotcha + mode: pseudo keyword: keyword: Fortify match: Fortifycost mode: expert - reminder: {format_cost(param1,add:"")}: Attach to target land you control. Fortify only as a sorcery. This card comes into play unattached and stays in play if the land leaves play. + reminder: {format_cost(param1)}: Attach to target land you control. Fortify only as a sorcery. This card comes into play unattached and stays in play if the land leaves play.