-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
309 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,30 @@ | ||
import secrets, json | ||
import secrets, json, random | ||
|
||
def dna_weekly(): # Weekly supply of DNA for research, used for LAB purchases | ||
with open("UniData.txt", 'r') as f: | ||
variables = json.load(f) | ||
variables["dna_points"] += int(float(variables["infected"])/(1 + (variables["healthy"] * 100))) | ||
dna_random() | ||
#print("DNA POINTS (DEBUG): " + str(variables["dna_points"])) | ||
variables["dna_points"] += 1 + int(float(variables["infected"])/(1 + (variables["healthy"] * 100))) | ||
#print("DNA POINTS (DEBUG): " + str(variables["dna_points"])) | ||
#dna_random() | ||
#print("DNA POINTS (DEBUG): " + str(variables["dna_points"])) | ||
with open("UniData.txt", 'w') as f2: | ||
json.dump(variables, f2, indent=3) | ||
print("Research Points: " + str(variables["dna_points"])) | ||
with open("UniData.txt", 'r') as f3: | ||
variables = json.load(f3) | ||
|
||
|
||
def dna_random(): # Random DNA per week, can determine victory or defeat | ||
with open("UniData.txt", 'r') as f: | ||
variables = json.load(f) | ||
rand_value1 = secrets.randbelow(10) | ||
if rand_value1 > 4: | ||
random_dna = secrets.randbelow(3) | ||
rand_value1 = secrets.randbelow(100) | ||
#print("RAND VALUE (DEBUG): " + str(rand_value1)) | ||
if rand_value1 >= 70: | ||
random_dna = random.randint(1, 5) | ||
# print("RANDOM DNA (DEBUG: " + str(random_dna)) | ||
variables["dna_points"] += int(random_dna) | ||
# print("DNA POINTS (DEBUG): " + str(variables["dna_points"])) | ||
with open("UniData.txt", 'w') as f2: | ||
json.dump(variables, f2, indent=3) | ||
else: | ||
return | ||
# print("DNA POINTS (DEBUG): " + str(variables["dna_points"])) | ||
print("Research Points: " + str(variables["dna_points"])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
{ | ||
"healthy": 100000, | ||
"infected": 1, | ||
"zombies": 0, | ||
"dead": 0, | ||
"cure": 0, | ||
"week": 0, | ||
"infectivity": 0, | ||
"infectivity_limit": 10000, | ||
"severity": 0, | ||
"severity_limit": 100, | ||
"lethality": 0, | ||
"lethality_limit": 10, | ||
"weekly_infections": 10, | ||
"dna_points": 0, | ||
"burst": 0, | ||
"burst_price": 10, | ||
"necrosis": 0, | ||
"necrosis_price": 20, | ||
"water": 0, | ||
"water_price": 10, | ||
"air": 0, | ||
"air_price": 10, | ||
"blood": 0, | ||
"blood_price": 20, | ||
"saliva": 0, | ||
"saliva_price": 20, | ||
"zombify": 0, | ||
"zombify_price": 20, | ||
"rise": 0, | ||
"rise_price": 20, | ||
"limit": 100001, | ||
"cure_percent": 0, | ||
"old": 0, | ||
"color": 0, | ||
"influence[0]": "Infectivity", | ||
"influence[1]": "Severity", | ||
"influence[2]": "Lethality", | ||
"gene[0]": "BURST", | ||
"gene[1]": "NECROSIS", | ||
"gene[2]": "WATER", | ||
"gene[3]": "AIR", | ||
"gene[4]": "BLOOD", | ||
"gene[5]": "SALIVA", | ||
"gene[6]": "ZOMBIFY", | ||
"gene[7]": "RISE" | ||
{ | ||
"healthy": 100000, | ||
"infected": 1, | ||
"zombies": 0, | ||
"dead": 0, | ||
"cure": 0, | ||
"week": 0, | ||
"infectivity": 0, | ||
"infectivity_limit": 10000, | ||
"severity": 0, | ||
"severity_limit": 100, | ||
"lethality": 0, | ||
"lethality_limit": 10, | ||
"weekly_infections": 10, | ||
"dna_points": 0, | ||
"burst": 0, | ||
"burst_price": 10, | ||
"necrosis": 0, | ||
"necrosis_price": 20, | ||
"water": 0, | ||
"water_price": 10, | ||
"air": 0, | ||
"air_price": 10, | ||
"blood": 0, | ||
"blood_price": 20, | ||
"saliva": 0, | ||
"saliva_price": 20, | ||
"zombify": 0, | ||
"zombify_price": 20, | ||
"rise": 0, | ||
"rise_price": 20, | ||
"limit": 100001, | ||
"cure_percent": 0, | ||
"old": 0, | ||
"color": 1, | ||
"influence[0]": "Infectivity", | ||
"influence[1]": "Severity", | ||
"influence[2]": "Lethality", | ||
"gene[0]": "BURST", | ||
"gene[1]": "NECROSIS", | ||
"gene[2]": "WATER", | ||
"gene[3]": "AIR", | ||
"gene[4]": "BLOOD", | ||
"gene[5]": "SALIVA", | ||
"gene[6]": "ZOMBIFY", | ||
"gene[7]": "RISE" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import os, platform, time, secrets, gc, sys, threading, Clear, WordCore, Loading, UI, Graph, Generation, json | ||
from json_system import * | ||
from ColorSplash import * | ||
|
||
OS = platform.system() | ||
|
||
|
@@ -37,8 +38,10 @@ def infecting_agent(): # Determines how many infections occur | |
with open("UniData.txt", 'r') as f: | ||
variables = json.load(f) | ||
inf_value = float(variables["infectivity"])/(1 + variables["lethality"]) # Must be kept as int() + lethality, inflates lethality otherwise | ||
variables["infected"] += int(inf_value) | ||
variables["healthy"] -= int(inf_value) | ||
variables["infected"] += int(inf_value) + int(variables["weekly_infections"]) | ||
variables["healthy"] -= int(inf_value) + int(variables["weekly_infections"]) | ||
with open("UniData.txt", 'w') as f2: | ||
json.dump(variables, f2, indent=3) | ||
|
||
|
||
def enforce_value_maximums(): #Makes sure that maximum/minumum values are never violated | ||
|
@@ -842,30 +845,12 @@ def player_menu(): | |
if variables["color"] != 0: | ||
UI.Color_lux() | ||
UI.Color_player_menu_UI() | ||
answer = input(str(Green_Blackxx + "Command: ")) | ||
print(Reset, end='') | ||
else: | ||
UI.lux() | ||
UI.player_menu_UI() | ||
#WordCore.word_corey("@@@@", " Week: " + str(week), "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> WORLD | ", "View world data", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> VIRUS | ", "View nano-virus data", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> LAB | ", "Work on your virus in the lab", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> TURN | ", "Move onto the next week", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> FAST | ", "Enter fast turn mode", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> SAVE | ", "Save your progress", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> LOAD | ", "Load a previous save", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#WordCore.word_corey("@@@@ >>> EXIT | ", "Quit the game without saving", "@@@@\n") | ||
#WordCore.word_corey("@@@@", "", "@@@@\n") | ||
#print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@") | ||
#print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@") | ||
answer = input(str("Command: ")) | ||
answer = input(str("Command: ")) | ||
if answer == "WORLD": | ||
Clear.clear() | ||
if variables["color"] != 0: | ||
|
@@ -916,13 +901,17 @@ def turn(): | |
Clear.clear() | ||
with open("UniData.txt", 'r') as f: | ||
variables = json.load(f) | ||
#variables["week"] += 1 | ||
#f.close() | ||
variables["week"] += 1 | ||
with open("UniData.txt", 'w') as f2: | ||
json.dump(variables, f2, indent=3) | ||
#f2.close() | ||
WordCore.word_core("A new week has come...", 0.01) | ||
print("\n") | ||
print("Week Number: " + str(variables["week"])) | ||
Generation.dna_weekly() | ||
Generation.dna_random() | ||
infecting_agent() | ||
check_cure_start() | ||
BURST_check() | ||
|
@@ -931,7 +920,7 @@ def turn(): | |
enforce_value_maximums() | ||
print("\n") | ||
Graph.graphical_analysis_mini() | ||
time.sleep(3) | ||
#time.sleep(3) | ||
player_menu() | ||
|
||
|
||
|
@@ -946,6 +935,7 @@ def turn_fast(): | |
print("\n") | ||
print("Week Number: " + str(variables["week"])) | ||
Generation.dna_weekly() | ||
Generation.dna_random() | ||
infecting_agent() | ||
check_cure_start() | ||
BURST_check() | ||
|
@@ -985,30 +975,20 @@ def Save_Check(): | |
|
||
def start_turn(): | ||
Clear.clear() | ||
UI.mail() | ||
WordCore.word_corez("@@@@ [email protected] TO [email protected] @@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
Loading.loading("@@@@ ", "Decrypting Message", "...."," Done! @@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "Hello, Doctor, I see the project is going smoothly...","@@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "5/19/XX", "@@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
Loading.loading("@@@@ ", "Decrypting Message", "...."," Done! @@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "The Nano-Virus you've been working on finally managed to infect someone", "@@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "Make sure to keep control, we wouldn't want you to die prematurely on us, now would we?", "@@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "9/04/XX", "@@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
Loading.loading("@@@@ ", "Decrypting Message", "...."," Done! @@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "I assure you that you, your family, and whomever else you so wish will be kept safe, so","@@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "Worry not. Now, without further ado, let us begin the transition to a new age!","@@@@\n") | ||
WordCore.word_corey("@@@@ >>>", "9/012/XX", "@@@@\n") | ||
WordCore.word_corez("@@@@ @@@@\n") | ||
WordCore.word_corez("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n") | ||
WordCore.word_corez("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n") | ||
input(str("press ENTER to exit Magus...")) | ||
with open("UniData.txt", 'r') as f: | ||
variables = json.load(f) | ||
if variables["color"] != 0: | ||
UI.Color_Mail() | ||
UI.intro_sq_c_nano() | ||
input(str(Green_Blackxx + "press ENTER to exit Magus...")) | ||
print(Reset, end='') | ||
#time.sleep(3) | ||
#answer = input(str(Green_Blackxx + "Command: ")) | ||
else: | ||
UI.mail() | ||
UI.intro_sq() | ||
input(str("press ENTER to exit Magus...")) | ||
#answer = input(str("Command: ")) | ||
player_menu() | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import json_system, json | ||
#from Main import * | ||
def settings(): | ||
with open("Globals.txt", 'r') as f: | ||
variables = json.load(f) | ||
print("This feature is in [alpha], and may cause [Program Termination]") | ||
color_ = str(input("Enable color (Current value [" + str(variables["color"]) + "]): ")) | ||
if color_ == "YES": | ||
variables["color"] = 1 | ||
with open("Globals.txt", 'w') as f2: | ||
json.dump(variables, f2, indent=3) | ||
#intro() | ||
elif color_ == "NO": | ||
variables["color"] = 0 | ||
with open("Globals.txt", 'w') as f2: | ||
json.dump(variables, f2, indent=3) | ||
else: | ||
settings() |
Oops, something went wrong.