|
|
@@ -305,15 +305,15 @@ class Campaign: |
|
|
|
self.masterpassword = None |
|
|
|
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 |
|
|
|
self.ship = Ship() |
|
|
|
self.params = Plot() |
|
|
|
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: |
|
|
|
self.characters = [] |
|
|
|
for _ in range(n): |
|
|
@@ -462,7 +462,7 @@ class Campaign: |
|
|
|
def decode_key(self, pw): |
|
|
|
densePwd = pw.replace(" ", "") |
|
|
|
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): |
|
|
|
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) |
|
|
@@ -524,6 +524,10 @@ class Campaign: |
|
|
|
# self.print_params() |
|
|
|
# self.print_chars() |
|
|
|
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 = [] |
|
|
|
for c in densePwd: |
|
|
|
numPwd.append(Campaign.ALPHABET.index(c)) |