From 6370fca9ec77d103559489af7488b16ee0fa3096 Mon Sep 17 00:00:00 2001 From: DoNoBaN Date: Fri, 11 Feb 2011 16:37:28 +0100 Subject: [PATCH] Added 4bet and fold to 3/4bet at detailed cash stats pages --- pyfpdb/GuiRingPlayerStats.py | 3 ++ pyfpdb/HUD_config.xml.example | 3 ++ pyfpdb/SQL.py | 69 ++++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/pyfpdb/GuiRingPlayerStats.py b/pyfpdb/GuiRingPlayerStats.py index 9a64eac6..4d214767 100644 --- a/pyfpdb/GuiRingPlayerStats.py +++ b/pyfpdb/GuiRingPlayerStats.py @@ -50,6 +50,9 @@ onlinehelp = {'Game':_('Type of Game'), 'VPIP':_('Voluntarily Putting In the pot\n(blinds excluded)'), 'PFR':_('% Pre Flop Raise'), 'PF3':_('% Pre Flop Re-Raise / 3Bet'), + 'PF4':_('% Pre Flop Re-Raise / 4Bet'), + 'PFF3':_('% Pre Flop Fold To Re-Raise / F3Bet'), + 'PFF4':_('% Pre Flop Fold To Re-Raise / F4Bet'), 'AggFac':_('Aggression Factor\n'), 'AggFreq':_('Aggression Frequency\nBet or Raise vs Fold'), 'ContBet':_('Continuation Bet post-flop'), diff --git a/pyfpdb/HUD_config.xml.example b/pyfpdb/HUD_config.xml.example index 803b9694..ecab4c76 100644 --- a/pyfpdb/HUD_config.xml.example +++ b/pyfpdb/HUD_config.xml.example @@ -24,6 +24,9 @@ + + + diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 3f211dd5..57f00abd 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2225,7 +2225,6 @@ class Sql: from Gametypes gt WHERE type = 'ring' order by type, limitType DESC, bb_or_buyin DESC""" -# FIXME: fold to 3bet don't added if db_server == 'mysql': self.query['playerDetailedStats'] = """ select AS hgametypeid @@ -2244,6 +2243,16 @@ class Sql: ,case when sum(cast(hp.street0_3Bchance as integer)) = 0 then -999 else 100.0*sum(cast(hp.street0_3Bdone as integer))/sum(cast(hp.street0_3Bchance as integer)) end AS pf3 + ,case when sum(cast(hp.street0_4Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_4Bdone as integer))/sum(cast(hp.street0_4Bchance as integer)) + end AS pf4 + ,case when sum(cast(hp.street0_FoldTo3Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_FoldTo3Bdone as integer))/sum(cast(hp.street0_FoldTo3Bchance as integer)) + end AS pff3 + ,case when sum(cast(hp.street0_FoldTo4Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_FoldTo4Bdone as integer))/sum(cast(hp.street0_FoldTo4Bchance as integer)) + end AS pff4 + ,case when sum(cast(hp.raiseFirstInChance as integer)) = 0 then -999 else 100.0 * sum(cast(hp.raisedFirstIn as integer)) / sum(cast(hp.raiseFirstInChance as integer)) @@ -2365,6 +2374,15 @@ class Sql: ,case when sum(cast(hp.street0_3Bchance as integer)) = 0 then -999 else 100.0*sum(cast(hp.street0_3Bdone as integer))/sum(cast(hp.street0_3Bchance as integer)) end AS pf3 + ,case when sum(cast(hp.street0_4Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_4Bdone as integer))/sum(cast(hp.street0_4Bchance as integer)) + end AS pf4 + ,case when sum(cast(hp.street0_FoldTo3Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_FoldTo3Bdone as integer))/sum(cast(hp.street0_FoldTo3Bchance as integer)) + end AS pff3 + ,case when sum(cast(hp.street0_FoldTo4Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_FoldTo4Bdone as integer))/sum(cast(hp.street0_FoldTo4Bchance as integer)) + end AS pff4 ,case when sum(cast(hp.raiseFirstInChance as integer)) = 0 then -999 else 100.0 * sum(cast(hp.raisedFirstIn as integer)) / sum(cast(hp.raiseFirstInChance as integer)) @@ -2487,6 +2505,15 @@ class Sql: ,case when sum(cast(hp.street0_3Bchance as integer)) = 0 then -999 else 100.0*sum(cast(hp.street0_3Bdone as integer))/sum(cast(hp.street0_3Bchance as integer)) end AS pf3 + ,case when sum(cast(hp.street0_4Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_4Bdone as integer))/sum(cast(hp.street0_4Bchance as integer)) + end AS pf4 + ,case when sum(cast(hp.street0_FoldTo3Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_FoldTo3Bdone as integer))/sum(cast(hp.street0_FoldTo3Bchance as integer)) + end AS pff3 + ,case when sum(cast(hp.street0_FoldTo4Bchance as integer)) = 0 then -999 + else 100.0*sum(cast(hp.street0_FoldTo4Bdone as integer))/sum(cast(hp.street0_FoldTo4Bchance as integer)) + end AS pff4 ,case when sum(cast(hp.raiseFirstInChance as integer)) = 0 then -999 else 100.0 * sum(cast(hp.raisedFirstIn as integer)) / sum(cast(hp.raiseFirstInChance as integer)) @@ -2592,6 +2619,7 @@ class Sql: ,s.name """ + #FIXME: 3/4bet and foldTo don't added four tournaments yet if db_server == 'mysql': self.query['tourneyPlayerDetailedStats'] = """ select s.name AS siteName @@ -2715,6 +2743,9 @@ class Sql: ,stats.vpip ,stats.pfr ,stats.pf3 + ,stats.pf4 + ,stats.pff3 + ,stats.pff4 ,stats.steals ,stats.saw_f ,stats.sawsd @@ -2745,6 +2776,15 @@ class Sql: ,case when sum(street0_3Bchance) = 0 then '0' else format(100.0*sum(street0_3Bdone)/sum(street0_3Bchance),1) end AS pf3 + ,case when sum(street0_4Bchance) = 0 then '0' + else format(100.0*sum(street0_4Bdone)/sum(street0_4Bchance),1) + end AS pf4 + ,case when sum(street0_FoldTo3Bchance) = 0 then '0' + else format(100.0*sum(street0_FoldTo3Bdone)/sum(street0_FoldTo3Bchance),1) + end AS pff3 + ,case when sum(street0_FoldTo4Bchance) = 0 then '0' + else format(100.0*sum(street0_FoldTo4Bdone)/sum(street0_FoldTo4Bchance),1) + end AS pff4 ,case when sum(raiseFirstInChance) = 0 then '-' else format(100.0*sum(raisedFirstIn)/sum(raiseFirstInChance),1) end AS steals @@ -2821,6 +2861,9 @@ class Sql: ,stats.vpip ,stats.pfr ,stats.pf3 + ,stats.pf4 + ,stats.pff3 + ,stats.pff4 ,stats.steals ,stats.saw_f ,stats.sawsd @@ -2935,6 +2978,9 @@ class Sql: ,stats.vpip ,stats.pfr ,stats.pf3 + ,stats.pf4 + ,stats.pff3 + ,stats.pff4 ,stats.steals ,stats.saw_f ,stats.sawsd @@ -2973,6 +3019,15 @@ class Sql: ,case when sum(street0_3Bchance) = 0 then '0' else format(100.0*sum(street0_3Bdone)/sum(street0_3Bchance),1) end AS pf3 + ,case when sum(street0_4Bchance) = 0 then '0' + else format(100.0*sum(street0_4Bdone)/sum(street0_4Bchance),1) + end AS pf4 + ,case when sum(street0_FoldTo3Bchance) = 0 then '0' + else format(100.0*sum(street0_FoldTo3Bdone)/sum(street0_FoldTo3Bchance),1) + end AS pff3 + ,case when sum(street0_FoldTo4Bchance) = 0 then '0' + else format(100.0*sum(street0_FoldTo4Bdone)/sum(street0_FoldTo4Bchance),1) + end AS pff4 ,case when sum(raiseFirstInChance) = 0 then '-' else format(100.0*sum(raisedFirstIn)/sum(raiseFirstInChance),1) end AS steals @@ -3071,6 +3126,9 @@ class Sql: ,stats.vpip ,stats.pfr ,stats.pf3 + ,stats.pf4 + ,stats.pff3 + ,stats.pff4 ,stats.steals ,stats.saw_f ,stats.sawsd @@ -3109,6 +3167,15 @@ class Sql: ,case when sum(street0_3Bchance) = 0 then '0' else to_char(100.0*sum(street0_3Bdone)/sum(street0_3Bchance),'90D0') end AS pf3 + ,case when sum(street0_4Bchance) = 0 then '0' + else to_char(100.0*sum(street0_4Bdone)/sum(street0_4Bchance),'90D0') + end AS pf4 + ,case when sum(street0_FoldTo3Bchance) = 0 then '0' + else to_char(100.0*sum(street0_FoldTo3Bdone)/sum(street0_FoldTo3Bchance),'90D0') + end AS pff3 + ,case when sum(street0_FoldTo4Bchance) = 0 then '0' + else to_char(100.0*sum(street0_FoldTo4Bdone)/sum(street0_FoldTo4Bchance),'90D0') + end AS pff4 ,case when sum(raiseFirstInChance) = 0 then '-' else to_char(100.0*sum(raisedFirstIn)/sum(raiseFirstInChance),'90D0') end AS steals