X-Git-Url: https://git.yukkurigames.com/?p=mlpccg-meta.git;a=blobdiff_plain;f=mlpccg%2FDeckList.py;h=5ff46bf9d6ec720dc5f20f552da6fee2a8d2aa1a;hp=0e0cba1f6d5ea3a07ca905bb85b127a92ad7c054;hb=22a94820738824527277e21f2f37bc77638e12bc;hpb=f5f267a53e90455937409ad2bd15324e717c8e04 diff --git a/mlpccg/DeckList.py b/mlpccg/DeckList.py index 0e0cba1..5ff46bf 100644 --- a/mlpccg/DeckList.py +++ b/mlpccg/DeckList.py @@ -35,13 +35,12 @@ class DeckList: aspects_sorted = sorted(aspects.iteritems(), reverse=True, key=operator.itemgetter(1)) aspects_sum = float(sum([aspect[1] for aspect in aspects_sorted])) aspects_filtered = [] - cutoff = 0.66 + cutoff = 0.6 amount = 0.0 for aspect, value in aspects_sorted: amount += value / aspects_sum - if amount < cutoff: - aspects_filtered += [aspect] - else: + aspects_filtered += [aspect] + if amount >= cutoff: break return (mane, aspects_filtered)