SnootGame/game/utility.rpy
2024-08-22 22:04:44 -03:00

52 lines
1.2 KiB
Text

## Utility functions for game setup, debugging etc.
init python:
def get_ending():
if anonscore >= 4 and fangscore >= 4 and wingStory:
return 4 # Golden
elif anonscore >= 3 and fangscore <= 4:
return 3 # Tradwife
elif anonscore <= 3 and fangscore >= 3:
return 2 # Doomer
else:
return 1 # Shooter
def debug_story_variables(toggle=True):
var_list = [
"anonscore",
"fangscore",
"current_chapter",
"chapter_list_length",
"chapter_list_index",
"ending_route_number",
"is_end_reached"
]
for item in var_list:
if toggle:
renpy.watch(item)
else:
renpy.unwatch(item)
def increase_anon_points():
global anonscore, lock_scores
if not lock_scores:
anonscore += 1
def increase_fang_points():
global fangscore, lock_scores
if not lock_scores:
fangscore += 1
def toggle_debug():
if persistent.enable_debug_scores:
debug_story_variables(False)
debug_story_variables(True)