finalized the rival system
This commit is contained in:
parent
de0288a1bf
commit
b2fc071502
|
@ -431,7 +431,7 @@ def obl_leaderboards():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def set_obl_rival(base_team, rival):
|
def set_obl_rival(base_team, rival):
|
||||||
conn = create_connectio()
|
conn = create_connection()
|
||||||
if conn is not None:
|
if conn is not None:
|
||||||
c=conn.cursor()
|
c=conn.cursor()
|
||||||
|
|
||||||
|
|
|
@ -1281,19 +1281,22 @@ class OBLTeamCommand(Command):
|
||||||
opplist = db.get_obl_stats(oppteam)[1]
|
opplist = db.get_obl_stats(oppteam)[1]
|
||||||
if team.name in opplist:
|
if team.name in opplist:
|
||||||
opponents_list[index] = opponents_list[index] + " 🤼"
|
opponents_list[index] = opponents_list[index] + " 🤼"
|
||||||
|
if rival_name == opponents_list[index]:
|
||||||
|
opponents_list[index] = opponents_list[index] + " 😈"
|
||||||
if rival_name is not None:
|
if rival_name is not None:
|
||||||
rival_team = games.get_team(rival_name)
|
rival_team = games.get_team(rival_name)
|
||||||
|
opponents_string = db.list_to_newline_string(opponents_list)
|
||||||
|
|
||||||
embed = discord.Embed(color=discord.Color.red(), title=f"{team.name} in the One Big League")
|
embed = discord.Embed(color=discord.Color.red(), title=f"{team.name} in the One Big League")
|
||||||
embed.add_field(name="OBL Points", value=points)
|
embed.add_field(name="OBL Points", value=points)
|
||||||
embed.add_field(name="Rank", value=rank)
|
embed.add_field(name="Rank", value=rank)
|
||||||
embed.add_field(name="Opponent Pool", value=opponents_string, inline=False)
|
embed.add_field(name="Bounty Board", value=opponents_string, inline=False)
|
||||||
if rival_team is not None:
|
if rival_team is not None:
|
||||||
embed.add_field(name="Rival", value=f"{rival_team.name}\n{rival_team.slogan}")
|
embed.add_field(name="Rival", value=f"**{rival_team.name}**\n{rival_team.slogan}")
|
||||||
await msg.channel.send(embed=embed)
|
await msg.channel.send(embed=embed)
|
||||||
|
|
||||||
class OBLSetRivalCommand(Command):
|
class OBLSetRivalCommand(Command):
|
||||||
name = "oblteam"
|
name = "oblrival"
|
||||||
template = "m;oblrival\n[your team name]\n[rival team name]"
|
template = "m;oblrival\n[your team name]\n[rival team name]"
|
||||||
description = "Sets your team's OBL rival. Can be changed at any time. Requires ownership."
|
description = "Sets your team's OBL rival. Can be changed at any time. Requires ownership."
|
||||||
|
|
||||||
|
@ -1307,9 +1310,11 @@ class OBLSetRivalCommand(Command):
|
||||||
elif owner_id != msg.author.id and msg.author.id not in config()["owners"]:
|
elif owner_id != msg.author.id and msg.author.id not in config()["owners"]:
|
||||||
await msg.channel.send("You're not authorized to mess with this team. Sorry, boss.")
|
await msg.channel.send("You're not authorized to mess with this team. Sorry, boss.")
|
||||||
return
|
return
|
||||||
try:
|
#try:
|
||||||
db.set_obl_rival(team, team_r)
|
db.set_obl_rival(team, team_r)
|
||||||
await msg.channel.send("One pair of mortal enemies, coming right up. Unless you're more of the 'enemies to lovers' type. We can manage that too, don't worry.")
|
await msg.channel.send("One pair of mortal enemies, coming right up. Unless you're more of the 'enemies to lovers' type. We can manage that too, don't worry.")
|
||||||
|
#except:
|
||||||
|
#await msg.channel.send("Hm. We don't think that team has tried to do anything in the One Big League yet, so you'll have to wait for consent. Get them to check their bounty board.")
|
||||||
|
|
||||||
class OBLConqueredCommand(Command):
|
class OBLConqueredCommand(Command):
|
||||||
name = "oblwins"
|
name = "oblwins"
|
||||||
|
@ -1389,6 +1394,7 @@ commands = [
|
||||||
StartTournamentCommand(),
|
StartTournamentCommand(),
|
||||||
OBLExplainCommand(),
|
OBLExplainCommand(),
|
||||||
OBLTeamCommand(),
|
OBLTeamCommand(),
|
||||||
|
OBLSetRivalCommand(),
|
||||||
OBLConqueredCommand(),
|
OBLConqueredCommand(),
|
||||||
OBLLeaderboardCommand(),
|
OBLLeaderboardCommand(),
|
||||||
LeagueClaimCommand(),
|
LeagueClaimCommand(),
|
||||||
|
|
Loading…
Reference in a new issue