Revert "Bump to 2 5 8 (#141)"

This reverts commit 240c1532ee.
This commit is contained in:
cajun
2025-09-23 22:32:25 -05:00
parent 240c1532ee
commit 75307ecbe4
46 changed files with 1902 additions and 12298 deletions

View File

@@ -2,8 +2,6 @@
############################################################## 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: "")
@@ -584,7 +582,8 @@ n_choose_k_statistic :=
# Average number of cards in an opening hand
average_opening_hand_statistic :=
{
if type_name(global_value) != "collection" then to_string(global_value) else (
averages := split_text(set.global_variable_average_opening_hand, match: ";")
if length(averages) != 9 then set.global_variable_average_opening_hand 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")] +
@@ -593,10 +592,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 global_value[x] else "")
result := for x from 0 to 8 do (if types[x] then averages[x] else "")
substring(result, begin: 1))
}
average_opening_hand_global_statistic :=
global_variable_average_opening_hand_statistic :=
{
if length(set.cards) < 1 then "" else (
@@ -641,17 +640,15 @@ average_opening_hand_global_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 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
]))
"," + 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))
}
format_average_statistic :=
{