🩸 Critical injury rolls

This commit is contained in:
NikolajDanger
2020-04-08 19:05:41 +02:00
parent 767d607f3f
commit 1e1dc9bd5f
4 changed files with 70 additions and 2 deletions

View File

@ -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"):

View File

@ -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

View File

@ -1,3 +1,3 @@
from .swchar import parseChar
from .swroll import parseRoll
from .swroll import parseRoll, critRoll
from .swdestiny import parseDestiny

View File

@ -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] == " ":