2021-06-19 15:36:02 +02:00
|
|
|
## Utility functions for game setup, debugging etc.
|
|
|
|
|
2023-05-07 04:11:35 +02:00
|
|
|
label initstats(anon=0, fang=0):
|
2021-06-19 15:36:02 +02:00
|
|
|
# Sets various game-related global variables
|
|
|
|
# :param int anon: Anon's score
|
|
|
|
# :param int fang: Fang's score
|
|
|
|
# :param bool trad: Tradwife ending flag
|
|
|
|
$ anonscore = anon
|
|
|
|
$ fangscore = fang
|
2024-08-17 01:56:58 +02:00
|
|
|
$ wingStory = False
|
|
|
|
|
|
|
|
if persistent.enable_debug_scores:
|
|
|
|
$ debug_story_variables(False)
|
|
|
|
$ debug_story_variables(True)
|
|
|
|
|
2021-06-19 15:36:02 +02:00
|
|
|
return
|
2021-08-21 14:27:58 +02:00
|
|
|
|
2024-08-09 00:19:48 +02:00
|
|
|
|
|
|
|
init python:
|
|
|
|
def get_ending():
|
|
|
|
if anonscore >= 4 and fangscore >= 4 and wingStory:
|
|
|
|
return 4 # Golden
|
2024-08-17 18:26:00 +02:00
|
|
|
elif anonscore >= 3 and fangscore <= 4:
|
2024-08-09 00:19:48 +02:00
|
|
|
return 3 # Tradwife
|
2024-08-17 18:26:00 +02:00
|
|
|
elif anonscore <= 3 and fangscore >= 3:
|
2024-08-09 00:19:48 +02:00
|
|
|
return 2 # Doomer
|
|
|
|
else:
|
|
|
|
return 1 # Shooter
|
2024-08-17 01:56:58 +02:00
|
|
|
|
|
|
|
|
2024-08-19 03:45:14 +02:00
|
|
|
def debug_story_variables(toggle=True):
|
2024-08-17 01:56:58 +02:00
|
|
|
var_list = [
|
|
|
|
"anonscore",
|
|
|
|
"fangscore",
|
2024-08-19 03:45:14 +02:00
|
|
|
"current_chapter",
|
|
|
|
"chapter_list_length",
|
|
|
|
"chapter_list_index",
|
|
|
|
"ending_route_number"
|
2024-08-17 01:56:58 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
for item in var_list:
|
|
|
|
if toggle:
|
|
|
|
renpy.watch(item)
|
|
|
|
else:
|
|
|
|
renpy.unwatch(item)
|
|
|
|
|
2024-08-17 18:24:22 +02:00
|
|
|
|
2024-08-21 03:09:04 +02:00
|
|
|
def increase_anon_points():
|
|
|
|
global anonscore, lock_scores
|
|
|
|
|
|
|
|
if not lock_scores:
|
|
|
|
anonscore += 1
|
|
|
|
|
|
|
|
|
|
|
|
def inscrease_fang_points():
|
|
|
|
global fangscore, lock_scores
|
|
|
|
|
|
|
|
if not lock_scores:
|
|
|
|
fangscore += 1
|
|
|
|
|
|
|
|
|