2015-07-06 07:15:12 +00:00
|
|
|
import re
|
|
|
|
|
2015-07-07 05:26:25 +00:00
|
|
|
# Utilities for handling unicode, unary numbers, mana costs, and special symbols.
|
|
|
|
# For convenience we redefine everything from utils so that it can all be accessed
|
|
|
|
# from the utils module.
|
2015-07-06 07:15:12 +00:00
|
|
|
|
|
|
|
# separators
|
|
|
|
cardsep = '\n\n'
|
|
|
|
fieldsep = '|'
|
|
|
|
bsidesep = '\n'
|
|
|
|
newline = '\\'
|
|
|
|
|
|
|
|
# special indicators
|
|
|
|
dash_marker = '~'
|
|
|
|
bullet_marker = '='
|
|
|
|
this_marker = '@'
|
|
|
|
counter_marker = '%'
|
2015-07-14 07:07:25 +00:00
|
|
|
reserved_marker = '\v'
|
|
|
|
reserved_mana_marker = '$'
|
2015-07-17 08:13:58 +00:00
|
|
|
choice_open_delimiter = '['
|
|
|
|
choice_close_delimiter = ']'
|
2015-07-06 07:15:12 +00:00
|
|
|
x_marker = 'X'
|
|
|
|
tap_marker = 'T'
|
|
|
|
untap_marker = 'Q'
|
2015-08-01 09:26:34 +00:00
|
|
|
# second letter of the word
|
|
|
|
rarity_common_marker = 'O'
|
|
|
|
rarity_uncommon_marker = 'N'
|
|
|
|
rarity_rare_marker = 'A'
|
|
|
|
rarity_mythic_marker = 'Y'
|
|
|
|
# with some crazy exceptions
|
2017-01-18 16:05:40 +00:00
|
|
|
rarity_special_marker = 'I'
|
2015-08-01 09:26:34 +00:00
|
|
|
rarity_basic_land_marker = 'L'
|
2015-07-06 07:15:12 +00:00
|
|
|
|
|
|
|
# unambiguous synonyms
|
|
|
|
counter_rename = 'uncast'
|
|
|
|
|
|
|
|
# unary numbers
|
|
|
|
unary_marker = '&'
|
|
|
|
unary_counter = '^'
|
|
|
|
unary_max = 20
|
|
|
|
unary_exceptions = {
|
|
|
|
25 : 'twenty' + dash_marker + 'five',
|
|
|
|
30 : 'thirty',
|
|
|
|
40 : 'forty',
|
|
|
|
50 : 'fifly',
|
|
|
|
100: 'one hundred',
|
|
|
|
200: 'two hundred',
|
|
|
|
}
|
2015-07-14 07:07:25 +00:00
|
|
|
|
|
|
|
# field labels, to allow potential reordering of card format
|
|
|
|
field_label_name = '1'
|
2015-08-01 09:26:34 +00:00
|
|
|
field_label_rarity = '0' # 2 is part of some mana symbols {2/B} ...
|
2015-07-14 07:07:25 +00:00
|
|
|
field_label_cost = '3'
|
|
|
|
field_label_supertypes = '4'
|
|
|
|
field_label_types = '5'
|
|
|
|
field_label_subtypes = '6'
|
|
|
|
field_label_loyalty = '7'
|
|
|
|
field_label_pt = '8'
|
|
|
|
field_label_text = '9'
|
|
|
|
|
|
|
|
# additional fields we add to the json cards
|
|
|
|
json_field_bside = 'bside'
|
|
|
|
json_field_set_name = 'setName'
|
2015-11-10 07:41:45 +00:00
|
|
|
json_field_info_code = 'magicCardsInfoCode'
|