Compare commits
No commits in common. "master" and "one_slash_to_rule_them" have entirely different histories.
master
...
one_slash_
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -359,4 +359,3 @@ env
|
||||||
/simmadome/build
|
/simmadome/build
|
||||||
/simmadome/.eslintcache
|
/simmadome/.eslintcache
|
||||||
/matteo_env/Lib/site-packages
|
/matteo_env/Lib/site-packages
|
||||||
/new_matteo_env
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import random
|
import random
|
||||||
from gametext import appearance_outcomes
|
from gametext import appearance_outcomes
|
||||||
from discord.app_commands import Choice
|
|
||||||
|
|
||||||
class Archetype:
|
class Archetype:
|
||||||
name = "basic"
|
name = "basic"
|
||||||
|
@ -127,12 +126,6 @@ def all_archetypes():
|
||||||
Control
|
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):
|
def search_archetypes(text):
|
||||||
for archetype in all_archetypes():
|
for archetype in all_archetypes():
|
||||||
if archetype.name == text or archetype.display_name.lower() == text.lower():
|
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.over = False
|
||||||
self.random_weather_flag = False
|
self.random_weather_flag = False
|
||||||
self.teams = {"away" : team1, "home" : team2}
|
self.teams = {"away" : team1, "home" : team2}
|
||||||
|
self.archetypes = {team1.name : team1.archetypes, team2.name : team2.archetypes}
|
||||||
self.offense_archetypes = {}
|
self.offense_archetypes = {}
|
||||||
self.defense_archetypes = {}
|
self.defense_archetypes = {}
|
||||||
self.inning = 1
|
self.inning = 1
|
||||||
|
@ -254,14 +254,10 @@ class game(object):
|
||||||
self.voice = None
|
self.voice = None
|
||||||
self.current_batter = None
|
self.current_batter = None
|
||||||
|
|
||||||
try:
|
for this_team in [team1, team2]:
|
||||||
self.archetypes = {team1.name : team1.archetypes, team2.name : team2.archetypes}
|
for this_player in this_team.lineup + this_team.rotation:
|
||||||
for this_team in [team1, team2]:
|
if this_player.name in this_team.archetypes.keys():
|
||||||
for this_player in this_team.lineup + this_team.rotation:
|
this_team.archetypes[this_player.name].modify_player_stats(this_player)
|
||||||
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):
|
def occupied_bases(self):
|
||||||
occ_dic = {}
|
occ_dic = {}
|
||||||
|
@ -954,7 +950,7 @@ def get_team_and_owner(name):
|
||||||
update_team(team_json)
|
update_team(team_json)
|
||||||
return (team_json, owner_id)
|
return (team_json, owner_id)
|
||||||
except:
|
except:
|
||||||
return (None, None)
|
return None
|
||||||
|
|
||||||
def save_team(this_team, user_id):
|
def save_team(this_team, user_id):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -390,10 +390,13 @@ class TrespassOracle(game_strings_base):
|
||||||
|
|
||||||
|
|
||||||
def all_voices():
|
def all_voices():
|
||||||
return {"default": game_strings_base}
|
return {"default": game_strings_base,
|
||||||
|
"The Goddesses": TheGoddesses,
|
||||||
|
"The New Guy": TheNewGuy,
|
||||||
|
"Trespass Oracle": TrespassOracle}
|
||||||
|
|
||||||
def weighted_voices(): #these are the ones accessible to random games
|
def weighted_voices(): #these are the ones accessible to random games
|
||||||
return [game_strings_base], [6]
|
return [game_strings_base, TheGoddesses, TheNewGuy], [6, 2, 2]
|
||||||
|
|
||||||
|
|
||||||
def base_string(base):
|
def base_string(base):
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<OutputPath>.</OutputPath>
|
<OutputPath>.</OutputPath>
|
||||||
<Name>the-prestige</Name>
|
<Name>the-prestige</Name>
|
||||||
<RootNamespace>the-prestige</RootNamespace>
|
<RootNamespace>the-prestige</RootNamespace>
|
||||||
<InterpreterId>MSBuild|new_matteo_env|$(MSBuildProjectFullPath)</InterpreterId>
|
<InterpreterId>MSBuild|matteo_env|$(MSBuildProjectFullPath)</InterpreterId>
|
||||||
<IsWindowsApplication>False</IsWindowsApplication>
|
<IsWindowsApplication>False</IsWindowsApplication>
|
||||||
<SuppressConfigureTestFrameworkPrompt>true</SuppressConfigureTestFrameworkPrompt>
|
<SuppressConfigureTestFrameworkPrompt>true</SuppressConfigureTestFrameworkPrompt>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -67,15 +67,6 @@
|
||||||
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>
|
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>
|
||||||
<Architecture>X86</Architecture>
|
<Architecture>X86</Architecture>
|
||||||
</Interpreter>
|
</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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="config.json" />
|
<Content Include="config.json" />
|
||||||
|
@ -43345,9 +43336,6 @@
|
||||||
<Folder Include="static\" />
|
<Folder Include="static\" />
|
||||||
<Folder Include="templates\" />
|
<Folder Include="templates\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<InterpreterReference Include="Global|VisualStudio|Python38-32" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets" />
|
||||||
<!-- Uncomment the CoreCompile target to enable the Build command in
|
<!-- Uncomment the CoreCompile target to enable the Build command in
|
||||||
Visual Studio and specify your pre- and post-build commands in
|
Visual Studio and specify your pre- and post-build commands in
|
||||||
|
|
1598
the_prestige.py
1598
the_prestige.py
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,5 @@
|
||||||
import random, math, roman
|
import random, math, roman
|
||||||
from gametext import appearance_outcomes, game_strings_base, base_string
|
from gametext import appearance_outcomes, game_strings_base, base_string
|
||||||
from discord.app_commands import Choice
|
|
||||||
|
|
||||||
class Weather:
|
class Weather:
|
||||||
name = "Sunny"
|
name = "Sunny"
|
||||||
|
@ -637,12 +636,6 @@ def all_weathers():
|
||||||
}
|
}
|
||||||
return weathers_dic
|
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():
|
def safe_weathers():
|
||||||
"""weathers safe to swap in mid-game"""
|
"""weathers safe to swap in mid-game"""
|
||||||
weathers_dic = {
|
weathers_dic = {
|
||||||
|
|
Loading…
Reference in a new issue