cmc now works correctly with keyword parameters

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1164 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-24 16:41:21 +00:00
parent 167cde312b
commit 644268a72d
+2 -2
View File
@@ -495,7 +495,7 @@ 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 := {to_number(
for each sym in cmc_split() do (
for each sym in cmc_split(to_text()) do (
numbers := only_numbers(sym)
if is_half_mana(sym) then 0.5
else if numbers != "" then to_int(numbers)
@@ -504,7 +504,7 @@ cmc := {to_number(
}
colored_mana := {to_number(
for each sym in cmc_split() do (
for each sym in cmc_split(to_text()) do (
numbers := only_numbers(sym)
if is_colored_mana(sym) then
if is_half_mana(sym) then 0.5 else 1