|
|
|
|
|
|
|
|
self.mission = Plot.miss[self.missIndex] |
|
|
self.mission = Plot.miss[self.missIndex] |
|
|
self.probIndex = probIndex if probIndex != None else r.randint(0, len(Plot.prob)-1) |
|
|
self.probIndex = probIndex if probIndex != None else r.randint(0, len(Plot.prob)-1) |
|
|
self.problem = Plot.prob[self.probIndex] |
|
|
self.problem = Plot.prob[self.probIndex] |
|
|
self.secProblem = [x for x in Plot.prob if x["id"] == secProblem][0] if (secProblem != None and secProblem in list(filter(lambda x:x["id"], Plot.prob))) else None |
|
|
|
|
|
|
|
|
if (secProblem != None and secProblem in list(filter(lambda x:x["id"], Plot.prob))): |
|
|
|
|
|
self.secProblem = [x for x in Plot.prob if x["id"] == secProblem][0] |
|
|
|
|
|
else: |
|
|
|
|
|
self.secProblem = None |
|
|
self.thirdProblem = [x for x in Plot.prob if x["id"] == thirdProblem][0] if (thirdProblem != None and thirdProblem in list(filter(lambda x:x["id"], Plot.prob))) else None |
|
|
self.thirdProblem = [x for x in Plot.prob if x["id"] == thirdProblem][0] if (thirdProblem != None and thirdProblem in list(filter(lambda x:x["id"], Plot.prob))) else None |
|
|
self.problem["givenname"] = probName if probName != None else gen_name() |
|
|
self.problem["givenname"] = probName if probName != None else gen_name() |
|
|
if self.problem["id"] == 3: |
|
|
|
|
|
|
|
|
if self.problem["id"] == 3 and self.secProblem == None: |
|
|
self.secProblem = {"name": "Parasites", "shortname": "parasites", "stats": [3,4,2,3]} |
|
|
self.secProblem = {"name": "Parasites", "shortname": "parasites", "stats": [3,4,2,3]} |
|
|
if self.problem["id"] == 10: |
|
|
|
|
|
|
|
|
if self.problem["id"] == 10 and self.secProblem == None: |
|
|
self.secProbIndex = r.randint(0, len(Plot.prob)-2) |
|
|
self.secProbIndex = r.randint(0, len(Plot.prob)-2) |
|
|
self.secProblem = Plot.prob[self.secProbIndex] |
|
|
self.secProblem = Plot.prob[self.secProbIndex] |
|
|
if self.secProbIndex == 3: |
|
|
|
|
|
|
|
|
if self.secProbIndex == 3 and self.thirdProblem == None: |
|
|
self.thirdProblem = {"name": "Parasites", "shortname": "parasites", "stats": [3,4,2,3]} |
|
|
self.thirdProblem = {"name": "Parasites", "shortname": "parasites", "stats": [3,4,2,3]} |
|
|
self.fullProblem = self.problem["givenname"] + ", " + self.problem["name"] |
|
|
self.fullProblem = self.problem["givenname"] + ", " + self.problem["name"] |
|
|
if self.secProblem and self.secProblem["name"] != "Parasites": |
|
|
if self.secProblem and self.secProblem["name"] != "Parasites": |