Compare commits

...

22 commits

Author SHA1 Message Date
Sakimori 16654ed3ff fixed team delete confirm 2023-04-01 00:13:00 -04:00
Sakimori b598e9aa5e fixed inning number not working 2023-03-31 14:46:37 -04:00
Sakimori deb10fb3b0 Merge branch 'master' of https://github.com/Sakimori/matteo-the-prestige 2023-03-31 14:33:17 -04:00
Sakimori a22d70cb0c Update .gitignore 2023-03-31 14:32:05 -04:00
Sakimori 68a8588ecd
Merge pull request #278 from Sakimori/full_slash_consequences
Full slash consequences
2023-03-31 14:30:17 -04:00
Sakimori 2ca1a44455 fixed some lastminute things 2023-03-31 14:29:38 -04:00
Sakimori 7fbd793cf5 done except draft 2023-03-31 14:28:04 -04:00
Sakimori 99fd5b00a3 finished league management commands, started OBL 2023-03-31 14:07:01 -04:00
Sakimori a7a9e37842 continued work on slashes 2023-03-31 13:22:10 -04:00
Sakimori 3d5aba94a9 added a few more slashes 2023-03-31 03:02:37 -04:00
Sakimori d7eb232af4 fixed environment, continued work on commands 2023-03-31 02:18:28 -04:00
Sakimori 03ab7c24bd showteam 2022-09-18 12:37:55 -04:00
Sakimori 793c67da11 view archetypes 2022-09-18 12:23:38 -04:00
Sakimori 85cbc0ef8a archetypehelp 2022-09-18 12:10:11 -04:00
Sakimori 4685f4aea8 added weather selection box 2022-09-18 12:02:34 -04:00
Sakimori 393094a63c archetypes, with dropdown 2022-09-18 11:49:50 -04:00
Sakimori 2b56ea6955 re-added conventional command handling for bot DMs 2022-09-18 11:35:03 -04:00
Sakimori 6d7cfe05c2 removed the one-command text and setupgame 2022-09-18 11:34:04 -04:00
Sakimori d6011a69d7 random games (also bugfix for same) 2022-09-18 11:27:36 -04:00
Sakimori dcbc934f86 removed custom voices for now 2022-09-18 11:14:20 -04:00
Sakimori 74aef9d163 startgame and showplayer 2022-09-18 11:08:24 -04:00
Sakimori 1f37131a76 moved showplayer 2022-09-18 10:00:28 -04:00
7 changed files with 883 additions and 795 deletions

1
.gitignore vendored
View file

@ -359,3 +359,4 @@ env
/simmadome/build
/simmadome/.eslintcache
/matteo_env/Lib/site-packages
/new_matteo_env

View file

@ -1,5 +1,6 @@
import random
from gametext import appearance_outcomes
from discord.app_commands import Choice
class Archetype:
name = "basic"
@ -126,6 +127,12 @@ def all_archetypes():
Control
]
def archetype_choices():
lst = []
for arch in all_archetypes():
lst.append(Choice(name=arch.display_name, value=arch.name))
return lst
def search_archetypes(text):
for archetype in all_archetypes():
if archetype.name == text or archetype.display_name.lower() == text.lower():

View file

@ -235,7 +235,7 @@ class game(object):
self.over = False
self.random_weather_flag = False
self.teams = {"away" : team1, "home" : team2}
self.archetypes = {team1.name : team1.archetypes, team2.name : team2.archetypes}
self.offense_archetypes = {}
self.defense_archetypes = {}
self.inning = 1
@ -254,10 +254,14 @@ class game(object):
self.voice = None
self.current_batter = None
for this_team in [team1, team2]:
for this_player in this_team.lineup + this_team.rotation:
if this_player.name in this_team.archetypes.keys():
this_team.archetypes[this_player.name].modify_player_stats(this_player)
try:
self.archetypes = {team1.name : team1.archetypes, team2.name : team2.archetypes}
for this_team in [team1, team2]:
for this_player in this_team.lineup + this_team.rotation:
if this_player.name in this_team.archetypes.keys():
this_team.archetypes[this_player.name].modify_player_stats(this_player)
except:
pass
def occupied_bases(self):
occ_dic = {}
@ -950,7 +954,7 @@ def get_team_and_owner(name):
update_team(team_json)
return (team_json, owner_id)
except:
return None
return (None, None)
def save_team(this_team, user_id):
try:

View file

@ -390,13 +390,10 @@ class TrespassOracle(game_strings_base):
def all_voices():
return {"default": game_strings_base,
"The Goddesses": TheGoddesses,
"The New Guy": TheNewGuy,
"Trespass Oracle": TrespassOracle}
return {"default": game_strings_base}
def weighted_voices(): #these are the ones accessible to random games
return [game_strings_base, TheGoddesses, TheNewGuy], [6, 2, 2]
return [game_strings_base], [6]
def base_string(base):

View file

@ -11,7 +11,7 @@
<OutputPath>.</OutputPath>
<Name>the-prestige</Name>
<RootNamespace>the-prestige</RootNamespace>
<InterpreterId>MSBuild|matteo_env|$(MSBuildProjectFullPath)</InterpreterId>
<InterpreterId>MSBuild|new_matteo_env|$(MSBuildProjectFullPath)</InterpreterId>
<IsWindowsApplication>False</IsWindowsApplication>
<SuppressConfigureTestFrameworkPrompt>true</SuppressConfigureTestFrameworkPrompt>
</PropertyGroup>
@ -67,6 +67,15 @@
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>
<Architecture>X86</Architecture>
</Interpreter>
<Interpreter Include="new_matteo_env\">
<Id>new_matteo_env</Id>
<Version>3.8</Version>
<Description>new_matteo_env (Python38-32)</Description>
<InterpreterPath>Scripts\python.exe</InterpreterPath>
<WindowsInterpreterPath>Scripts\pythonw.exe</WindowsInterpreterPath>
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>
<Architecture>X86</Architecture>
</Interpreter>
</ItemGroup>
<ItemGroup>
<Content Include="config.json" />
@ -43336,6 +43345,9 @@
<Folder Include="static\" />
<Folder Include="templates\" />
</ItemGroup>
<ItemGroup>
<InterpreterReference Include="Global|VisualStudio|Python38-32" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
<!-- Uncomment the CoreCompile target to enable the Build command in
Visual Studio and specify your pre- and post-build commands in

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
import random, math, roman
from gametext import appearance_outcomes, game_strings_base, base_string
from discord.app_commands import Choice
class Weather:
name = "Sunny"
@ -636,6 +637,12 @@ def all_weathers():
}
return weathers_dic
def weather_choices():
lst = []
for key, value in list(all_weathers().items()):
lst.append(Choice(name=key, value=key))
return lst
def safe_weathers():
"""weathers safe to swap in mid-game"""
weathers_dic = {