Commit 45316572 authored by pichoro's avatar pichoro

Added BunnieRein's keywording script.

Formatted all keywords with cost params to use it.
Re-activated font for textbox in Magic-new style.
parent 4f69c6e3
...@@ -212,12 +212,12 @@ card style: ...@@ -212,12 +212,12 @@ card style:
top : 328 top : 328
width: 311 width: 311
height: 142 height: 142
#font: font:
# name: MPlantin name: MPlantin
# italic name: MPlantin-Italic italic name: MPlantin-Italic
# size: 14 size: 14
# scale down to: 6 scale down to: 6
# color: rgb(0,0,0) color: rgb(0,0,0)
symbol font: symbol font:
name: name:
script: script:
......
mse version: 0.3.1 mse version: 0.3.1
short name: Magic short name: Magic
full name: Magic the Gathering full name: Magic the Gathering
icon: card-back.png icon: card-back.png
...@@ -23,7 +23,7 @@ init script: ...@@ -23,7 +23,7 @@ init script:
replace: "™") + replace: "™") +
# step 4 : copyright symbol # step 4 : copyright symbol
replace_rule( replace_rule(
match: "(C)", match: "CR",
replace: "©") replace: "©")
#character filter for title line #character filter for title line
...@@ -154,6 +154,15 @@ init script: ...@@ -154,6 +154,15 @@ init script:
else mana_color else mana_color
}; };
# replaces — correctly
alternative_cost := replace_rule(match:"—|\\.", replace:"") + replace_rule(match:"[A-Z]", in_context:"<param-[a-z]*><match>", replace: { to_lower() })
mana_cost := replace_rule(match:" ", in_context:"\\><match>", replace: "")
format_cost := {
if substring(begin: 0, end: 13)=="<param-cost>—" then
alternative_cost(input:input)
else add + "<sym>" + mana_cost(input:input) + "</sym>"
};
# Filters for the text box # Filters for the text box
# context in which mana symbols are found # context in which mana symbols are found
mana_context := mana_context :=
...@@ -174,7 +183,7 @@ init script: ...@@ -174,7 +183,7 @@ init script:
) )
) )
| <param-mana><match></param-mana> # keyword argument that is declared as mana | <param-mana><match></param-mana> # keyword argument that is declared as mana
| <param-cost><match></param-cost> # keyword argument that is declared as cost | <param-cost>[ ]*<match></param-cost> # keyword argument that is declared as cost
| <param-cost><match>, # keyword argument that is declared as cost | <param-cost><match>, # keyword argument that is declared as cost
"; ";
# the rule text filter # the rule text filter
...@@ -225,15 +234,16 @@ init script: ...@@ -225,15 +234,16 @@ init script:
replace_rule( replace_rule(
match: "s</param-name><s>" match: "s</param-name><s>"
replace: "" ) + replace: "" ) +
# step 6d : period remover for action param keywords
replace_rule(
match: ".</param-action><.>"
replace: "" ) +
# step 7 : italic reminder text # step 7 : italic reminder text
replace_rule( replace_rule(
match: "[(][^)\n]*[)]?", match: "[(][^)\n]*[)]?",
in_context: "(^|[[:space:]])<match>|<atom-keyword><match></", in_context: "(^|[[:space:]])<match>|<atom-keyword><match></",
replace: "<i-auto>&</i-auto>") replace: "<i-auto>&</i-auto>") +
# step 8 : post ( capitalization
replace_rule(
match: "[a-z]",
in_context: "[(](<param-[a-z]*>)?<match>",
replace: { to_upper() })
# the flavor text filter # the flavor text filter
# - makes all text italic # - makes all text italic
...@@ -961,10 +971,18 @@ keyword mode: ...@@ -961,10 +971,18 @@ keyword mode:
keyword parameter type: keyword parameter type:
name: mana name: mana
match: [XYZ0-9WUBRGS/]+ match: [XYZ0-9WUBRGS/]+
# By jimrandomh # By pichoro and bunnierein
keyword parameter type: keyword parameter type:
name: cost name: cost
match: [^(\n]+ match: [:space:]?[^(\n]+
refer script:
name: normal
description: standard cost
script: \{{input}\}
refer script:
name: dual parameters
description: parses dual costs without pay an additional
script: \{format_cost({input},add:"")\}
keyword parameter type: keyword parameter type:
name: number name: number
match: [XYZ0-9]+ match: [XYZ0-9]+
...@@ -1027,14 +1045,9 @@ keyword: ...@@ -1027,14 +1045,9 @@ keyword:
reminder: Target a {param1} as you play this. This card comes into play attached to that {param1}. reminder: Target a {param1} as you play this. This card comes into play attached to that {param1}.
keyword: keyword:
keyword: Cycling keyword: Cycling
match: Cycling <atom-param>mana</atom-param> match: Cycling<atom-param>cost</atom-param>
mode: core mode: core
reminder: {param1}, Discard this card: Draw a card. reminder: {format_cost(param1,add:"")}, Discard this card: Draw a card.
keyword:
keyword: Cycling
match: Cycling—<atom-param>action</atom-param>
mode: core
reminder: {param1}<.>, Discard this card: Draw a card.
keyword: keyword:
keyword: Trample keyword: Trample
match: Trample match: Trample
...@@ -1067,14 +1080,9 @@ keyword: ...@@ -1067,14 +1080,9 @@ keyword:
reminder: This creature can’t attack. reminder: This creature can’t attack.
keyword: keyword:
keyword: Cumulative upkeep keyword: Cumulative upkeep
match: Cumulative upkeep <atom-param>mana</atom-param> match: Cumulative upkeep<atom-param>cost</atom-param>
mode: old mode: old
reminder: At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay {param1} 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(param1,add:"pay an additional ")} for each age counter on it.
keyword:
keyword: Cumulative upkeep
match: Cumulative upkeep—<atom-param>action</atom-param>
mode: old
reminder: At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you {to_lower(param1)}<.> for each age counter on it.
keyword: keyword:
keyword: Horsemanship keyword: Horsemanship
match: Horsemanship match: Horsemanship
...@@ -1097,34 +1105,24 @@ keyword: ...@@ -1097,34 +1105,24 @@ keyword:
reminder: This creature can block or be blocked only by creatures with shadow. reminder: This creature can block or be blocked only by creatures with shadow.
keyword: keyword:
keyword: Buyback keyword: Buyback
match: Buyback <atom-param>mana</atom-param> match: Buyback<atom-param>cost</atom-param>
mode: expert
reminder: You may 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: Buyback
match: Buyback—<ataom-param>action</atom-param>
mode: expert mode: expert
reminder: You may {to_lower(param1)}<.> 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 pay {format_cost(param1,add:"pay an additional ")} 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:
keyword: Echo keyword: Echo
match: Echo <atom-param>mana</atom-param> match: Echo<atom-param>cost</atom-param>
mode: expert
reminder: At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.
keyword:
keyword: Echo
match: Echo—<atom-param>action</atom-param>
mode: expert mode: expert
reminder: At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost. reminder: At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.
keyword: keyword:
keyword: Cardcycling keyword: Cardcycling
match: <atom-param>name</atom-param>cycling <atom-param>mana</atom-param> match: <atom-param>name</atom-param>cycling<atom-param>cost</atom-param>
mode: expert mode: expert
reminder: {param2}, 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(param1,add:"")}, Discard this card: Search your library for a {param1} card, reveal it, and put it into your hand. Then shuffle your library.
keyword: keyword:
keyword: Cardcycling keyword: Cardcycling
match: <atom-param>name</atom-param>cycling—<atom-param>action</atom-param> match: <atom-param>name</atom-param>cycling—<atom-param>action</atom-param>
mode: expert mode: expert
reminder: {param2}<.>, Discard this card: Search your library for a {param1} card, reveal it, and put it into your hand. Then shuffle your library. reminder: {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:
keyword: Fading keyword: Fading
match: Fading <atom-param>number</atom-param> match: Fading <atom-param>number</atom-param>
...@@ -1132,42 +1130,22 @@ keyword: ...@@ -1132,42 +1130,22 @@ keyword:
reminder: This comes into play with {english_number_a(param1)} fade counter(s) on it. At the beginning of your upkeep, remove a fade counter from it. If you can’t, sacrifice it. reminder: This comes into play with {english_number_a(param1)} fade counter(s) on it. At the beginning of your upkeep, remove a fade counter from it. If you can’t, sacrifice it.
keyword: keyword:
keyword: Kicker keyword: Kicker
match: Kicker <atom-param>mana</atom-param> match: Kicker<atom-param>cost</atom-param>
mode: expert
reminder: You may pay an additional {param1} as you play this spell.
keyword:
keyword: Kicker
match: Kicker—<atom-param>action</atom-param>
mode: expert mode: expert
reminder: You may {to_lower(param1)}<.> as you play this spell. reminder: You may pay an additional {format_cost(param1,add:"pay an additional ")} as you play this spell.
keyword: keyword:
keyword: Madness keyword: Madness
match: Madness <atom-param>mana</atom-param> match: Madness<atom-param>cost</atom-param>
mode: expert
reminder: You may play this card for its madness cost at the time you discard it.
keyword:
keyword: Madness
match: Madness—<atom-param>action</atom-param>
mode: expert mode: expert
reminder: You may play this card for its madness cost at the time you discard it. reminder: You may play this card for its madness cost at the time you discard it.
keyword: keyword:
keyword: Flashback keyword: Flashback
match: Flashback <atom-param>mana</atom-param> match: Flashback<atom-param>cost</atom-param>
mode: expert
reminder: You may play this card from your graveyard for its flashback cost. Then remove it from the game.
keyword:
keyword: Flashback
match: Flashback—<atom-param>action</atom-param>
mode: expert mode: expert
reminder: You may play this card from your graveyard for its flashback cost. Then remove it from the game. reminder: You may play this card from your graveyard for its flashback cost. Then remove it from the game.
keyword: keyword:
keyword: Morph keyword: Morph
match: Morph <atom-param>mana</atom-param> match: Morph<atom-param>cost</atom-param>
mode: expert
reminder: You may play this face down as a 2/2 creature for <sym>3</sym>. Turn it face up any time for its morph cost.
keyword:
keyword: Morph
match: Morph—<atom-param>action</atom-param>
mode: expert mode: expert
reminder: You may play this face down as a 2/2 creature for <sym>3</sym>. Turn it face up any time for its morph cost. reminder: You may play this face down as a 2/2 creature for <sym>3</sym>. Turn it face up any time for its morph cost.
keyword: keyword:
...@@ -1197,24 +1175,14 @@ keyword: ...@@ -1197,24 +1175,14 @@ keyword:
reminder: This spell costs <sym>1</sym> less to play for each {param1}<s> you control. reminder: This spell costs <sym>1</sym> less to play for each {param1}<s> you control.
keyword: keyword:
keyword: Entwine keyword: Entwine
match: Entwine <atom-param>mana</atom-param> match: Entwine<atom-param>cost</atom-param>
mode: expert mode: expert
reminder: Choose both if you pay the entwine cost. reminder: Choose both if you pay the entwine cost.
keyword:
keyword: Entwine
match: Entwine—<atom-param>action</atom-param>
mode: expert
reminder: Choose both if you pay the entwine cost.
keyword:
keyword: Equip
match: Equip <atom-param>mana</atom-param>
mode: expert
reminder: {param1}: Attach to target creature you control. Equip only as a sorcery.
keyword: keyword:
keyword: Equip keyword: Equip
match: Equip—<atom-param>action</atom-param> match: Equip<atom-param>cost</atom-param>
mode: expert mode: expert
reminder: {param1}<.>: Attach to target creature you control. Equip only as a sorcery. reminder: {format_cost(param1,add:"")}: Attach to target creature you control. Equip only as a sorcery.
keyword: keyword:
keyword: Imprint keyword: Imprint
match: Imprint—<atom-param>action</atom-param> match: Imprint—<atom-param>action</atom-param>
...@@ -1237,14 +1205,9 @@ keyword: ...@@ -1237,14 +1205,9 @@ keyword:
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. 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.
keyword: keyword:
keyword: Splice keyword: Splice
match: Splice onto <atom-param>name</atom-param> <atom-param>mana</atom-param> match: Splice onto <atom-param>name</atom-param><atom-param>cost</atom-param>
mode: expert mode: expert
reminder: As you play a {param1} spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card’s effects to that spell. reminder: As you play a {param1} spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card’s effects to that spell.
keyword:
keyword: Splice
match: Splice onto <atom-param>name</atom-param>—<atom-param>action</atom-param>
mode: expert
reminder: As you play a {param1} spell, you may reveal this card from your hand and pay its splice cost. If you do, add this card's effects to that spell.
keyword: keyword:
keyword: Offering keyword: Offering
match: <atom-param>name</atom-param> offering match: <atom-param>name</atom-param> offering
...@@ -1257,14 +1220,9 @@ keyword: ...@@ -1257,14 +1220,9 @@ keyword:
reminder: When this blocks or becomes blocked, it gets +{param1}/+{param1} until end of turn. reminder: When this blocks or becomes blocked, it gets +{param1}/+{param1} until end of turn.
keyword: keyword:
keyword: Ninjutsu keyword: Ninjutsu
match: Ninjutsu <atom-param>mana</atom-param> match: Ninjutsu<atom-param>cost</atom-param>
mode: expert mode: expert
reminder: {param1}, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking. reminder: {format_cost(param1,add:"")}, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking.
keyword:
keyword: Ninjutsu
match: Ninjutsu—<atom-param>action</atom-param>
mode: expert
reminder: {param1}<.>, Return an unblocked attacker you control to hand: Put this card into play from your hand tapped and attacking.
keyword: keyword:
keyword: Soulshift keyword: Soulshift
match: Soulshift <atom-param>number</atom-param> match: Soulshift <atom-param>number</atom-param>
...@@ -1282,14 +1240,9 @@ keyword: ...@@ -1282,14 +1240,9 @@ keyword:
reminder: Each creature you tap while playing this spell reduces its cost by <sym>1</sym> or by one mana of that creature’s color. reminder: Each creature you tap while playing this spell reduces its cost by <sym>1</sym> or by one mana of that creature’s color.
keyword: keyword:
keyword: Transmute keyword: Transmute
match: Transmute <atom-param>mana</atom-param> match: Transmute<atom-param>cost</atom-param>
mode: expert 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. Play only as a sorcery. 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.
keyword:
keyword: Transmute
match: Transmute—<atom-param>action</atom-param>
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. Play only as a sorcery.
keyword: keyword:
keyword: Haunt keyword: Haunt
match: Haunt match: Haunt
...@@ -1302,12 +1255,7 @@ keyword: ...@@ -1302,12 +1255,7 @@ keyword:
reminder: If an opponent was dealt damage this turn, this creature comes into play with {english_number_a(param1)} +1/+1 counter(s) on it. reminder: If an opponent was dealt damage this turn, this creature comes into play with {english_number_a(param1)} +1/+1 counter(s) on it.
keyword: keyword:
keyword: Replicate keyword: Replicate
match: Replicate <atom-param>mana</atom-param> match: Replicate<atom-param>cost</atom-param>
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.
keyword:
keyword: Replicate
match: Replicate—<atom-param>action</atom-param>
mode: expert 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. 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 #Denimwalk was a casualty of my fixing landwalk to work right
...@@ -1343,14 +1291,9 @@ keyword: ...@@ -1343,14 +1291,9 @@ keyword:
reminder: Play this ability only during your upkeep and only once each turn. reminder: Play this ability only during your upkeep and only once each turn.
keyword: keyword:
keyword: Recover keyword: Recover
match: Recover <atom-param>mana</atom-param> match: Recover<atom-param>cost</atom-param>
mode: expert mode: expert
reminder: When a creature is put into your graveyard from play, you may pay an additional {param1}. 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 pay an additional {format_cost(param1,add:"pay an additional ")}. If you do, return this card from your graveyard to your hand. Otherwise, remove this card from the game.
keyword:
keyword: Recover
match: Recover—<atom-param>action</atom-param>
mode: expert
reminder: When a creature is put into your graveyard from play, you may {to_lower(param1)}<.>. If you do, return this card from your graveyard to your hand. Otherwise, remove this card from the game.
keyword: keyword:
keyword: Ripple keyword: Ripple
match: Ripple <atom-param>number</atom-param> match: Ripple <atom-param>number</atom-param>
...@@ -1408,24 +1351,14 @@ keyword: ...@@ -1408,24 +1351,14 @@ keyword:
reminder: Look at the top {english_number_multiple(param1)} card(s) 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. reminder: Look at the top {english_number_multiple(param1)} card(s) 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.
keyword: keyword:
keyword: Transfigure keyword: Transfigure
match: Transfigure <atom-param>mana</atom-param> match: Transfigure<atom-param>cost</atom-param>
mode: expert mode: expert
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 into play. Then shuffle your library. Play only as a sorcery. 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.
keyword:
keyword: Transfigure
match: Transfigure—<atom-param>action</atom-param>
mode: expert
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 into play. Then shuffle your library. Play only as a sorcery.
keyword:
keyword: Aura swap
match: Aura swamp <atom-param>mana</atom-param>
mode: expert
reminder: {param1}: Exchange this Aura with an Aura card in your hand.
keyword: keyword:
keyword: Aura swap keyword: Aura swap
match: Aura swap—<atom-param>action</atom-param> match: Aura swamp<atom-param>cost</atom-param>
mode: expert mode: expert
reminder: {param1}<.>: Exchange this Aura with an Aura card in your hand. reminder: {format_cost(param1,add:"")}: Exchange this Aura with an Aura card in your hand.
keyword: keyword:
keyword: Frenzy keyword: Frenzy
match: Frenzy <atom-param>number</atom-param> match: Frenzy <atom-param>number</atom-param>
...@@ -1448,11 +1381,6 @@ keyword: ...@@ -1448,11 +1381,6 @@ keyword:
reminder: This permanent can't be the target of spells or abilities. reminder: This permanent can't be the target of spells or abilities.
keyword: keyword:
keyword: Fortify keyword: Fortify
match: Fortify <atom-param>mana</atom-param> match: Fortify<atom-param>cost</atom-param>
mode: expert
reminder: {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.
keyword:
keyword: Fortify
match: Fortify—<atom-param>action</atom-param>
mode: expert mode: expert
reminder: {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. 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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment