AFR Update and sorting

This commit is contained in:
CajunAvenger
2021-07-09 13:48:12 -05:00
parent eda330eee8
commit 946e8534b1
1673 changed files with 5365 additions and 6505 deletions

View File

@@ -294,6 +294,8 @@ card field:
script:
if mainframe_walker() then
mainframe_walker_text_script()
else if alt_text() then
alt_text_script()
else
combined_editor(field1: card.rule_text, separator: "<line>\n</line>", field2: card.flavor_text)
description: The rules and flavor text for the card; use up and down arrows to switch
@@ -846,6 +848,8 @@ card field:
script:
if mainframe_walkerb() then
mainframe_walker_text_scriptb()
else if alt_textb() then
alt_text_scriptb()
else
combined_editor(field1: card.rule_text_2, separator: "<line>\n</line>", field2: card.flavor_text_2)
description: The rules and flavor text of the card
@@ -1025,6 +1029,55 @@ card field:
show statistics: false
multi line: true
description: The eighth level text for the card
card field:
type: text
name: level 9 text
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias != "" then card.alias else card.name, margin_code:"lv9")
show statistics: false
multi line: true
description: The ninth level text for the card
card field:
type: text
name: level 10 text
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias != "" then card.alias else card.name, margin_code:"lv10")
show statistics: false
multi line: true
description: The tenth level text for the card
card field:
type: text
name: level 11 text
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias != "" then card.alias else card.name, margin_code:"lv11")
show statistics: false
multi line: true
description: The eleventh level text for the card
card field:
type: text
name: level 12 text
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias != "" then card.alias else card.name, margin_code:"lv12")
show statistics: false
multi line: true
description: The twelvth level text for the card
card field:
type: text
name: level 13 text
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias_2 != "" then card.alias_2 else card.name_2, margin_code:"lv13")
show statistics: false
multi line: true
description: The thirteenth level text for the card
card field:
type: text
name: level 14 text
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias_2 != "" then card.alias_2 else card.name_2, margin_code:"lv14")
show statistics: false
multi line: true
description: The fourteenth level text for the card
card field:
type: text
name: level 15 text
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias_2 != "" then card.alias_2 else card.name_2, margin_code:"lv15")
show statistics: false
multi line: true
description: The fifteenth level text for the card
card field:
type: text
name: level 5
@@ -1133,6 +1186,64 @@ card field:
card list name: P/T6
show statistics: false
description: Power/Toughness of a creature
card field:
type: text
name: power 7
icon: stats/power.png
show statistics: false
script: type_over_pt(value)
description: The power of a creature
card field:
type: text
name: toughness 7
icon: stats/toughness.png
show statistics: false
description: The toughness of a creature
card field:
type: text
name: pt 7
save value: false
script:
combined_editor(
field1: card.power_7,
separator: language().pt_separator,
field2: card.toughness_7,
soft_before_empty: true,
hide_when_empty: true
)
card list width: 50
card list name: P/T7
show statistics: false
description: Power/Toughness of a creature
card field:
type: text
name: power 8
icon: stats/power.png
show statistics: false
script: type_over_pt(value)
description: The power of a creature
card field:
type: text
name: toughness 8
icon: stats/toughness.png
show statistics: false
description: The toughness of a creature
card field:
type: text
name: pt 8
save value: false
script:
combined_editor(
field1: card.power_8,
separator: language().pt_separator,
field2: card.toughness_8,
soft_before_empty: true,
hide_when_empty: true
)
card list width: 50
card list name: P/T8
show statistics: false
description: Power/Toughness of a creature
card field:
type: text
name: cmc
@@ -1195,5 +1306,5 @@ card field:
show statistics: false
multi line: true
script: text_filter(input: value, card_name: if set.alias_as_cardname and card.alias_2 != "" then card.alias_2 else card.name_2, margin_code:"unknown")
default: if not b_saga() then "" else "<i-auto>(" + saga_reminder() + ")</i-auto>"
default: if not b_saga() then "" else "<i-auto>(" + saga_reminderb() + ")</i-auto>"
description: The saga reminder text

View File

@@ -791,7 +791,7 @@ keyword:
keyword: Living weapon
match: Living weapon
mode: expert
reminder: When this Equipment enters the battlefield, create a 0/0 black Germ creature token, then attach this to it.
reminder: When this Equipment enters the battlefield, create a 0/0 black Phyrexian Germ creature token, then attach this to it.
# Commander
keyword:
keyword: Join forces
@@ -1478,4 +1478,14 @@ keyword:
match: Trample over <atom-param>name</atom-param>
mode: expert
reminder: This creature can deal excess combat damage to the controller of {if param1.value == "planeswalkers" then "the planeswalker it's attacking" else param1.value + " blocking it"}.
# Adventures in the Forgotten Realms
keyword:
keyword: Venture into
match: Venture into <atom-param>name</atom-param>
mode: action
reminder: Enter the first room or advance to the next room.
keyword:
keyword: Pack tactics
match: Pack tactics
mode: pseudo
rules: Pack tactics — Whenever CARDNAME attacks, if you attacked with creatures with total power 6 or greater this combat, [effect].

View File

@@ -16,6 +16,7 @@ languages := [
is_spell : match@(match: "(?i)Instant|Sorcery")
is_planeswalker : match@(match: "(?i)Planeswalker|Emblem")
is_plane : match@(match: "(?i)Plane(?!swalker)")
word_list : "word_list"
],
Russian: [
code : "ru",
@@ -31,10 +32,27 @@ languages := [
is_spell : match@(match: "(?i)Мгновенное заклинание|Волшебство")
is_planeswalker : match@(match: "(?i)Planeswalker|Emblem")
is_plane : match@(match: "(?i)Plane(?!swalker)")
word_list : "word_list_ru"
],
Italiano: [
code : "it",
spellcheck_code : "it_IT",
pt_separator : "/",
type_separator : " — ",
subtype_separator : " ",
is_creature : match@(match: "(?i)Creatura")
is_tribal : match@(match: "(?i)Tribale")
is_artifact : match@(match: "(?i)Artefatto")
is_land : match@(match: "(?i)Terra")
is_enchantment : match@(match: "(?i)Incantesimo")
is_spell : match@(match: "(?i)Istantaneo|Stregoneria")
is_planeswalker : match@(match: "(?i)Planeswalker|Emblem")
is_plane : match@(match: "(?i)Plane(?!swalker)")
word_list : "word_list_it"
],
Français: [
code : "fr",
spellcheck_code : "fr_FR", # TODO: get dictionary
spellcheck_code : "fr_FR",
pt_separator : "/",
type_separator : " : "
subtype_separator : "<atom-sep> et </atom-sep>",
@@ -46,6 +64,7 @@ languages := [
is_spell : match@(match: "(?i)Éphémère|Rituel")
is_planeswalker : match@(match: "(?i)Planeswalker")
is_plane : match@(match: "(?i)Plane(?!swalker)")
word_list : "word_list_fr"
]
]

View File

@@ -652,7 +652,9 @@ auto_errata :=
replace@(match:"converted mana cost", replace:"mana value")
+replace@(match:"hen shuffle your library", replace:"hen shuffle")
+replace@(match:"this (?:ability )?(?:only )?(?:any ?time you could cast|as) a", in_context: "(Activate|Play) <match>n? (instant|sorcery)", replace:"only as a")
ex_test := expand_keywords@(
ex_test := {
expand_keywords(
input,
condition: {
correct_case or (mode != "pseudo" and not used_placeholders)
}
@@ -664,7 +666,11 @@ ex_test := expand_keywords@(
reminder := process_english_hints(if has_pt() then reminder else equip_filter(reminder))
if mode == "pseudo" then "<i-auto>{keyword}</i-auto>"
else keyword + if expand then "<atom-reminder-{mode}> ({reminder})</atom-reminder-{mode}>" else ""
})
},
margin_code: margin_code
)
}
text_filter :=
# step 1 : remove all automatic tags
remove_tag@(tag: "<sym-auto>") +
@@ -746,7 +752,7 @@ text_filter :=
# step 3a : expand shortcut word CARDNAME
replace@(
match: "CARDNAME>?",
in_context: "(^|[[:space:]]|\\(|,|\\.|:|“|\"|'||/|)<match>", # TODO: Allow any punctuation before
in_context: "(^|[[:space:]]|\\(|,|\\.|:|“|\"|'||-|—|/|)<match>", # TODO: Allow any punctuation before
replace: "<atom-cardname></atom-cardname>"
) +
# step 3b : expand shortcut word LEGENDNAME
@@ -770,13 +776,13 @@ text_filter :=
replace: "<atom-insert\\1></atom-insert\\1>"
) +
{
out := input
for x from 1 to 9 do
out := tag_contents(out,
tag: "<atom-insert"+x+">",
contents: { "<nospellcheck>" + (if inserts_values()[x-1] == "" then "INS"+x else inserts_values()[x-1]) + "</nospellcheck>" }
)
out
out := input
for x from 1 to 9 do
out := tag_contents(out,
tag: "<atom-insert"+x+">",
contents: { "<nospellcheck>" + (if inserts_values()[x-1] == "" then "INS"+x else inserts_values()[x-1]) + "</nospellcheck>" }
)
out
} +
# step 4 : explict non mana symbols
replace@(
@@ -1036,8 +1042,10 @@ primary_card_color := {
black := chosen(choice:"black")
red := chosen(choice:"red")
green := chosen(choice:"green")
multi_color := count_chosen(choices:"white, blue, black, red, green")
if land then "land"
else if multi then "multicolor"
else if multi_color == 2 and chosen(choice:"artifact") then "hybrid" ##hybrid artifacts would show as their first color
else if hybrid then "hybrid"
else if artifact then "artifact"
else if white then "white"
@@ -1079,6 +1087,11 @@ mainframe_walker := {false}
mainframe_walker_text_script := {combined_editor(field1: card.level_1_text, separator1: "<line>\n</line>", field2: card.level_2_text, separator2: "<line>\n</line>", field3: card.level_3_text)}
mainframe_walkerb := {false}
mainframe_walker_text_scriptb := {combined_editor(field1: card.level_5_text, separator1: "<line>\n</line>", field2: card.level_6_text, separator2: "<line>\n</line>", field3: card.level_7_text)}
alt_text := {false}
alt_text_script := {false}
alt_textb := {false}
alt_text_scriptb := {false}
mainframe_power := { card.power }
mainframe_toughness := { card.toughness }
@@ -1181,6 +1194,7 @@ transfer_levels_2 := {true}
a_saga := {false}
saga_reminder := { "As this Saga enters and after your draw step, add a lore counter. Sacrifice after III." }
b_saga := {false}
saga_reminderb := { "As this Saga enters and after your draw step, add a lore counter. Sacrifice after III." }
############################################################## Watermark Updates
card_spotlight := { "/magic-mainframe-watermarks.mse-include/spotlight/" + card_new_color() + "spotlight.png" }
custom_watermark_1 := { if set.custom_watermark_1 != "" then "/magic-watermarks.mse-include/" + set.custom_watermark_1 else "/magic-watermarks.mse-include/planeswalker.png" }
@@ -1261,7 +1275,7 @@ uneven_correction := { if lines_of_flavor() == 1 then max(4, (card_style.text.co
###add it all up
###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 }
bar_equation := {if card_style.text.layout.blocks[0].bottom or else 0 > 0 then card_style.text.top + 0.5*(card_style.text.layout.blocks[0].bottom+card_style.text.layout.blocks[1].top) else old_bar_equation()}
bar_equation := {if card_style.text.layout.blocks[1].bottom or else 0 > 0 then card_style.text.top + 0.5*(card_style.text.layout.blocks[0].bottom+card_style.text.layout.blocks[1].top) else old_bar_equation()}
flavor_text2 := {split_text(match:"\n", 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}
@@ -1574,13 +1588,19 @@ saga_lore_count := {
three := 0
four := 0
five := 0
six := 0
seven := 0
eight := 0
for x from 0 to length(input)-1 do
if input[x] == "1" then one := one +1
else if input[x] == "2" then two := two +1
else if input[x] == "3" then three := three +1
else if input[x] == "4" then four := four +1
else five := five +1
[one, two, three, four]
else if input[x] == "5" then five := five +1
else if input[x] == "6" then six := six +1
else if input[x] == "7" then seven := seven +1
else eight := eight +1
[one, two, three, four, five, six, seven]
}
##index of given chapter number in above array
##example, 2,2,3, returns 1,2,1
@@ -1705,3 +1725,10 @@ saga_ch_placement := {
)else (seven := seven)
[one, two, three, four, five, six, seven]
}
card_face := {
trace(margin_code)
front := card[input]
back := if card[input+"_2"] or else "" != "" then card[input+"_2"] else card[input]
if match(margin_code, match:"(text[2456]|lv[5678])") then back else front
}

View File

@@ -193,7 +193,7 @@ statistics dimension:
statistics dimension:
name: text length (words)
position hint: 100
script: if is_mainframe() and is_walker() then word_count(to_text(card.mainframe_rule_text)) else word_count(to_text(card.rule_text))
script: if a_saga() or mainframe_walker() then word_count(to_text(card.level_1_text))+word_count(to_text(card.level_2_text))+word_count(to_text(card.level_3_text))+word_count(to_text(card.level_4_text)) else word_count(to_text(card.rule_text))
numeric: true
bin size: 5
icon: stats/text_length.png
@@ -201,7 +201,7 @@ statistics dimension:
statistics dimension:
name: text length (lines)
position hint: 101
script: if is_mainframe() and is_walker() then line_count(to_text(card.mainframe_rule_text)) else line_count(to_text(card.rule_text))
script: if a_saga() or mainframe_walker() then line_count(to_text(card.level_1_text))+line_count(to_text(card.level_2_text))+line_count(to_text(card.level_3_text))+line_count(to_text(card.level_4_text)) else line_count(to_text(card.rule_text))
numeric: true
icon: stats/text_length.png

View File

@@ -76,6 +76,7 @@ word list:
word: Bear
word: Beast
word: Beeble
word: Beholder
word: Bird
word: Blinkmoth
word: Boar
@@ -134,6 +135,7 @@ word list:
word: Gargoyle
word: Germ
word: Giant
word: Gnoll
word: Gnome
word: Goat
word: Goblin
@@ -146,6 +148,8 @@ word list:
word:
name: H
word: Hag
word: Halfling
word: Hamster
word: Harpy
word: Hellion
word: Hippo
@@ -286,6 +290,7 @@ word list:
word: Thalakos
word: Thopter
word: Thrull
word: Tiefling
word: Treefolk
word: Trilobite
word: Triskelavite
@@ -347,6 +352,7 @@ word list:
word: Artificer
word: Assassin
word: Barbarian
word: Bard
word: Beast
word: Berserker
word: Bringer
@@ -385,6 +391,7 @@ word list:
word: Processor
word:
name: R-S
word: Ranger
word: Rebel
word: Reflection
word: Rigger
@@ -474,6 +481,7 @@ word list:
word: Angrath
word: Arlinn
word: Ashiok
word: Bahamut
word: Bolas
word: Calix
word: Chandra
@@ -484,6 +492,7 @@ word list:
word: Dihada
word: Domri
word: Dovin
word: Ellywick
word: Elspeth
word: Estrid
word: Freyalise
@@ -499,7 +508,9 @@ word list:
word: Kiora
word: Koth
word: Liliana
word: Lolth
word: Lukka
word: Mordenkainen
word: Nahiri
word: Narset
word: Niko
@@ -529,6 +540,14 @@ word list:
word: Xenagos
word: Yanggu
word: Yanling
word: Zariel
word:
name: Last Seen on Faerun
word: Bahamut
word: Ellywick
word: Lolth
word: Mordenkainen
word: Zariel
word:
name: Last Seen on Strixhaven
word: Kasmina