mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Adding chaos symbols to Vanguard.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1423 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+12
-15
@@ -5,7 +5,7 @@ installer group: Magic Vanguard/game files
|
|||||||
icon: card-sample.png
|
icon: card-sample.png
|
||||||
position hint: 02
|
position hint: 02
|
||||||
|
|
||||||
version: 2009-07-12
|
version: 2009-08-10
|
||||||
|
|
||||||
# Author : Wolfwood
|
# Author : Wolfwood
|
||||||
# Most stuff is copy/pasted from magic.mse-game
|
# Most stuff is copy/pasted from magic.mse-game
|
||||||
@@ -30,7 +30,7 @@ init script:
|
|||||||
else mana_sort()
|
else mana_sort()
|
||||||
}
|
}
|
||||||
# Like mana filter, only also allow tap symbols:
|
# Like mana filter, only also allow tap symbols:
|
||||||
tap_filter := sort_text@(order: "<TQ>")
|
tap_filter := sort_text@(order: "<CTQ>")
|
||||||
mana_filter_t := replace@( # Remove [] used for forcing mana symbols
|
mana_filter_t := replace@( # Remove [] used for forcing mana symbols
|
||||||
match: "[\\[\\]]",
|
match: "[\\[\\]]",
|
||||||
replace: ""
|
replace: ""
|
||||||
@@ -43,7 +43,7 @@ init script:
|
|||||||
for_mana_costs := format_cost := {
|
for_mana_costs := format_cost := {
|
||||||
if input.separator_before == "—" and contains(input.param, " ") then (
|
if input.separator_before == "—" and contains(input.param, " ") then (
|
||||||
if contains(input.param, match:",") then (
|
if contains(input.param, match:",") then (
|
||||||
if match(match: "^[STQXYZIWUBRG0-9/|]+,", input.param) then
|
if match(match: "^[SCTQXYZIWUBRG0-9/|]+,", input.param) then
|
||||||
"{add}<param-cost>{combined_cost(input.param)}</param-cost>"
|
"{add}<param-cost>{combined_cost(input.param)}</param-cost>"
|
||||||
else "<param-cost>{combined_cost(input.param)}</param-cost>"
|
else "<param-cost>{combined_cost(input.param)}</param-cost>"
|
||||||
) else
|
) else
|
||||||
@@ -54,18 +54,15 @@ init script:
|
|||||||
alternative_cost := replace@(match:"^[A-Z]", replace: { to_lower() })
|
alternative_cost := replace@(match:"^[A-Z]", replace: { to_lower() })
|
||||||
combined_cost := replace@(match:", [A-Z]", replace: { to_lower() })+
|
combined_cost := replace@(match:", [A-Z]", replace: { to_lower() })+
|
||||||
replace@(match:",", replace:" and")+
|
replace@(match:",", replace:" and")+
|
||||||
replace@(match:"^[STQXYZIWUBRG0-9/|]", in_context: "(^|[[:space:]])<match>", replace: "<sym-auto>&</sym-auto>")+
|
replace@(match:"^[SCTQXYZIWUBRG0-9/|]", in_context: "(^|[[:space:]])<match>", replace: "<sym-auto>&</sym-auto>")+
|
||||||
replace@(match:"^[A-Z]", replace: { to_lower() })
|
replace@(match:"^[A-Z]", replace: { to_lower() })
|
||||||
long_dash := replace@(match:"-", replace:"—")
|
long_dash := replace@(match:"-", replace:"—")
|
||||||
# Utilities for keywords
|
|
||||||
has_cc := { card.casting_cost != "" }
|
|
||||||
has_pt := { card.pt != "" }
|
|
||||||
|
|
||||||
# Converted mana cost
|
# Converted mana cost
|
||||||
is_half_mana := match@(match: "1/2|[|][WUBRGS]")
|
is_half_mana := match@(match: "1/2|[|][WUBRGS]")
|
||||||
is_colored_mana := match@(match: "[WUBRG]")
|
is_colored_mana := match@(match: "[WUBRG]")
|
||||||
only_numbers := filter_text@(match: "^[0123456789]+")
|
only_numbers := filter_text@(match: "^[0123456789]+")
|
||||||
cmc_split := break_text@(match: "(?ix) 1/2 | [|][WUBRG] | [0-9]+(?!/[WUBRGSTQ2]) | [WUBRGS0-9](/[WUBRGS])\{0,4} ")
|
cmc_split := break_text@(match: "(?ix) 1/2 | [|][WUBRG] | [0-9]+(?!/[WUBRGSCTQ2]) | [WUBRGS0-9](/[WUBRGS])\{0,4} ")
|
||||||
cmc := {to_number(
|
cmc := {to_number(
|
||||||
for each sym in cmc_split() do (
|
for each sym in cmc_split() do (
|
||||||
numbers := only_numbers(sym)
|
numbers := only_numbers(sym)
|
||||||
@@ -98,7 +95,7 @@ init script:
|
|||||||
|adds?|pay(ed)?[ ](with|using)
|
|adds?|pay(ed)?[ ](with|using)
|
||||||
)
|
)
|
||||||
([ ]either)? # pay either X or Y
|
([ ]either)? # pay either X or Y
|
||||||
([ ]<sym[^>]*>[TQSXYZIWUBRG0-9/|]+</sym[^>]*>[ ](and|or))* # pay X or Y
|
([ ]<sym[^>]*>[CTQSXYZIWUBRG0-9/|]+</sym[^>]*>[ ](and|or))* # pay X or Y
|
||||||
[ ]<match>
|
[ ]<match>
|
||||||
([,.)]|$ # (end of word)
|
([,.)]|$ # (end of word)
|
||||||
|[ ][^ .,]*$ # still typing...
|
|[ ][^ .,]*$ # still typing...
|
||||||
@@ -157,16 +154,16 @@ init script:
|
|||||||
) +
|
) +
|
||||||
# step 4.5 : explict non mana symbols
|
# step 4.5 : explict non mana symbols
|
||||||
replace@(
|
replace@(
|
||||||
match: "\\][STQXYZIWUBRG0-9/|]+\\[",
|
match: "\\][SCTQXYZIWUBRG0-9/|]+\\[",
|
||||||
replace: {"<nosym>" + mana_filter_t() + "</nosym>"} ) +
|
replace: {"<nosym>" + mana_filter_t() + "</nosym>"} ) +
|
||||||
# step 5 : add mana & tap symbols
|
# step 5 : add mana & tap symbols
|
||||||
replace@(
|
replace@(
|
||||||
match: "[STQXYZIWUBRG0-9/|]+",
|
match: "[SCTQXYZIWUBRG0-9/|]+",
|
||||||
in_context: mana_context,
|
in_context: mana_context,
|
||||||
replace: {"<sym-auto>" + mana_filter_t() + "</sym-auto>"} ) +
|
replace: {"<sym-auto>" + mana_filter_t() + "</sym-auto>"} ) +
|
||||||
# step 5b : add explict mana symbols
|
# step 5b : add explict mana symbols
|
||||||
replace@(
|
replace@(
|
||||||
match: "\\[[STQXYZIWUBRG0-9/|]+\\]",
|
match: "\\[[SCTQXYZIWUBRG0-9/|]+\\]",
|
||||||
replace: {"<sym>" + mana_filter_t() + "</sym>"} ) +
|
replace: {"<sym>" + mana_filter_t() + "</sym>"} ) +
|
||||||
# step 7 : italic reminder text
|
# step 7 : italic reminder text
|
||||||
replace@(
|
replace@(
|
||||||
@@ -489,7 +486,7 @@ keyword mode:
|
|||||||
|
|
||||||
keyword parameter type:
|
keyword parameter type:
|
||||||
name: mana
|
name: mana
|
||||||
match: [STQXYZI0-9WUBRG/|]+
|
match: [SCTQXYZI0-9WUBRG/|]+
|
||||||
refer script:
|
refer script:
|
||||||
name: normal
|
name: normal
|
||||||
description: No changes made
|
description: No changes made
|
||||||
@@ -507,7 +504,7 @@ keyword parameter type:
|
|||||||
# By pichoro and bunnierein
|
# By pichoro and bunnierein
|
||||||
keyword parameter type:
|
keyword parameter type:
|
||||||
name: cost
|
name: cost
|
||||||
match: [ ][STQXYZI0-9WUBRG/|]*|[-—][^(\n]*
|
match: [ ][SCTQXYZI0-9WUBRG/|]*|[-—][^(\n]*
|
||||||
separator before is: [ —-]
|
separator before is: [ —-]
|
||||||
separator after is: [.]
|
separator after is: [.]
|
||||||
optional: false
|
optional: false
|
||||||
@@ -1083,4 +1080,4 @@ keyword:
|
|||||||
keyword: Intimidate
|
keyword: Intimidate
|
||||||
match: intimidate
|
match: intimidate
|
||||||
mode: core
|
mode: core
|
||||||
reminder: This creature can’t be blocked except by artifact creatures and/or creatures that share a color with it.
|
reminder: It can’t be blocked except by artifact creatures and/or creatures that share a color with it.
|
||||||
|
|||||||
Reference in New Issue
Block a user