X-Git-Url: https://git.yukkurigames.com/?p=mlpccg-meta.git;a=blobdiff_plain;f=mlpccg%2FDeckList.py;fp=mlpccg%2FDeckList.py;h=415c91d561cc6bb1a6f238916d8cedc4e8518227;hp=0e0cba1f6d5ea3a07ca905bb85b127a92ad7c054;hb=eef1965dcc0281ff5a0cf7bba05b6b79f79efaa0;hpb=0460c3c46cd330bbae7043e42a8a490662bf1e60 diff --git a/mlpccg/DeckList.py b/mlpccg/DeckList.py index 0e0cba1..415c91d 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.5 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)