S9 bug fixes
This commit is contained in:
parent
0035090ad9
commit
fdfcd05899
25
helpers.py
25
helpers.py
@ -17,8 +17,8 @@ from dataclasses import dataclass
|
||||
from typing import Optional, Literal
|
||||
|
||||
|
||||
SBA_SEASON = 7
|
||||
PD_SEASON = 6
|
||||
SBA_SEASON = 9
|
||||
PD_SEASON = 7
|
||||
SBA_COLOR = 'a6ce39'
|
||||
PD_PLAYERS = 'Paper Dynasty Players'
|
||||
SBA_PLAYERS_ROLE_NAME = f'Season {SBA_SEASON} Players'
|
||||
@ -98,7 +98,8 @@ IMAGES = {
|
||||
'Texas Rangers': f'{PD_CARD_URL}/mvp/texas-rangers.gif',
|
||||
'Toronto Blue Jays': f'{PD_CARD_URL}/mvp/toronto-blue-jays.gif',
|
||||
'Washington Nationals': f'{PD_CARD_URL}/mvp/washington-nationals.gif',
|
||||
'Junior All Stars': f'{PD_CARD_URL}/mvp.png'
|
||||
'Junior All Stars': f'{PD_CARD_URL}/mvp.png',
|
||||
'Mario Super Sluggers': f'{PD_CARD_URL}/mvp.png'
|
||||
},
|
||||
'gauntlets': f'{PD_CARD_URL}/gauntlets.png'
|
||||
}
|
||||
@ -854,7 +855,7 @@ class SelectBuyPacksCardset(discord.ui.Select):
|
||||
elif self.values[0] == '2018 Season':
|
||||
cardset_id = 13
|
||||
elif self.values[0] == '2024 Live':
|
||||
cardset_id = 13
|
||||
cardset_id = 17
|
||||
|
||||
self.pack_embed.description = f'{self.pack_embed.description} - {self.values[0]}'
|
||||
view = Confirm(responders=[interaction.user], timeout=30)
|
||||
@ -1619,8 +1620,10 @@ async def get_card_embeds(card, include_stats=False) -> list:
|
||||
embed.set_footer(text=f'Paper Dynasty Season {card["team"]["season"]}', icon_url=IMAGES['logo'])
|
||||
|
||||
if include_stats:
|
||||
b_query = await db_get('plays/batting', params=[('player_id', card['player']['player_id'])])
|
||||
p_query = await db_get('plays/pitching', params=[('player_id', card['player']['player_id'])])
|
||||
b_query = await db_get(
|
||||
'plays/batting', params=[('player_id', card['player']['player_id']), ('season', PD_SEASON)])
|
||||
p_query = await db_get(
|
||||
'plays/pitching', params=[('player_id', card['player']['player_id']), ('season', PD_SEASON)])
|
||||
|
||||
embed.add_field(name='Player ID', value=f'{card["player"]["player_id"]}')
|
||||
embed.add_field(name='Rarity', value=f'{card["player"]["rarity"]["name"]}')
|
||||
@ -2970,12 +2973,18 @@ async def open_choice_pack(this_pack, team: dict, context, cardset_id: Optional[
|
||||
else:
|
||||
rarity_id = 2
|
||||
|
||||
# HAX FOR SOCC TO GET HIS MVP PACK
|
||||
if (team['abbrev'] in ['KSK', 'NJY']) and (datetime.datetime.today().day == 24):
|
||||
rarity_id = 5
|
||||
|
||||
min_rarity = rarity_id
|
||||
while len(players) < 4 and rarity_id < 10:
|
||||
params = [
|
||||
('min_rarity', min_rarity), ('max_rarity', rarity_id), ('limit', 4 - len(players)), ('in_packs', True),
|
||||
('mlbclub', this_pack['pack_team']['lname'])
|
||||
('min_rarity', min_rarity), ('max_rarity', rarity_id), ('limit', 4 - len(players)),
|
||||
('franchise', this_pack['pack_team']['lname'])
|
||||
]
|
||||
if this_pack['pack_team']['abbrev'] not in ['MSS']:
|
||||
params.append(('in_packs', True))
|
||||
if cardset_id is not None:
|
||||
params.append(('cardset_id', cardset_id))
|
||||
pl = await db_get(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user