misdiagnoses addition
This commit is contained in:
@@ -12,7 +12,7 @@ func _ready() -> void:
|
||||
reset()
|
||||
|
||||
#Reveals the game over screen
|
||||
func reveal():
|
||||
func reveal(message_text: String):
|
||||
|
||||
#Reveals the background image first
|
||||
show()
|
||||
@@ -21,6 +21,7 @@ func reveal():
|
||||
await background.reveal_done
|
||||
|
||||
#Reveals the text and buttons afterwards
|
||||
message.text = Globals.colorize(message_text, "dark_red")
|
||||
for node in [message, back_to_menu, reload_checkpoint]:
|
||||
node.modulate.a = 0.0
|
||||
node.show()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
extends Node
|
||||
|
||||
#Variables for gameplay
|
||||
var day_count : int = 1
|
||||
var floor_count : int = -1
|
||||
var patient_count : int = 1
|
||||
var its_patient_count : int = 0
|
||||
var accurate_diagnoses : int = 0
|
||||
var diagnoses_quota : int = 1
|
||||
var misdiagnoses_allowed : int = 2
|
||||
var daily_patient_limit : int = 3
|
||||
var patient_list = []
|
||||
var event_index : String = ""
|
||||
|
||||
+3
-3
@@ -53,11 +53,11 @@ func _ready() -> void:
|
||||
func _on_new_game_pressed():
|
||||
|
||||
#Setting/Resetting game parameters
|
||||
Globals.day_count = 1
|
||||
Globals.floor_count = -1
|
||||
Globals.patient_count = 0
|
||||
Globals.accurate_diagnoses = 0
|
||||
Globals.diagnoses_quota = 1
|
||||
Globals.misdiagnoses_allowed = 0
|
||||
Globals.daily_patient_limit = 6
|
||||
Globals.event_index = "interfloor"
|
||||
for i in range(len(Patient.patient_list)):
|
||||
@@ -112,13 +112,13 @@ func save_game(save_slot_number:int):
|
||||
|
||||
#Setting up save data
|
||||
var save_data = {
|
||||
"day_count": Globals.day_count,
|
||||
"floor_count": Globals.floor_count,
|
||||
"event_index": Globals.event_index,
|
||||
"supervisor_index": Globals.supervisor_index,
|
||||
"patient_count": Globals.patient_count,
|
||||
"accurate_diagnoses": Globals.accurate_diagnoses,
|
||||
"diagnoses_quota": Globals.diagnoses_quota,
|
||||
"misdiagnoses_allowed": Globals.misdiagnoses_allowed,
|
||||
"daily_patient_limit": Globals.daily_patient_limit,
|
||||
"patient_list": Patient.patient_list,
|
||||
"its_list": Patient.its_list,
|
||||
@@ -168,13 +168,13 @@ func load_game(load_slot_number:int):
|
||||
|
||||
if load_data is Dictionary: #Checks if loaded data is a Dictionary
|
||||
print("Loaded save: " + str(load_data))
|
||||
Globals.day_count = load_data["day_count"]
|
||||
Globals.floor_count = load_data["floor_count"]
|
||||
Globals.event_index = load_data["event_index"]
|
||||
Globals.supervisor_index = load_data["supervisor_index"]
|
||||
Globals.patient_count = load_data["patient_count"]
|
||||
Globals.accurate_diagnoses = load_data["accurate_diagnoses"]
|
||||
Globals.diagnoses_quota = load_data["diagnoses_quota"]
|
||||
Globals.misdiagnoses_allowed = load_data["misdiagnoses_allowed"]
|
||||
Globals.daily_patient_limit = load_data["daily_patient_limit"]
|
||||
Patient.patient_list.clear()
|
||||
Patient.patient_list.append_array(load_data["patient_list"])
|
||||
|
||||
@@ -15,13 +15,13 @@ var symptoms_detailed: Array[Array] = [
|
||||
"SOMATIC HALLUCINATIONS\nFalse sensations, from inside the body or on the skin"],
|
||||
|
||||
["MYSTICAL DELUSIONS\nFalse certainty of spiritual, divine connection",
|
||||
"MANIA\nExcessively elevated mood and increased energy"],
|
||||
"THOUGHT INSERTION\nFalse conviction of having alien thoughts implanted in one's brain"],
|
||||
|
||||
["CHEMOSENSORY HALLUCINATIONS\nFalse perceptions of smell or taste",
|
||||
"SELF-MUTILATION\nDeliberate self-injury"],
|
||||
"DISORGANIZED SPEECH\nIncoherent sentences, words and speech"],
|
||||
|
||||
["HETERO-AGRESSIVE BEHAVIOUR\nExcessive hostility, verbal agression, threats",
|
||||
"VISUAL HALLUCINATIONS\nFalse perceptions of visual stimuli"]
|
||||
"DISSOCIATIVE IDENTITY\nPresence of two or more alternate personalities"]
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ func _ready() -> void:
|
||||
|
||||
|
||||
#Updates Middle Screen Info
|
||||
func update(day_count, floor_count, diagnoses_count, diagnoses_quota):
|
||||
var day = Globals.colorize(str(day_count), "dark_orange")
|
||||
func update(floor_count, diagnoses_count, diagnoses_quota, misdiagnoses_allowed):
|
||||
var floor = Globals.colorize(str(floor_count), "dark_orange")
|
||||
var diagnoses = Globals.colorize(str(diagnoses_count) + "/" + str(diagnoses_quota), "dark_orange")
|
||||
var misdiagnoses = Globals.colorize(str(misdiagnoses_allowed), "dark_orange")
|
||||
|
||||
text = "DAY: " + day + "\n\nFLOOR: " + floor + "\n\nACCURATE DIAGNOSES: " + diagnoses
|
||||
text = "FLOOR: " + floor + "\n\nACCURATE DIAGNOSES: " + diagnoses + "\n\nMISDIAGNOSES ALLOWED: " + misdiagnoses
|
||||
|
||||
|
||||
func reset():
|
||||
update(Globals.day_count, Globals.floor_count, Globals.accurate_diagnoses, Globals.diagnoses_quota)
|
||||
update(Globals.floor_count, Globals.accurate_diagnoses, Globals.diagnoses_quota, Globals.misdiagnoses_allowed)
|
||||
|
||||
@@ -22,8 +22,8 @@ var symptoms_arrays: Array[Array] = [
|
||||
["SUICIDAL IDEATIONS", "PERSECUTORY DELUSIONS", "UNNATURAL BEHAVIOUR", "AUDITORY HALLUCINATIONS"],
|
||||
["SOMATIC HALLUCINATIONS", "MEGALOMANIAC DELUSIONS"],
|
||||
["MYSTICAL DELUSIONS", "THOUGHT INSERTION"],
|
||||
["CHEMOSENSORY HALLUCINATIONS", "DISORGANIZED SPEECH"],
|
||||
["VISUAL HALLUCINATIONS", "DISSOCIATIVE IDENTITY"]
|
||||
["CHEMOSENSORY HALLUCINATIONS", "SELF-MUTILATION"],
|
||||
["VISUAL HALLUCINATIONS", "INSOMNIA"]
|
||||
]
|
||||
#Lists of possible patients sorted by floor
|
||||
var og_patient_list : Array[Dictionary]
|
||||
@@ -39,7 +39,7 @@ var ite_seen = []
|
||||
|
||||
|
||||
#Supervisor file path
|
||||
var supervisor_name = "loeveth"
|
||||
var supervisor_name = "siveyan"
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
||||
@@ -152,7 +152,8 @@ func _on_clear_patient(choice:String):
|
||||
Globals.accurate_diagnoses += 1
|
||||
else:
|
||||
Globals.accurate_diagnoses = 0 # Resetting to 0 if the player makes a wrong diagnosis
|
||||
middle_screen.update(Globals.day_count, Globals.floor_count, Globals.accurate_diagnoses, Globals.diagnoses_quota)
|
||||
Globals.misdiagnoses_allowed -= 1 #Reducing remaining mistakes allowed if the player makes a wrong diagnosis
|
||||
middle_screen.update(Globals.floor_count, Globals.accurate_diagnoses, Globals.diagnoses_quota, Globals.misdiagnoses_allowed) #Updating middle screen info
|
||||
|
||||
Patient.update_list() #Updating patient list
|
||||
Globals.patient_count += 1 #Updating patient_count
|
||||
@@ -177,6 +178,10 @@ func _on_clear_patient(choice:String):
|
||||
#Resetting the scene
|
||||
reset()
|
||||
|
||||
#GameOver is too many misdiagnoses
|
||||
if Globals.misdiagnoses_allowed == -1:
|
||||
UI.game_over.reveal("YOU MADE TOO MANY MISTAKES")
|
||||
|
||||
#Descending Floor if diagnoses_quota reached
|
||||
if Globals.accurate_diagnoses == Globals.diagnoses_quota:
|
||||
Globals.event_index = "descend"
|
||||
|
||||
Reference in New Issue
Block a user