diff --git a/data/magic-genevensis-10-saga.mse-style/style b/data/magic-genevensis-10-saga.mse-style/style index 8beb5ae3f..2b52852d0 100644 --- a/data/magic-genevensis-10-saga.mse-style/style +++ b/data/magic-genevensis-10-saga.mse-style/style @@ -42,6 +42,8 @@ init script: corners_default := { "diagonal" } + font_size := { if styling.font_size == "" then 26 else to_number_lax(styling.font_size) or else 26 } + swap_font := { true } swap_fonts_name_src := { styling.name_font } @@ -68,7 +70,7 @@ init script: swap_fonts_body_default := [ name: {"MPlantin"}, - size: {if styling.font_size == "" then 26 else to_number_lax(styling.font_size) or else 26}, + size: {font_size()}, color: {"black"}, vertical: {0}, italic: {"MPlantin-Italic"} diff --git a/data/magic-genevensis-11-class.mse-style/style b/data/magic-genevensis-11-class.mse-style/style index 5cdc9d9bb..01f8a2bc7 100644 --- a/data/magic-genevensis-11-class.mse-style/style +++ b/data/magic-genevensis-11-class.mse-style/style @@ -45,6 +45,8 @@ init script: corners_default := { "diagonal" } + font_size := { if styling.font_size == "" then 26 else to_number_lax(styling.font_size) or else 26 } + swap_font := { true } swap_fonts_name_src := { styling.name_font } @@ -71,7 +73,7 @@ init script: swap_fonts_body_default := [ name: {"MPlantin"}, - size: {if styling.font_size == "" then 26 else to_number_lax(styling.font_size) or else 26}, + size: {font_size()}, color: {"black"}, vertical: {0}, italic: {"MPlantin-Italic"} diff --git a/data/magic.mse-game/keywords b/data/magic.mse-game/keywords index d5addc298..c8e7cd984 100644 --- a/data/magic.mse-game/keywords +++ b/data/magic.mse-game/keywords @@ -153,11 +153,15 @@ keyword parameter type: match: mills? keyword parameter type: name: iterate - match: [., ](t?w?i?c?e?|t?h?r?e?e?|f?o?u?r?|f?i?v?e?|s?i?x?|s?e?v?e?n?|X?)?( ?t?i?m?e?s?)? + match: [., ](o?n?c?e?|o?n?e?|t?w?i?c?e?|t?w?o?|t?h?r?e?e?|f?o?u?r?|f?i?v?e?|s?i?x?|s?e?v?e?n?|X?)?( ?t?i?m?e?s?)? refer script: - name: as words - description: Use the iteration word (twice, three times, etc) - script: \{iterate_fix({input})\} + name: as words, use "" for blank + description: Use the iteration word (twice, three, etc) + script: \{iterate_string({input})\} + refer script: + name: as words, use "one" for blank + description: Use the iteration word (twice, three, etc) + script: \{iterate_string({input}, empty:"one")\} refer script: name: as number description: Use the iteration word (twice, three times, etc) diff --git a/data/magic.mse-game/script b/data/magic.mse-game/script index 39499b11c..c876a4b2b 100644 --- a/data/magic.mse-game/script +++ b/data/magic.mse-game/script @@ -1068,7 +1068,13 @@ iterate_fix := remove_tags +replace@(match: "^\\.", replace:"") +replace@(match: "^,", replace:"") +replace@(match: "^[ ]", replace:"") - +replace@(match:" times", replace:"") + +replace@(match:" ti?m?e?s?$", replace:"") +iterate_string := { + str := iterate_fix(input) + if str == "" + then empty_lead + empty + empty_follow + else non_empty_lead + str + non_empty_follow +}@(non_empty_lead:" ", non_empty_follow:"", empty_lead:"", empty_follow:"", empty:"") digital_map := [ "zero": 0, "one": 1,