From 67c2938e1716df1a989af5e7167298b4afb1cee7 Mon Sep 17 00:00:00 2001 From: Fingon00 Date: Sun, 29 Dec 2024 10:05:38 -0500 Subject: [PATCH 1/2] Update search_commands.py --- commands/search_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/search_commands.py b/commands/search_commands.py index 434613d..a5a406a 100644 --- a/commands/search_commands.py +++ b/commands/search_commands.py @@ -298,7 +298,7 @@ async def stats(self, interaction: discord.Interaction, tourney_only:bool=False) for player in game.gamestate["players"]: username = game.gamestate["players"][player]["username"] if "(" in username: - username = username.split("(")[0] + username = username.split("(")[0].replace(" ","") vp_count[username] += int(100*drawing.get_public_points(game.gamestate["players"][player], True)/highestVP) if game.gamestate["roundNum"] == 9: finished_tourney_games[username] += 1 From 84c5990c943493474a846fed809145e0bde26b28 Mon Sep 17 00:00:00 2001 From: Fingon00 Date: Sun, 29 Dec 2024 10:43:57 -0500 Subject: [PATCH 2/2] Stat adjustments --- Buttons/Turn.py | 1 + commands/search_commands.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Buttons/Turn.py b/Buttons/Turn.py index 3a8bbc8..118f522 100644 --- a/Buttons/Turn.py +++ b/Buttons/Turn.py @@ -168,6 +168,7 @@ async def passForRound(player, game: GamestateHelper, interaction: discord.Inter view2 = View() view2.add_item(Button(label="Pass Unless Someone Attacks You", style=discord.ButtonStyle.green, custom_id="permanentlyPass")) + await asyncio.sleep(1) await interaction.followup.send(interaction.user.mention + " you may use this button to pass on reactions" " unless someone invades your systems.", view=view2, ephemeral=True) diff --git a/commands/search_commands.py b/commands/search_commands.py index a5a406a..181210c 100644 --- a/commands/search_commands.py +++ b/commands/search_commands.py @@ -299,7 +299,7 @@ async def stats(self, interaction: discord.Interaction, tourney_only:bool=False) username = game.gamestate["players"][player]["username"] if "(" in username: username = username.split("(")[0].replace(" ","") - vp_count[username] += int(100*drawing.get_public_points(game.gamestate["players"][player], True)/highestVP) + vp_count[username] += float(100.0*drawing.get_public_points(game.gamestate["players"][player], True)/highestVP) if game.gamestate["roundNum"] == 9: finished_tourney_games[username] += 1 else: @@ -347,6 +347,6 @@ async def stats(self, interaction: discord.Interaction, tourney_only:bool=False) for faction, count in faction_performance.most_common(): relative_faction_performance[faction] += int(count/max_faction_performance[faction] * 100) for faction, count in relative_faction_performance.most_common(): - summary += f"{faction}: {count} out of 100 possible points\n" + summary += f"{faction}: {count} out of 100 possible points (in {str(max_faction_performance[faction]/100)} games)\n" asyncio.create_task(interaction.channel.send(summary) )