SnootGame/game/utility.rpy
Iggy 297ca81c7c - Add array containing general chapters labels
- Add dictionary for endings
- Add chapter transition functions
2024-08-08 19:19:48 -03:00

34 lines
1.1 KiB
Text

## Utility functions for game setup, debugging etc.
label initstats(anon=0, fang=0):
# 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
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
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