Merge branch 'master' of https://github.com/NikolajDanger/Gwendolyn
This commit is contained in:
8
.gitignore
vendored
8
.gitignore
vendored
@@ -150,12 +150,16 @@ static
|
|||||||
|
|
||||||
.vscode/
|
.vscode/
|
||||||
token.txt
|
token.txt
|
||||||
resources/swcharacters.json
|
resources/starWars/swcharacters.json
|
||||||
resources/games/games.json
|
resources/games/games.json
|
||||||
resources/games/blackjackCards/
|
resources/games/blackjackCards/
|
||||||
resources/games/hilo/
|
resources/games/hilo/
|
||||||
resources/destinyPoints.txt
|
resources/starWars/destinyPoints.txt
|
||||||
resources/games/blackjackTables/
|
resources/games/blackjackTables/
|
||||||
resources/games/oldImages/
|
resources/games/oldImages/
|
||||||
resources/games/4InARowBoards/
|
resources/games/4InARowBoards/
|
||||||
|
resources/lookup/monsters.json
|
||||||
|
resources/lookup/spells.json
|
||||||
|
resources/movies.txt
|
||||||
|
resources/names.txt
|
||||||
gwendolynTest.py
|
gwendolynTest.py
|
||||||
|
|||||||
241
Gwendolyn.py
241
Gwendolyn.py
@@ -7,10 +7,12 @@ import codecs
|
|||||||
import string
|
import string
|
||||||
import json
|
import json
|
||||||
import random
|
import random
|
||||||
import math
|
#import math
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from funcs import *
|
from funcs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, emojiToNumber, fiarReactionTest, deleteGame, stopServer, checkBalance, giveMoney, triviaCountPoints, triviaStart, triviaAnswer, blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit, parseFourInARow, fourInARowAI, spellFunc, monsterFunc, nameGen, tavernGen, movieFunc, roll_dice, parseChar, parseRoll, critRoll, parseDestiny
|
||||||
|
|
||||||
|
from gameLoops import fiar, blackjackLoop
|
||||||
|
|
||||||
commandPrefix = "!"
|
commandPrefix = "!"
|
||||||
|
|
||||||
@@ -21,204 +23,6 @@ blackjackDecks = 4
|
|||||||
# Variable for reacting to messages
|
# Variable for reacting to messages
|
||||||
meanWords = ["stupid", "bitch", "fuck", "dumb", "idiot"]
|
meanWords = ["stupid", "bitch", "fuck", "dumb", "idiot"]
|
||||||
|
|
||||||
# Runs Hex
|
|
||||||
async def hex(channel,command,user):
|
|
||||||
try:
|
|
||||||
response, showImage, deleteImage, gameDone, gwendoTurn = parseHex(command,str(channel),user)
|
|
||||||
except:
|
|
||||||
logThis("Error parsing command (error code 1510)")
|
|
||||||
|
|
||||||
await channel.send(response)
|
|
||||||
logThis(response,str(channel))
|
|
||||||
if showImage:
|
|
||||||
if deleteImage:
|
|
||||||
try:
|
|
||||||
oldImage = await deleteMessage("hex"+str(channel),channel)
|
|
||||||
except:
|
|
||||||
logThis("Error deleting old image (error code 1501)")
|
|
||||||
oldImage = await channel.send(file = discord.File("resources/games/hexBoards/board"+str(channel)+".png"))
|
|
||||||
if gameDone == False:
|
|
||||||
if gwendoTurn:
|
|
||||||
try:
|
|
||||||
response, showImage, deleteImage, gameDone, gwendoTurn = hexAI(str(channel))
|
|
||||||
except:
|
|
||||||
logThis("AI error (error code 1420)")
|
|
||||||
await channel.send(response)
|
|
||||||
logThis(response,str(channel))
|
|
||||||
if showImage:
|
|
||||||
if deleteImage:
|
|
||||||
await oldImage.delete()
|
|
||||||
oldImage = await channel.send(file = discord.File("resources/games/4InARowBoards/board"+str(channel)+".png"))
|
|
||||||
if gameDone == False:
|
|
||||||
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
|
||||||
f.write(str(oldImage.id))
|
|
||||||
try:
|
|
||||||
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
|
||||||
for reaction in reactions:
|
|
||||||
await oldImage.add_reaction(reaction)
|
|
||||||
|
|
||||||
except:
|
|
||||||
logThis("Image deleted before I could react to all of them")
|
|
||||||
|
|
||||||
else:
|
|
||||||
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
|
||||||
f.write(str(oldImage.id))
|
|
||||||
try:
|
|
||||||
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
|
||||||
for reaction in reactions:
|
|
||||||
await oldImage.add_reaction(reaction)
|
|
||||||
except:
|
|
||||||
logThis("Image deleted before I could react to all of them")
|
|
||||||
# else:
|
|
||||||
# with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
|
||||||
# f.write(str(oldImage.id))
|
|
||||||
|
|
||||||
if gameDone:
|
|
||||||
with open("resources/games/games.json", "r") as f:
|
|
||||||
data = json.load(f)
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open("resources/games/oldImages/fourInARow"+str(channel), "r") as f:
|
|
||||||
oldImage = await channel.fetch_message(int(f.read()))
|
|
||||||
|
|
||||||
await oldImage.delete()
|
|
||||||
except:
|
|
||||||
logThis("The old image was already deleted")
|
|
||||||
|
|
||||||
winner = data["4 in a row games"][str(channel)]["winner"]
|
|
||||||
if winner != 0:
|
|
||||||
addMoney(data["4 in a row games"][str(channel)]["players"][winner-1].lower(),20)
|
|
||||||
with open("resources/games/games.json", "r") as f:
|
|
||||||
data = json.load(f)
|
|
||||||
|
|
||||||
deleteGame("4 in a row games",str(channel))
|
|
||||||
|
|
||||||
|
|
||||||
# Runs Four in a Row
|
|
||||||
async def fiar(channel,command,user):
|
|
||||||
try:
|
|
||||||
response, showImage, deleteImage, gameDone, gwendoTurn = parseFourInARow(command,str(channel),user)
|
|
||||||
except:
|
|
||||||
logThis("Error parsing command (error code 1410)")
|
|
||||||
|
|
||||||
await channel.send(response)
|
|
||||||
logThis(response,str(channel))
|
|
||||||
if showImage:
|
|
||||||
if deleteImage:
|
|
||||||
try:
|
|
||||||
oldImage = await deleteMessage("fourInARow"+str(channel),channel)
|
|
||||||
except:
|
|
||||||
logThis("Error deleting message (error code 1401)")
|
|
||||||
oldImage = await channel.send(file = discord.File("resources/games/4InARowBoards/board"+str(channel)+".png"))
|
|
||||||
if gameDone == False:
|
|
||||||
if gwendoTurn:
|
|
||||||
try:
|
|
||||||
response, showImage, deleteImage, gameDone, gwendoTurn = fourInARowAI(str(channel))
|
|
||||||
except:
|
|
||||||
logThis("AI error (error code 1420)")
|
|
||||||
await channel.send(response)
|
|
||||||
logThis(response,str(channel))
|
|
||||||
if showImage:
|
|
||||||
if deleteImage:
|
|
||||||
await oldImage.delete()
|
|
||||||
oldImage = await channel.send(file = discord.File("resources/games/4InARowBoards/board"+str(channel)+".png"))
|
|
||||||
if gameDone == False:
|
|
||||||
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
|
||||||
f.write(str(oldImage.id))
|
|
||||||
try:
|
|
||||||
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
|
||||||
for reaction in reactions:
|
|
||||||
await oldImage.add_reaction(reaction)
|
|
||||||
|
|
||||||
except:
|
|
||||||
logThis("Image deleted before I could react to all of them")
|
|
||||||
|
|
||||||
else:
|
|
||||||
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
|
||||||
f.write(str(oldImage.id))
|
|
||||||
try:
|
|
||||||
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
|
||||||
for reaction in reactions:
|
|
||||||
await oldImage.add_reaction(reaction)
|
|
||||||
except:
|
|
||||||
logThis("Image deleted before I could react to all of them")
|
|
||||||
# else:
|
|
||||||
# with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
|
||||||
# f.write(str(oldImage.id))
|
|
||||||
|
|
||||||
if gameDone:
|
|
||||||
with open("resources/games/games.json", "r") as f:
|
|
||||||
data = json.load(f)
|
|
||||||
|
|
||||||
try:
|
|
||||||
with open("resources/games/oldImages/fourInARow"+str(channel), "r") as f:
|
|
||||||
oldImage = await channel.fetch_message(int(f.read()))
|
|
||||||
|
|
||||||
await oldImage.delete()
|
|
||||||
except:
|
|
||||||
logThis("The old image was already deleted")
|
|
||||||
|
|
||||||
winner = data["4 in a row games"][str(channel)]["winner"]
|
|
||||||
if winner != 0:
|
|
||||||
addMoney(data["4 in a row games"][str(channel)]["players"][winner-1].lower(),20)
|
|
||||||
with open("resources/games/games.json", "r") as f:
|
|
||||||
data = json.load(f)
|
|
||||||
|
|
||||||
deleteGame("4 in a row games",str(channel))
|
|
||||||
|
|
||||||
# Deletes a message
|
|
||||||
async def deleteMessage(imageLocation,channel):
|
|
||||||
try:
|
|
||||||
logThis("Finding old image")
|
|
||||||
with open("resources/games/oldImages/"+imageLocation, "r") as f:
|
|
||||||
oldImage = await channel.fetch_message(int(f.read()))
|
|
||||||
logThis("Deleting old image")
|
|
||||||
await oldImage.delete()
|
|
||||||
except:
|
|
||||||
oldImage = ""
|
|
||||||
|
|
||||||
return oldImage
|
|
||||||
|
|
||||||
# Loop of game rounds
|
|
||||||
async def blackjackLoop(channel,gameRound,gameID):
|
|
||||||
logThis("Loop "+str(gameRound),str(channel))
|
|
||||||
|
|
||||||
with open("resources/games/oldImages/blackjack"+str(channel), "r") as f:
|
|
||||||
oldImage = await channel.fetch_message(int(f.read()))
|
|
||||||
|
|
||||||
new_message, allStanding, gamedone = blackjackContinue(str(channel))
|
|
||||||
if new_message != "":
|
|
||||||
logThis(new_message,str(channel))
|
|
||||||
await channel.send(new_message)
|
|
||||||
if gamedone == False:
|
|
||||||
await oldImage.delete()
|
|
||||||
oldImage = await channel.send(file = discord.File("resources/games/blackjackTables/blackjackTable"+str(channel)+".png"))
|
|
||||||
with open("resources/games/oldImages/blackjack"+str(channel), "w") as f:
|
|
||||||
f.write(str(oldImage.id))
|
|
||||||
if allStanding:
|
|
||||||
await asyncio.sleep(5)
|
|
||||||
else:
|
|
||||||
await asyncio.sleep(120)
|
|
||||||
|
|
||||||
with open("resources/games/games.json", "r") as f:
|
|
||||||
data = json.load(f)
|
|
||||||
|
|
||||||
if str(channel) in data["blackjack games"]:
|
|
||||||
realRound = data["blackjack games"][str(channel)]["round"]
|
|
||||||
realGameID = data["blackjack games"][str(channel)]["id"]
|
|
||||||
|
|
||||||
if gameRound == realRound and realGameID == gameID:
|
|
||||||
if gamedone == False:
|
|
||||||
logThis("Loop "+str(gameRound)+" calling blackjackLoop()",str(channel))
|
|
||||||
await blackjackLoop(channel,gameRound+1,gameID)
|
|
||||||
else:
|
|
||||||
new_message = blackjackFinish(str(channel))
|
|
||||||
await channel.send(new_message)
|
|
||||||
else:
|
|
||||||
logThis("Ending loop on round "+str(gameRound),str(channel))
|
|
||||||
else:
|
|
||||||
logThis("Ending loop on round "+str(gameRound),str(channel))
|
|
||||||
|
|
||||||
async def parseCommands(message,content):
|
async def parseCommands(message,content):
|
||||||
# Sends the contents of a help file, as specified by the message.
|
# Sends the contents of a help file, as specified by the message.
|
||||||
if content.startswith("help"):
|
if content.startswith("help"):
|
||||||
@@ -289,7 +93,12 @@ async def parseCommands(message,content):
|
|||||||
# Looks up a spell with the spellFunc function from funcs/lookup/lookuppy
|
# Looks up a spell with the spellFunc function from funcs/lookup/lookuppy
|
||||||
elif content.startswith("spell "):
|
elif content.startswith("spell "):
|
||||||
try:
|
try:
|
||||||
await message.channel.send(spellFunc(cap(content.replace("spell",""))))
|
spell = spellFunc(cap(content.replace("spell","")))
|
||||||
|
if len(spell) > 2000:
|
||||||
|
await message.channel.send(spell[:2000])
|
||||||
|
await message.channel.send(spell[2000:])
|
||||||
|
else:
|
||||||
|
await message.channel.send(spell)
|
||||||
except:
|
except:
|
||||||
logThis("Something fucked up (error code 500)",str(message.channel))
|
logThis("Something fucked up (error code 500)",str(message.channel))
|
||||||
await message.channel.send("Something fucked up (error code 500)")
|
await message.channel.send("Something fucked up (error code 500)")
|
||||||
@@ -355,7 +164,8 @@ async def parseCommands(message,content):
|
|||||||
# funcs/gwendolynpy
|
# funcs/gwendolynpy
|
||||||
elif content.startswith("image"):
|
elif content.startswith("image"):
|
||||||
try:
|
try:
|
||||||
await message.channel.send(imageFunc())
|
randomImage = imageFunc()
|
||||||
|
await message.channel.send(randomImage)
|
||||||
except:
|
except:
|
||||||
logThis("Something fucked up (error code 700)",str(message.channel))
|
logThis("Something fucked up (error code 700)",str(message.channel))
|
||||||
await message.channel.send("Something fucked up (error code 700)")
|
await message.channel.send("Something fucked up (error code 700)")
|
||||||
@@ -369,10 +179,13 @@ async def parseCommands(message,content):
|
|||||||
if title == "error":
|
if title == "error":
|
||||||
await message.channel.send("An error occurred. Try again (error code "+plot+")")
|
await message.channel.send("An error occurred. Try again (error code "+plot+")")
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
embed = discord.Embed(title=title, description=plot, color=0x24ec19)
|
embed = discord.Embed(title=title, description=plot, color=0x24ec19)
|
||||||
embed.set_thumbnail(url=cover)
|
embed.set_thumbnail(url=cover)
|
||||||
embed.add_field(name="Cast", value=cast,inline = True)
|
embed.add_field(name="Cast", value=cast,inline = True)
|
||||||
await message.channel.send(embed = embed)
|
await message.channel.send(embed = embed)
|
||||||
|
except:
|
||||||
|
logThis("Error embedding (error code 805)")
|
||||||
except:
|
except:
|
||||||
logThis("Something fucked up (error code 800)",str(message.channel))
|
logThis("Something fucked up (error code 800)",str(message.channel))
|
||||||
await message.channel.send("Something fucked up (error code 800)")
|
await message.channel.send("Something fucked up (error code 800)")
|
||||||
@@ -558,7 +371,7 @@ async def parseCommands(message,content):
|
|||||||
|
|
||||||
# Runs a game of Blackjack
|
# Runs a game of Blackjack
|
||||||
elif content.startswith("blackjack"):
|
elif content.startswith("blackjack"):
|
||||||
try:
|
#try:
|
||||||
# Starts the game
|
# Starts the game
|
||||||
if content == "blackjack" or content == "blackjack ":
|
if content == "blackjack" or content == "blackjack ":
|
||||||
cardsLeft = 0
|
cardsLeft = 0
|
||||||
@@ -637,8 +450,7 @@ async def parseCommands(message,content):
|
|||||||
logThis("Hit calling blackjackLoop()",str(message.channel))
|
logThis("Hit calling blackjackLoop()",str(message.channel))
|
||||||
await blackjackLoop(message.channel,int(response[7:])+1,gameID)
|
await blackjackLoop(message.channel,int(response[7:])+1,gameID)
|
||||||
except:
|
except:
|
||||||
logThis("Something fucked up")
|
logThis("Something fucked up",str(message.channel))
|
||||||
await message.channel.send("something fucked up",str(message.channel))
|
|
||||||
else:
|
else:
|
||||||
await message.channel.send(response)
|
await message.channel.send(response)
|
||||||
|
|
||||||
@@ -688,23 +500,26 @@ async def parseCommands(message,content):
|
|||||||
await blackjackLoop(message.channel,int(roundDone[1:])+1,gameID)
|
await blackjackLoop(message.channel,int(roundDone[1:])+1,gameID)
|
||||||
except:
|
except:
|
||||||
logThis("Something fucked up",str(message.channel))
|
logThis("Something fucked up",str(message.channel))
|
||||||
await message.channel.send("something fucked up")
|
|
||||||
|
|
||||||
# Splitting hand
|
# Splitting hand
|
||||||
elif content.startswith("blackjack split"):
|
elif content.startswith("blackjack split"):
|
||||||
response, roundDone = blackjackSplit(str(message.channel),message.author.display_name)
|
commands = content.split(" ")
|
||||||
|
try:
|
||||||
|
handNumber = int(commands[2])
|
||||||
|
except:
|
||||||
|
handNumber = 0
|
||||||
|
response, roundDone = blackjackSplit(str(message.channel),message.author.display_name,handNumber)
|
||||||
|
|
||||||
await message.channel.send(response)
|
await message.channel.send(response)
|
||||||
|
|
||||||
#try:
|
try:
|
||||||
if roundDone[0] == "T":
|
if roundDone[0] == "T":
|
||||||
with open("resources/games/games.json", "r") as f:
|
with open("resources/games/games.json", "r") as f:
|
||||||
gameID = json.load(f)["blackjack games"][str(message.channel)]["id"]
|
gameID = json.load(f)["blackjack games"][str(message.channel)]["id"]
|
||||||
logThis("Split calling blackjackLoop()",str(message.channel))
|
logThis("Split calling blackjackLoop()",str(message.channel))
|
||||||
await blackjackLoop(message.channel,int(roundDone[1:])+1,gameID)
|
await blackjackLoop(message.channel,int(roundDone[1:])+1,gameID)
|
||||||
#except:
|
except:
|
||||||
# logThis("Something fucked up")
|
logThis("Something fucked up")
|
||||||
# await message.channel.send("something fucked up")
|
|
||||||
|
|
||||||
# Returning current hi-lo value
|
# Returning current hi-lo value
|
||||||
elif content.startswith("blackjack hilo") and message.author.display_name == "Nikolaj":
|
elif content.startswith("blackjack hilo") and message.author.display_name == "Nikolaj":
|
||||||
@@ -736,8 +551,8 @@ async def parseCommands(message,content):
|
|||||||
else:
|
else:
|
||||||
logThis("Not a command (error code 1301)")
|
logThis("Not a command (error code 1301)")
|
||||||
await message.channel.send("I didn't quite understand that (error code 1301)")
|
await message.channel.send("I didn't quite understand that (error code 1301)")
|
||||||
except:
|
#except:
|
||||||
logThis("Something went wrong (error code 1300)")
|
# logThis("Something went wrong (error code 1300)")
|
||||||
|
|
||||||
# Runs a game of four in a row
|
# Runs a game of four in a row
|
||||||
elif content.startswith("fourinarow"):
|
elif content.startswith("fourinarow"):
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Gwendolyn
|
# Gwendolyn
|
||||||
|
[](https://www.codacy.com?utm_source=github.com&utm_medium=referral&utm_content=NikolajDanger/Gwendolyn&utm_campaign=Badge_Grade)
|
||||||
|
|
||||||
Gwendolyn is a discord bot that I made. It does a bunch of stuff.
|
Gwendolyn is a discord bot that I made. It does a bunch of stuff.
|
||||||
|
|
||||||
@@ -17,3 +18,5 @@ And much more!!! (not really. That's pretty much all it can do. See help files i
|
|||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Running gwendolyn.py will help you set up. You will need a bot token on hand, which you should paste into your terminal when prompted.
|
Running gwendolyn.py will help you set up. You will need a bot token on hand, which you should paste into your terminal when prompted.
|
||||||
|
|
||||||
|
You will need to populate monsters.json and spells.json with monsters and spells. The files are created in the resources folder when running the program.
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
|
"""A collection of all Gwendolyn functions."""
|
||||||
|
|
||||||
|
__all__ = ["helloFunc", "cap", "imageFunc", "logThis", "findWikiPage", "makeFiles", "emojiToNumber", "fiarReactionTest", "deleteGame", "stopServer", "checkBalance", "giveMoney", "addMoney", "triviaCountPoints", "triviaStart", "triviaAnswer", "blackjackShuffle", "blackjackStart", "blackjackPlayerDrawHand", "blackjackContinue", "blackjackFinish", "blackjackHit", "blackjackStand", "blackjackDouble", "blackjackSplit", "parseFourInARow", "fourInARowAI", "spellFunc", "monsterFunc", "nameGen", "tavernGen", "movieFunc", "roll_dice", "parseChar", "parseRoll", "critRoll", "parseDestiny"]
|
||||||
|
|
||||||
from .miscFuncs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, replaceMultiple, emojiToNumber, fiarReactionTest, deleteGame, stopServer
|
from .miscFuncs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles, replaceMultiple, emojiToNumber, fiarReactionTest, deleteGame, stopServer
|
||||||
|
|
||||||
from .swfuncs import *
|
from .games import checkBalance, giveMoney, addMoney, triviaCountPoints, triviaStart, triviaAnswer, blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit, parseFourInARow, fourInARowAI
|
||||||
|
|
||||||
from .lookup import *
|
from .lookup import spellFunc, monsterFunc
|
||||||
|
|
||||||
from .other import *
|
from .other import nameGen, tavernGen, movieFunc
|
||||||
|
|
||||||
from .games import *
|
from .roll import roll_dice
|
||||||
|
|
||||||
|
from .swfuncs import parseChar, parseRoll, parseDestiny, critRoll
|
||||||
|
|
||||||
from .roll import *
|
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
"""Functions for games Gwendolyn can play."""
|
||||||
|
|
||||||
|
__all__ = ["checkBalance", "giveMoney", "addMoney","triviaCountPoints", "triviaStart", "triviaAnswer", "blackjackShuffle", "blackjackStart", "blackjackPlayerDrawHand", "blackjackContinue", "blackjackFinish", "blackjackHit", "blackjackStand", "blackjackDouble", "blackjackSplit", "parseFourInARow", "fourInARowAI"]
|
||||||
|
|
||||||
from .money import checkBalance, giveMoney, addMoney
|
from .money import checkBalance, giveMoney, addMoney
|
||||||
from .trivia import triviaCountPoints, triviaStart, triviaAnswer
|
from .trivia import triviaCountPoints, triviaStart, triviaAnswer
|
||||||
from .blackjack import blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit
|
from .blackjack import blackjackShuffle, blackjackStart, blackjackPlayerDrawHand, blackjackContinue, blackjackFinish, blackjackHit, blackjackStand, blackjackDouble, blackjackSplit
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ def blackjackContinue(channel):
|
|||||||
|
|
||||||
data["blackjack games"][channel]["user hands"][user]["hit"] = False
|
data["blackjack games"][channel]["user hands"][user]["hit"] = False
|
||||||
|
|
||||||
if data["blackjack games"][channel]["user hands"][user]["split"]:
|
if data["blackjack games"][channel]["user hands"][user]["split"] > 0:
|
||||||
if data["blackjack games"][channel]["user hands"][user]["other hand"]["hit"] == False:
|
if data["blackjack games"][channel]["user hands"][user]["other hand"]["hit"] == False:
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["standing"] = True
|
data["blackjack games"][channel]["user hands"][user]["other hand"]["standing"] = True
|
||||||
|
|
||||||
@@ -160,6 +160,34 @@ def blackjackContinue(channel):
|
|||||||
|
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["hit"] = False
|
data["blackjack games"][channel]["user hands"][user]["other hand"]["hit"] = False
|
||||||
|
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["split"] > 1:
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["third hand"]["hit"] == False:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["third hand"]["standing"] = True
|
||||||
|
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["third hand"]["standing"] == False:
|
||||||
|
allStanding = False
|
||||||
|
|
||||||
|
if calcHandValue(data["blackjack games"][channel]["user hands"][user]["third hand"]["hand"]) >= 21 or data["blackjack games"][channel]["user hands"][user]["third hand"]["doubled"]:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["third hand"]["standing"] = True
|
||||||
|
else:
|
||||||
|
preAllStanding = False
|
||||||
|
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["third hand"]["hit"] = False
|
||||||
|
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["split"] > 2:
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["fourth hand"]["hit"] == False:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["fourth hand"]["standing"] = True
|
||||||
|
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["fourth hand"]["standing"] == False:
|
||||||
|
allStanding = False
|
||||||
|
|
||||||
|
if calcHandValue(data["blackjack games"][channel]["user hands"][user]["fourth hand"]["hand"]) >= 21 or data["blackjack games"][channel]["user hands"][user]["fourth hand"]["doubled"]:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["fourth hand"]["standing"] = True
|
||||||
|
else:
|
||||||
|
preAllStanding = False
|
||||||
|
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["fourth hand"]["hit"] = False
|
||||||
|
|
||||||
if allStanding:
|
if allStanding:
|
||||||
data["blackjack games"][channel]["all standing"] = True
|
data["blackjack games"][channel]["all standing"] = True
|
||||||
with open("resources/games/games.json", "w") as f:
|
with open("resources/games/games.json", "w") as f:
|
||||||
@@ -190,17 +218,19 @@ def blackjackHit(channel,user,handNumber = 0):
|
|||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
if user in data["blackjack games"][channel]["user hands"]:
|
if user in data["blackjack games"][channel]["user hands"]:
|
||||||
if data["blackjack games"][channel]["user hands"][user]["split"] == False:
|
if data["blackjack games"][channel]["user hands"][user]["split"] == 0:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
otherHand = False
|
handNumber = 0
|
||||||
else:
|
else:
|
||||||
if handNumber != 0:
|
if handNumber != 0:
|
||||||
if handNumber == 1:
|
if handNumber == 1:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
otherHand = False
|
|
||||||
elif handNumber == 2:
|
elif handNumber == 2:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
hand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
||||||
otherHand = True
|
elif handNumber == 3:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["third hand"]
|
||||||
|
elif handNumber == 4:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["fourth hand"]
|
||||||
else:
|
else:
|
||||||
logThis(user+" tried to hit without specifying which hand")
|
logThis(user+" tried to hit without specifying which hand")
|
||||||
return "You have to specify the hand you're hitting with."
|
return "You have to specify the hand you're hitting with."
|
||||||
@@ -219,8 +249,12 @@ def blackjackHit(channel,user,handNumber = 0):
|
|||||||
if handValue > 21:
|
if handValue > 21:
|
||||||
hand["busted"] = True
|
hand["busted"] = True
|
||||||
|
|
||||||
if otherHand:
|
if handNumber == 2:
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"] = hand
|
data["blackjack games"][channel]["user hands"][user]["other hand"] = hand
|
||||||
|
elif handNumber == 3:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["third hand"] = hand
|
||||||
|
elif handNumber == 4:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["fourth hand"] = hand
|
||||||
else:
|
else:
|
||||||
data["blackjack games"][channel]["user hands"][user] = hand
|
data["blackjack games"][channel]["user hands"][user] = hand
|
||||||
|
|
||||||
@@ -234,10 +268,18 @@ def blackjackHit(channel,user,handNumber = 0):
|
|||||||
if person["hit"] == False and person["standing"] == False:
|
if person["hit"] == False and person["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
if person["split"]:
|
if person["split"] > 0:
|
||||||
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 1:
|
||||||
|
if person["third hand"]["hit"] == False and person["third hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 2:
|
||||||
|
if person["fourth hand"]["hit"] == False and person["fourth hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
return response + str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
return response + str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
||||||
else:
|
else:
|
||||||
logThis(user+" is already standing")
|
logThis(user+" is already standing")
|
||||||
@@ -258,31 +300,31 @@ def blackjackDouble(channel,user,handNumber = 0):
|
|||||||
with open("resources/games/games.json", "r") as f:
|
with open("resources/games/games.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
if data["blackjack games"][channel]["user hands"][user]["split"] == False:
|
if data["blackjack games"][channel]["user hands"][user]["split"] == 0:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
otherHand = False
|
handNumber = 0
|
||||||
correctRound = 1
|
|
||||||
else:
|
else:
|
||||||
if handNumber != 0:
|
if handNumber != 0:
|
||||||
if handNumber == 1:
|
if handNumber == 1:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
otherHand = False
|
|
||||||
elif handNumber == 2:
|
elif handNumber == 2:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
hand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
||||||
otherHand = True
|
elif handNumber == 3:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["third hand"]
|
||||||
|
elif handNumber == 3:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["fourth hand"]
|
||||||
else:
|
else:
|
||||||
logThis(user+" tried to double without specifying which hand")
|
logThis(user+" tried to double without specifying which hand")
|
||||||
return "You have to specify the hand you're doubling down.",""
|
return "You have to specify the hand you're doubling down.",""
|
||||||
else:
|
else:
|
||||||
logThis(user+" tried to double without specifying which hand")
|
logThis(user+" tried to double without specifying which hand")
|
||||||
return "You have to specify the hand you're doubling down.",""
|
return "You have to specify the hand you're doubling down.",""
|
||||||
correctRound = 2
|
|
||||||
|
|
||||||
|
|
||||||
if data["blackjack games"][channel]["round"] > 0:
|
if data["blackjack games"][channel]["round"] > 0:
|
||||||
if hand["hit"] == False:
|
if hand["hit"] == False:
|
||||||
if hand["standing"] == False:
|
if hand["standing"] == False:
|
||||||
if data["blackjack games"][channel]["round"] == correctRound:
|
if len(hand["hand"]) == 2:
|
||||||
bet = hand["bet"]
|
bet = hand["bet"]
|
||||||
if money.checkBalance(user) >= bet:
|
if money.checkBalance(user) >= bet:
|
||||||
money.addMoney(user,-1 * bet)
|
money.addMoney(user,-1 * bet)
|
||||||
@@ -300,8 +342,12 @@ def blackjackDouble(channel,user,handNumber = 0):
|
|||||||
if handValue > 21:
|
if handValue > 21:
|
||||||
hand["busted"] = True
|
hand["busted"] = True
|
||||||
|
|
||||||
if otherHand:
|
if handNumber == 2:
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"] = hand
|
data["blackjack games"][channel]["user hands"][user]["other hand"] = hand
|
||||||
|
elif handNumber == 3:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["third hand"] = hand
|
||||||
|
elif handNumber == 4:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["fourth hand"] = hand
|
||||||
else:
|
else:
|
||||||
data["blackjack games"][channel]["user hands"][user] = hand
|
data["blackjack games"][channel]["user hands"][user] = hand
|
||||||
|
|
||||||
@@ -314,10 +360,18 @@ def blackjackDouble(channel,user,handNumber = 0):
|
|||||||
if person["hit"] == False and person["standing"] == False:
|
if person["hit"] == False and person["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
if person["split"]:
|
if person["split"] > 0:
|
||||||
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 1:
|
||||||
|
if person["third hand"]["hit"] == False and person["third hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 2:
|
||||||
|
if person["fourth hand"]["hit"] == False and person["fourth hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
|
|
||||||
return "Adding another "+str(bet)+" GwendoBucks to "+user+"'s bet and drawing another card.",str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
return "Adding another "+str(bet)+" GwendoBucks to "+user+"'s bet and drawing another card.",str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
||||||
else:
|
else:
|
||||||
@@ -342,17 +396,19 @@ def blackjackStand(channel,user,handNumber = 0):
|
|||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
if user in data["blackjack games"][channel]["user hands"]:
|
if user in data["blackjack games"][channel]["user hands"]:
|
||||||
if data["blackjack games"][channel]["user hands"][user]["split"] == False:
|
if data["blackjack games"][channel]["user hands"][user]["split"] == 0:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
otherHand = False
|
handNumber = 0
|
||||||
else:
|
else:
|
||||||
if handNumber != 0:
|
if handNumber != 0:
|
||||||
if handNumber == 1:
|
if handNumber == 1:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
otherHand = False
|
|
||||||
elif handNumber == 2:
|
elif handNumber == 2:
|
||||||
hand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
hand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
||||||
otherHand = True
|
elif handNumber == 3:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["third hand"]
|
||||||
|
elif handNumber == 4:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["fourth hand"]
|
||||||
else:
|
else:
|
||||||
logThis(user+" tried to hit without specifying which hand")
|
logThis(user+" tried to hit without specifying which hand")
|
||||||
return "You have to specify the hand you're hitting with."
|
return "You have to specify the hand you're hitting with."
|
||||||
@@ -374,10 +430,18 @@ def blackjackStand(channel,user,handNumber = 0):
|
|||||||
if person["hit"] == False and person["standing"] == False:
|
if person["hit"] == False and person["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
if person["split"]:
|
if person["split"] > 0:
|
||||||
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 1:
|
||||||
|
if person["third hand"]["hit"] == False and person["third hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 2:
|
||||||
|
if person["fourth hand"]["hit"] == False and person["fourth hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
return response + str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
return response + str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
||||||
else:
|
else:
|
||||||
logThis(user+" is already standing")
|
logThis(user+" is already standing")
|
||||||
@@ -393,46 +457,92 @@ def blackjackStand(channel,user,handNumber = 0):
|
|||||||
return "You have to enter the game before you can stand"
|
return "You have to enter the game before you can stand"
|
||||||
|
|
||||||
# When players try to split
|
# When players try to split
|
||||||
def blackjackSplit(channel,user):
|
def blackjackSplit(channel,user,handNumber = 0):
|
||||||
with open("resources/games/games.json", "r") as f:
|
with open("resources/games/games.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
if data["blackjack games"][channel]["round"] > 0:
|
if data["blackjack games"][channel]["user hands"][user]["split"] == 0:
|
||||||
if data["blackjack games"][channel]["user hands"][user]["hit"] == False:
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
if data["blackjack games"][channel]["user hands"][user]["standing"] == False:
|
newHand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
||||||
if data["blackjack games"][channel]["round"] == 1:
|
handNumber = 0
|
||||||
firstCard = calcHandValue([data["blackjack games"][channel]["user hands"][user]["hand"][0]])
|
otherHand = 2
|
||||||
secondCard = calcHandValue([data["blackjack games"][channel]["user hands"][user]["hand"][1]])
|
else:
|
||||||
|
if handNumber != 0:
|
||||||
|
if handNumber == 1:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]
|
||||||
|
elif handNumber == 2:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["other hand"]
|
||||||
|
elif handNumber == 3:
|
||||||
|
hand = data["blackjack games"][channel]["user hands"][user]["third hand"]
|
||||||
|
else:
|
||||||
|
logThis(user+" tried to hit without specifying which hand")
|
||||||
|
return "You have to specify the hand you're hitting with."
|
||||||
|
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["split"] == 1:
|
||||||
|
newHand = data["blackjack games"][channel]["user hands"][user]["third hand"]
|
||||||
|
otherHand = 3
|
||||||
|
else:
|
||||||
|
newHand = data["blackjack games"][channel]["user hands"][user]["fourth hand"]
|
||||||
|
otherHand = 4
|
||||||
|
else:
|
||||||
|
logThis(user+" tried to split without specifying which hand")
|
||||||
|
return "You have to specify the hand you're splitting.",""
|
||||||
|
|
||||||
|
if data["blackjack games"][channel]["user hands"][user]["split"] < 3:
|
||||||
|
if data["blackjack games"][channel]["round"] != 0:
|
||||||
|
if hand["hit"] == False:
|
||||||
|
if hand["standing"] == False:
|
||||||
|
if len(hand["hand"]) == 2:
|
||||||
|
firstCard = calcHandValue([hand["hand"][0]])
|
||||||
|
secondCard = calcHandValue([hand["hand"][1]])
|
||||||
if firstCard == secondCard:
|
if firstCard == secondCard:
|
||||||
bet = data["blackjack games"][channel]["user hands"][user]["bet"]
|
bet = hand["bet"]
|
||||||
if money.checkBalance(user) >= bet:
|
if money.checkBalance(user) >= bet:
|
||||||
money.addMoney(user,-1 * bet)
|
money.addMoney(user,-1 * bet)
|
||||||
with open("resources/games/games.json", "r") as f:
|
with open("resources/games/games.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
|
|
||||||
data["blackjack games"][channel]["user hands"][user]["hit"] = True
|
hand["hit"] = True
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["hit"] = True
|
newHand["hit"] = True
|
||||||
data["blackjack games"][channel]["user hands"][user]["split"] = True
|
|
||||||
|
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"] = data["blackjack games"][channel]["user hands"][user]["bet"]
|
newHand = {
|
||||||
|
"hand":[],"bet":0,"standing":False,"busted":False,
|
||||||
|
"blackjack":False,"hit":True,"doubled":False}
|
||||||
|
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["hand"].append(data["blackjack games"][channel]["user hands"][user]["hand"].pop(1))
|
newHand["bet"] = hand["bet"]
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["hand"].append(drawCard(channel))
|
|
||||||
data["blackjack games"][channel]["user hands"][user]["hand"].append(drawCard(channel))
|
|
||||||
|
|
||||||
handValue = calcHandValue(data["blackjack games"][channel]["user hands"][user]["hand"])
|
newHand["hand"].append(hand["hand"].pop(1))
|
||||||
otherHandValue = calcHandValue(data["blackjack games"][channel]["user hands"][user]["other hand"]["hand"])
|
newHand["hand"].append(drawCard(channel))
|
||||||
|
hand["hand"].append(drawCard(channel))
|
||||||
|
|
||||||
|
handValue = calcHandValue(hand["hand"])
|
||||||
|
otherHandValue = calcHandValue(newHand["hand"])
|
||||||
if handValue > 21:
|
if handValue > 21:
|
||||||
data["blackjack games"][channel]["user hands"][user]["busted"] = True
|
hand["busted"] = True
|
||||||
elif handValue == 21:
|
elif handValue == 21:
|
||||||
data["blackjack games"][channel]["user hands"][user]["blackjack"] = True
|
hand["blackjack"] = True
|
||||||
|
|
||||||
if otherHandValue > 21:
|
if otherHandValue > 21:
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["busted"] = True
|
newHand["busted"] = True
|
||||||
elif otherHandValue == 21:
|
elif otherHandValue == 21:
|
||||||
data["blackjack games"][channel]["user hands"][user]["other hand"]["blackjack"] = True
|
newHand["blackjack"] = True
|
||||||
|
|
||||||
|
if handNumber == 2:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["other hand"] = hand
|
||||||
|
elif handNumber == 3:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["third hand"] = hand
|
||||||
|
else:
|
||||||
|
data["blackjack games"][channel]["user hands"][user] = hand
|
||||||
|
|
||||||
|
if otherHand == 3:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["third hand"] = newHand
|
||||||
|
elif otherHand == 4:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["fourth hand"] = newHand
|
||||||
|
else:
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["other hand"] = newHand
|
||||||
|
|
||||||
|
data["blackjack games"][channel]["user hands"][user]["split"] += 1
|
||||||
|
|
||||||
with open("resources/games/games.json", "w") as f:
|
with open("resources/games/games.json", "w") as f:
|
||||||
json.dump(data,f,indent=4)
|
json.dump(data,f,indent=4)
|
||||||
@@ -443,10 +553,18 @@ def blackjackSplit(channel,user):
|
|||||||
if person["hit"] == False and person["standing"] == False:
|
if person["hit"] == False and person["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
if person["split"]:
|
if person["split"] > 0:
|
||||||
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
if person["other hand"]["hit"] == False and person["other hand"]["standing"] == False:
|
||||||
roundDone = False
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 1:
|
||||||
|
if person["third hand"]["hit"] == False and person["third hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
|
if person["split"] > 2:
|
||||||
|
if person["fourth hand"]["hit"] == False and person["fourth hand"]["standing"] == False:
|
||||||
|
roundDone = False
|
||||||
|
|
||||||
return "Splitting "+user+"'s hand into 2. Adding their original bet to the second hand. You can use \"!Blackjack hit/stand/double 1\" and \"!Blackjack hit/stand/double 2\" to play the different hands.",str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
return "Splitting "+user+"'s hand into 2. Adding their original bet to the second hand. You can use \"!Blackjack hit/stand/double 1\" and \"!Blackjack hit/stand/double 2\" to play the different hands.",str(roundDone)[0] + str(data["blackjack games"][channel]["round"])
|
||||||
else:
|
else:
|
||||||
logThis(user+" doesn't have enough GwendoBucks")
|
logThis(user+" doesn't have enough GwendoBucks")
|
||||||
@@ -455,7 +573,7 @@ def blackjackSplit(channel,user):
|
|||||||
logThis(user+" tried to split 2 different cards")
|
logThis(user+" tried to split 2 different cards")
|
||||||
return "Your cards need to have the same value to split",""
|
return "Your cards need to have the same value to split",""
|
||||||
else:
|
else:
|
||||||
logThis(user+" tried to split on round "+data["blackjack games"][channel]["round"])
|
logThis(user+" tried to split later than they could")
|
||||||
return "You can only split on the first round",""
|
return "You can only split on the first round",""
|
||||||
else:
|
else:
|
||||||
logThis(user+" is already standing")
|
logThis(user+" is already standing")
|
||||||
@@ -466,6 +584,9 @@ def blackjackSplit(channel,user):
|
|||||||
else:
|
else:
|
||||||
logThis(user+" tried to split on the 0th round")
|
logThis(user+" tried to split on the 0th round")
|
||||||
return "You can't split before you see your cards",""
|
return "You can't split before you see your cards",""
|
||||||
|
else:
|
||||||
|
logThis(user+" tried to split more than three times")
|
||||||
|
return "You can only split 3 times",""
|
||||||
|
|
||||||
# Player enters the game and draws a hand
|
# Player enters the game and draws a hand
|
||||||
def blackjackPlayerDrawHand(channel,user,bet):
|
def blackjackPlayerDrawHand(channel,user,bet):
|
||||||
@@ -491,15 +612,11 @@ def blackjackPlayerDrawHand(channel,user,bet):
|
|||||||
if handValue == 21:
|
if handValue == 21:
|
||||||
data["blackjack games"][channel]["user hands"][user] = {"hand":playerHand,
|
data["blackjack games"][channel]["user hands"][user] = {"hand":playerHand,
|
||||||
"bet":bet,"standing":False,"busted":False,"blackjack":True,"hit":True,
|
"bet":bet,"standing":False,"busted":False,"blackjack":True,"hit":True,
|
||||||
"doubled":False,"split":False,"other hand":{
|
"doubled":False,"split":0,"other hand":{},"third hand":{},"fourth hand":{}}
|
||||||
"hand":[],"bet":0,"standing":False,"busted":False,"blackjack":False,"hit":True,
|
|
||||||
"doubled":False}}
|
|
||||||
else:
|
else:
|
||||||
data["blackjack games"][channel]["user hands"][user] = {"hand":playerHand,
|
data["blackjack games"][channel]["user hands"][user] = {"hand":playerHand,
|
||||||
"bet":bet,"standing":False,"busted":False,"blackjack":False,"hit":True,
|
"bet":bet,"standing":False,"busted":False,"blackjack":False,"hit":True,
|
||||||
"doubled":False,"split":False,"other hand":{
|
"doubled":False,"split":0,"other hand":{},"third hand":{},"fourth hand":{}}
|
||||||
"hand":[],"bet":0,"standing":False,"busted":False,"blackjack":False,"hit":True,
|
|
||||||
"doubled":False}}
|
|
||||||
|
|
||||||
with open("resources/games/games.json", "w") as f:
|
with open("resources/games/games.json", "w") as f:
|
||||||
json.dump(data,f,indent=4)
|
json.dump(data,f,indent=4)
|
||||||
@@ -560,54 +677,16 @@ def blackjackFinish(channel):
|
|||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
dealerValue = calcHandValue(data["blackjack games"][channel]["dealer hand"])
|
dealerValue = calcHandValue(data["blackjack games"][channel]["dealer hand"])
|
||||||
reason = ""
|
dealerBlackjack = data["blackjack games"][channel]["dealer blackjack"]
|
||||||
|
dealerBusted = data["blackjack games"][channel]["dealer busted"]
|
||||||
|
|
||||||
|
try:
|
||||||
for user in data["blackjack games"][channel]["user hands"]:
|
for user in data["blackjack games"][channel]["user hands"]:
|
||||||
winnings = -1 * data["blackjack games"][channel]["user hands"][user]["bet"]
|
|
||||||
if data["blackjack games"][channel]["user hands"][user]["blackjack"] and data["blackjack games"][channel]["dealer blackjack"] == False:
|
|
||||||
reason = "(blackjack)"
|
|
||||||
winnings += math.floor(2.5 * data["blackjack games"][channel]["user hands"][user]["bet"])
|
|
||||||
elif data["blackjack games"][channel]["dealer blackjack"]:
|
|
||||||
reason += "(dealer blackjack)"
|
|
||||||
elif data["blackjack games"][channel]["user hands"][user]["busted"]:
|
|
||||||
reason = "(busted)"
|
|
||||||
else:
|
|
||||||
if data["blackjack games"][channel]["dealer busted"]:
|
|
||||||
reason = "(dealer busted)"
|
|
||||||
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["bet"]
|
|
||||||
elif calcHandValue(data["blackjack games"][channel]["user hands"][user]["hand"]) > dealerValue:
|
|
||||||
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["bet"]
|
|
||||||
reason = "(highest value)"
|
|
||||||
elif calcHandValue(data["blackjack games"][channel]["user hands"][user]["hand"]) == dealerValue:
|
|
||||||
reason = "(pushed)"
|
|
||||||
winnings += data["blackjack games"][channel]["user hands"][user]["bet"]
|
|
||||||
else:
|
|
||||||
reason = "(highest value)"
|
|
||||||
|
|
||||||
|
|
||||||
if data["blackjack games"][channel]["user hands"][user]["split"]:
|
|
||||||
winnings -= data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
|
||||||
if data["blackjack games"][channel]["user hands"][user]["other hand"]["blackjack"] and data["blackjack games"][channel]["dealer blackjack"] == False:
|
|
||||||
reason += "(blackjack)"
|
|
||||||
winnings += math.floor(2.5 * data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"])
|
|
||||||
elif data["blackjack games"][channel]["dealer blackjack"]:
|
|
||||||
reason += "(dealer blackjack)"
|
|
||||||
elif data["blackjack games"][channel]["user hands"][user]["other hand"]["busted"]:
|
|
||||||
reason += "(busted)"
|
|
||||||
else:
|
|
||||||
if data["blackjack games"][channel]["dealer busted"]:
|
|
||||||
reason += "(dealer busted)"
|
|
||||||
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
|
||||||
elif calcHandValue(data["blackjack games"][channel]["user hands"][user]["other hand"]["hand"]) > dealerValue:
|
|
||||||
reason += "(highest value)"
|
|
||||||
winnings += 2 * data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
|
||||||
elif calcHandValue(data["blackjack games"][channel]["user hands"][user]["other hand"]["hand"]) == dealerValue:
|
|
||||||
reason += "(pushed)"
|
|
||||||
winnings += data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
|
||||||
else:
|
|
||||||
reason += "(highest value)"
|
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
winnings, netWinnings, reason = calcWinnings(data["blackjack games"][channel]["user hands"][user],dealerValue,True,dealerBlackjack,dealerBusted)
|
||||||
|
except:
|
||||||
|
logThis("Error calculating winnings for "+str(user)+" (error code 1312)")
|
||||||
|
|
||||||
if winnings < 0:
|
if winnings < 0:
|
||||||
if winnings == -1:
|
if winnings == -1:
|
||||||
@@ -620,10 +699,11 @@ def blackjackFinish(channel):
|
|||||||
else:
|
else:
|
||||||
finalWinnings += user+" won "+str(winnings)+" GwendoBucks "+reason+"\n"
|
finalWinnings += user+" won "+str(winnings)+" GwendoBucks "+reason+"\n"
|
||||||
|
|
||||||
netWinnings = winnings + data["blackjack games"][channel]["user hands"][user]["bet"] + data["blackjack games"][channel]["user hands"][user]["other hand"]["bet"]
|
|
||||||
|
|
||||||
money.addMoney(user,netWinnings)
|
money.addMoney(user,netWinnings)
|
||||||
|
|
||||||
|
except:
|
||||||
|
logThis("Error calculating winnings (error code 1311)")
|
||||||
|
|
||||||
with open("resources/games/games.json", "r") as f:
|
with open("resources/games/games.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
@@ -633,3 +713,56 @@ def blackjackFinish(channel):
|
|||||||
json.dump(data,f,indent=4)
|
json.dump(data,f,indent=4)
|
||||||
|
|
||||||
return finalWinnings
|
return finalWinnings
|
||||||
|
|
||||||
|
|
||||||
|
def calcWinnings(hand, dealerValue, topLevel, dealerBlackjack, dealerBusted):
|
||||||
|
logThis("Calculating winnings")
|
||||||
|
reason = ""
|
||||||
|
bet = hand["bet"]
|
||||||
|
winnings = -1 * bet
|
||||||
|
netWinnings = 0
|
||||||
|
handValue = calcHandValue(hand["hand"])
|
||||||
|
|
||||||
|
if hand["blackjack"] and dealerBlackjack == False:
|
||||||
|
reason += "(blackjack)"
|
||||||
|
winnings += math.floor(2.5 * bet)
|
||||||
|
netWinnings += math.floor(2.5 * bet)
|
||||||
|
elif dealerBlackjack:
|
||||||
|
reason += "(dealer blackjack)"
|
||||||
|
elif hand["busted"]:
|
||||||
|
reason += "(busted)"
|
||||||
|
else:
|
||||||
|
if dealerBusted:
|
||||||
|
reason = "(dealer busted)"
|
||||||
|
winnings += 2 * bet
|
||||||
|
netWinnings += 2 * bet
|
||||||
|
elif handValue > dealerValue:
|
||||||
|
winnings += 2 * bet
|
||||||
|
netWinnings += 2 * bet
|
||||||
|
reason = "(highest value)"
|
||||||
|
elif handValue == dealerValue:
|
||||||
|
reason = "(pushed)"
|
||||||
|
winnings += bet
|
||||||
|
netWinnings += bet
|
||||||
|
else:
|
||||||
|
reason = "(highest value)"
|
||||||
|
|
||||||
|
|
||||||
|
if topLevel:
|
||||||
|
if hand["split"] >= 1:
|
||||||
|
winningsTemp, netWinningsTemp, reasonTemp = calcWinnings(hand["other hand"],dealerValue,False,dealerBlackjack,dealerBusted)
|
||||||
|
winnings += winningsTemp
|
||||||
|
netWinnings += netWinningsTemp
|
||||||
|
reason += reasonTemp
|
||||||
|
if hand["split"] >= 2:
|
||||||
|
winningsTemp, netWinningsTemp, reasonTemp = calcWinnings(hand["third hand"],dealerValue,False,dealerBlackjack,dealerBusted)
|
||||||
|
winnings += winningsTemp
|
||||||
|
netWinnings += netWinningsTemp
|
||||||
|
reason += reasonTemp
|
||||||
|
if hand["split"] >= 3:
|
||||||
|
winningsTemp, netWinningsTemp, reasonTemp = calcWinnings(hand["fourth hand"],dealerValue,False,dealerBlackjack,dealerBusted)
|
||||||
|
winnings += winningsTemp
|
||||||
|
netWinnings += netWinningsTemp
|
||||||
|
reason += reasonTemp
|
||||||
|
|
||||||
|
return winnings, netWinnings, reason
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import json, random
|
import json
|
||||||
|
|
||||||
from PIL import Image, ImageDraw, ImageFont
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
|
||||||
@@ -33,7 +33,21 @@ def drawImage(channel):
|
|||||||
key, value = list(hands.items())[x]
|
key, value = list(hands.items())[x]
|
||||||
userHand = drawHand(value["hand"],False,value["busted"],value["blackjack"])
|
userHand = drawHand(value["hand"],False,value["busted"],value["blackjack"])
|
||||||
|
|
||||||
if value["split"]:
|
if value["split"] == 3:
|
||||||
|
table.paste(userHand,(32-borderSmol+(384*placement[x]),280-borderSmol),userHand)
|
||||||
|
userOtherHand = drawHand(value["other hand"]["hand"],False,value["other hand"]["busted"],value["other hand"]["blackjack"])
|
||||||
|
table.paste(userOtherHand,(32-borderSmol+(384*placement[x]),420-borderSmol),userOtherHand)
|
||||||
|
userThirdHand = drawHand(value["third hand"]["hand"],False,value["third hand"]["busted"],value["third hand"]["blackjack"])
|
||||||
|
table.paste(userThirdHand,(32-borderSmol+(384*placement[x]),560-borderSmol),userOtherHand)
|
||||||
|
userFourthHand = drawHand(value["fourth hand"]["hand"],False,value["fourth hand"]["busted"],value["fourth hand"]["blackjack"])
|
||||||
|
table.paste(userFourthHand,(32-borderSmol+(384*placement[x]),700-borderSmol),userOtherHand)
|
||||||
|
elif value["split"] == 2:
|
||||||
|
table.paste(userHand,(32-borderSmol+(384*placement[x]),420-borderSmol),userHand)
|
||||||
|
userOtherHand = drawHand(value["other hand"]["hand"],False,value["other hand"]["busted"],value["other hand"]["blackjack"])
|
||||||
|
table.paste(userOtherHand,(32-borderSmol+(384*placement[x]),560-borderSmol),userOtherHand)
|
||||||
|
userThirdHand = drawHand(value["third hand"]["hand"],False,value["third hand"]["busted"],value["third hand"]["blackjack"])
|
||||||
|
table.paste(userThirdHand,(32-borderSmol+(384*placement[x]),700-borderSmol),userOtherHand)
|
||||||
|
elif value["split"] == 1:
|
||||||
table.paste(userHand,(32-borderSmol+(384*placement[x]),560-borderSmol),userHand)
|
table.paste(userHand,(32-borderSmol+(384*placement[x]),560-borderSmol),userHand)
|
||||||
userOtherHand = drawHand(value["other hand"]["hand"],False,value["other hand"]["busted"],value["other hand"]["blackjack"])
|
userOtherHand = drawHand(value["other hand"]["hand"],False,value["other hand"]["busted"],value["other hand"]["blackjack"])
|
||||||
table.paste(userOtherHand,(32-borderSmol+(384*placement[x]),700-borderSmol),userOtherHand)
|
table.paste(userOtherHand,(32-borderSmol+(384*placement[x]),700-borderSmol),userOtherHand)
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
|
"""Gwendolyn functions for looking things up."""
|
||||||
|
|
||||||
|
__all__ = ["spellFunc", "monsterFunc"]
|
||||||
|
|
||||||
from .lookupFuncs import spellFunc, monsterFunc
|
from .lookupFuncs import spellFunc, monsterFunc
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import math
|
import math
|
||||||
import discord
|
#import discord
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from funcs import cap, logThis
|
from funcs import cap, logThis
|
||||||
@@ -24,9 +24,9 @@ def monsterFunc(command):
|
|||||||
return("I don't know that monster... (error code 601)","","","","","")
|
return("I don't know that monster... (error code 601)","","","","","")
|
||||||
else:
|
else:
|
||||||
# Opens "mensters.json"
|
# Opens "mensters.json"
|
||||||
data = json.load(open('resources/monsters.json', encoding = "utf8"))
|
data = json.load(open('resources/lookup/monsters.json', encoding = "utf8"))
|
||||||
for monster in data:
|
for monster in data:
|
||||||
if str(command) == monster["name"]:
|
if "name" in monster and str(command) == monster["name"]:
|
||||||
logThis("Found it!")
|
logThis("Found it!")
|
||||||
|
|
||||||
# Looks at the information about the monster and returns that information
|
# Looks at the information about the monster and returns that information
|
||||||
@@ -125,7 +125,7 @@ def spellFunc(command):
|
|||||||
logThis("Looking up "+command)
|
logThis("Looking up "+command)
|
||||||
|
|
||||||
# Opens "spells.json"
|
# Opens "spells.json"
|
||||||
data = json.load(open('resources/spells.json', encoding = "utf8"))
|
data = json.load(open('resources/lookup/spells.json', encoding = "utf8"))
|
||||||
if str(command) in data:
|
if str(command) in data:
|
||||||
logThis("Returning spell information")
|
logThis("Returning spell information")
|
||||||
spell_output = ("***"+str(command)+"***\n*"+str(data[str(command)]["level"])+" level "+str(data[str(command)]["school"])+"\nCasting Time: "+str(data[str(command)]["casting_time"])+"\nRange: "+str(data[str(command)]["range"])+"\nComponents: "+str(data[str(command)]["components"])+"\nDuration: "+str(data[str(command)]["duration"])+"*\n \n"+str(data[str(command)]["description"]))
|
spell_output = ("***"+str(command)+"***\n*"+str(data[str(command)]["level"])+" level "+str(data[str(command)]["school"])+"\nCasting Time: "+str(data[str(command)]["casting_time"])+"\nRange: "+str(data[str(command)]["range"])+"\nComponents: "+str(data[str(command)]["components"])+"\nDuration: "+str(data[str(command)]["duration"])+"*\n \n"+str(data[str(command)]["description"]))
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
import lxml.etree # Used by imageFunc
|
import lxml.etree # Used by imageFunc
|
||||||
import re # Used by roll_dice
|
|
||||||
import datetime # Used by helloFunc
|
import datetime # Used by helloFunc
|
||||||
import json # Used by spellFunc
|
import json # Used by spellFunc
|
||||||
#import random # Used by imageFunc
|
import random # Used by imageFunc
|
||||||
import urllib # Used by imageFunc
|
import urllib # Used by imageFunc
|
||||||
import imdb # Used by movieFunc
|
|
||||||
import time # Used for logging
|
import time # Used for logging
|
||||||
import logging # Used for... you know... logging
|
import logging # Used for... you know... logging
|
||||||
import wikia # Used by findWikiPage
|
import wikia # Used by findWikiPage
|
||||||
import os
|
import os # Used by makeFiles
|
||||||
|
|
||||||
from .roll import dice
|
|
||||||
|
|
||||||
logging.basicConfig(filename="gwendolyn.log", level=logging.INFO)
|
logging.basicConfig(filename="gwendolyn.log", level=logging.INFO)
|
||||||
|
|
||||||
@@ -54,6 +50,7 @@ def helloFunc(author):
|
|||||||
# Finds a random picture online
|
# Finds a random picture online
|
||||||
def imageFunc():
|
def imageFunc():
|
||||||
# Picks a type of camera, which decides the naming scheme
|
# Picks a type of camera, which decides the naming scheme
|
||||||
|
try:
|
||||||
cams = ("one","two","three","four")
|
cams = ("one","two","three","four")
|
||||||
cam = random.choice(cams)
|
cam = random.choice(cams)
|
||||||
logThis("Chose cam type "+cam)
|
logThis("Chose cam type "+cam)
|
||||||
@@ -77,6 +74,8 @@ def imageFunc():
|
|||||||
c = str(random.randint(0,9))
|
c = str(random.randint(0,9))
|
||||||
d = str(random.randint(0,9))
|
d = str(random.randint(0,9))
|
||||||
search = ("DSC_"+a+b+c+d)
|
search = ("DSC_"+a+b+c+d)
|
||||||
|
except:
|
||||||
|
logThis("error picking camera type (error code 702)")
|
||||||
|
|
||||||
logThis("Searching for "+search)
|
logThis("Searching for "+search)
|
||||||
|
|
||||||
@@ -138,11 +137,11 @@ def findWikiPage(search : str):
|
|||||||
def makeFiles():
|
def makeFiles():
|
||||||
# Creates swcharacters.json if it doesn't exist
|
# Creates swcharacters.json if it doesn't exist
|
||||||
try:
|
try:
|
||||||
f = open("resources/swcharacters.json","r")
|
f = open("resources/starWars/swcharacters.json","r")
|
||||||
except:
|
except:
|
||||||
logThis("swcharacters.json didn't exist. Making it now.")
|
logThis("swcharacters.json didn't exist. Making it now.")
|
||||||
emptyDict = {}
|
emptyDict = {}
|
||||||
with open("resources/swcharacters.json","w") as f:
|
with open("resources/starWars/swcharacters.json","w") as f:
|
||||||
json.dump(emptyDict,f,indent = 4)
|
json.dump(emptyDict,f,indent = 4)
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
@@ -158,17 +157,60 @@ def makeFiles():
|
|||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
# Creates monsters.json if it doesn't exist
|
||||||
|
try:
|
||||||
|
f = open("resources/lookup/monsters.json","r")
|
||||||
|
except:
|
||||||
|
logThis("monsters.json didn't exist. Making it now.")
|
||||||
|
with open("resources/lookup/lookupExamples.json") as f:
|
||||||
|
data = json.load(f)["monster"]
|
||||||
|
with open("resources/lookup/monsters.json","w") as f:
|
||||||
|
json.dump(data,f,indent = 4)
|
||||||
|
finally:
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# Creates spells.json if it doesn't exist
|
||||||
|
try:
|
||||||
|
f = open("resources/lookup/spells.json","r")
|
||||||
|
except:
|
||||||
|
logThis("spells.json didn't exist. Making it now.")
|
||||||
|
with open("resources/lookup/lookupExamples.json") as f:
|
||||||
|
data = json.load(f)["spell"]
|
||||||
|
with open("resources/lookup/spells.json","w") as f:
|
||||||
|
json.dump(data,f,indent = 4)
|
||||||
|
finally:
|
||||||
|
f.close()
|
||||||
|
|
||||||
# Creates destinyPoints.txt if it doesn't exist
|
# Creates destinyPoints.txt if it doesn't exist
|
||||||
try:
|
try:
|
||||||
f = open("resources/destinyPoints.txt","r")
|
f = open("resources/starWars/destinyPoints.txt","r")
|
||||||
except:
|
except:
|
||||||
logThis("destinyPoints.txt didn't exist. Making it now.")
|
logThis("destinyPoints.txt didn't exist. Making it now.")
|
||||||
with open("resources/destinyPoints.txt","w") as f:
|
with open("resources/starWars/destinyPoints.txt","w") as f:
|
||||||
f.write("")
|
f.write("")
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
# Creates movies.txt if it doesn't exist
|
||||||
|
try:
|
||||||
|
f = open("resources/movies.txt","r")
|
||||||
|
except:
|
||||||
|
logThis("movies.txt didn't exist. Making it now.")
|
||||||
|
with open("resources/movies.txt","w") as f:
|
||||||
|
f.write("The Room")
|
||||||
|
finally:
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# Creates names.txt if it doesn't exist
|
||||||
|
try:
|
||||||
|
f = open("resources/names.txt","r")
|
||||||
|
except:
|
||||||
|
logThis("names.txt didn't exist. Making it now.")
|
||||||
|
with open("resources/names.txt","w") as f:
|
||||||
|
f.write("Gandalf")
|
||||||
|
finally:
|
||||||
|
f.close()
|
||||||
|
|
||||||
# Creates token.txt if it doesn't exist
|
# Creates token.txt if it doesn't exist
|
||||||
try:
|
try:
|
||||||
f = open("token.txt","r")
|
f = open("token.txt","r")
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
|
"""Misc. functions for Gwendolyn."""
|
||||||
|
|
||||||
|
__all__ = ["nameGen", "tavernGen", "movieFunc"]
|
||||||
|
|
||||||
from .generators import nameGen, tavernGen
|
from .generators import nameGen, tavernGen
|
||||||
from .movie import movieFunc
|
from .movie import movieFunc
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import numpy as np
|
#import numpy as np
|
||||||
import random
|
import random
|
||||||
|
|
||||||
from funcs import logThis
|
from funcs import logThis
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ def movieFunc():
|
|||||||
movs.close()
|
movs.close()
|
||||||
except:
|
except:
|
||||||
logThis("Problem picking the movie (error code 801)")
|
logThis("Problem picking the movie (error code 801)")
|
||||||
return("error","801","","")
|
return("error","804","","")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
logThis("Searching for "+mov)
|
logThis("Searching for "+mov)
|
||||||
@@ -42,5 +42,5 @@ def movieFunc():
|
|||||||
logThis("Successfully ran !movie")
|
logThis("Successfully ran !movie")
|
||||||
return(movie['title'], movie['plot'][0].split("::")[0], movie['cover url'].replace("150","600").replace("101","404"), pcast[:-2])
|
return(movie['title'], movie['plot'][0].split("::")[0], movie['cover url'].replace("150","600").replace("101","404"), pcast[:-2])
|
||||||
except:
|
except:
|
||||||
logThis("Something bad happened... (error code 800)")
|
logThis("Something bad happened... (error code 801)")
|
||||||
return("error","800","","")
|
return("error","801","","")
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
|
"""I stole this."""
|
||||||
|
|
||||||
|
__all__ = ["roll_dice"]
|
||||||
|
|
||||||
from .dice import roll_dice
|
from .dice import roll_dice
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
"""Functions related to the Star Wars TTRPG."""
|
||||||
|
|
||||||
|
__all__ = ["parseChar", "parseRoll", "critRoll", "parseDestiny"]
|
||||||
|
|
||||||
from .swchar import parseChar
|
from .swchar import parseChar
|
||||||
from .swroll import parseRoll, critRoll
|
from .swroll import parseRoll, critRoll
|
||||||
from .swdestiny import parseDestiny
|
from .swdestiny import parseDestiny
|
||||||
@@ -5,7 +5,7 @@ from funcs import logThis
|
|||||||
|
|
||||||
def getName(user : str):
|
def getName(user : str):
|
||||||
logThis("Getting name for "+user+"'s character")
|
logThis("Getting name for "+user+"'s character")
|
||||||
with open("resources/swcharacters.json", "r") as f:
|
with open("resources/starWars/swcharacters.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
if user in data:
|
if user in data:
|
||||||
@@ -238,7 +238,7 @@ def characterSheet(character : dict):
|
|||||||
return name, text1+text2+"\n\n"+text3+divider+text4+"\n"+divider+text5+text6+text7+text8
|
return name, text1+text2+"\n\n"+text3+divider+text4+"\n"+divider+text5+text6+text7+text8
|
||||||
|
|
||||||
def charData(user : str,cmd : str):
|
def charData(user : str,cmd : str):
|
||||||
with open("resources/swcharacters.json", "r") as f:
|
with open("resources/starWars/swcharacters.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
key = string.capwords(cmd.split(" ")[0])
|
key = string.capwords(cmd.split(" ")[0])
|
||||||
@@ -285,7 +285,7 @@ def charData(user : str,cmd : str):
|
|||||||
cmd[1] = cmd[1][1:]
|
cmd[1] = cmd[1][1:]
|
||||||
logThis("Adding "+cmd[0]+" to "+key)
|
logThis("Adding "+cmd[0]+" to "+key)
|
||||||
data[user][key][cmd[0]] = cmd[1]
|
data[user][key][cmd[0]] = cmd[1]
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return cmd[0]+" added to "+key+" for " + data[user]["Name"]
|
return cmd[0]+" added to "+key+" for " + data[user]["Name"]
|
||||||
|
|
||||||
@@ -299,18 +299,18 @@ def charData(user : str,cmd : str):
|
|||||||
except:
|
except:
|
||||||
logThis("Fucked that up (error code 949)")
|
logThis("Fucked that up (error code 949)")
|
||||||
return "Wrong data type (error code 949)"
|
return "Wrong data type (error code 949)"
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return cmd[0]+" added to "+key+" for " + data[user]["Name"]
|
return cmd[0]+" added to "+key+" for " + data[user]["Name"]
|
||||||
|
|
||||||
elif key == "Weapons":
|
elif key == "Weapons":
|
||||||
with open("resources/swtemplates.json", "r") as f:
|
with open("resources/starWars/swtemplates.json", "r") as f:
|
||||||
templates = json.load(f)
|
templates = json.load(f)
|
||||||
newWeapon = templates["Weapon"]
|
newWeapon = templates["Weapon"]
|
||||||
logThis("Adding "+cmd+" to "+key)
|
logThis("Adding "+cmd+" to "+key)
|
||||||
data[user][key][cmd] = newWeapon
|
data[user][key][cmd] = newWeapon
|
||||||
|
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return cmd+" added to weapons for " + data[user]["Name"]
|
return cmd+" added to weapons for " + data[user]["Name"]
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ def charData(user : str,cmd : str):
|
|||||||
logThis("Trying to remove "+cmd+" from "+key)
|
logThis("Trying to remove "+cmd+" from "+key)
|
||||||
if cmd in data[user][key]:
|
if cmd in data[user][key]:
|
||||||
del data[user][key][cmd]
|
del data[user][key][cmd]
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
logThis("I did that")
|
logThis("I did that")
|
||||||
return cmd+" removed from "+key+" from "+data[user]["Name"]
|
return cmd+" removed from "+key+" from "+data[user]["Name"]
|
||||||
@@ -356,7 +356,7 @@ def charData(user : str,cmd : str):
|
|||||||
|
|
||||||
if type(lookUpResult) is dict:
|
if type(lookUpResult) is dict:
|
||||||
data[user][key] = lookUpResult
|
data[user][key] = lookUpResult
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "Changed " + data[user]["Name"] + "'s " + key
|
return "Changed " + data[user]["Name"] + "'s " + key
|
||||||
else:
|
else:
|
||||||
@@ -383,7 +383,7 @@ def charData(user : str,cmd : str):
|
|||||||
logThis("Adding "+cmd+" to "+key)
|
logThis("Adding "+cmd+" to "+key)
|
||||||
beforeData = data[user][key]
|
beforeData = data[user][key]
|
||||||
data[user][key] = beforeData+ int(cmd)
|
data[user][key] = beforeData+ int(cmd)
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "Added " + cmd + " to " + data[user]["Name"] + "'s " + key
|
return "Added " + cmd + " to " + data[user]["Name"] + "'s " + key
|
||||||
except:
|
except:
|
||||||
@@ -393,7 +393,7 @@ def charData(user : str,cmd : str):
|
|||||||
try:
|
try:
|
||||||
logThis("Adding "+cmd+" to "+key)
|
logThis("Adding "+cmd+" to "+key)
|
||||||
data[user][key].append(cmd)
|
data[user][key].append(cmd)
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "Added " + cmd + " to " + data[user]["Name"] + "'s " + key
|
return "Added " + cmd + " to " + data[user]["Name"] + "'s " + key
|
||||||
except:
|
except:
|
||||||
@@ -417,7 +417,7 @@ def charData(user : str,cmd : str):
|
|||||||
logThis("Subtracting "+cmd+" from "+key)
|
logThis("Subtracting "+cmd+" from "+key)
|
||||||
beforeData = data[user][key]
|
beforeData = data[user][key]
|
||||||
data[user][key] = beforeData - int(cmd)
|
data[user][key] = beforeData - int(cmd)
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "Subtracted " + cmd + " from " + data[user]["Name"] + "'s " + key
|
return "Subtracted " + cmd + " from " + data[user]["Name"] + "'s " + key
|
||||||
except:
|
except:
|
||||||
@@ -432,7 +432,7 @@ def charData(user : str,cmd : str):
|
|||||||
except:
|
except:
|
||||||
logThis("They can only remove stuff that's actually in the list")
|
logThis("They can only remove stuff that's actually in the list")
|
||||||
return "Not in list (error code 944b)"
|
return "Not in list (error code 944b)"
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "Removed " + cmd + " from " + data[user]["Name"] + "'s " + key
|
return "Removed " + cmd + " from " + data[user]["Name"] + "'s " + key
|
||||||
except:
|
except:
|
||||||
@@ -455,7 +455,7 @@ def charData(user : str,cmd : str):
|
|||||||
logThis("I don't wanna tho (error code 945a)")
|
logThis("I don't wanna tho (error code 945a)")
|
||||||
return "Can't do that (error code 945a)"
|
return "Can't do that (error code 945a)"
|
||||||
|
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "Changed " + data[user]["Name"] + "'s " + key +" to " + cmd
|
return "Changed " + data[user]["Name"] + "'s " + key +" to " + cmd
|
||||||
else:
|
else:
|
||||||
@@ -487,7 +487,7 @@ def parseChar(user : str, cmd : str):
|
|||||||
|
|
||||||
cmd = replaceSpaces(cmd)
|
cmd = replaceSpaces(cmd)
|
||||||
|
|
||||||
with open("resources/swcharacters.json", "r") as f:
|
with open("resources/starWars/swcharacters.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
if cmd == " ":
|
if cmd == " ":
|
||||||
@@ -504,31 +504,31 @@ def parseChar(user : str, cmd : str):
|
|||||||
return text1, replaceWithSpaces(text2)
|
return text1, replaceWithSpaces(text2)
|
||||||
else:
|
else:
|
||||||
logThis("Makin' a character for "+user)
|
logThis("Makin' a character for "+user)
|
||||||
with open("resources/swtemplates.json", "r") as f:
|
with open("resources/starWars/swtemplates.json", "r") as f:
|
||||||
templates = json.load(f)
|
templates = json.load(f)
|
||||||
newChar = templates["Character"]
|
newChar = templates["Character"]
|
||||||
data[user] = newChar
|
data[user] = newChar
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "", "Character for " + user + " created"
|
return "", "Character for " + user + " created"
|
||||||
else:
|
else:
|
||||||
if cmd == "Purge":
|
if cmd == "Purge":
|
||||||
logThis("Deleting "+user+"'s character")
|
logThis("Deleting "+user+"'s character")
|
||||||
del data[user]
|
del data[user]
|
||||||
with open("resources/swcharacters.json", "w") as f:
|
with open("resources/starWars/swcharacters.json", "w") as f:
|
||||||
json.dump(data,f,indent = 4)
|
json.dump(data,f,indent = 4)
|
||||||
return "", "Character for " + user + " deleted"
|
return "", "Character for " + user + " deleted"
|
||||||
return "", replaceWithSpaces(str(charData(user,cmd)))
|
return "", replaceWithSpaces(str(charData(user,cmd)))
|
||||||
|
|
||||||
def lightsaberChar(user : str):
|
def lightsaberChar(user : str):
|
||||||
with open("resources/swcharacters.json", "r") as f:
|
with open("resources/starWars/swcharacters.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
if user in data:
|
if user in data:
|
||||||
return data[user]["Lightsaber-characteristic"]
|
return data[user]["Lightsaber-characteristic"]
|
||||||
|
|
||||||
def userHasChar(user : str):
|
def userHasChar(user : str):
|
||||||
with open("resources/swcharacters.json", "r") as f:
|
with open("resources/starWars/swcharacters.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
return user in data
|
return user in data
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ def destinyNew(num : int):
|
|||||||
roll, diceResults = swroll.roll(0,0,0,0,0,0,num)
|
roll, diceResults = swroll.roll(0,0,0,0,0,0,num)
|
||||||
roll = "".join(sorted(roll))
|
roll = "".join(sorted(roll))
|
||||||
|
|
||||||
with open("resources/destinyPoints.txt","wt") as f:
|
with open("resources/starWars/destinyPoints.txt","wt") as f:
|
||||||
f.write(roll)
|
f.write(roll)
|
||||||
|
|
||||||
return "Rolled for Destiny Points and got:\n"+swroll.diceResultToEmoji(diceResults)+"\n"+swroll.resultToEmoji(roll)
|
return "Rolled for Destiny Points and got:\n"+swroll.diceResultToEmoji(diceResults)+"\n"+swroll.resultToEmoji(roll)
|
||||||
|
|
||||||
def destinyUse(user : str):
|
def destinyUse(user : str):
|
||||||
with open("resources/destinyPoints.txt","rt") as f:
|
with open("resources/starWars/destinyPoints.txt","rt") as f:
|
||||||
points = f.read()
|
points = f.read()
|
||||||
|
|
||||||
if user == "Nikolaj":
|
if user == "Nikolaj":
|
||||||
@@ -21,7 +21,7 @@ def destinyUse(user : str):
|
|||||||
if 'B' in points:
|
if 'B' in points:
|
||||||
points = points.replace("B","L",1)
|
points = points.replace("B","L",1)
|
||||||
points = "".join(sorted(points))
|
points = "".join(sorted(points))
|
||||||
with open("resources/destinyPoints.txt","wt") as f:
|
with open("resources/starWars/destinyPoints.txt","wt") as f:
|
||||||
f.write(points)
|
f.write(points)
|
||||||
logThis("Did it")
|
logThis("Did it")
|
||||||
return "Used a dark side destiny point. Destiny pool is now:\n"+swroll.resultToEmoji(points)
|
return "Used a dark side destiny point. Destiny pool is now:\n"+swroll.resultToEmoji(points)
|
||||||
@@ -33,7 +33,7 @@ def destinyUse(user : str):
|
|||||||
if 'L' in points:
|
if 'L' in points:
|
||||||
points = points.replace("L","B",1)
|
points = points.replace("L","B",1)
|
||||||
points = "".join(sorted(points))
|
points = "".join(sorted(points))
|
||||||
with open("resources/destinyPoints.txt","wt") as f:
|
with open("resources/starWars/destinyPoints.txt","wt") as f:
|
||||||
f.write(points)
|
f.write(points)
|
||||||
logThis("Did it")
|
logThis("Did it")
|
||||||
return "Used a light side destiny point. Destiny pool is now:\n"+swroll.resultToEmoji(points)
|
return "Used a light side destiny point. Destiny pool is now:\n"+swroll.resultToEmoji(points)
|
||||||
@@ -51,7 +51,7 @@ def parseDestiny(user : str, cmd : str):
|
|||||||
|
|
||||||
if cmd == "":
|
if cmd == "":
|
||||||
logThis("Retrieving destiny pool info")
|
logThis("Retrieving destiny pool info")
|
||||||
with open("resources/destinyPoints.txt","rt") as f:
|
with open("resources/starWars/destinyPoints.txt","rt") as f:
|
||||||
return swroll.resultToEmoji(f.read())
|
return swroll.resultToEmoji(f.read())
|
||||||
else:
|
else:
|
||||||
commands = cmd.upper().split(" ")
|
commands = cmd.upper().split(" ")
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ import random
|
|||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
|
|
||||||
from . import swchar
|
from . import swchar
|
||||||
from funcs import logThis
|
from funcs import logThis
|
||||||
|
|
||||||
with open("resources/swskills.json", "r") as f:
|
with open("resources/starWars/swskills.json", "r") as f:
|
||||||
skillData = json.load(f)
|
skillData = json.load(f)
|
||||||
|
|
||||||
# Rolls the specified dice
|
# Rolls the specified dice
|
||||||
@@ -224,7 +223,7 @@ def diceToEmoji(dice : list):
|
|||||||
# Rolls for obligation
|
# Rolls for obligation
|
||||||
def obligationRoll():
|
def obligationRoll():
|
||||||
logThis("Rolling for obligation")
|
logThis("Rolling for obligation")
|
||||||
with open("resources/swcharacters.json", "r") as f:
|
with open("resources/starWars/swcharacters.json", "r") as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
table = []
|
table = []
|
||||||
|
|||||||
138
gameLoops.py
Normal file
138
gameLoops.py
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
import asyncio
|
||||||
|
import discord
|
||||||
|
import json
|
||||||
|
|
||||||
|
from funcs import logThis, addMoney, deleteGame, parseFourInARow, fourInARowAI, blackjackContinue, blackjackFinish
|
||||||
|
|
||||||
|
# Deletes a message
|
||||||
|
async def deleteMessage(imageLocation,channel):
|
||||||
|
try:
|
||||||
|
logThis("Finding old image")
|
||||||
|
with open("resources/games/oldImages/"+imageLocation, "r") as f:
|
||||||
|
oldImage = await channel.fetch_message(int(f.read()))
|
||||||
|
logThis("Deleting old image")
|
||||||
|
await oldImage.delete()
|
||||||
|
except:
|
||||||
|
oldImage = ""
|
||||||
|
|
||||||
|
return oldImage
|
||||||
|
|
||||||
|
# Runs Four in a Row
|
||||||
|
async def fiar(channel,command,user):
|
||||||
|
try:
|
||||||
|
response, showImage, deleteImage, gameDone, gwendoTurn = parseFourInARow(command,str(channel),user)
|
||||||
|
except:
|
||||||
|
logThis("Error parsing command (error code 1410)")
|
||||||
|
|
||||||
|
await channel.send(response)
|
||||||
|
logThis(response,str(channel))
|
||||||
|
if showImage:
|
||||||
|
if deleteImage:
|
||||||
|
try:
|
||||||
|
oldImage = await deleteMessage("fourInARow"+str(channel),channel)
|
||||||
|
except:
|
||||||
|
logThis("Error deleting message (error code 1401)")
|
||||||
|
oldImage = await channel.send(file = discord.File("resources/games/4InARowBoards/board"+str(channel)+".png"))
|
||||||
|
if gameDone == False:
|
||||||
|
if gwendoTurn:
|
||||||
|
try:
|
||||||
|
response, showImage, deleteImage, gameDone, gwendoTurn = fourInARowAI(str(channel))
|
||||||
|
except:
|
||||||
|
logThis("AI error (error code 1420)")
|
||||||
|
await channel.send(response)
|
||||||
|
logThis(response,str(channel))
|
||||||
|
if showImage:
|
||||||
|
if deleteImage:
|
||||||
|
await oldImage.delete()
|
||||||
|
oldImage = await channel.send(file = discord.File("resources/games/4InARowBoards/board"+str(channel)+".png"))
|
||||||
|
if gameDone == False:
|
||||||
|
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
||||||
|
f.write(str(oldImage.id))
|
||||||
|
try:
|
||||||
|
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
||||||
|
for reaction in reactions:
|
||||||
|
await oldImage.add_reaction(reaction)
|
||||||
|
|
||||||
|
except:
|
||||||
|
logThis("Image deleted before I could react to all of them")
|
||||||
|
|
||||||
|
else:
|
||||||
|
with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
||||||
|
f.write(str(oldImage.id))
|
||||||
|
try:
|
||||||
|
reactions = ["1️⃣","2️⃣","3️⃣","4️⃣","5️⃣","6️⃣","7️⃣"]
|
||||||
|
for reaction in reactions:
|
||||||
|
await oldImage.add_reaction(reaction)
|
||||||
|
except:
|
||||||
|
logThis("Image deleted before I could react to all of them")
|
||||||
|
# else:
|
||||||
|
# with open("resources/games/oldImages/fourInARow"+str(channel), "w") as f:
|
||||||
|
# f.write(str(oldImage.id))
|
||||||
|
|
||||||
|
if gameDone:
|
||||||
|
with open("resources/games/games.json", "r") as f:
|
||||||
|
data = json.load(f)
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open("resources/games/oldImages/fourInARow"+str(channel), "r") as f:
|
||||||
|
oldImage = await channel.fetch_message(int(f.read()))
|
||||||
|
|
||||||
|
await oldImage.delete()
|
||||||
|
except:
|
||||||
|
logThis("The old image was already deleted")
|
||||||
|
|
||||||
|
winner = data["4 in a row games"][str(channel)]["winner"]
|
||||||
|
if winner != 0:
|
||||||
|
addMoney(data["4 in a row games"][str(channel)]["players"][winner-1].lower(),20)
|
||||||
|
with open("resources/games/games.json", "r") as f:
|
||||||
|
data = json.load(f)
|
||||||
|
|
||||||
|
deleteGame("4 in a row games",str(channel))
|
||||||
|
|
||||||
|
# Loop of blackjack game rounds
|
||||||
|
async def blackjackLoop(channel,gameRound,gameID):
|
||||||
|
logThis("Loop "+str(gameRound),str(channel))
|
||||||
|
|
||||||
|
with open("resources/games/oldImages/blackjack"+str(channel), "r") as f:
|
||||||
|
oldImage = await channel.fetch_message(int(f.read()))
|
||||||
|
|
||||||
|
new_message, allStanding, gamedone = blackjackContinue(str(channel))
|
||||||
|
if new_message != "":
|
||||||
|
logThis(new_message,str(channel))
|
||||||
|
await channel.send(new_message)
|
||||||
|
if gamedone == False:
|
||||||
|
await oldImage.delete()
|
||||||
|
oldImage = await channel.send(file = discord.File("resources/games/blackjackTables/blackjackTable"+str(channel)+".png"))
|
||||||
|
with open("resources/games/oldImages/blackjack"+str(channel), "w") as f:
|
||||||
|
f.write(str(oldImage.id))
|
||||||
|
|
||||||
|
try:
|
||||||
|
if allStanding:
|
||||||
|
await asyncio.sleep(5)
|
||||||
|
else:
|
||||||
|
await asyncio.sleep(120)
|
||||||
|
except:
|
||||||
|
logThis("Loop "+str(gameRound)+" interrupted (error code 1321)")
|
||||||
|
|
||||||
|
with open("resources/games/games.json", "r") as f:
|
||||||
|
data = json.load(f)
|
||||||
|
|
||||||
|
if str(channel) in data["blackjack games"]:
|
||||||
|
realRound = data["blackjack games"][str(channel)]["round"]
|
||||||
|
realGameID = data["blackjack games"][str(channel)]["id"]
|
||||||
|
|
||||||
|
if gameRound == realRound and realGameID == gameID:
|
||||||
|
if gamedone == False:
|
||||||
|
logThis("Loop "+str(gameRound)+" calling blackjackLoop()",str(channel))
|
||||||
|
await blackjackLoop(channel,gameRound+1,gameID)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
new_message = blackjackFinish(str(channel))
|
||||||
|
except:
|
||||||
|
logThis("Something fucked up (error code 1310)")
|
||||||
|
await channel.send(new_message)
|
||||||
|
else:
|
||||||
|
logThis("Ending loop on round "+str(gameRound),str(channel))
|
||||||
|
else:
|
||||||
|
logThis("Ending loop on round "+str(gameRound),str(channel))
|
||||||
|
|
||||||
@@ -32,12 +32,15 @@
|
|||||||
7 - Image
|
7 - Image
|
||||||
700 - Unspecified error
|
700 - Unspecified error
|
||||||
701 - Can't connect to Bing
|
701 - Can't connect to Bing
|
||||||
|
702 - Error picking camera type/image name
|
||||||
|
|
||||||
8 - Movie
|
8 - Movie
|
||||||
800 - Unspecified error
|
800 - Unspecified error
|
||||||
801 - Can't pick movie
|
801 - Error in function
|
||||||
802 - Can't find movie on imdb
|
802 - Can't find movie on imdb
|
||||||
803 - Can't extract data
|
803 - Can't extract data
|
||||||
|
804 - Can't pick movie
|
||||||
|
805 - Embed error
|
||||||
|
|
||||||
9 - Star Wars
|
9 - Star Wars
|
||||||
910 - Unspecified swroll error
|
910 - Unspecified swroll error
|
||||||
@@ -84,10 +87,15 @@
|
|||||||
1223b - Not enough money
|
1223b - Not enough money
|
||||||
|
|
||||||
13 - Blackjack
|
13 - Blackjack
|
||||||
1300 - Unspecified
|
1300 - Unspecified error
|
||||||
|
1310 - Unspecified finishing error
|
||||||
|
1311 - Error calculating winnings
|
||||||
|
1312 - Error in calcWinnings function
|
||||||
|
1320 - Unspecified loop error
|
||||||
|
1321 - Loop interrupted while waiting
|
||||||
|
|
||||||
14 - Four in a row
|
14 - Four in a row
|
||||||
1400 - Unspecified
|
1400 - Unspecified error
|
||||||
1401 - Error deleting old image
|
1401 - Error deleting old image
|
||||||
1410 - Unspecified parsing error
|
1410 - Unspecified parsing error
|
||||||
1420 - Unspecified AI error
|
1420 - Unspecified AI error
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"trivia questions": {},
|
|
||||||
"users": {
|
|
||||||
"nikolaj": 1,
|
|
||||||
"jonathanh\u00f8jlev": 6
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,208 +0,0 @@
|
|||||||
2s
|
|
||||||
3s
|
|
||||||
0s
|
|
||||||
7s
|
|
||||||
jh
|
|
||||||
7h
|
|
||||||
8c
|
|
||||||
kh
|
|
||||||
0d
|
|
||||||
js
|
|
||||||
ks
|
|
||||||
qh
|
|
||||||
2c
|
|
||||||
4c
|
|
||||||
kc
|
|
||||||
3h
|
|
||||||
kc
|
|
||||||
3c
|
|
||||||
2h
|
|
||||||
5d
|
|
||||||
9h
|
|
||||||
2d
|
|
||||||
3s
|
|
||||||
ks
|
|
||||||
6s
|
|
||||||
9d
|
|
||||||
2s
|
|
||||||
8s
|
|
||||||
qd
|
|
||||||
8d
|
|
||||||
6s
|
|
||||||
9s
|
|
||||||
js
|
|
||||||
5c
|
|
||||||
9s
|
|
||||||
ac
|
|
||||||
6s
|
|
||||||
6h
|
|
||||||
6h
|
|
||||||
0c
|
|
||||||
2d
|
|
||||||
ad
|
|
||||||
qh
|
|
||||||
qc
|
|
||||||
qh
|
|
||||||
7c
|
|
||||||
0d
|
|
||||||
8d
|
|
||||||
2h
|
|
||||||
as
|
|
||||||
jc
|
|
||||||
3d
|
|
||||||
9c
|
|
||||||
kd
|
|
||||||
4c
|
|
||||||
4d
|
|
||||||
ah
|
|
||||||
kd
|
|
||||||
8c
|
|
||||||
8h
|
|
||||||
5d
|
|
||||||
qc
|
|
||||||
9s
|
|
||||||
0c
|
|
||||||
qh
|
|
||||||
jh
|
|
||||||
0s
|
|
||||||
8d
|
|
||||||
6c
|
|
||||||
8h
|
|
||||||
5c
|
|
||||||
3c
|
|
||||||
0h
|
|
||||||
4h
|
|
||||||
8c
|
|
||||||
6d
|
|
||||||
5c
|
|
||||||
4d
|
|
||||||
2c
|
|
||||||
7s
|
|
||||||
2s
|
|
||||||
ks
|
|
||||||
5s
|
|
||||||
ah
|
|
||||||
jd
|
|
||||||
ah
|
|
||||||
8h
|
|
||||||
0h
|
|
||||||
4h
|
|
||||||
3d
|
|
||||||
7c
|
|
||||||
4d
|
|
||||||
ad
|
|
||||||
3h
|
|
||||||
9h
|
|
||||||
3h
|
|
||||||
6c
|
|
||||||
5s
|
|
||||||
6d
|
|
||||||
jd
|
|
||||||
7c
|
|
||||||
ks
|
|
||||||
7d
|
|
||||||
0s
|
|
||||||
jd
|
|
||||||
8s
|
|
||||||
ah
|
|
||||||
0s
|
|
||||||
as
|
|
||||||
7d
|
|
||||||
2d
|
|
||||||
4s
|
|
||||||
qs
|
|
||||||
3s
|
|
||||||
9h
|
|
||||||
9c
|
|
||||||
4c
|
|
||||||
4h
|
|
||||||
3c
|
|
||||||
5c
|
|
||||||
as
|
|
||||||
8s
|
|
||||||
9d
|
|
||||||
7c
|
|
||||||
5d
|
|
||||||
6d
|
|
||||||
3d
|
|
||||||
kc
|
|
||||||
jc
|
|
||||||
6s
|
|
||||||
4s
|
|
||||||
5h
|
|
||||||
9d
|
|
||||||
2h
|
|
||||||
qd
|
|
||||||
qc
|
|
||||||
qs
|
|
||||||
6d
|
|
||||||
jh
|
|
||||||
ac
|
|
||||||
as
|
|
||||||
5h
|
|
||||||
6h
|
|
||||||
jc
|
|
||||||
ad
|
|
||||||
7h
|
|
||||||
4c
|
|
||||||
9d
|
|
||||||
5h
|
|
||||||
kh
|
|
||||||
0h
|
|
||||||
7d
|
|
||||||
7h
|
|
||||||
9c
|
|
||||||
8c
|
|
||||||
qc
|
|
||||||
4s
|
|
||||||
qs
|
|
||||||
0c
|
|
||||||
jh
|
|
||||||
ac
|
|
||||||
9s
|
|
||||||
4h
|
|
||||||
3h
|
|
||||||
ad
|
|
||||||
kc
|
|
||||||
kh
|
|
||||||
qs
|
|
||||||
5d
|
|
||||||
jc
|
|
||||||
qd
|
|
||||||
8s
|
|
||||||
js
|
|
||||||
ac
|
|
||||||
js
|
|
||||||
jd
|
|
||||||
kd
|
|
||||||
qd
|
|
||||||
2s
|
|
||||||
4d
|
|
||||||
2h
|
|
||||||
5h
|
|
||||||
7d
|
|
||||||
6c
|
|
||||||
0c
|
|
||||||
6h
|
|
||||||
4s
|
|
||||||
0d
|
|
||||||
8d
|
|
||||||
7h
|
|
||||||
2c
|
|
||||||
2d
|
|
||||||
9c
|
|
||||||
7s
|
|
||||||
6c
|
|
||||||
5s
|
|
||||||
3d
|
|
||||||
3s
|
|
||||||
9h
|
|
||||||
8h
|
|
||||||
3c
|
|
||||||
0d
|
|
||||||
0h
|
|
||||||
7s
|
|
||||||
2c
|
|
||||||
kd
|
|
||||||
5s
|
|
||||||
kh
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
0
|
|
||||||
56
resources/lookup/lookupExamples.json
Normal file
56
resources/lookup/lookupExamples.json
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"monster" : [
|
||||||
|
{
|
||||||
|
"name": "Bandit",
|
||||||
|
"size": "Medium",
|
||||||
|
"type": "humanoid",
|
||||||
|
"subtype": "any race",
|
||||||
|
"alignment": "any non-lawful alignment",
|
||||||
|
"armor_class": 12,
|
||||||
|
"hit_points": 11,
|
||||||
|
"hit_dice": "2d8",
|
||||||
|
"speed": "30 ft.",
|
||||||
|
"strength": 11,
|
||||||
|
"dexterity": 12,
|
||||||
|
"constitution": 12,
|
||||||
|
"intelligence": 10,
|
||||||
|
"wisdom": 10,
|
||||||
|
"charisma": 10,
|
||||||
|
"damage_vulnerabilities": "",
|
||||||
|
"damage_resistances": "",
|
||||||
|
"damage_immunities": "",
|
||||||
|
"condition_immunities": "",
|
||||||
|
"senses": "passive Perception 10",
|
||||||
|
"languages": "any one language (usually Common)",
|
||||||
|
"challenge_rating": "1/8",
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"name": "Scimitar",
|
||||||
|
"desc": "Melee Weapon Attack: +3 to hit, reach 5 ft., one target. Hit: 4 (1d6 + 1) slashing damage.",
|
||||||
|
"attack_bonus": 3,
|
||||||
|
"damage_dice": "1d6",
|
||||||
|
"damage_bonus": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Light Crossbow",
|
||||||
|
"desc": "Ranged Weapon Attack: +3 to hit, range 80 ft./320 ft., one target. Hit: 5 (1d8 + 1) piercing damage.",
|
||||||
|
"attack_bonus": 3,
|
||||||
|
"damage_dice": "1d8",
|
||||||
|
"damage_bonus": 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"spell": {
|
||||||
|
"Fireball" : {
|
||||||
|
"casting_time" : "1 action",
|
||||||
|
"components" : "V, S, M (a tiny ball of bat guano and sulfur)",
|
||||||
|
"description" : "A bright streak flashes from your pointing finger to a point you choose within range and then blossoms with a low roar into an explosion of flame. Each creature in a 20-foot-radius sphere centered on that point must make a Dexterity saving throw. A target takes 8d6 fire damage on a failed save, or half as much damage on a successful one. The fire spreads around corners. It ignites flammable objects in the area that aren’t being worn or carried. At Higher Levels. When you cast this spell using a spell slot of 4th level or higher, the damage increases by 1d6 for each slot level above 3rd.",
|
||||||
|
"duration" : "Instantaneous",
|
||||||
|
"level" : "3rd",
|
||||||
|
"range" : "150 feet",
|
||||||
|
"school" : "Evocation",
|
||||||
|
"ritual" : false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18349
resources/monsters.json
18349
resources/monsters.json
File diff suppressed because it is too large
Load Diff
1167
resources/movies.txt
1167
resources/movies.txt
File diff suppressed because it is too large
Load Diff
@@ -1,307 +0,0 @@
|
|||||||
Eddard Ned Stark
|
|
||||||
Robert Baratheon
|
|
||||||
Jaime Lannister
|
|
||||||
Catelyn Stark
|
|
||||||
Cersei Lannister
|
|
||||||
Daenerys Targaryen
|
|
||||||
Jorah Mormont
|
|
||||||
Viserys Targaryen
|
|
||||||
Jon Snow
|
|
||||||
Sansa Stark
|
|
||||||
Arya Stark
|
|
||||||
Robb Stark
|
|
||||||
Theon Greyjoy
|
|
||||||
Bran Stark
|
|
||||||
Joffrey Baratheon
|
|
||||||
Sandor The Hound Clegane
|
|
||||||
Tyrion Lannister
|
|
||||||
Khal Drogo
|
|
||||||
Petyr Littlefinger Baelish
|
|
||||||
Davos Seaworth
|
|
||||||
Samwell Tarly
|
|
||||||
Stannis Baratheon
|
|
||||||
Melisandre
|
|
||||||
Jeor Mormont
|
|
||||||
Bronn
|
|
||||||
Varys
|
|
||||||
Shae
|
|
||||||
Margaery Tyrell
|
|
||||||
Tywin Lannister
|
|
||||||
Talisa Maegyr
|
|
||||||
Ygritte
|
|
||||||
Gendry
|
|
||||||
Tormund Giantsbane
|
|
||||||
Brienne of Tarth
|
|
||||||
Ramsay Bolton
|
|
||||||
Gilly
|
|
||||||
Daario Naharis
|
|
||||||
Missandei
|
|
||||||
Ellaria Sand
|
|
||||||
Tommen Baratheon
|
|
||||||
Jaqen H'ghar
|
|
||||||
Roose Bolton
|
|
||||||
The High Sparrow
|
|
||||||
Grand Maester Pycelle
|
|
||||||
Meryn Trant
|
|
||||||
Hodor
|
|
||||||
Grenn
|
|
||||||
Osha
|
|
||||||
Rickon Stark
|
|
||||||
Ros
|
|
||||||
Gregor Clegane
|
|
||||||
Janos Slynt
|
|
||||||
Lancel Lannister
|
|
||||||
Myrcella Baratheon
|
|
||||||
Rodrik Cassel
|
|
||||||
Maester Luwin
|
|
||||||
Irri
|
|
||||||
Doreah
|
|
||||||
Kevan Lannister
|
|
||||||
Barristan Selmy
|
|
||||||
Rast
|
|
||||||
Maester Aemon
|
|
||||||
Pypar
|
|
||||||
Alliser Thorne
|
|
||||||
Othell Yarwyck
|
|
||||||
Loras Tyrell
|
|
||||||
Hot Pie
|
|
||||||
Beric Dondarrion
|
|
||||||
Podrick Payne
|
|
||||||
Eddison Tollett
|
|
||||||
Yara Greyjoy
|
|
||||||
Selyse Florent
|
|
||||||
Little Sam
|
|
||||||
Grey Worm
|
|
||||||
Qyburn
|
|
||||||
Olenna Tyrell
|
|
||||||
Shireen Baratheon
|
|
||||||
Meera Reed
|
|
||||||
Jojen Reed
|
|
||||||
Thoros of Myr
|
|
||||||
Yohn Royce
|
|
||||||
Olly
|
|
||||||
Mace Tyrell
|
|
||||||
The Waif
|
|
||||||
Bowen Marsh
|
|
||||||
Aragorn
|
|
||||||
Arwen
|
|
||||||
Bilbo
|
|
||||||
Boromir
|
|
||||||
Celeborn
|
|
||||||
Denethor
|
|
||||||
Elrond
|
|
||||||
Eomer
|
|
||||||
Eowyn
|
|
||||||
Faramir
|
|
||||||
Frodo
|
|
||||||
Galadriel
|
|
||||||
Gandalf
|
|
||||||
Gimli
|
|
||||||
Gollum
|
|
||||||
Legolas
|
|
||||||
Merry
|
|
||||||
Mouth of Sauron
|
|
||||||
Old Man Willow
|
|
||||||
Pippin
|
|
||||||
Radagast
|
|
||||||
Sam
|
|
||||||
Saruman
|
|
||||||
Sauron
|
|
||||||
Shelob
|
|
||||||
Theoden
|
|
||||||
Tom Bombadil
|
|
||||||
Treebeard
|
|
||||||
Witch king
|
|
||||||
Wormtongue
|
|
||||||
Adon
|
|
||||||
Methrammar Aerasume
|
|
||||||
Sernius Alathar
|
|
||||||
Alaundo
|
|
||||||
Alias
|
|
||||||
Alicia Kendrick
|
|
||||||
Arganth Snarrl
|
|
||||||
Khelben Arunsun
|
|
||||||
Jorus Azuremantle
|
|
||||||
Berg'inyon Baenre
|
|
||||||
Dantrag Baenre
|
|
||||||
Gromph Baenre
|
|
||||||
Liriel Baenre
|
|
||||||
Quenthel Baenre
|
|
||||||
Triel Baenre
|
|
||||||
Yvonnel Baenre
|
|
||||||
Balduron
|
|
||||||
Bruenor Battlehammer
|
|
||||||
Akabar Bel Akash
|
|
||||||
Belhifet
|
|
||||||
Aballister Bonaduce
|
|
||||||
Erevis Cale
|
|
||||||
Captain Deudermont
|
|
||||||
Catti-brie
|
|
||||||
Clacker
|
|
||||||
Companions of the Hall
|
|
||||||
Elaith Craulnober
|
|
||||||
Cyric
|
|
||||||
Danica Maupoissant
|
|
||||||
Montolio Debrouchee
|
|
||||||
Briza Do'Urden
|
|
||||||
Dinin Do'Urden
|
|
||||||
Malice Do'Urden
|
|
||||||
Maya Do'Urden
|
|
||||||
Nalfein Do'Urden
|
|
||||||
Shi'nayne Do'Urden
|
|
||||||
Vartha Do'Urden
|
|
||||||
Vierna Do'Urden
|
|
||||||
Drizzt Do'Urden
|
|
||||||
Dove Falconhand
|
|
||||||
Dragonbait
|
|
||||||
Gareth Dragonsbane
|
|
||||||
Elk Tribe
|
|
||||||
Ellifain
|
|
||||||
Elminster
|
|
||||||
Artemis Entreri
|
|
||||||
Errtu
|
|
||||||
Galaeron Nihmedu
|
|
||||||
Volothamp Geddarm
|
|
||||||
Halisstra Melarn
|
|
||||||
Halueth Never
|
|
||||||
Harkle Harpell
|
|
||||||
Taern Hornblade
|
|
||||||
Imoen
|
|
||||||
Ingeloakastimizilian
|
|
||||||
Innovindil
|
|
||||||
Ivan and Pikel Bouldershoulder
|
|
||||||
Jander Sunstar
|
|
||||||
Jarlaxle
|
|
||||||
Kelemvor Lyonsbane
|
|
||||||
Kierkan Rufo
|
|
||||||
Manshoon
|
|
||||||
Obould Many-Arrows
|
|
||||||
Minder the Golem
|
|
||||||
Minsc
|
|
||||||
Pharaun Mizzrym
|
|
||||||
Arilyn Moonblade
|
|
||||||
Narnra Shalace
|
|
||||||
Nasher Alagondar
|
|
||||||
Taegan Nightwind
|
|
||||||
Nimor Imphraezl
|
|
||||||
Thibbledorf Pwent
|
|
||||||
Regis Rumblebelly
|
|
||||||
Rizzen Do'Urden
|
|
||||||
Sammaster
|
|
||||||
Seven Sisters
|
|
||||||
Shandril Shessair
|
|
||||||
Alustriel Silverhand
|
|
||||||
The Simbul
|
|
||||||
Storm Silverhand
|
|
||||||
Sylune
|
|
||||||
Szass Tam
|
|
||||||
Tarathiel
|
|
||||||
Araevin Teshurr
|
|
||||||
Danilo Thann
|
|
||||||
Urlgen Threefist
|
|
||||||
Valas Hune
|
|
||||||
Vangerdahast
|
|
||||||
Wulfgar
|
|
||||||
Finder Wyvernspur
|
|
||||||
Yharaskrik
|
|
||||||
Zaknafein Do'Urden
|
|
||||||
Johnny Depp
|
|
||||||
Arnold Schwarzenegger
|
|
||||||
Jim Carrey
|
|
||||||
Emma Watson
|
|
||||||
Daniel Radcliffe
|
|
||||||
Leonardo DiCaprio
|
|
||||||
Tom Cruise
|
|
||||||
Brad Pitt
|
|
||||||
Charles Chaplin
|
|
||||||
Morgan Freeman
|
|
||||||
Tom Hanks
|
|
||||||
Hugh Jackman
|
|
||||||
Matt Damon
|
|
||||||
Sylvester Stallone
|
|
||||||
Will Smith
|
|
||||||
Clint Eastwood
|
|
||||||
Cameron Diaz
|
|
||||||
George Clooney
|
|
||||||
Steven Spielberg
|
|
||||||
Harrison Ford
|
|
||||||
Robert De Niro
|
|
||||||
Al Pacino
|
|
||||||
Robert Downey Jr.
|
|
||||||
Russell Crowe
|
|
||||||
Liam Neeson
|
|
||||||
Kate Winslet
|
|
||||||
Mark Wahlberg
|
|
||||||
Natalie Portman
|
|
||||||
Pierce Brosnan
|
|
||||||
Sean Connery
|
|
||||||
Orlando Bloom
|
|
||||||
Dwayne Johnson
|
|
||||||
Jackie Chan
|
|
||||||
Angelina Jolie
|
|
||||||
Adam Sandler
|
|
||||||
Scarlett Johansson
|
|
||||||
Heath Ledger
|
|
||||||
Anne Hathaway
|
|
||||||
Jessica Alba
|
|
||||||
Edward Norton
|
|
||||||
Keira Knightley
|
|
||||||
Bradley Cooper
|
|
||||||
Will Ferrell
|
|
||||||
Julia Roberts
|
|
||||||
Nicolas Cage
|
|
||||||
Daniel Craig
|
|
||||||
Keanu Reeves
|
|
||||||
Ian McKellen
|
|
||||||
Halle Berry
|
|
||||||
Bruce Willis
|
|
||||||
Samuel L. Jackson
|
|
||||||
Ben Stiller
|
|
||||||
Tommy Lee Jones
|
|
||||||
Antonio Banderas
|
|
||||||
Denzel Washington
|
|
||||||
Steve Carell
|
|
||||||
Shia LaBeouf
|
|
||||||
Megan Fox
|
|
||||||
James Franco
|
|
||||||
Mel Gibson
|
|
||||||
Vin Diesel
|
|
||||||
Tim Allen
|
|
||||||
Robin Williams
|
|
||||||
Kevin Spacey
|
|
||||||
Jason Biggs
|
|
||||||
Seann William Scott
|
|
||||||
Jean-Claude Van Damme
|
|
||||||
Zach Galifianakis
|
|
||||||
Owen Wilson
|
|
||||||
Christian Bale
|
|
||||||
Peter Jackson
|
|
||||||
Sandra Bullock
|
|
||||||
Bruce Lee
|
|
||||||
Drew Barrymore
|
|
||||||
Macaulay Culkin
|
|
||||||
Jack Nicholson
|
|
||||||
Bill Murray
|
|
||||||
Sigourney Weaver
|
|
||||||
Jake Gyllenhaal
|
|
||||||
Kamal Haasan
|
|
||||||
Jason Statham
|
|
||||||
Jet Li
|
|
||||||
Kate Beckinsale
|
|
||||||
Rowan Atkinson
|
|
||||||
Marlon Brando
|
|
||||||
John Travolta
|
|
||||||
Channing Tatum
|
|
||||||
Ben Affleck
|
|
||||||
Shah Rukh Khan
|
|
||||||
Jennifer Aniston
|
|
||||||
Emma Stone
|
|
||||||
Chris Hemsworth
|
|
||||||
James McAvoy
|
|
||||||
James Cameron
|
|
||||||
Amitabh Bachchan
|
|
||||||
Brendan Fraser
|
|
||||||
Rachel McAdams
|
|
||||||
Tom Hiddleston
|
|
||||||
Aamir Khan
|
|
||||||
Rajinikanth
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,32 +0,0 @@
|
|||||||
Astrogation
|
|
||||||
Computers
|
|
||||||
Cool
|
|
||||||
Vigilance
|
|
||||||
Mechanics
|
|
||||||
Melee
|
|
||||||
Perception
|
|
||||||
Piloting-space
|
|
||||||
Ranged-heavy
|
|
||||||
Ranged-light
|
|
||||||
Athletics
|
|
||||||
Coercion
|
|
||||||
Coordination
|
|
||||||
Charm
|
|
||||||
Deceptiono
|
|
||||||
Medicine
|
|
||||||
Negotiation
|
|
||||||
Piloting-planetary
|
|
||||||
Stealth
|
|
||||||
Skullduggery
|
|
||||||
Brawl
|
|
||||||
Discipline
|
|
||||||
Gunnery
|
|
||||||
Core-worlds
|
|
||||||
Outer-rim
|
|
||||||
Underworld
|
|
||||||
Leadership
|
|
||||||
Lore
|
|
||||||
Resilience
|
|
||||||
Streetwise
|
|
||||||
Survival
|
|
||||||
Xenology
|
|
||||||
Reference in New Issue
Block a user