feat(transforms): remove ability words
This commit is contained in:
parent
65905cf656
commit
68704c0094
2 changed files with 46 additions and 0 deletions
|
@ -298,6 +298,7 @@ def fields_from_json(src_json, linetrans = True):
|
||||||
text_val = transforms.text_pass_3_unary(text_val)
|
text_val = transforms.text_pass_3_unary(text_val)
|
||||||
text_val = transforms.text_pass_4a_dashes(text_val)
|
text_val = transforms.text_pass_4a_dashes(text_val)
|
||||||
text_val = transforms.text_pass_4b_x(text_val)
|
text_val = transforms.text_pass_4b_x(text_val)
|
||||||
|
text_val = transforms.text_pass_4c_abilitywords(text_val)
|
||||||
text_val = transforms.text_pass_5_counters(text_val)
|
text_val = transforms.text_pass_5_counters(text_val)
|
||||||
text_val = transforms.text_pass_6_uncast(text_val)
|
text_val = transforms.text_pass_6_uncast(text_val)
|
||||||
text_val = transforms.text_pass_7_choice(text_val)
|
text_val = transforms.text_pass_7_choice(text_val)
|
||||||
|
|
|
@ -158,6 +158,51 @@ def text_pass_4b_x(s):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
|
def text_pass_4c_abilitywords(s):
|
||||||
|
# Ability words are flavor text. We can discard them
|
||||||
|
abilitywords = [
|
||||||
|
'battalion',
|
||||||
|
'bloodrush',
|
||||||
|
'channel',
|
||||||
|
'chroma',
|
||||||
|
'cohort',
|
||||||
|
'constellation',
|
||||||
|
'converge',
|
||||||
|
"council's dilemma",
|
||||||
|
'delirium',
|
||||||
|
'domain',
|
||||||
|
'fateful hour',
|
||||||
|
'ferocious',
|
||||||
|
'formidable',
|
||||||
|
'grandeur',
|
||||||
|
'hellbent',
|
||||||
|
'heroic',
|
||||||
|
'imprint',
|
||||||
|
'inspired',
|
||||||
|
'join forces',
|
||||||
|
'kinship',
|
||||||
|
'landfall',
|
||||||
|
'lieutenant',
|
||||||
|
'metalcraft',
|
||||||
|
'morbid',
|
||||||
|
'parley',
|
||||||
|
'radiance',
|
||||||
|
'raid',
|
||||||
|
'rally',
|
||||||
|
'spell mastery',
|
||||||
|
'strive',
|
||||||
|
'sweep',
|
||||||
|
'tempting offer',
|
||||||
|
'threshold',
|
||||||
|
'will of the council',
|
||||||
|
]
|
||||||
|
|
||||||
|
for abilityword in abilitywords:
|
||||||
|
s = s.replace(abilityword + ' ' + u'\u2014' + ' ', '')
|
||||||
|
|
||||||
|
return s
|
||||||
|
|
||||||
|
|
||||||
# Call this before replacing newlines.
|
# Call this before replacing newlines.
|
||||||
# This one ends up being really bad because of the confusion
|
# This one ends up being really bad because of the confusion
|
||||||
# with 'counter target spell or ability'.
|
# with 'counter target spell or ability'.
|
||||||
|
|
Loading…
Reference in a new issue