Initial commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
mse version: 2.0.0
|
||||
short name: Name Check
|
||||
full name: Name Check Exporter
|
||||
position hint: 009
|
||||
icon: icon.png
|
||||
version: 2014-02-04
|
||||
installer group: magic/Export/Name Check
|
||||
|
||||
depends on:
|
||||
package: magic.mse-game
|
||||
version: 2008-08-08
|
||||
|
||||
game: magic
|
||||
create directory: false
|
||||
file type: *.txt|*.txt|*.*|*.*
|
||||
|
||||
# By Pichoro
|
||||
# Thanks to kiligir for the name list, and twanvl for fixing my code.
|
||||
option field:
|
||||
type: choice
|
||||
name: info
|
||||
description: This export template outputs a text list of cards that share names with real Magic cards.
|
||||
choice: This export template outputs a text list of cards that share names with real Magic cards.
|
||||
|
||||
script:
|
||||
# Because MSE gets mad when there are quotation marks in the card list, remove them for comparison.
|
||||
quote_filter := replace@(match:"”", replace:"")+
|
||||
replace@(match:"“", replace:"")+
|
||||
replace@(match:"[[.quotation-mark.]]", replace:"")
|
||||
|
||||
#
|
||||
#
|
||||
# Spacer because long blocks of code with lots of card names are long.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
matches_name := { to_string(quote_filter(card.name)) } + match@(match: "^(list)$")
|
||||
|
||||
#
|
||||
#
|
||||
# Spacer because long blocks of code with lots of card names are long.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
matches_name_2 := { to_string(quote_filter(card.name_2)) } + match@(match: "^(list$)")
|
||||
|
||||
#
|
||||
#
|
||||
# Spacer because long blocks of code with lots of card names are long.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
similar_name := { to_string(quote_filter(card.name)) } + match@(match: "(list)")
|
||||
|
||||
#
|
||||
#
|
||||
# Spacer because long blocks of code with lots of card names are long.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
similar_name_2 := { to_string(quote_filter(card.name_2)) } + match@(match: "(list)")
|
||||
|
||||
write_card := {if matches_name() or matches_name_2() then card.full_name + "\n" else ""}
|
||||
write_card_2 := {if ( similar_name() or similar_name_2() ) and not ( matches_name() or matches_name_2() ) then card.full_name + "\n" else ""}
|
||||
write_cards := "----- Exact Matches -----\n\n" + to_text(for each card in cards do write_card()) + "\n\n----- Similar Matches -----\n\n" + to_text(for each card in cards do write_card_2())
|
||||
to_string(write_cards)
|
||||
Reference in New Issue
Block a user