From f8613dc45fed8f800f5053239364704e08ed7d29 Mon Sep 17 00:00:00 2001
From: schneefux <schneefux+commit@schneefux.xyz>
Date: Sat, 6 May 2017 11:48:13 +0200
Subject: blind fame formula hotfix

---
 crunch_team.sql | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

(limited to 'crunch_team.sql')

diff --git a/crunch_team.sql b/crunch_team.sql
index 4133cf4..fb94418 100644
--- a/crunch_team.sql
+++ b/crunch_team.sql
@@ -3,8 +3,15 @@ JOIN (
     SELECT
     tm.id AS tm_id,
     SUM(
-        (1 + (tm_cnt-2) * 0.3) *
-        (p.winner * 0.3 + 0.7) *
+        (CASE
+            WHEN tm_cnt=1 THEN 0.33
+            WHEN tm_cnt=2 THEN 0.66
+            WHEN tm_cnt=3 THEN 1.33
+        ) *
+        (CASE
+            WHEN p.winner THEN 1
+            WHEN NOT p.winner THEN 0.7
+        ) *
         (CASE
             WHEN tm.status='initiate' THEN 10
             WHEN tm.status='member' THEN 75
-- 
cgit v1.3.1

