Bump to 2 5 8 (#141)
* Bump to 2.5.8 - Hard code exception for word "plains" in english_singular and english_plural functions - Add font preloading by TomTkacz - Add import_image function by TomTkacz - Fix freeze when loading a set with missing templates * add locale entries * include localized keywords and statistics * Add slider fields and get_mse_path * Allow "Default" in slider fields * better fix for print bug * don't draw checkerboard when image field has default this allows an image field to be transparent before an image has been selected by the user * allow additional individual choices in slider fields * Add CSV / TSV importer * Update README.md * move game scripts to separate file * add json import * format english locale * format foreign locales * localize * finish locales * cleanup * minor tweaks * fix bug in import csv * optimize card counts display * tighten conditions on drop down menu closing * widen welcome window buttons * Update changelog.txt * tweaks * update cli * add locale entries, add changelog entries * make some values scriptable, rewrite print layout logic * fix "referencing nonexistant file" internal error the error would happen when an image or set symbol file was changed or deleted, then the set was saved, then the change or deletion was undone * add add_card_to_set script function am I crazy or was there no way to do this from the CLI? * fix symbol font bug * add global_script statistics dimension property this script is ran once at the start, and its result is stored in the 'global_value' variable, which is accessible to the regular script. with this we can get rid of the set.global_variable_average_opening_hand field, and make sure its script is ran only once, when the user clicks on the relevant statistics dimension * Add to_json and from_json script functions * Update changelog.txt * bump wxWidgets to 3.3.1 * Update changelog.txt typos and today's prs --------- Co-authored-by: cajun <kajunkittyavenger@gmail.com> Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
This commit is contained in:
@@ -45,6 +45,8 @@ card field:
|
||||
card field:
|
||||
type: color
|
||||
name: border color
|
||||
alt name: bordercolor
|
||||
alt name: border
|
||||
description: The border of the card. Can be any solid color.
|
||||
show statistics: false
|
||||
card list name: Border
|
||||
@@ -62,6 +64,7 @@ card field:
|
||||
choice:
|
||||
name: gold
|
||||
color: rgb(200,180,0)
|
||||
import script: dfc_split_import_script(value:value, import_script:border_import_script, margin_code:"border")
|
||||
default: stylesheet; border_color_default()
|
||||
|
||||
card field:
|
||||
@@ -288,6 +291,7 @@ card field:
|
||||
card list name: Color Category
|
||||
card list column: 0410
|
||||
card list width: 90
|
||||
import script: ""
|
||||
script: remove_zwsp(color_category_statistic())
|
||||
|
||||
card field:
|
||||
@@ -300,6 +304,7 @@ card field:
|
||||
card list name: Exact Color
|
||||
card list column: 0420
|
||||
card list width: 100
|
||||
import script: ""
|
||||
script: remove_zwsp(prefixed_color_statistic())
|
||||
|
||||
card field:
|
||||
@@ -312,6 +317,7 @@ card field:
|
||||
card list name: Color Identity
|
||||
card list column: 0430
|
||||
card list width: 100
|
||||
import script: ""
|
||||
script: remove_zwsp(prefixed_color_identity_statistic())
|
||||
|
||||
card field:
|
||||
@@ -324,6 +330,7 @@ card field:
|
||||
card list name: Color Count
|
||||
card list column: 0440
|
||||
card list width: 40
|
||||
import script: ""
|
||||
script: remove_zwsp(color_count_statistic())
|
||||
|
||||
############################################################## Name line
|
||||
@@ -368,6 +375,7 @@ card field:
|
||||
pt-br: Nome 1
|
||||
card list column: 0020
|
||||
card list width: 150
|
||||
import script: dfc_split_import_script(value:value, import_script:name_import_script, margin_code:"name1")
|
||||
default: stylesheet; name_default(value, margin_code: "name1")
|
||||
script: name_checker(value)
|
||||
card field:
|
||||
@@ -375,7 +383,6 @@ card field:
|
||||
name: name 2
|
||||
description: The second name of the card.
|
||||
show statistics: false
|
||||
identifying: true
|
||||
card list name: Name 2
|
||||
localized card list name:
|
||||
ch-s: 名称 2
|
||||
@@ -388,13 +395,13 @@ card field:
|
||||
pt-br: Nome 2
|
||||
card list column: 0021
|
||||
card list width: 150
|
||||
import script: dfc_split_import_script(value:value, import_script:name_import_script, margin_code:"name2")
|
||||
default: stylesheet; name_default(value, margin_code: "name2")
|
||||
card field:
|
||||
type: text
|
||||
name: name 3
|
||||
description: The third name of the card.
|
||||
show statistics: false
|
||||
identifying: true
|
||||
card list name: Name 3
|
||||
localized card list name:
|
||||
ch-s: 名称 3
|
||||
@@ -407,13 +414,13 @@ card field:
|
||||
pt-br: Nome 3
|
||||
card list column: 0022
|
||||
card list width: 150
|
||||
import script: dfc_split_import_script(value:value, import_script:name_import_script, margin_code:"name3")
|
||||
default: stylesheet; name_default(value, margin_code: "name3")
|
||||
card field:
|
||||
type: text
|
||||
name: name 4
|
||||
description: The fourth name of the card.
|
||||
show statistics: false
|
||||
identifying: true
|
||||
card list name: Name 4
|
||||
localized card list name:
|
||||
ch-s: 名称 4
|
||||
@@ -426,6 +433,7 @@ card field:
|
||||
pt-br: Nome 4
|
||||
card list column: 0023
|
||||
card list width: 150
|
||||
import script: dfc_split_import_script(value:value, import_script:name_import_script, margin_code:"name4")
|
||||
default: stylesheet; name_default(value, margin_code: "name4")
|
||||
|
||||
card field:
|
||||
@@ -465,6 +473,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: casting cost
|
||||
alt name: mana cost
|
||||
alt name: manacost
|
||||
alt name: cost
|
||||
alt name: cc
|
||||
description: The casting cost of the card.
|
||||
show statistics: false
|
||||
card list visible: true
|
||||
@@ -480,10 +492,14 @@ card field:
|
||||
card list column: 0100
|
||||
card list alignment: right
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:cc_import_script, margin_code:"cc1")
|
||||
script: mana_filter(value)
|
||||
card field:
|
||||
type: text
|
||||
name: casting cost 2
|
||||
alt name: mana cost 2
|
||||
alt name: cost 2
|
||||
alt name: cc 2
|
||||
description: The second casting cost of the card.
|
||||
show statistics: false
|
||||
card list name: CC 2
|
||||
@@ -498,10 +514,14 @@ card field:
|
||||
card list column: 0101
|
||||
card list alignment: right
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:cc_import_script, margin_code:"cc2")
|
||||
script: mana_filter(value)
|
||||
card field:
|
||||
type: text
|
||||
name: casting cost 3
|
||||
alt name: mana cost 3
|
||||
alt name: cost 3
|
||||
alt name: cc 3
|
||||
description: The third casting cost of the card.
|
||||
show statistics: false
|
||||
card list name: CC 3
|
||||
@@ -516,10 +536,14 @@ card field:
|
||||
card list column: 0102
|
||||
card list alignment: right
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:cc_import_script, margin_code:"cc3")
|
||||
script: mana_filter(value)
|
||||
card field:
|
||||
type: text
|
||||
name: casting cost 4
|
||||
alt name: mana cost 4
|
||||
alt name: cost 4
|
||||
alt name: cc 4
|
||||
description: The fourth casting cost of the card.
|
||||
show statistics: false
|
||||
card list name: CC 4
|
||||
@@ -534,6 +558,7 @@ card field:
|
||||
card list column: 0103
|
||||
card list alignment: right
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:cc_import_script, margin_code:"cc4")
|
||||
script: mana_filter(value)
|
||||
|
||||
card field:
|
||||
@@ -556,6 +581,7 @@ card field:
|
||||
card list column: 0120
|
||||
card list alignment: right
|
||||
card list width: 40
|
||||
import script: ""
|
||||
script: cmc(card.casting_cost)
|
||||
|
||||
############################################################## Nameline symbols
|
||||
@@ -666,12 +692,16 @@ card field:
|
||||
card field:
|
||||
type: image
|
||||
name: image
|
||||
alt name: illustration
|
||||
alt name: art
|
||||
description: The illustration of the card.
|
||||
show statistics: false
|
||||
card list allow: false
|
||||
card field:
|
||||
type: image
|
||||
name: image 2
|
||||
alt name: illustration 2
|
||||
alt name: art 2
|
||||
description: The second illustration of the card.
|
||||
show statistics: false
|
||||
card list allow: false
|
||||
@@ -696,6 +726,7 @@ card field:
|
||||
card field:
|
||||
type: multiple choice
|
||||
name: indicator
|
||||
alt name: color indicator
|
||||
description: The color indicator dot of the card. Used to indicate card color on cards without casting cost.
|
||||
show statistics: false
|
||||
card list name: Indicator
|
||||
@@ -741,6 +772,7 @@ card field:
|
||||
card field:
|
||||
type: multiple choice
|
||||
name: indicator 2
|
||||
alt name: color indicator 2
|
||||
description: The second color indicator dot of the card. Used to indicate card color on cards without casting cost.
|
||||
show statistics: false
|
||||
card list name: Indicator 2
|
||||
@@ -786,6 +818,7 @@ card field:
|
||||
card field:
|
||||
type: multiple choice
|
||||
name: indicator 3
|
||||
alt name: color indicator 3
|
||||
description: The third color indicator dot of the card. Used to indicate card color on cards without casting cost.
|
||||
show statistics: false
|
||||
card list name: Indicator 3
|
||||
@@ -834,6 +867,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: super type
|
||||
alt name: supertype
|
||||
description: The combined types and supertypes of the card.
|
||||
show statistics: false
|
||||
card list name: Super Type
|
||||
@@ -844,6 +878,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: super type 2
|
||||
alt name: supertype 2
|
||||
description: The second combined types and supertypes of the card.
|
||||
show statistics: false
|
||||
card list name: Super Type 2
|
||||
@@ -854,6 +889,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: super type 3
|
||||
alt name: supertype 3
|
||||
description: The third combined types and supertypes of the card.
|
||||
show statistics: false
|
||||
card list name: Super Type 3
|
||||
@@ -864,6 +900,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: super type 4
|
||||
alt name: supertype 4
|
||||
description: The fourth combined types and supertypes of the card.
|
||||
show statistics: false
|
||||
card list name: Super Type 4
|
||||
@@ -877,6 +914,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: sub type
|
||||
alt name: subtype
|
||||
description: The combined subtypes of the card.
|
||||
show statistics: false
|
||||
card list name: Sub Type
|
||||
@@ -887,6 +925,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: sub type 2
|
||||
alt name: subtype 2
|
||||
description: The second combined subtypes of the card.
|
||||
show statistics: false
|
||||
card list name: Sub Type 2
|
||||
@@ -897,6 +936,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: sub type 3
|
||||
alt name: subtype 3
|
||||
description: The third combined subtypes of the card.
|
||||
show statistics: false
|
||||
card list name: Sub Type 3
|
||||
@@ -907,6 +947,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: sub type 4
|
||||
alt name: subtype 4
|
||||
description: The fourth combined subtypes of the card.
|
||||
show statistics: false
|
||||
card list name: Sub Type 4
|
||||
@@ -920,6 +961,8 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: type
|
||||
alt name: typeline
|
||||
alt name: type line
|
||||
description: The combined subtypes, types and supertypes of the card.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -937,6 +980,7 @@ card field:
|
||||
card list column: 0200
|
||||
card list width: 220
|
||||
sort script: type_sort_script(super_type: card.super_type, sub_type: card.sub_type)
|
||||
import script: dfc_split_import_script(value:value, import_script:type_import_script, margin_code:"type1")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.super_type,
|
||||
@@ -948,6 +992,8 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: type 2
|
||||
alt name: typeline 2
|
||||
alt name: type line 2
|
||||
description: The second combined subtypes, types and supertypes of the card.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -964,6 +1010,7 @@ card field:
|
||||
card list column: 0201
|
||||
card list width: 220
|
||||
sort script: type_sort_script(super_type: card.super_type_2, sub_type: card.sub_type_2)
|
||||
import script: dfc_split_import_script(value:value, import_script:type_import_script, margin_code:"type2")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.super_type_2,
|
||||
@@ -975,6 +1022,8 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: type 3
|
||||
alt name: typeline 3
|
||||
alt name: type line 3
|
||||
description: The third combined subtypes, types and supertypes of the card.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -991,6 +1040,7 @@ card field:
|
||||
card list column: 0202
|
||||
card list width: 220
|
||||
sort script: type_sort_script(super_type: card.super_type_3, sub_type: card.sub_type_3)
|
||||
import script: dfc_split_import_script(value:value, import_script:type_import_script, margin_code:"type3")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.super_type_3,
|
||||
@@ -1000,6 +1050,8 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: type 4
|
||||
alt name: typeline 4
|
||||
alt name: type line 4
|
||||
description: The fourth combined subtypes, types and supertypes of the card.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -1016,6 +1068,7 @@ card field:
|
||||
card list column: 0203
|
||||
card list width: 220
|
||||
sort script: type_sort_script(super_type: card.super_type_4, sub_type: card.sub_type_4)
|
||||
import script: dfc_split_import_script(value:value, import_script:type_import_script, margin_code:"type4")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.super_type_4,
|
||||
@@ -1053,6 +1106,7 @@ card field:
|
||||
choice: special
|
||||
choice: masterpiece
|
||||
initial: common
|
||||
import script: dfc_split_import_script(value:value, import_script:rarity_import_script, margin_code:"rarity1")
|
||||
card field:
|
||||
type: choice
|
||||
name: rarity 2
|
||||
@@ -1079,6 +1133,7 @@ card field:
|
||||
choice: special
|
||||
choice: masterpiece
|
||||
initial: common
|
||||
import script: dfc_split_import_script(value:value, import_script:rarity_import_script, margin_code:"rarity1")
|
||||
default: stylesheet; card.rarity
|
||||
card field:
|
||||
type: choice
|
||||
@@ -1106,6 +1161,7 @@ card field:
|
||||
choice: special
|
||||
choice: masterpiece
|
||||
initial: common
|
||||
import script: dfc_split_import_script(value:value, import_script:rarity_import_script, margin_code:"rarity1")
|
||||
default: stylesheet; card.rarity
|
||||
|
||||
############################################################## The text box
|
||||
@@ -1139,45 +1195,61 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: rule text
|
||||
alt name: rules text
|
||||
alt name: rules
|
||||
alt name: oracle text
|
||||
description: The rules text of the card.
|
||||
show statistics: false
|
||||
multi line: true
|
||||
card list name: Rule Text
|
||||
card list column: 0700
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text")
|
||||
default: stylesheet; text_filter_default(value, card_name: card_name_for_face(1), margin_code:"text")
|
||||
script: text_filter(value, card_name: card_name_for_face(1), margin_code:"text")
|
||||
card field:
|
||||
type: text
|
||||
name: rule text 2
|
||||
alt name: rules text 2
|
||||
alt name: rules 2
|
||||
alt name: oracle text 2
|
||||
description: The second rules text of the card.
|
||||
show statistics: false
|
||||
multi line: true
|
||||
card list name: Rule Text 2
|
||||
card list column: 0701
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text2")
|
||||
default: stylesheet; text_filter_default(value, card_name: card_name_for_face(2), margin_code:"text2")
|
||||
script: text_filter(value, card_name: card_name_for_face(2), margin_code:"text2")
|
||||
card field:
|
||||
type: text
|
||||
name: rule text 3
|
||||
alt name: rules text 3
|
||||
alt name: rules 3
|
||||
alt name: oracle text 3
|
||||
description: The third rules text of the card.
|
||||
show statistics: false
|
||||
multi line: true
|
||||
card list name: Rule Text 3
|
||||
card list column: 0702
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text3")
|
||||
default: stylesheet; text_filter_default(value, card_name: card_name_for_face(3), margin_code:"text3")
|
||||
script: text_filter(value, card_name: card_name_for_face(3), margin_code:"text3")
|
||||
card field:
|
||||
type: text
|
||||
name: rule text 4
|
||||
alt name: rules text 4
|
||||
alt name: rules 4
|
||||
alt name: oracle text 4
|
||||
description: The fourth rules text of the card.
|
||||
show statistics: false
|
||||
multi line: true
|
||||
card list name: Rule Text 4
|
||||
card list column: 0703
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text4")
|
||||
default: stylesheet; text_filter_default(value, card_name: card_name_for_face(4), margin_code:"text4")
|
||||
script: text_filter(value, card_name: card_name_for_face(4), margin_code:"text4")
|
||||
|
||||
@@ -1185,6 +1257,8 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: rule text 5
|
||||
alt name: rules text 5
|
||||
alt name: rules 5
|
||||
description: The fifth rules text of the card.
|
||||
show statistics: false
|
||||
multi line: true
|
||||
@@ -1196,6 +1270,8 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: rule text 6
|
||||
alt name: rules text 6
|
||||
alt name: rules 6
|
||||
description: The sixth rules text of the card.
|
||||
show statistics: false
|
||||
multi line: true
|
||||
@@ -1211,6 +1287,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: flavor text
|
||||
alt name: flavortext
|
||||
description: The flavor text of the card.
|
||||
show statistics: false
|
||||
multi line: true
|
||||
@@ -1265,6 +1342,7 @@ card field:
|
||||
card list name: Text
|
||||
card list column: 0740
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text")
|
||||
script:
|
||||
if mainframe_walker() then
|
||||
mainframe_walker_text_script()
|
||||
@@ -1282,6 +1360,7 @@ card field:
|
||||
card list name: Text 2
|
||||
card list column: 0741
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text2")
|
||||
script:
|
||||
if mainframe_walkerb() then
|
||||
mainframe_walker_text_scriptb()
|
||||
@@ -1299,6 +1378,7 @@ card field:
|
||||
card list name: Text 3
|
||||
card list column: 0742
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text3")
|
||||
script:
|
||||
if mainframe_walkerc() then
|
||||
mainframe_walker_text_scriptc()
|
||||
@@ -1316,6 +1396,7 @@ card field:
|
||||
card list name: Text 4
|
||||
card list column: 0743
|
||||
card list width: 150
|
||||
import script: text_import_script(margin_code:"text4")
|
||||
script:
|
||||
if mainframe_walkerd() then
|
||||
mainframe_walker_text_scriptd()
|
||||
@@ -2221,6 +2302,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt
|
||||
alt name: p/t
|
||||
alt name: p t
|
||||
alt name: power/toughness
|
||||
alt name: power toughness
|
||||
description: The combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2237,6 +2322,7 @@ card field:
|
||||
pt-br: P/R
|
||||
card list column: 0300
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt1")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power,
|
||||
@@ -2248,6 +2334,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt 2
|
||||
alt name: p/t 2
|
||||
alt name: p t 2
|
||||
alt name: power/toughness 2
|
||||
alt name: power toughness 2
|
||||
description: The second combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2263,6 +2353,7 @@ card field:
|
||||
pt-br: P/R 2
|
||||
card list column: 0301
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt2")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power_2,
|
||||
@@ -2274,6 +2365,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt 3
|
||||
alt name: p/t 3
|
||||
alt name: p t 3
|
||||
alt name: power/toughness 3
|
||||
alt name: power toughness 3
|
||||
description: The third combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2289,6 +2384,7 @@ card field:
|
||||
pt-br: P/R 3
|
||||
card list column: 0302
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt3")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power_3,
|
||||
@@ -2300,6 +2396,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt 4
|
||||
alt name: p/t 4
|
||||
alt name: p t 4
|
||||
alt name: power/toughness 4
|
||||
alt name: power toughness 4
|
||||
description: The fourth combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2315,6 +2415,7 @@ card field:
|
||||
pt-br: P/R 4
|
||||
card list column: 0303
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt4")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power_4,
|
||||
@@ -2326,6 +2427,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt 5
|
||||
alt name: p/t 5
|
||||
alt name: p t 5
|
||||
alt name: power/toughness 5
|
||||
alt name: power toughness 5
|
||||
description: The fifth combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2341,6 +2446,7 @@ card field:
|
||||
pt-br: P/R 5
|
||||
card list column: 0304
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt5")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power_5,
|
||||
@@ -2352,6 +2458,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt 6
|
||||
alt name: p/t 6
|
||||
alt name: p t 6
|
||||
alt name: power/toughness 6
|
||||
alt name: power toughness 6
|
||||
description: The sixth combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2367,6 +2477,7 @@ card field:
|
||||
pt-br: P/R 6
|
||||
card list column: 0305
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt6")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power_6,
|
||||
@@ -2378,6 +2489,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt 7
|
||||
alt name: p/t 7
|
||||
alt name: p t 7
|
||||
alt name: power/toughness 7
|
||||
alt name: power toughness 7
|
||||
description: The seventh combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2393,6 +2508,7 @@ card field:
|
||||
pt-br: P/R 7
|
||||
card list column: 0306
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt7")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power_7,
|
||||
@@ -2404,6 +2520,10 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: pt 8
|
||||
alt name: p/t 8
|
||||
alt name: p t 8
|
||||
alt name: power/toughness 8
|
||||
alt name: power toughness 8
|
||||
description: The eighth combined power/toughness of the creature.
|
||||
show statistics: false
|
||||
save value: false
|
||||
@@ -2419,6 +2539,7 @@ card field:
|
||||
pt-br: P/R 8
|
||||
card list column: 0307
|
||||
card list width: 60
|
||||
import script: dfc_split_import_script(value:value, import_script:pt_import_script, margin_code:"pt8")
|
||||
script:
|
||||
combined_editor(
|
||||
field1: card.power_8,
|
||||
@@ -2514,6 +2635,7 @@ card field:
|
||||
card field:
|
||||
type: choice
|
||||
name: card stamp
|
||||
alt name: stamp
|
||||
description: The hologram security stamp of the card.
|
||||
show statistics: false
|
||||
card list name: Stamp
|
||||
@@ -2524,6 +2646,7 @@ card field:
|
||||
card field:
|
||||
type: choice
|
||||
name: card stamp 2
|
||||
alt name: stamp 2
|
||||
description: The second hologram security stamp of the card.
|
||||
show statistics: false
|
||||
card list name: Stamp 2
|
||||
@@ -2534,6 +2657,7 @@ card field:
|
||||
card field:
|
||||
type: choice
|
||||
name: card stamp 3
|
||||
alt name: stamp 3
|
||||
description: The third hologram security stamp of the card.
|
||||
show statistics: false
|
||||
card list name: Stamp 3
|
||||
@@ -2610,6 +2734,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: illustrator
|
||||
alt name: artist
|
||||
description: The illustrator of the card. Default value can be changed on the 'set info' tab. Can also be used for flavor, mechanics or template credit.
|
||||
show statistics: false
|
||||
card list visible: true
|
||||
@@ -2620,6 +2745,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: illustrator 2
|
||||
alt name: artist 2
|
||||
description: The second illustrator of the card. Default value can be changed on the 'set info' tab. Can also be used for flavor, mechanics or template credit.
|
||||
show statistics: false
|
||||
card list name: Artist 2
|
||||
@@ -2629,6 +2755,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: illustrator 3
|
||||
alt name: artist 3
|
||||
description: The third illustrator of the card. Default value can be changed on the 'set info' tab. Can also be used for flavor, mechanics or template credit.
|
||||
show statistics: false
|
||||
card list name: Artist 3
|
||||
@@ -2845,6 +2972,7 @@ card field:
|
||||
card field:
|
||||
type: text
|
||||
name: custom card number
|
||||
alt name: collector number
|
||||
description: The custom cardnumber of the card, defined by the user.
|
||||
show statistics: false
|
||||
card list name: Custom #
|
||||
@@ -3197,6 +3325,50 @@ card field:
|
||||
card list width: 50
|
||||
script: custom_index()
|
||||
|
||||
############################################################## JSON import helper
|
||||
card field:
|
||||
type: text
|
||||
name: card faces
|
||||
description: A helper field that will import values from a Scryfall JSON card_faces object
|
||||
show statistics: false
|
||||
save value: false
|
||||
editable: false
|
||||
card list allow: false
|
||||
script: ""
|
||||
import script:
|
||||
result := []
|
||||
if value != nil then
|
||||
(
|
||||
count := length(value)
|
||||
for f from 1 to count do
|
||||
(
|
||||
suffix := if f <= 1 then "" else "_" + f
|
||||
map := value[f-1]
|
||||
for each k:v in map do
|
||||
(
|
||||
if k == "oracle_text" then result := result + make_map(keys:["rule_text" + suffix], values:[v])
|
||||
else if k == "flavor_text" then result := result + make_map(keys:["flavor_text" + suffix], values:[v])
|
||||
else if k == "mana_cost" then result := result + make_map(keys:["casting_cost" + suffix], values:[v])
|
||||
else if k == "power" then result := result + make_map(keys:["power" + suffix], values:[v])
|
||||
else if k == "toughness" then result := result + make_map(keys:["toughness" + suffix], values:[v])
|
||||
else if k == "defense" then result := result + make_map(keys:["loyalty" + suffix], values:[v])
|
||||
else if k == "loyalty" then result := result + make_map(keys:["loyalty" + suffix], values:[v])
|
||||
""
|
||||
)
|
||||
""
|
||||
)
|
||||
)
|
||||
result
|
||||
|
||||
card field:
|
||||
type: text
|
||||
name: layout
|
||||
description: A helper field that will import values from a Scryfall JSON layout object
|
||||
show statistics: false
|
||||
save value: false
|
||||
editable: false
|
||||
card list allow: false
|
||||
|
||||
############################################################## 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
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
mse version: 2.0.0
|
||||
mse version: 2.5.8
|
||||
short name: Magic
|
||||
full name: Magic the Gathering
|
||||
installer group: magic/game files
|
||||
icon: card-back.png
|
||||
position hint: 01
|
||||
|
||||
version: 2024-10-01
|
||||
version: 2025-06-14
|
||||
depends on:
|
||||
package: magic-blends.mse-include
|
||||
version: 2024-10-01
|
||||
@@ -13,48 +13,24 @@ depends on:
|
||||
package: magic-modules.mse-include
|
||||
version: 2024-10-01
|
||||
|
||||
############################################################## Load the main scripts
|
||||
########################################## Load the main scripts
|
||||
|
||||
init script: include file: script
|
||||
|
||||
############################################################## Load all the fields and lists
|
||||
########################################## Load all the fields and lists
|
||||
|
||||
################## There be dragons here. -Liosan ##########################
|
||||
include file: game_script
|
||||
include file: card_fields
|
||||
include file: set_fields
|
||||
include file: statistics
|
||||
include localized file: statistics
|
||||
include file: add_cards_scripts
|
||||
include file: packs
|
||||
include file: keywords
|
||||
include localized file: keywords
|
||||
include file: word_lists
|
||||
include file: auto_replace
|
||||
#### Add/overwrite things in this file rather than editing the above files
|
||||
include file: json_paths
|
||||
|
||||
########################################## Load custom user addons
|
||||
########################################## Add/overwrite things in this file rather than editing the above files
|
||||
|
||||
include file: custom_addons
|
||||
|
||||
|
||||
############################################################## Other stuff
|
||||
|
||||
#### Determine the color in the card columns
|
||||
card list color script:
|
||||
input := card.card_color
|
||||
if input == "white" then rgb(156,130,90)
|
||||
else if input == "blue" then rgb(0,64,168)
|
||||
else if input == "black" then rgb(0,0,0)
|
||||
else if input == "red" then rgb(168,0,0)
|
||||
else if input == "green" then rgb(0,168,0)
|
||||
else if input == "pink" then rgb(210,60,140)
|
||||
else if input == "purple" then rgb(150,100,160)
|
||||
else if input == "yellow" then rgb(190,200,50)
|
||||
else if input == "brown" then rgb(51, 10, 0)
|
||||
else if input == "orange" then rgb(255, 51, 0)
|
||||
else (
|
||||
artifact := chosen(choice:"artifact")
|
||||
land := chosen(choice:"land")
|
||||
multi := chosen(choice:"multicolor")
|
||||
hybrid := chosen(choice:"hybrid")
|
||||
if land then rgb(109,62,39) # land
|
||||
else if multi and input != "artifact, multicolor" then rgb(130,110,0) # multicolor
|
||||
else if hybrid then rgb(115,0,160) # hybrid
|
||||
else if artifact then rgb(72,90,100) # artifact
|
||||
else rgb(119,83,83) # colorless
|
||||
)
|
||||
|
||||
71
data/magic.mse-game/game_script
Normal file
71
data/magic.mse-game/game_script
Normal file
@@ -0,0 +1,71 @@
|
||||
############################################################## Game Scripts
|
||||
#### Determine the color in the card columns
|
||||
card list color script:
|
||||
input := card.card_color
|
||||
if input == "white" then rgb(156,130,90)
|
||||
else if input == "blue" then rgb(0,64,168)
|
||||
else if input == "black" then rgb(0,0,0)
|
||||
else if input == "red" then rgb(168,0,0)
|
||||
else if input == "green" then rgb(0,168,0)
|
||||
else if input == "pink" then rgb(210,60,140)
|
||||
else if input == "purple" then rgb(150,100,160)
|
||||
else if input == "yellow" then rgb(190,200,50)
|
||||
else if input == "brown" then rgb(51, 10, 0)
|
||||
else if input == "orange" then rgb(255, 51, 0)
|
||||
else (
|
||||
artifact := chosen(choice:"artifact")
|
||||
land := chosen(choice:"land")
|
||||
multi := chosen(choice:"multicolor")
|
||||
hybrid := chosen(choice:"hybrid")
|
||||
if land then rgb(109,62,39) # land
|
||||
else if multi and input != "artifact, multicolor" then rgb(130,110,0) # multicolor
|
||||
else if hybrid then rgb(115,0,160) # hybrid
|
||||
else if artifact then rgb(72,90,100) # artifact
|
||||
else rgb(119,83,83) # colorless
|
||||
)
|
||||
|
||||
#### Make some adjustments when creating a new card
|
||||
import script:
|
||||
map := []
|
||||
|
||||
if card.stylesheet == nil then (
|
||||
if card.layout == "split" then map := map + [stylesheet: "m15-split-fusable"]
|
||||
else if card.layout == "aftermath" then map := map + [stylesheet: "m15-aftermath"]
|
||||
else if card.layout == "flip" then map := map + [stylesheet: "m15-flip"]
|
||||
else if card.layout == "transform" then map := map + [stylesheet: "m15-mainframe-dfc"]
|
||||
else if card.layout == "modal_dfc" then map := map + [stylesheet: "m15-mainframe-dfc"]
|
||||
else if card.layout == "meld" then map := map + [stylesheet: "m15-mainframe-dfc"]
|
||||
else if card.layout == "class" then map := map + [stylesheet: "m15-saga"]
|
||||
else if card.layout == "case" then map := map + [stylesheet: "m15-saga"]
|
||||
else if card.layout == "saga" then map := map + [stylesheet: "m15-saga"]
|
||||
else if card.layout == "adventure" then map := map + [stylesheet: "m15-adventure"]
|
||||
else if card.layout == "battle" then map := map + [stylesheet: "m15-battle"]
|
||||
else if card.layout == "planar" then map := map + [stylesheet: "m15-mainframe-planes"]
|
||||
else if card.layout == "scheme" then map := map + [stylesheet: "archenemy"]
|
||||
else if card.layout == "vanguard" then map := map + [stylesheet: "m15-vanguard"]
|
||||
else if card.layout == "token" then map := map + [stylesheet: "m15-mainframe-tokens"]
|
||||
else if card.layout == "emblem" then map := map + [stylesheet: "m15-emblem-cajun"]
|
||||
|
||||
else if lang_setting("is_planeswalker")(card.super_type)
|
||||
then map := map + [stylesheet:"m15-mainframe-planeswalker"]
|
||||
|
||||
else if lang_setting("is_saga")(card.sub_type)
|
||||
or lang_setting("is_class")(card.sub_type)
|
||||
or lang_setting("is_case")(card.sub_type)
|
||||
then map := map + [stylesheet:"m15-saga"]
|
||||
|
||||
else if lang_setting("is_adventure")(card.sub_type)
|
||||
or lang_setting("is_adventure")(card.sub_type_2)
|
||||
then map := map + [stylesheet:"m15-adventure"]
|
||||
)
|
||||
|
||||
style := to_lower(if card.stylesheet == nil then (map["stylesheet"] or else "m15-altered") else card.stylesheet.folder_name)
|
||||
if contains(style, match:"walker")
|
||||
or contains(style, match:"pw")
|
||||
or contains(style, match:"leveler")
|
||||
or contains(style, match:"saga")
|
||||
or contains(style, match:"class")
|
||||
then map := map + rule_text_to_level_text(1)
|
||||
|
||||
map
|
||||
|
||||
9
data/magic.mse-game/json_paths
Normal file
9
data/magic.mse-game/json_paths
Normal file
@@ -0,0 +1,9 @@
|
||||
############################################################## JSON Paths
|
||||
json path:
|
||||
Scryfall JSON list file // data:
|
||||
|
||||
json path:
|
||||
Scryfall JSON bulk file //
|
||||
|
||||
json path:
|
||||
MTGJSON file // data:cards:
|
||||
2021
data/magic.mse-game/keywords_en
Normal file
2021
data/magic.mse-game/keywords_en
Normal file
File diff suppressed because it is too large
Load Diff
2021
data/magic.mse-game/keywords_pl
Normal file
2021
data/magic.mse-game/keywords_pl
Normal file
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)Klasse")
|
||||
is_case : match@(match: "(?i)Fall")
|
||||
is_room : match@(match: "(?i)Raum")
|
||||
is_adventure : match@(match: "(?i)Abenteuer")
|
||||
is_nyx : match@(match: "(?i)Verzauberungs")
|
||||
is_saga : match@(match: "(?i)Sage")
|
||||
is_vehicle : match@(match: "(?i)Fahrzeug")
|
||||
@@ -799,6 +800,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)Class")
|
||||
is_case : match@(match: "(?i)Case")
|
||||
is_room : match@(match: "(?i)Room")
|
||||
is_adventure : match@(match: "(?i)Adventure")
|
||||
is_nyx : match@(match: "(?i)Enchantment ")
|
||||
is_saga : match@(match: "(?i)Saga")
|
||||
is_vehicle : match@(match: "(?i)Vehicle")
|
||||
@@ -1560,6 +1562,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)Clase")
|
||||
is_case : match@(match: "(?i)Caso")
|
||||
is_room : match@(match: "(?i)Sala")
|
||||
is_adventure : match@(match: "(?i)Aventura")
|
||||
is_nyx : match@(match: "(?i) encantamiento")
|
||||
is_saga : match@(match: "(?i)Saga")
|
||||
is_vehicle : match@(match: "(?i)Vehículo")
|
||||
@@ -2292,6 +2295,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)Classe")
|
||||
is_case : match@(match: "(?i)Affaire")
|
||||
is_room : match@(match: "(?i)Pièce")
|
||||
is_adventure : match@(match: "(?i)Aventure")
|
||||
is_nyx : match@(match: "(?i)-enchantement")
|
||||
is_saga : match@(match: "(?i)Saga")
|
||||
is_vehicle : match@(match: "(?i)Véhicule")
|
||||
@@ -3029,6 +3033,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)Classe")
|
||||
is_case : match@(match: "(?i)Caso")
|
||||
is_room : match@(match: "(?i)Stanza")
|
||||
is_adventure : match@(match: "(?i)Avventura")
|
||||
is_nyx : match@(match: "(?i) Incantesimo")
|
||||
is_saga : match@(match: "(?i)Saga")
|
||||
is_vehicle : match@(match: "(?i)Veicolo")
|
||||
@@ -3763,6 +3768,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)クラス")
|
||||
is_case : match@(match: "(?i)事件")
|
||||
is_room : match@(match: "(?i)部屋")
|
||||
is_adventure : match@(match: "(?i)出来事")
|
||||
is_nyx : match@(match: "(?i)・エンチャント")
|
||||
is_saga : match@(match: "(?i)英雄譚")
|
||||
is_vehicle : match@(match: "(?i)機体")
|
||||
@@ -4564,6 +4570,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)직업")
|
||||
is_case : match@(match: "(?i)직업")
|
||||
is_room : match@(match: "(?i)방")
|
||||
is_adventure : match@(match: "(?i)모험")
|
||||
is_nyx : match@(match: "(?i)부여마법 ")
|
||||
is_saga : match@(match: "(?i)서사시")
|
||||
is_vehicle : match@(match: "(?i)탑승물")
|
||||
@@ -5256,6 +5263,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)Classe")
|
||||
is_case : match@(match: "(?i)Caso")
|
||||
is_room : match@(match: "(?i)Sala")
|
||||
is_adventure : match@(match: "(?i)Aventura")
|
||||
is_nyx : match@(match: "(?i) Encantamento")
|
||||
is_saga : match@(match: "(?i)Saga")
|
||||
is_vehicle : match@(match: "(?i)Veículo")
|
||||
@@ -5988,6 +5996,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)Класс")
|
||||
is_case : match@(match: "(?i)Класс")
|
||||
is_room : match@(match: "(?i)Комната")
|
||||
is_adventure : match@(match: "(?i)Приключение")
|
||||
is_nyx : match@(match: "(?i)Чары ")
|
||||
is_saga : match@(match: "(?i)Сага")
|
||||
is_vehicle : match@(match: "(?i)Машина")
|
||||
@@ -6699,6 +6708,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)职业")
|
||||
is_case : match@(match: "(?i)案件")
|
||||
is_room : match@(match: "(?i)房间")
|
||||
is_adventure : match@(match: "(?i)历险")
|
||||
is_nyx : match@(match: "(?i)结界(生物|神器)")
|
||||
is_saga : match@(match: "(?i)传纪")
|
||||
is_vehicle : match@(match: "(?i)载具")
|
||||
@@ -7416,6 +7426,7 @@ languages := [
|
||||
is_class : match@(match: "(?i)職業")
|
||||
is_case : match@(match: "(?i)案件")
|
||||
is_room : match@(match: "(?i)房間")
|
||||
is_adventure : match@(match: "(?i)歷險")
|
||||
is_nyx : match@(match: "(?i)結界(生物|神器)")
|
||||
is_saga : match@(match: "(?i)傳紀")
|
||||
is_vehicle : match@(match: "(?i)載具")
|
||||
|
||||
@@ -42,6 +42,8 @@ semicolon_count := filter_text@(match:";")
|
||||
|
||||
split_comma := split_text@(match: " *, *")
|
||||
split_semicolon := split_text@(match: " *; *")
|
||||
split_line := split_text@(match: "\n")
|
||||
split_face := split_text@(match: " ?// ?")
|
||||
line_count := split_text@(match:"\n+",include_empty:false) + length
|
||||
px_split := split_text@(match:"p?x",include_empty:false)
|
||||
|
||||
@@ -516,6 +518,16 @@ colorless_color := {
|
||||
else "c"
|
||||
}
|
||||
|
||||
convert_scryfall_phy_hybrid_mana := replace@(match:"\{(.)/(.)/P\}", replace:"\{H/\\1/\\2\}")
|
||||
convert_scryfall_phy_normal_mana := replace@(match:"\{(.)/P\}", replace:"\{H/\\1\}")
|
||||
convert_scryfall_pawprint_symbol := replace@(match:"\{P\}", replace:"\{J\}")
|
||||
convert_scryfall_chaos_symbol := replace@(match:"\{CHAOS\}", replace:"\{A\}")
|
||||
convert_scryfall_braces := replace@(match:"\{([A-Z0-9/]+)\}", replace:"<sym>\\1</sym>") + replace@(match:"</sym><sym>", replace:"")
|
||||
convert_scryfall_mana := convert_scryfall_phy_hybrid_mana +
|
||||
convert_scryfall_phy_normal_mana +
|
||||
convert_scryfall_pawprint_symbol +
|
||||
convert_scryfall_chaos_symbol
|
||||
|
||||
############################################################## Mainframe mana
|
||||
use_v_mana := {contains(set.custom_mana_symbol_name, match:".png")}
|
||||
use_large_v_mana := { use_v_mana() and chosen(set.mana_symbol_options, choice:"enable in casting costs")}
|
||||
@@ -1984,8 +1996,8 @@ apply_margins := {
|
||||
}
|
||||
|
||||
bump_text := {
|
||||
blocks := split_text(input, match:"\n");
|
||||
new_text := blocks[0];
|
||||
blocks := split_line(input)
|
||||
new_text := blocks[0]
|
||||
for x from 1 to length(blocks)-1 do new_text := new_text + "\n" + bumper(blocks[x])
|
||||
new_text
|
||||
}
|
||||
@@ -2338,7 +2350,7 @@ lines_of_text := { #### estimate lines in break blocks
|
||||
lines := lines + calc_lines(word_split(input[x]), char:char)
|
||||
lines
|
||||
}
|
||||
flavor_text := {split_text(match:"\n", remove_tags(card.flavor_text+"\n"))} #### remove tags, add \n so .1 doesn't explode
|
||||
flavor_text := {split_line(remove_tags(card.flavor_text+"\n"))} #### remove tags, add \n so .1 doesn't explode
|
||||
hard_flavor_break := { if not contains(card.flavor_text, match:"\n") then 0 else if contains(card.flavor_text, match:"<soft-line>\n") then 0 else if lines_of_rules() >= 3 then -3 else -2}
|
||||
font_size := {min(14,round_near(card_style.text.content_height / card_style.text.content_lines) - 8)} #### approximate font size
|
||||
adj_char_width := {7.35 * min(14, font_size()+0.95) / 14} #### average char width, adjusted for font size
|
||||
@@ -2354,7 +2366,7 @@ uneven_correction := { if lines_of_flavor() == 1 then max(4, (card_style.text.co
|
||||
#### old_bar_equation is compatibilty for 2.0.0
|
||||
old_bar_equation := { top_of_textbox() + padding_height() + card_style.text.content_height - line_height()*(lines_of_flavor() + offset_lines()) + linebreak_height() - uneven_correction() + front_corr() + bar_offset() + hard_flavor_break() +1 }
|
||||
|
||||
flavor_text2 := {split_text(match:"\n", remove_tags(card.flavor_text_2+"\n"))} #### remove tags, add \n so .1 doesn't explode
|
||||
flavor_text2 := {split_line(remove_tags(card.flavor_text_2+"\n"))} #### remove tags, add \n so .1 doesn't explode
|
||||
hard_flavor_break2 := { if not contains(card.flavor_text_2, match:"\n") then 0 else if contains(card.flavor_text_2, match:"<soft-line>\n") then 0 else if lines_of_rules2() >= 3 then -3 else -2}
|
||||
font_size2 := {min(14,round_near(card_style.text_2.content_height / card_style.text_2.content_lines) - 8)} #### approximate font size
|
||||
adj_char_width2 := {7.35 * min(14, font_size2()+0.95) / 14} #### average char width, adjusted for font size
|
||||
@@ -2369,7 +2381,7 @@ uneven_correction2 := { if lines_of_flavor2() == 1 then max(4, (card_style.text_
|
||||
#### add it all up
|
||||
old_bar_equation2 := { top_of_textbox2() + padding_height2() + card_style.text_2.content_height - line_height2()*(lines_of_flavor2() + offset_lines2()) + linebreak_height2() - uneven_correction2() + back_corr() + bar_offset2() + hard_flavor_break2() +1 }
|
||||
|
||||
flavor_text3 := {split_text(match:"\n", remove_tags(card.flavor_text_3+"\n"))} #### remove tags, add \n so .1 doesn't explode
|
||||
flavor_text3 := {split_line(remove_tags(card.flavor_text_3+"\n"))} #### remove tags, add \n so .1 doesn't explode
|
||||
hard_flavor_break3 := { if not contains(card.flavor_text_3, match:"\n") then 0 else if contains(card.flavor_text_3, match:"<soft-line>\n") then 0 else if lines_of_rules3() >= 3 then -3 else -2}
|
||||
font_size3 := {min(14,round_near(card_style.text_3.content_height / card_style.text_3.content_lines) - 8)} #### approximate font size
|
||||
adj_char_width3 := {7.35 * min(14, font_size3()+0.95) / 14} #### average char width, adjusted for font size
|
||||
@@ -5413,6 +5425,70 @@ rarity_sort_script :=
|
||||
else if input == "masterpiece" then "5"
|
||||
else "6"
|
||||
}
|
||||
############################################################## Card import
|
||||
dfc_split_import_script :=
|
||||
{
|
||||
face_values := split_face(value)
|
||||
for x from 1 to length(face_values) do
|
||||
(
|
||||
suffix := if x <= 1 then "" else "_" + x
|
||||
import_script(value:face_values[x-1], suffix:suffix)
|
||||
)
|
||||
}
|
||||
name_import_script :=
|
||||
{
|
||||
make_map(keys:["name" + suffix], values:[value])
|
||||
}
|
||||
pt_import_script :=
|
||||
{
|
||||
values := split_text(value, match: lang_setting("pt_separator"))
|
||||
if length(values) != 2 then [] else (
|
||||
keys := ["power" + suffix, "toughness" + suffix]
|
||||
make_map(keys:keys, values:values))
|
||||
}
|
||||
type_import_script :=
|
||||
{
|
||||
values := split_text(value, match: "( ?- ?|" + lang_setting("type_separator") + ")")
|
||||
keys := ["super_type" + suffix]
|
||||
if length(values) > 1 then keys := keys + ["sub_type" + suffix]
|
||||
make_map(keys:keys, values:values)
|
||||
}
|
||||
text_import_script :=
|
||||
{
|
||||
suffix := if margin_code == "text" then "" else replace(margin_code, match: "text", replace: "_")
|
||||
keys := ["rule_text" + suffix]
|
||||
values := [convert_scryfall_braces(convert_scryfall_mana(value))]
|
||||
make_map(keys:keys, values:values)
|
||||
}
|
||||
cc_import_script :=
|
||||
{
|
||||
keys := ["casting_cost" + suffix]
|
||||
values := [convert_scryfall_mana(value)]
|
||||
make_map(keys:keys, values:values)
|
||||
}
|
||||
rarity_import_script :=
|
||||
{
|
||||
keys := ["rarity" + suffix]
|
||||
values := [if value == "mythic" then "mythic rare" else if value == "bonus" then "special" else value]
|
||||
make_map(keys:keys, values:values)
|
||||
}
|
||||
border_import_script :=
|
||||
{
|
||||
keys := ["border_color"]
|
||||
values := [if value == "borderless" then rgba(0,0,0,0) else value]
|
||||
make_map(keys:keys, values:values)
|
||||
}
|
||||
rule_text_to_level_text :=
|
||||
{
|
||||
suffix := if input <= 1 then "" else "_" + input
|
||||
offset := if suffix == "" then 0 else (to_int(substring(suffix, begin:1))-1)*8
|
||||
values := split_line(card["rule_text" + suffix])
|
||||
count := length(values)
|
||||
keys := for x from 1 to count do ["level_" + (x+offset) + "_text"]
|
||||
values := values + [""]
|
||||
keys := keys + ["rule_text" + suffix]
|
||||
make_map(keys:keys, values:values)
|
||||
}
|
||||
############################################################## Custom index
|
||||
search_pull := filter_text@(match:"search(name|mana|type|rules|flavor|text|notes)")
|
||||
search_snip := replace@(match:"search(name|mana|type|rules|flavor|text|notes)_", replace:"")
|
||||
|
||||
@@ -443,10 +443,6 @@ set field:
|
||||
name: card notes clauses split
|
||||
description: Regex used to split the card notes in the Card Notes Clauses statistics category. Default is " *(\.|\n|;|,|(?=!)) *" which splits at each semicolon, each dot, each exclamation mark and each comma.
|
||||
default: " *(\\.|\\n|;|,|(?=!)) *"
|
||||
set field:
|
||||
type: choice
|
||||
name: global_variable_average_opening_hand
|
||||
script: global_variable_average_opening_hand_statistic()
|
||||
|
||||
|
||||
set field:
|
||||
@@ -537,8 +533,6 @@ set field:
|
||||
############################# Default style
|
||||
|
||||
default set style:
|
||||
global_variable_average_opening_hand:
|
||||
visible: false
|
||||
title:
|
||||
padding left: 2
|
||||
font:
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (On The Play)
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
|
||||
1347
data/magic.mse-game/statistics_en
Normal file
1347
data/magic.mse-game/statistics_en
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: Couleur (Catégorie)
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: % D’Avoir Un Terrain (Jouant 1er)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
|
||||
1347
data/magic.mse-game/statistics_pl
Normal file
1347
data/magic.mse-game/statistics_pl
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics dimensions 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
statistics dimension:
|
||||
name: color category
|
||||
position hint: 0000
|
||||
@@ -1117,6 +1119,7 @@ statistics dimension:
|
||||
split list: true
|
||||
show empty: false
|
||||
script: if trim_from_draw_statistic() then "" else average_opening_hand_statistic()
|
||||
global_script: average_opening_hand_global_statistic()
|
||||
|
||||
statistics dimension:
|
||||
name: land drop hit % (Play)
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
############################################################## Statistics scripts 30-03-2023
|
||||
############################################################## Blame GenevensiS for this
|
||||
|
||||
## Enable showing of non-printing characters to edit this file
|
||||
|
||||
## Clean up text for processing
|
||||
remove_flavor_statistic := replace@(match: "<i-flavor>.*?</i-flavor>", replace: "")
|
||||
remove_reminder_statistic := replace@(match: "(<i>|<i-auto>).*?(</i>|</i-auto>)", replace: "")
|
||||
@@ -582,8 +584,7 @@ n_choose_k_statistic :=
|
||||
# Average number of cards in an opening hand
|
||||
average_opening_hand_statistic :=
|
||||
{
|
||||
averages := split_text(set.global_variable_average_opening_hand, match: ";")
|
||||
if length(averages) != 9 then set.global_variable_average_opening_hand else (
|
||||
if type_name(global_value) != "collection" then to_string(global_value) else (
|
||||
types := [has_type_statistic("land")] +
|
||||
(if has_type_statistic("artifact") then (if mana_production_list_statistic(check_type: "nonland") == "" then [false, true] else [true, false]) else [false, false]) +
|
||||
[has_type_statistic("enchantment")] +
|
||||
@@ -592,10 +593,10 @@ average_opening_hand_statistic :=
|
||||
[has_type_statistic("creature")] +
|
||||
[has_type_statistic("sorcery")] +
|
||||
[has_type_statistic("instant")]
|
||||
result := for x from 0 to 8 do (if types[x] then averages[x] else "")
|
||||
result := for x from 0 to 8 do (if types[x] then global_value[x] else "")
|
||||
substring(result, begin: 1))
|
||||
}
|
||||
global_variable_average_opening_hand_statistic :=
|
||||
average_opening_hand_global_statistic :=
|
||||
{
|
||||
if length(set.cards) < 1 then "" else (
|
||||
|
||||
@@ -640,15 +641,17 @@ global_variable_average_opening_hand_statistic :=
|
||||
creatures_average := format_average_statistic(7.0 * to_number(creatures) / card_count_real)
|
||||
sorceries_average := format_average_statistic(7.0 * to_number(sorceries) / card_count_real)
|
||||
instants_average := format_average_statistic(7.0 * to_number(instants) / card_count_real)
|
||||
"," + lang_setting("land") + " — " + lands_average + # There are zero width spaces in the "," and ",;" to impose ordering
|
||||
";," + lang_setting("mana_artifact") + " — " + manaartifacts_average +
|
||||
";," + lang_setting("nonmana_artifact") + " — " + nonmanaartifacts_average +
|
||||
";," + lang_setting("enchantment") + " — " + enchantments_average +
|
||||
";," + lang_setting("planeswalker") + " — " + planeswalkers_average +
|
||||
";," + lang_setting("battle") + " — " + battles_average +
|
||||
";," + lang_setting("creature") + " — " + creatures_average +
|
||||
";," + lang_setting("sorcery") + " — " + sorceries_average +
|
||||
";," + lang_setting("instant") + " — " + instants_average))
|
||||
[
|
||||
"," + lang_setting("land") + " — " + lands_average, # There are zero width spaces after the initial "," to impose ordering
|
||||
"," + lang_setting("mana_artifact") + " — " + manaartifacts_average,
|
||||
"," + lang_setting("nonmana_artifact") + " — " + nonmanaartifacts_average,
|
||||
"," + lang_setting("enchantment") + " — " + enchantments_average,
|
||||
"," + lang_setting("planeswalker") + " — " + planeswalkers_average,
|
||||
"," + lang_setting("battle") + " — " + battles_average,
|
||||
"," + lang_setting("creature") + " — " + creatures_average,
|
||||
"," + lang_setting("sorcery") + " — " + sorceries_average,
|
||||
"," + lang_setting("instant") + " — " + instants_average
|
||||
]))
|
||||
}
|
||||
format_average_statistic :=
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user