From 6fea10127e3a9292f3a7725ac885f44ca59ea57d Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Tue, 7 Apr 2020 23:26:58 +0200 Subject: [PATCH 1/5] Fixed typo in word Skulduggery --- resources/swskills.json | 2 +- resources/swtemplates.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/swskills.json b/resources/swskills.json index 697e734..698cafe 100644 --- a/resources/swskills.json +++ b/resources/swskills.json @@ -17,7 +17,7 @@ "Negotiation" : "Presence", "Piloting-planetary" : "Agility", "Stealth" : "Agility", - "Skullduggery" : "Cunning", + "skulduggery" : "Cunning", "Brawl" : "Brawn", "Discipline" : "Willpower", "Gunnery" : "Agility", diff --git a/resources/swtemplates.json b/resources/swtemplates.json index 4d04535..00773a9 100644 --- a/resources/swtemplates.json +++ b/resources/swtemplates.json @@ -48,7 +48,7 @@ "Ranged-heavy": 0, "Ranged-light": 0, "Resilience": 0, - "Skullduggery": 0, + "skulduggery": 0, "Stealth": 0, "Streetwise": 0, "Survival": 0, From 8e8de4ab5cb4017fbe2ab29733db10345522e1cb Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Wed, 8 Apr 2020 16:22:28 +0200 Subject: [PATCH 2/5] =?UTF-8?q?Reacts=20with=20=F0=9F=91=8D=20when=20someo?= =?UTF-8?q?ne=20aswers=20trivia=20question?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gwendolyn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gwendolyn.py b/Gwendolyn.py index a85865a..0ba8b83 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -246,7 +246,11 @@ async def on_message(message): elif message.content.lower().startswith("!trivia "): command = message.content.lower().replace("!trivia ","") - await message.channel.send(funcs.triviaOtherThing(message.author.name,str(message.channel),command)) + response = funcs.triviaOtherThing(message.author.name,str(message.channel),command) + if response.startswith("Locked in "): + await message.add_reaction("👍") + else: + await message.channel.send(response) else: funcs.logThis("I didn't understand that") await message.channel.send("I didn't understand that") From 68dc74f2359229a4147fcbfc5f302224d83c53c7 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Wed, 8 Apr 2020 16:43:04 +0200 Subject: [PATCH 3/5] She's a bit sassy now --- Gwendolyn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gwendolyn.py b/Gwendolyn.py index 0ba8b83..d0a8b52 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -254,7 +254,10 @@ async def on_message(message): else: funcs.logThis("I didn't understand that") await message.channel.send("I didn't understand that") - + + + if ("gwendolyn" in message.content.lower() or message.content.startswith("!")) and ("bitch" in message.content.lower() or "fuck" in message.content.lower()): + await message.add_reaction("😠") # Runs the whole shabang client.run(token) From 4f24a11e03358b442f4859f4453ff7f8a47dc3c2 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Wed, 8 Apr 2020 18:04:53 +0200 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=93=9D=20Some=20more=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gwendolyn.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Gwendolyn.py b/Gwendolyn.py index d0a8b52..2558670 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -6,6 +6,7 @@ import pickle import codecs import string import json +import random import funcs @@ -201,6 +202,8 @@ async def on_message(message): else: await message.channel.send(desc) + + # Searches for a specific page on the Senkulpa Wiki elif message.content.lower().startswith("!wiki "): async with message.channel.typing(): funcs.logThis(message.author.name+" ran \""+message.content+"\"") @@ -217,6 +220,8 @@ async def on_message(message): else: await message.channel.send(content) + + # Runs a trivia game elif message.content.lower().startswith("!trivia"): funcs.logThis(message.author.name+" ran \""+message.content+"\"") if message.content.lower() == "!trivia" or message.content.lower() == "!trivia ": @@ -256,8 +261,10 @@ async def on_message(message): await message.channel.send("I didn't understand that") - if ("gwendolyn" in message.content.lower() or message.content.startswith("!")) and ("bitch" in message.content.lower() or "fuck" in message.content.lower()): - await message.add_reaction("😠") + # Is a bit sassy sometimes + if ("gwendolyn" in message.content.lower() or message.content.startswith("!")) and ("bitch" in message.content.lower() or "fuck" in message.content.lower()) and "ikke" in message.content.lower() and "not" in message.content.lower(): + emoji = random.choice(["😠", "🖕", "👎"]) + await message.add_reaction(emoji) # Runs the whole shabang client.run(token) From 9656dcaa664215044e372d96ed5542a65cfc4376 Mon Sep 17 00:00:00 2001 From: NikolajDanger Date: Wed, 8 Apr 2020 19:05:41 +0200 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=A9=B8=20Critical=20injury=20rolls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gwendolyn.py | 17 +++++++++++++ funcs/__init__.py | 2 +- funcs/swfuncs/__init__.py | 2 +- funcs/swfuncs/swroll.py | 51 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 2 deletions(-) diff --git a/Gwendolyn.py b/Gwendolyn.py index 2558670..d89dcb2 100644 --- a/Gwendolyn.py +++ b/Gwendolyn.py @@ -190,6 +190,23 @@ async def on_message(message): for messageItem in messageList: await message.channel.send(messageItem) + # Rolls for critical injuries + elif message.content.lower().startswith("!swcrit"): + funcs.logThis(message.author.name+" ran \""+message.content+"\"") + command = message.content.lower().replace("!swcrit","").replace(" ","").replace("+","") + + if command == "": + command = 0 + + try: + newMessage = funcs.critRoll(int(command)) + except: + newMessage = "Try using a number, stupid" + + messageList = newMessage.split("\n") + for messageItem in messageList: + await message.channel.send(messageItem) + # Accesses and changes character sheet data with the parseChar function # from funcs/swfuncs/swchar.py elif message.content.lower().startswith("!swchar") or message.content.lower().startswith("!sw"): diff --git a/funcs/__init__.py b/funcs/__init__.py index e12dd3c..49590ac 100644 --- a/funcs/__init__.py +++ b/funcs/__init__.py @@ -1,6 +1,6 @@ from .gwendolynFuncs import helloFunc, cap, imageFunc, logThis, findWikiPage, makeFiles -from .swfuncs import parseChar, parseRoll, parseDestiny +from .swfuncs import parseChar, parseRoll, parseDestiny, critRoll from .lookup import spellFunc, monsterFunc diff --git a/funcs/swfuncs/__init__.py b/funcs/swfuncs/__init__.py index b5d9864..8937758 100644 --- a/funcs/swfuncs/__init__.py +++ b/funcs/swfuncs/__init__.py @@ -1,3 +1,3 @@ from .swchar import parseChar -from .swroll import parseRoll +from .swroll import parseRoll, critRoll from .swdestiny import parseDestiny \ No newline at end of file diff --git a/funcs/swfuncs/swroll.py b/funcs/swfuncs/swroll.py index d27989d..4215dcd 100644 --- a/funcs/swfuncs/swroll.py +++ b/funcs/swfuncs/swroll.py @@ -232,6 +232,57 @@ def obligationRoll(): return random.choice(table) +def critRoll(addington : int): + dd = "<:difficulty:690973992470708296>" + sd = "<:setback:690972157890658415>" + bd = "<:boost:690972178216386561>" + roll = random.randint(1,100) + addington + injuries = [ + "**Minor nick**: The target suffers 1 strain, "+dd] * 5 + [ + "**Slowed down**: The target can only act during the last allied initiative slot this turn, "+dd] * 5 + [ + "**Sudden Jolt**: The target drops whatever is in hand, "+dd] * 5 + [ + "**Distracted**: The target cannot perform a Free maneuver during his next turn, "+dd] * 5 + [ + "**Off-Balance**: The target adds "+sd+" to his next skill check, "+dd] * 5 + [ + "**Discouraging Wound**: Flip one light side Destiny point to a dark side Destiny point (reverse if NPC), "+dd] * 5 + [ + "**Stunned**: The target is staggered until the end of his next turn, "+dd] * 5 + [ + "**Stinger**: Increase the difficulty of next check by one, "+dd] * 5 + [ + "**Bowled Over**: The target is knocked prone and suffers 1 sttrain, "+dd+dd] * 5 + [ + "**Head Ringer**: The target increases the difficulty of all Intellect and Cunning checks by one until the end of the encounter, "+dd+dd] * 5 + [ + "**Fearsome Wound**: The target increases the difficulty of all Presence and Willpower checks by one until the end of the encounter, "+dd+dd] * 5 + [ + "**Agonizing Wound**: The target increases the difficulty of all Brawn and Agility checks by one until the end of the encounter, "+dd+dd] * 5 + [ + "**Slightly Dazed**: The target is disoriented until the end of the encounter, "+dd+dd] * 5 + [ + "**Scattered Senses**: The target removes all "+bd+" from skill checks until the end of the encounter, "+dd+dd] * 5 + [ + "**Hamstrung**: The target loses his free maneuver until the end of the encounter, "+dd+dd] * 5 + [ + "**Overpowered**: The target leaves himselp open, and the attacker may immediately attempt another free attack agains him, using the exact same pool as the original, "+dd+dd] * 5 + [ + "**Winded**: Until the end of the encounter, the target cannot voluntarily suffer strain to activate any abilities or gain additional maneuvers, "+dd+dd] * 5 + [ + "**Compromised**: Incerase difficulty of all skill checks by one until the end of the encounter, "+dd+dd] * 5 + [ + "**At the brink**: The target suffers 1 strain each time he performs an action, "+dd+dd+dd] * 5 + [ + "**Crippled**: One of the target's limbs (selected by the GM) is crippled until healed or replaced. Increase difficulty of all checks that require use of that limb by one, "+dd+dd+dd] * 5 + [ + "**Maimed**: One of the target's limbs (selected by the GM) is permanently lost. Unless the target has a cybernetic replacement, the target cannot perform actions that would require the use of that limb. All other actions gain "+sd+", "+dd+dd+dd] * 5 + [ + "HI"] * 5 + [ + "**Temporarily Lame**: Until this critical injury is healed, the target cannot perform more than one maneuver during his turn, "+dd+dd+dd] * 5 + [ + "**Blinded**: The target can no longer see. Upgrade the difficulty of all checks twice. Upgrade the difficulty of perception checks three times, "+dd+dd+dd] * 5 + [ + "**Knocked Senseless**: The target is staggered for the remainder of the encounter, "+dd+dd+dd] * 5 + [ + "GI"] * 5 + [ + "**Bleeding Out**: Every round, the target suffers 1 wound and 1 strain at the beginning of his turn. For every five wounds he suffers beyond his wound threshold, he suffers one additional critical injury. (If he suffers this one again, roll again), "+dd+dd+dd+dd] * 10 + [ + "**The End is Nigh**: The target will die after the last initiative slot during the next round, "+dd+dd+dd+dd] * 10 + [ + "**Dead**: U B Dead :("] + + if roll >= len(injuries): + results = injuries[-1] + else: + results = injuries[roll] + + if results == "HI": + characteristic = random.choice(["brawn"] * 3 + ["agility"] * 3 + ["intellect", "cunning", "presence"]) + results = "**Horrific Injury**: Until this criticil injury is healed, treat the target's "+characteristic+" as if it's one lower, "+dd+dd+dd + + if results == "GI": + characteristic = random.choice(["brawn"] * 3 + ["agility"] * 3 + ["intellect", "cunning", "presence"]) + results = "**Gruesome Injury**: The target's "+characteristic+" is permanently one lower, "+dd+dd+dd+dd + + return "Roll: "+str(roll)+"\nInjury:\n"+results + def parseRoll(user : str,cmd : str = ""): cmd = re.sub(' +',' ',cmd.upper()) + " " if cmd[0] == " ":