Compare commits
22 commits
one_slash_
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
16654ed3ff | ||
![]() |
b598e9aa5e | ||
![]() |
deb10fb3b0 | ||
![]() |
a22d70cb0c | ||
![]() |
68a8588ecd | ||
![]() |
2ca1a44455 | ||
![]() |
7fbd793cf5 | ||
![]() |
99fd5b00a3 | ||
![]() |
a7a9e37842 | ||
![]() |
3d5aba94a9 | ||
![]() |
d7eb232af4 | ||
![]() |
03ab7c24bd | ||
![]() |
793c67da11 | ||
![]() |
85cbc0ef8a | ||
![]() |
4685f4aea8 | ||
![]() |
393094a63c | ||
![]() |
2b56ea6955 | ||
![]() |
6d7cfe05c2 | ||
![]() |
d6011a69d7 | ||
![]() |
dcbc934f86 | ||
![]() |
74aef9d163 | ||
![]() |
1f37131a76 |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -359,3 +359,4 @@ env
|
|||
/simmadome/build
|
||||
/simmadome/.eslintcache
|
||||
/matteo_env/Lib/site-packages
|
||||
/new_matteo_env
|
||||
|
|
|
@ -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():
|
||||
|
|
16
games.py
16
games.py
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
1626
the_prestige.py
1626
the_prestige.py
File diff suppressed because it is too large
Load diff
|
@ -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 = {
|
||||
|
|
Loading…
Reference in a new issue