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
|
|
|
|
return
|
2021-08-21 14:27:58 +02:00
|
|
|
|
2024-08-09 03:42:08 +02:00
|
|
|
# label get_ending:
|
|
|
|
# # To check what ending we're getting, call this label and then check the value of _return
|
|
|
|
# # Sensible to have this logic defined in only one place for consistency
|
|
|
|
# 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
|
2024-08-09 00:19:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
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
|