From add2e3b9796547c4cbe80e93965679cc484a7489 Mon Sep 17 00:00:00 2001 From: cajun <12363371+CajunAvenger@users.noreply.github.com> Date: Thu, 3 Jul 2025 23:04:41 -0500 Subject: [PATCH] special_text, fr fixes fix Enchant : creature being autocapitalized move card.special_text definition to the end so it can properly access all card fields --- data/magic.mse-game/card_fields | 47 +++++++++++++++++---------------- data/magic.mse-game/script | 4 +-- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/data/magic.mse-game/card_fields b/data/magic.mse-game/card_fields index 496a465c6..41953635e 100644 --- a/data/magic.mse-game/card_fields +++ b/data/magic.mse-game/card_fields @@ -41,29 +41,6 @@ card field: ### rulestip ### checklist -############################################################## Special text -### This is given to exporters to handle complicated rules text -### In particular, things like Sagas that using styling data to determine their rules text -### That exporters can't access -card field: - type: text - name: special text - description: The full text for exporting. - show statistics: false - card list name: Special Text - card list column: 0780 - card list width: 150 - script: special_text() -card field: - type: text - name: special text 2 - description: The second full text for exporting. - show statistics: false - card list name: Special Text 2 - card list column: 0781 - card list width: 150 - script: special_text2() - ############################################################## Card border card field: type: color @@ -3219,3 +3196,27 @@ card field: card list alignment: right card list width: 50 script: custom_index() + +############################################################## Special text +### This is given to exporters to handle complicated rules text +### In particular, things like Sagas that using styling data to determine their rules text +### That exporters can't access +### This needs to be at the end so it can properly access other fields +card field: + type: text + name: special text + description: The full text for exporting. + show statistics: false + card list name: Special Text + card list column: 0780 + card list width: 150 + script: special_text() +card field: + type: text + name: special text 2 + description: The second full text for exporting. + show statistics: false + card list name: Special Text 2 + card list column: 0781 + card list width: 150 + script: special_text2() diff --git a/data/magic.mse-game/script b/data/magic.mse-game/script index b691eb305..ab50816f5 100644 --- a/data/magic.mse-game/script +++ b/data/magic.mse-game/script @@ -1518,7 +1518,7 @@ auto_correct := + "([A-Z])" #### match this replace: { _1 + _2 + to_lower(_3)}) +replace@( - match: "([ ]*: |—| — )" #### preceded by this + match: "([^ ]: |—| — )" #### preceded by this + "([[:lower:]])" #### match this + "(?![)])", #### not followed by this replace: { _1 + to_upper(_2) }) @@ -1819,7 +1819,7 @@ text_filter := } + #### step 8 : automatic capitalization, but not after "(" #replace@( - # match: "([ ]*: |—| — )" #### preceded by this + # match: "([^ ]: |—| — )" #### preceded by this # + "([[:lower:]])" #### match this # + "(?![)])", #### not followed by this # replace: { _1 + to_upper(_2) }) +