diff --git a/data/magic.mse-game/game b/data/magic.mse-game/game index 10c09bb8..498e543d 100644 --- a/data/magic.mse-game/game +++ b/data/magic.mse-game/game @@ -255,17 +255,22 @@ init script: # replaces — correctly add := "" # default is nothing for_mana_costs := format_cost := { - if input.separator_before == "—" then - "{input.param}" - else + if input.separator_before == "—" then ( + if not contains(input.param, match:",") then + "{input.param}" + else + "{add}{input.param}" + ) else "{add}{input.param}" } 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 cost @@ -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 name cost @@ -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 cost @@ -1790,6 +1803,7 @@ keyword: keyword: Grandeur match: Grandeur mode: pseudo + rules: Grandeur — Discard another card named ~: [effect]. keyword: keyword: Deathtouch match: Deathtouch diff --git a/data/vanguard.mse-game/game b/data/vanguard.mse-game/game index 0e220aec..7030c02e 100644 --- a/data/vanguard.mse-game/game +++ b/data/vanguard.mse-game/game @@ -70,17 +70,22 @@ init script: # replaces — correctly add := "" # default is nothing for_mana_costs := format_cost := { - if input.separator_before == "—" then - "{input.param}" - else + if input.separator_before == "—" then ( + if not contains(input.param, match:",") then + "{input.param}" + else + "{add}{input.param}" + ) else "{add}{input.param}" } 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—-]+