test(vehicles): check p/t and crew
This commit is contained in:
parent
a961baf9ed
commit
4a8f9db7b0
1 changed files with 9 additions and 2 deletions
|
@ -63,8 +63,8 @@ def check_types(card):
|
||||||
return list_only(card.types, ['tribal', 'artifact', 'land', 'enchantment'])
|
return list_only(card.types, ['tribal', 'artifact', 'land', 'enchantment'])
|
||||||
|
|
||||||
def check_pt(card):
|
def check_pt(card):
|
||||||
if 'creature' in card.types or card.pt:
|
if ('creature' in card.types or 'vehicle' in card.subtypes) or card.pt:
|
||||||
return (('creature' in card.types and len(re.findall(re.escape('/'), card.pt)) == 1)
|
return ((('creature' in card.types or 'vehicle' in card.subtypes) and len(re.findall(re.escape('/'), card.pt)) == 1)
|
||||||
and not card.loyalty)
|
and not card.loyalty)
|
||||||
if 'planeswalker' in card.types or card.loyalty:
|
if 'planeswalker' in card.types or card.loyalty:
|
||||||
return (('planeswalker' in card.types and card.loyalty)
|
return (('planeswalker' in card.types and card.loyalty)
|
||||||
|
@ -202,6 +202,12 @@ def check_equipment(card):
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def check_vehicles(card):
|
||||||
|
if 'vehicle' in card.subtypes:
|
||||||
|
return 'crew' in card.text.text
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
def check_planeswalkers(card):
|
def check_planeswalkers(card):
|
||||||
if 'planeswalker' in card.types:
|
if 'planeswalker' in card.types:
|
||||||
good_lines = 0
|
good_lines = 0
|
||||||
|
@ -350,6 +356,7 @@ props = OrderedDict([
|
||||||
('quotes', check_quotes),
|
('quotes', check_quotes),
|
||||||
('auras', check_auras),
|
('auras', check_auras),
|
||||||
('equipment', check_equipment),
|
('equipment', check_equipment),
|
||||||
|
('vehicles', check_vehicles),
|
||||||
('planeswalkers', check_planeswalkers),
|
('planeswalkers', check_planeswalkers),
|
||||||
('levelup', check_levelup),
|
('levelup', check_levelup),
|
||||||
('chosen', check_chosen),
|
('chosen', check_chosen),
|
||||||
|
|
Loading…
Reference in a new issue