WTS/game/scripts/events/quests.rpy
LoafyLemon b28a3e250d Refactor variables - Part 1
* Added get_character_scheduling function
* Removed update_interface_color calls (Redundant)
* Redesigned variable naming convention to simplify assignment and lookup
* Removed counter_class (Superseded)
* Removed DynamicDisplayable CG implementation (Superseded)
2023-03-31 23:41:48 +01:00

417 lines
15 KiB
Plaintext

### Quests ###
# Add any event triggers to this list.
# Only one event can play for each day/night (this might change.)
# Add date specific events at the start of the list (create the date if it's not there.)
label quests:
$ renpy.choice_for_skipping()
if states.room == "main_room":
#
# DAY-BASED EVENTS
#
if game.day >= 1:
if game.daytime:
if not states.gen.ev.intro.e2_complete and states.gen.ev.intro.bird_examined and states.gen.ev.intro.desk_examined and states.gen.ev.intro.cupboard_examined and states.gen.ev.intro.door_examined and states.gen.ev.intro.fireplace_examined:
jump genie_intro_E2
else:
if not snape_intro.E1_complete:
jump snape_intro_E1
if game.day >= 2:
if game.daytime:
if not states.gen.ev.intro.e3_complete:
jump genie_intro_E3
else:
if ss_event_pause == 0 and not snape_intro.E2_complete:
# Snape's second visit.
jump snape_intro_E2
if game.day >= 3:
if game.daytime:
if not states.gen.ev.intro.e4_complete:
jump genie_intro_E4
else:
if ss_event_pause == 0 and not snape_intro.E3_complete:
# Day of the duel.
jump snape_intro_E3
if game.day >= 4:
if game.daytime:
pass
else:
if ss_event_pause == 0 and not snape_intro.E5_complete:
# You bother decide to just "roll with it"... Snape summon unlocked.
jump snape_intro_E5
if game.day >= 5:
if game.daytime:
if hg_event_pause == 0 and not states.her.ev.intro.e1_complete:
# Hermione shows up for the first time.
jump hermione_intro_E1
if game.day >= 6:
if game.daytime:
if hg_event_pause == 0 and ss_he.hermione_E1 and not states.her.ev.intro.e2_complete:
# Second visit from Hermione. Says she sent a letter to the Ministry.
jump hermione_intro_E2
else:
pass
if game.day >= 7:
if game.daytime:
pass
else:
if hg_event_pause == 0 and ss_he.hermione_E2 and not states.her.ev.intro.e3_complete:
# Takes place after first special event with Snape, where he just complains about Hermione.
# Hermione might have failed a test...
jump hermione_intro_E3
if game.day >= 8:
if game.daytime:
pass
else:
if hg_event_pause == 0 and states.her.ev.intro.e3_complete and not states.her.ev.intro.e4_complete:
# She failed a test and cries.
jump hermione_intro_E4
if game.day >= 9:
if game.daytime:
if hg_event_pause == 0 and states.her.ev.intro.e4_complete and not states.her.ev.intro.e5_complete:
# Hermione asks to be tutored. Summon unlocked!
jump hermione_intro_E5
if game.day >= 10:
if game.daytime:
if nt_event_pause == 0 and states.her.ev.intro.e5_complete and not tonks_intro.E1_complete:
# Tonks visits for the first time.
jump tonks_intro_E1
else:
if tonks_intro.E1_complete and not tonks_intro.E2_complete:
# Tonks has found no evidence so far.
jump tonks_intro_E2
if game.day >= 11:
if game.daytime:
pass
else:
if nt_event_pause == 0 and ss_he.tonks_E1 and not tonks_intro.E3_complete:
# Tonks becomes a teacher. Summon unlocked!
jump tonks_intro_E3
if game.day >= 13:
if game.daytime:
if hg_event_pause == 0 and states.her.ev.intro.e5_complete and ss_he.tonks_E1 and states.her.ev.intro.convinced and not states.her.ev.intro.e6_complete:
# Hermione wants to buy favours. Favours unlocked!
jump hermione_intro_E6
if is_puzzle_box_in_fireplace():
$ states.fireplace_started = False
$ fireplace_OBJ.foreground = "glow_effect_fireplace"
elif fireplace_OBJ.foreground == "glow_effect_fireplace":
$ fireplace_OBJ.foreground = None
#
# CARDGAME - EVENTS
#
if game.day >= twins_cards_delay:
if deck_unlocked and twins_first_win and not twins_cards_stocked:
if not game.daytime:
$ letter_cards_store.send()
if geniecard_level < 2 and snape_third_win and her_third_win and twins_second_win:
if not game.daytime:
$ letter_cards_tier2.send()
#
# CHO CHANG - EVENTS
#
if cc_event_pause == 0:
if game.daytime:
if not states.cho.ev.intro.e1_complete and states.her.tier >= 2:
# Cho intro
jump cho_intro_E1
if states.cho.ev.quidditch.hufflepuff_stage == "start":
$ game.weather = "clear"
stop weather
$ states.cho.ev.quidditch.hufflepuff_stage = "return"
jump hufflepuff_match
elif states.cho.ev.quidditch.slytherin_stage == "start":
$ game.weather = "clear"
stop weather
$ states.cho.ev.quidditch.slytherin_stage = "return"
jump slytherin_match
elif states.cho.ev.quidditch.gryffindor_stage == "start":
$ game.weather = "clear"
stop weather
$ states.cho.ev.quidditch.gryffindor_stage = "return"
jump gryffindor_match
if states.cho.tier == 1:
# Lee Jordan gets knocked out cold
if states.cho.ev.quidditch.hufflepuff_training and not states.cho.ev.quidditch.e3_complete:
jump cho_quid_E3
elif states.cho.tier == 2:
# Hermione refuses to commentate for Slytherin match.
if states.cho.ev.quidditch.slytherin_failed and not states.cho.ev.quidditch.e6_complete:
jump cho_quid_E6
elif states.cho.tier == 3:
# Genie decides to get the broom.
if states.cho.ev.quidditch.gryffindor_training and not states.cho.ev.quidditch.e12_complete:
jump cho_quid_E12
# Informs the player that all preparations are complete
if states.cho.ev.quidditch.e11_complete and states.cho.ev.quidditch.e12_complete and not states.cho.ev.quidditch.e13_complete:
jump cho_quid_E13
else:
# Introduction
if states.cho.ev.intro.e1_complete and not states.cho.ev.intro.e2_complete:
jump cho_intro_E2
# Quidditch training matches
if states.cho.ev.quidditch.in_progress:
$ states.cho.ev.quidditch.in_progress = False
if states.cho.tier == 1:
# Hufflepuff
jump cc_ht_return
elif states.cho.tier == 2:
# Slytherin
jump cc_st_return
elif states.cho.tier == 3:
# Gryffindor
jump cc_gt_return
# Note: The return events now get jumped to right after the main match events.
python:
for i in cc_requests_list:
if i.inProgress:
i.inProgress = False
i.start()
$ play_potion_return("cho")
#
# SUSAN BONES - EVENTS
#
if sb_event_pause == 0:
if game.daytime:
# Introduction
if nt_he.susan_E1 and not susan_intro.E1_complete:
jump susan_intro_E1
$ play_potion_return("susan")
#
# ASTORIA GREENGRASS - EVENTS
#
# Astoria events not triggered by a date.
if ag_event_pause == 0:
if game.daytime:
# Introduction
if states.ast.ev.intro.e2_complete and states.ast.ev.intro.e2_deadend and not states.ast.ev.intro.e3_complete:
jump astoria_intro_E3
if nt_he.astoria_E1 and not states.ast.ev.intro.e4_complete:
jump astoria_intro_E4
else:
# Introduction
if susan_intro.E1_complete and not states.ast.ev.intro.e1_complete:
jump astoria_intro_E1
python:
for i in ag_spell_list: # Spell Training
if i.inProgress:
i.inProgress = False
i.start()
$ play_potion_return("astoria")
#
# SEVERUS SNAPE - EVENTS
#
if ss_event_pause == 0:
if game.daytime:
# Ending events
if states.her.level >= 15 and states.her.ev.yule_ball.e1_complete and not states.her.ev.yule_ball.e2_complete:
# Snape complains that appointing Hermione in the Autumn Ball committee was a mistake.
jump ball_quest_E2
else:
# Ending events
if states.her.ev.yule_ball.started and not states.her.ev.yule_ball.completed:
jump ball_ending_E1
#
# NYMPHADORA TONKS - EVENTS
#
# Tonks events not triggered by a date.
if nt_event_pause == 0:
if game.daytime:
python:
for i in tonks_mail_list:
if i == "poster_1_gift":
letter_nt_1.send()
tonks_mail_list.remove(i)
else:
python:
for i in nt_requests_list:
if i.inProgress:
i.inProgress = False
i.start()
$ play_potion_return("tonks")
#
# HERMIONE GRANGER - EVENTS
#
if hg_event_pause == 0:
if game.daytime:
# Ending events
if states.her.level >= 15 and not states.her.ev.yule_ball.e1_complete:
# Hermione wants to be in the Autumn Ball committee.
jump ball_quest_E1
if states.her.level >= 18 and states.her.ev.yule_ball.e2_complete and not states.her.ev.yule_ball.e3_complete:
# Hermione cries about having no proper dress for the Ball.
jump ball_quest_E3
if states.her.level >= 18 and states.her.ev.yule_ball.e3_complete and not states.her.ev.yule_ball.e4_complete:
# Hermione apologizes for the day (event) before.
jump ball_quest_E4
if hg_pr_sex.is_event_complete(6, 1) and not hg_pr_sex.is_event_complete(6, 2):
# Hermione missed the debriefing
$ hg_pr_sex.start()
else:
if current_job == "maid":
jump maid_responses
elif current_job == "barmaid":
jump barmaid_responses
elif current_job == "gryffindor_cheerleader":
jump gryffindor_cheer_responses
elif current_job == "slytherin_cheerleader":
jump slytherin_cheer_responses
elif current_job == "promoter":
jump hermione_helping_selling_cards
python:
for i in hg_requests_list:
if i.inProgress:
i.start()
for i in hg_ps_list: #Call any public shaming event if it's in progress
if i.inProgress:
renpy.jump(i.complete_label)
$ play_potion_return("hermione")
#
# LUNA LOVEGOOD - EVENTS
#
if ll_event_pause == 0:
if not luna_intro_E1 and states.her.tier >= 3:
if not game.daytime:
# Luna barges into your office sleepwalking.
jump luna_intro_E1
if luna_intro_E1 and not luna_intro_E2:
if game.daytime:
jump luna_intro_E2
if spectrespecs_E1 and not quibbler_stocked:
if game.daytime:
jump spectrespecs_E2_reminder
$ play_potion_return("luna")
elif states.room == "snape_office":
if game.daytime:
if not snape_office_intro_E1:
# Genie searches the office
jump potions_intro_E1
if not snape_office_intro_E2 and snape_office_intro_E1:
# Genie gets caught by the painting.
jump potions_intro_E2
else:
if not snape_office_intro_E2:
# (Optional) Genie gets caught by Snape. (E0 can play either before or after E1)
jump potions_intro_E0
$ eventqueue.start()
# All quest events should somehow end with a jump to the main room day/night cycle
# If no quest event is triggered, resume normally from the main room
call music_block
call screen room_menu
### Quests flags ###
# Snape
default snape_intro = quest_class(
E1_complete = False, # 1st visit
E2_complete = False, # 2nd visit
E3_complete = False, # 3rd visit, before the duel.
duel_complete = False, # Duel
E4_complete = False, # After the duel.
E5_complete = False, # 4th visit, summon unlocked.
)
# Tonks
default tonks_intro = quest_class(
E1_complete = False, # 1st visit
E2_complete = False, # 2nd visit
E3_complete = False, # 3rd visit, summon unlocked.
)
# Susan
default susan_intro = quest_class(
E1_complete = False, # Susan visits.
)
### Hangout Events ###
# Snape
default ss_he = quest_class(
hermione_E1 = False, # I hate her!
hermione_E2 = False, # Let's ruin her!
tonks_E1 = False, # Discuss Tonks with Snape.
tonks_E2 = False, # Inform him that Tonks has joined you both.
tonks_E3 = False, # Tonks is teaching DAtDA. Snape might use Veritaserum on her...
cho_E1 = False, # You tell Snape that you have met Cho.
cho_E2 = False, # Get some help with Quidditch.
hermione_strip = False, # You invite Snape to watch Hermione strip.
)
# Tonks
default nt_he = quest_class(
hermione_E1 = False, # Help with/unlock Hermione's favours.
susan_E1 = False, # Tonks is worried about Susan.
astoria_E1 = False, # Tonks suggests to teach Astoria the Imperius curse.
favors_E1 = False, # Unlock Public Requests.
favors_E2 = False, # Advance to Tier 2.
)