Browse Source

Add Pev

master
Noëlle 3 years ago
parent
commit
11179567fd
2 changed files with 21 additions and 7 deletions
  1. 11
    1
      adversaries.py
  2. 10
    6
      koboldgen.py

+ 11
- 1
adversaries.py View File

'note': "Its minion is either dedicated to waking it up or keeping it asleep, at the DM's discretion. If it wakes up, it'll wake up grumpy.", # formatted string 'note': "Its minion is either dedicated to waking it up or keeping it asleep, at the DM's discretion. If it wakes up, it'll wake up grumpy.", # formatted string
'stats': [3,5,6,6], # four-integer list 'stats': [3,5,6,6], # four-integer list
}, },

{
'id': 121,
'name': f"Pev the Destroyer",
'shortname': "cat",
'isPlural': False,
'hasMinion': False,
'potentialMinions': None,
'needsName': False,
'note': "He's an enormous black-and-brown tabby cat who loves to hunt and eat lizards.",
'stats': [2,6,4,6],
},
] ]

+ 10
- 6
koboldgen.py View File

self.masterpassword = None self.masterpassword = None
self.create_campaign(n, makeChars) self.create_campaign(n, makeChars)


def create_campaign(self, n, makeChars):
def create_campaign(self, n=None, makeChars=True):
n = 6 if n == None else n n = 6 if n == None else n
self.ship = Ship() self.ship = Ship()
self.params = Plot() self.params = Plot()
self.params.problem["fullname"] = "" self.params.problem["fullname"] = ""
if self.params.problem["id"] in [1,2]:
self.params.problem["fullname"] += " led by " + self.params.problem["name"]
if self.params.problem["id"] in [4,7,8,10]:
self.params.problem["fullname"] += " named " + self.params.problem["name"]
# if self.params.problem["id"] in [1,2]:
# self.params.problem["fullname"] += " led by " + self.params.problem["name"]
# if self.params.problem["id"] in [4,7,8,10]:
# self.params.problem["fullname"] += " named " + self.params.problem["name"]
if makeChars: if makeChars:
self.characters = [] self.characters = []
for _ in range(n): for _ in range(n):
def decode_key(self, pw): def decode_key(self, pw):
densePwd = pw.replace(" ", "") densePwd = pw.replace(" ", "")
aBuiltin = densePwd[:12].upper() aBuiltin = densePwd[:12].upper()
builtins = ["PACKTACTICS!", "JUSTINBAILEY", "NARPASSWORD", "PACKTACTICS1", "PACKTACTICS2", "PACKTACTICS3"]
builtins = ["PACKTACTICS!", "JUSTINBAILEY", "NARPASSWORD", "PACKTACTICS1", "PACKTACTICS2", "PACKTACTICS3", "OHNOITSPEV!!"]
if len(densePwd) != 84 and (aBuiltin not in builtins): if len(densePwd) != 84 and (aBuiltin not in builtins):
print("This password is not valid. If this is a password that this generator created, please email noelle@noelle.codes and let me know.") print("This password is not valid. If this is a password that this generator created, please email noelle@noelle.codes and let me know.")
sys.exit(0) sys.exit(0)
# self.print_params() # self.print_params()
# self.print_chars() # self.print_chars()
return return
elif aBuiltin == "OHNOITSPEV!!":
# Create a random campaign, but the adversary is Pev
self.create_campaign(n=6, makeChars=True)
self.params = Plot(probIndex=121)
numPwd = [] numPwd = []
for c in densePwd: for c in densePwd:
numPwd.append(Campaign.ALPHABET.index(c)) numPwd.append(Campaign.ALPHABET.index(c))

Loading…
Cancel
Save