This commit is contained in:
jona605a
2020-08-04 19:39:37 +02:00
3 changed files with 3 additions and 4 deletions

View File

@ -102,7 +102,7 @@ def placePiece(channel : str,player : int,column : int):
data["4 in a row games"][channel]["win coordinates"] = winCoordinates data["4 in a row games"][channel]["win coordinates"] = winCoordinates
message = getName(data["4 in a row games"][channel]["players"][won-1])+" won." message = getName(data["4 in a row games"][channel]["players"][won-1])+" won."
winAmount = int(data["4 in a row games"][channel]["difficulty"])^2+5 winAmount = int(data["4 in a row games"][channel]["difficulty"])**2+5
if data["4 in a row games"][channel]["players"][won-1] != "Gwendolyn": if data["4 in a row games"][channel]["players"][won-1] != "Gwendolyn":
message += " Adding "+str(winAmount)+" GwendoBucks to their account." message += " Adding "+str(winAmount)+" GwendoBucks to their account."
elif 0 not in board[0]: elif 0 not in board[0]:

View File

@ -365,7 +365,6 @@ def getName(userID):
data = json.load(f) data = json.load(f)
if userID in data: if userID in data:
logThis("yeet")
return data[userID]["user name"] return data[userID]["user name"]
else: else:
logThis("Couldn't find user") logThis("Couldn't find user")

View File

@ -136,8 +136,8 @@ async def fiar(channel,command,user):
logThis("The old image was already deleted") logThis("The old image was already deleted")
winner = data["4 in a row games"][str(channel)]["winner"] winner = data["4 in a row games"][str(channel)]["winner"]
reward = int(data["4 in a row games"][str(channel)]["difficulty"]) difficulty = int(data["4 in a row games"][str(channel)]["difficulty"])
reward = reward^2 + 5 reward = difficulty**2 + 5
if winner != 0: if winner != 0:
if data["4 in a row games"][str(channel)]["players"][winner-1].lower() != "gwendolyn": if data["4 in a row games"][str(channel)]["players"][winner-1].lower() != "gwendolyn":
addMoney(data["4 in a row games"][str(channel)]["players"][winner-1].lower(),reward) addMoney(data["4 in a row games"][str(channel)]["players"][winner-1].lower(),reward)