Commit 44224ade authored by pichoro's avatar pichoro

Added "rules" to pseudo keywords, to serve as a guideline for use.

Added support to cost param for mixed costs, such as "Kicker-R, Sacrifice a Merfolk."
parent f3c11449
......@@ -255,17 +255,22 @@ init script:
# replaces — correctly
add := "" # default is nothing
for_mana_costs := format_cost := {
if input.separator_before == "—" then
"<param-cost>{input.param}</param-cost>"
else
if input.separator_before == "—" then (
if not contains(input.param, match:",") then
"<param-cost>{input.param}</param-cost>"
else
"{add}<param-cost>{input.param}</param-cost>"
) else
"{add}<param-mana>{input.param}</param-mana>"
}
alternative_cost := replace_rule(match:"^[A-Z]", replace: { to_lower() })
combined_cost := replace_rule(match:", [A-Z]", replace: { to_lower() })+
replace_rule(match:",", replace:", and")
format_alt_cost := {
if input.separator_before == "—" then
if input.separator_before == "—" and not contains(input.param, match:",") then
alternative_cost(input.param)
else
input.param
combined_cost(input.param)
}
long_dash := replace_rule(match:"-", replace:"—")
# Utilities for keywords
......@@ -1431,6 +1436,8 @@ keyword parameter type:
keyword parameter type:
name: action
match: [^(\n]+
separator after is: [.]
reminder script: alternative_cost()
keyword parameter type:
name: name
match: [^(.,\n—-]+
......@@ -1572,6 +1579,7 @@ keyword:
keyword: Threshold
match: Threshold
mode: pseudo
rules: Threshold — [effect] as long as seven or more cards are in your graveyard.
keyword:
keyword: Madness
match: Madness <atom-param>cost</atom-param>
......@@ -1655,6 +1663,7 @@ keyword:
keyword: Gotcha
match: Gotcha
mode: pseudo
rules: Gotcha — Whenever an opponent [does something], you may say "Gotcha!". If you do, return [something] from your graveyard to your hand.
keyword:
keyword: Splice
match: Splice onto <atom-param>name</atom-param> <atom-param>cost</atom-param>
......@@ -1704,10 +1713,12 @@ keyword:
keyword: Channel
match: Channel
mode: pseudo
rules: Channel — [cost], Discard ~: [effect].
keyword:
keyword: Sweep
match: Sweep
mode: pseudo
rules: Sweep — Return any number of [basic land type] you control to their owner's hand. [effect based on number of lands returned].
keyword:
keyword: Convoke
match: Convoke
......@@ -1727,6 +1738,7 @@ keyword:
keyword: Radiance
match: Radiance
mode: pseudo
rules: Radiance — [effect to target permanent or spell and all cards of same card type that share a color with it]
keyword:
keyword: Haunt
match: Haunt
......@@ -1756,6 +1768,7 @@ keyword:
keyword: Hellbent
match: Hellbent
mode: pseudo
rules: Hellbent — [effect] if you have no cards in hand.
keyword:
keyword: Recover
match: Recover <atom-param>cost</atom-param>
......@@ -1790,6 +1803,7 @@ keyword:
keyword: Grandeur
match: Grandeur
mode: pseudo
rules: Grandeur — Discard another card named ~: [effect].
keyword:
keyword: Deathtouch
match: Deathtouch
......
......@@ -70,17 +70,22 @@ init script:
# replaces — correctly
add := "" # default is nothing
for_mana_costs := format_cost := {
if input.separator_before == "—" then
"<param-cost>{input.param}</param-cost>"
else
if input.separator_before == "—" then (
if not contains(input.param, match:",") then
"<param-cost>{input.param}</param-cost>"
else
"{add}<param-cost>{input.param}</param-cost>"
) else
"{add}<param-mana>{input.param}</param-mana>"
}
alternative_cost := replace_rule(match:"^[A-Z]", replace: { to_lower() })
combined_cost := replace_rule(match:", [A-Z]", replace: { to_lower() })+
replace_rule(match:",", replace:", and")
format_alt_cost := {
if input.separator_before == "—" then
if input.separator_before == "—" and not contains(input.param, match:",") then
alternative_cost(input.param)
else
input.param
combined_cost(input.param)
}
long_dash := replace_rule(match:"-", replace:"—")
# Utilities for keywords
......@@ -465,6 +470,8 @@ keyword parameter type:
keyword parameter type:
name: action
match: [^(\n]+
separator after is: [.]
reminder script: alternative_cost()
keyword parameter type:
name: name
match: [^(.,\n—-]+
......
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