Only markdownify $target if move.range exists.

This commit is contained in:
Lynn "Zhorken" Vaughan 2012-08-06 14:08:46 -04:00
parent c00bc4cad2
commit 95422bc985

View file

@ -99,7 +99,12 @@ def _markdownify_effect_text(move, effect_text, language=None):
effect_text = effect_text.replace( effect_text = effect_text.replace(
u'$effect_chance', u'$effect_chance',
unicode(move.effect_chance), unicode(move.effect_chance),
).replace( )
# "The target" vs "each target"; for Conquest, but hopefully main series
# moves too eventually
if hasattr(move, 'range'):
effect_text = effect_text.replace(
u'$target', u'$target',
_target_labels[move.range.targets > 1] _target_labels[move.range.targets > 1]
).replace( ).replace(