add error catch
MSE failed to start up if you had an unhandled replacement, like "Totem Armor"
This commit is contained in:
@@ -847,12 +847,13 @@ auto_correct :=
|
|||||||
replace: { _1 + _2 + to_lower(_3)})
|
replace: { _1 + _2 + to_lower(_3)})
|
||||||
auto_errata :=
|
auto_errata :=
|
||||||
replace@(match:"converted mana cost", replace:"mana value")
|
replace@(match:"converted mana cost", replace:"mana value")
|
||||||
+replace@(match:"(?i)(Totem armor|Totembeistand|Armadura tótem|totémique|Armatura totem|Armadura de totem|族霊鎧|替身甲)", replace:{errata_map[_1]})
|
+replace@(match:"(?i)(Totem armor|Totembeistand|Armadura tótem|totémique|Armatura totem|Armadura de totem|族霊鎧|替身甲)", replace:{errata_map[_1] or else _1})
|
||||||
+replace@(match:"hen shuffle your library", replace:"hen shuffle")
|
+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")
|
+replace@(match:"this (?:ability )?(?:only )?(?:any ?time you could cast|as) a", in_context: "(Activate|Play) <match>n? (instant|sorcery)", replace:"only as a")
|
||||||
|
|
||||||
errata_map := [
|
errata_map := [
|
||||||
"Totem armor": "Umbra armor",
|
"Totem armor": "Umbra armor",
|
||||||
|
"Totem Armor": "Umbra armor",
|
||||||
"totem armor": "umbra armor",
|
"totem armor": "umbra armor",
|
||||||
"Totembeistand": "Schattenbeistand",
|
"Totembeistand": "Schattenbeistand",
|
||||||
"totembeistand": "schattenbeistand",
|
"totembeistand": "schattenbeistand",
|
||||||
|
|||||||
Reference in New Issue
Block a user