From: Jess Date: Mon, 25 Aug 2014 22:18:28 +0000 (+0200) Subject: reduce cutoff weight for prettier descriptions? X-Git-Url: https://git.yukkurigames.com/?p=mlpccg-meta.git;a=commitdiff_plain;h=eef1965dcc0281ff5a0cf7bba05b6b79f79efaa0;hp=0460c3c46cd330bbae7043e42a8a490662bf1e60 reduce cutoff weight for prettier descriptions? --- 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)