mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57: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
|
||||
position hint: 02
|
||||
|
||||
version: 2009-07-12
|
||||
version: 2009-08-10
|
||||
|
||||
# Author : Wolfwood
|
||||
# Most stuff is copy/pasted from magic.mse-game
|
||||
@@ -30,7 +30,7 @@ init script:
|
||||
else mana_sort()
|
||||
}
|
||||
# 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
|
||||
match: "[\\[\\]]",
|
||||
replace: ""
|
||||
@@ -43,7 +43,7 @@ init script:
|
||||
for_mana_costs := format_cost := {
|
||||
if input.separator_before == "—" and contains(input.param, " ") 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>"
|
||||
else "<param-cost>{combined_cost(input.param)}</param-cost>"
|
||||
) else
|
||||
@@ -54,18 +54,15 @@ init script:
|
||||
alternative_cost := replace@(match:"^[A-Z]", replace: { to_lower() })
|
||||
combined_cost := replace@(match:", [A-Z]", replace: { to_lower() })+
|
||||
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() })
|
||||
long_dash := replace@(match:"-", replace:"—")
|
||||
# Utilities for keywords
|
||||
has_cc := { card.casting_cost != "" }
|
||||
has_pt := { card.pt != "" }
|
||||
|
||||
# Converted mana cost
|
||||
is_half_mana := match@(match: "1/2|[|][WUBRGS]")
|
||||
is_colored_mana := match@(match: "[WUBRG]")
|
||||
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(
|
||||
for each sym in cmc_split() do (
|
||||
numbers := only_numbers(sym)
|
||||
@@ -98,7 +95,7 @@ init script:
|
||||
|adds?|pay(ed)?[ ](with|using)
|
||||
)
|
||||
([ ]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>
|
||||
([,.)]|$ # (end of word)
|
||||
|[ ][^ .,]*$ # still typing...
|
||||
@@ -157,16 +154,16 @@ init script:
|
||||
) +
|
||||
# step 4.5 : explict non mana symbols
|
||||
replace@(
|
||||
match: "\\][STQXYZIWUBRG0-9/|]+\\[",
|
||||
match: "\\][SCTQXYZIWUBRG0-9/|]+\\[",
|
||||
replace: {"<nosym>" + mana_filter_t() + "</nosym>"} ) +
|
||||
# step 5 : add mana & tap symbols
|
||||
replace@(
|
||||
match: "[STQXYZIWUBRG0-9/|]+",
|
||||
match: "[SCTQXYZIWUBRG0-9/|]+",
|
||||
in_context: mana_context,
|
||||
replace: {"<sym-auto>" + mana_filter_t() + "</sym-auto>"} ) +
|
||||
# step 5b : add explict mana symbols
|
||||
replace@(
|
||||
match: "\\[[STQXYZIWUBRG0-9/|]+\\]",
|
||||
match: "\\[[SCTQXYZIWUBRG0-9/|]+\\]",
|
||||
replace: {"<sym>" + mana_filter_t() + "</sym>"} ) +
|
||||
# step 7 : italic reminder text
|
||||
replace@(
|
||||
@@ -489,7 +486,7 @@ keyword mode:
|
||||
|
||||
keyword parameter type:
|
||||
name: mana
|
||||
match: [STQXYZI0-9WUBRG/|]+
|
||||
match: [SCTQXYZI0-9WUBRG/|]+
|
||||
refer script:
|
||||
name: normal
|
||||
description: No changes made
|
||||
@@ -507,7 +504,7 @@ keyword parameter type:
|
||||
# By pichoro and bunnierein
|
||||
keyword parameter type:
|
||||
name: cost
|
||||
match: [ ][STQXYZI0-9WUBRG/|]*|[-—][^(\n]*
|
||||
match: [ ][SCTQXYZI0-9WUBRG/|]*|[-—][^(\n]*
|
||||
separator before is: [ —-]
|
||||
separator after is: [.]
|
||||
optional: false
|
||||
@@ -1083,4 +1080,4 @@ keyword:
|
||||
keyword: Intimidate
|
||||
match: intimidate
|
||||
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