Establish mother's letter request in the first call
This commit is contained in:
@@ -8,7 +8,28 @@ func run(qa: RefCounted) -> void:
|
||||
qa.check(not game.facts.has("mail") and not game.facts.has("code"),"Chapter alone grants no letter or code: " + str(number))
|
||||
qa.check(game.action_button("read_mail") == null and game.action_button("safe") == null,"Unheard letter and safe stay hidden: " + str(number))
|
||||
qa.check("call_04_k" not in game.heard and "call_05_k" not in game.heard,"No knowledgeable opening on an empty profile: " + str(number))
|
||||
qa.check("письм" not in game.action_button("mail_hint").text.to_lower(),"Discovery choice does not reveal the letter")
|
||||
qa.check(game.action_button("mail_hint") == null,"No reason to bring up email without mother's earlier request")
|
||||
|
||||
qa.start(1)
|
||||
var request_at := 0.0
|
||||
for beat in game.story.intro:
|
||||
if beat.line == "intro_02": request_at = beat.at
|
||||
qa.at(request_at+0.1)
|
||||
qa.check(not game.facts.has("mail_request"),"Request is not remembered before mom finishes")
|
||||
qa.at(game.speech_until+0.01)
|
||||
qa.check(game.facts.has("mail_request") and not game.facts.has("mail") and not game.facts.has("code"),"First call establishes only an unopened important letter")
|
||||
qa.check(game.elapsed < game.story.timeline.alarm,"Letter request is heard before the siren")
|
||||
qa.click("memory")
|
||||
await qa.capture("phone-first-letter-memory")
|
||||
qa.check(game.memory_content.text.contains("Попросила Катю помочь"),"Memory records why Katya will return to the letter")
|
||||
qa.click("close_memory")
|
||||
qa.finish("flat")
|
||||
qa.click("next")
|
||||
qa.check(game.chapter == 2 and game.action_button("mail_hint") != null,"First call gives a reason to ask about the letter in call two")
|
||||
qa.check(game.action_button("read_mail") == null,"Remembering a request does not reveal contents")
|
||||
qa.perform("mail_hint")
|
||||
qa.perform("read_mail")
|
||||
qa.check(game.facts.has("code") and game.elapsed < 45,"Motivated second-call route reads the code before blackout")
|
||||
|
||||
qa.start(2)
|
||||
qa.click("memory")
|
||||
@@ -33,7 +54,7 @@ func run(qa: RefCounted) -> void:
|
||||
qa.check(game.memory_content.get_parsed_text().contains("правом кармане"),"Learned knowledge is visible in the notebook")
|
||||
qa.click("close_memory")
|
||||
|
||||
qa.start(2)
|
||||
qa.start_with_letter(2)
|
||||
qa.perform("mail_hint")
|
||||
qa.check(game.facts.has("mail") and not game.facts.has("code"),"Email conversation reveals a marked letter but not its code")
|
||||
qa.check(game.heard.has("mail_hint_k") and game.heard.has("mail_hint_m"),"Letter discovery is a complete conversation")
|
||||
@@ -88,3 +109,14 @@ func run(qa: RefCounted) -> void:
|
||||
qa.click("close_memory")
|
||||
var legacy: Dictionary = game.Profile.valid_flags({"keys":true,"mail":true,"code":true},game.story.facts)
|
||||
qa.check(not legacy.has("keys_exact") and legacy.has("code"),"Legacy guessed keys are not upgraded to confirmed knowledge")
|
||||
var previous_facts: Dictionary = game.facts.duplicate()
|
||||
var previous_completed: int = game.completed
|
||||
game.facts = {"lamp":true}
|
||||
game.completed = 3
|
||||
qa.check(game.continuation_chapter() == 1 and game.facts == {"lamp":true} and game.completed == 3,"Legacy profile hears the missing setup without losing progress")
|
||||
game.facts["mail_request"] = true
|
||||
qa.check(game.continuation_chapter() == 4,"Heard setup restores the saved continuation")
|
||||
game.facts = {"mail":true}
|
||||
qa.check(game.continuation_chapter() == 4,"Existing genuine letter knowledge remains valid")
|
||||
game.facts = previous_facts
|
||||
game.completed = previous_completed
|
||||
|
||||
@@ -359,6 +359,12 @@ func _unhandled_key_input(event: InputEvent) -> void:
|
||||
else:
|
||||
show_menu()
|
||||
|
||||
func continuation_chapter() -> int:
|
||||
# Old profiles without the new conversation must hear it, not receive an
|
||||
# invented memory. Existing discoveries and completed-call count stay intact.
|
||||
if not facts.has("mail_request") and not facts.has("mail"): return 1
|
||||
return mini(completed+1,10)
|
||||
|
||||
func show_menu() -> void:
|
||||
var box := menu_page("main")
|
||||
box.add_child(stage.centered("Не клади трубку",52,INK))
|
||||
@@ -372,7 +378,9 @@ func show_menu() -> void:
|
||||
menu_action(box,"Итоги звонка","outcome",show_outcome)
|
||||
menu_action(box,"Сообщения от подруги","ending_messages",show_messages)
|
||||
else:
|
||||
menu_action(box,"Позвонить маме" if completed == 0 else "Продолжить · звонок %d" % mini(completed + 1, 10),"start",func(): dial_call(mini(completed+1,10),false),true)
|
||||
var next_chapter := continuation_chapter()
|
||||
var start_text := "Позвонить маме" if completed == 0 else ("Первый разговор" if next_chapter == 1 else "Продолжить · звонок %d" % next_chapter)
|
||||
menu_action(box,start_text,"start",func(): dial_call(next_chapter,false),true)
|
||||
menu_action(box,"Проверка сцен","testing",show_test_menu)
|
||||
menu_action(box,"Звук и титры","settings",show_settings)
|
||||
menu_action(box,"Выйти из игры","quit",func(): get_tree().quit())
|
||||
@@ -835,7 +843,7 @@ func refresh_commands() -> void:
|
||||
var entry: Dictionary = story.chapters[chapter - 1]
|
||||
if not done.has("question") and line_allowed(entry.question):
|
||||
command_list.add_child(stage.chip("«"+str(story.lines[entry.question].text)+"»","question",func():choose_action("question")))
|
||||
var names := {"look":"У входной двери", "keys_search":"Найти ключи", "keys_fast":"Ключи в куртке", "lamp_search":"Поискать фонарь", "lamp_fast":"Повернуть батарейку", "mail_hint":"Спросить о почте", "read_mail":"Прочитать письмо", "safe":"Сейф · 0417", "front":"На площадку", "stairs":"Проверить лестницу", "side_try":"Боковая дверь", "side_open":"Ручку вверх и ключ", "inner":"Подальше от окон", "back":"Вернуться в квартиру", "neighbor":"Постучать соседке", "phone_test":"Проверить связь", "phone_shelf":"Телефон на полку", "speak_here":"Мам, я здесь", "speak_love":"Я люблю тебя"}
|
||||
var names := {"look":"У входной двери", "keys_search":"Найти ключи", "keys_fast":"Ключи в куртке", "lamp_search":"Поискать фонарь", "lamp_fast":"Повернуть батарейку", "mail_hint":"Помочь с письмом", "read_mail":"Прочитать письмо", "safe":"Сейф · 0417", "front":"На площадку", "stairs":"Проверить лестницу", "side_try":"Боковая дверь", "side_open":"Ручку вверх и ключ", "inner":"Подальше от окон", "back":"Вернуться в квартиру", "neighbor":"Постучать соседке", "phone_test":"Проверить связь", "phone_shelf":"Телефон на полку", "speak_here":"Мам, я здесь", "speak_love":"Я люблю тебя"}
|
||||
for action in story.actions:
|
||||
if command_allowed(action):
|
||||
var id: String = action.id
|
||||
|
||||
@@ -61,6 +61,12 @@ func start(number: int, knowledge: int = 0) -> void:
|
||||
memories.select(knowledge)
|
||||
click("test_start")
|
||||
|
||||
func start_with_letter(number: int) -> void:
|
||||
start(1)
|
||||
finish("flat")
|
||||
check(game.facts.has("mail_request"),"First conversation establishes mother's request")
|
||||
start(number,1)
|
||||
|
||||
func render() -> void:
|
||||
await game.get_tree().process_frame
|
||||
await game.get_tree().process_frame
|
||||
@@ -542,7 +548,7 @@ func run(target: Node) -> void:
|
||||
check(game.chapter == 3 and game.facts.has("keys_exact") and game.items.is_empty(), "Redial remembers knowledge only")
|
||||
check(game.action_button("keys_fast") != null and game.action_button("keys_search") == null, "Shortcut replaces slow search")
|
||||
|
||||
start(4)
|
||||
start_with_letter(4)
|
||||
perform("mail_hint")
|
||||
perform("read_mail")
|
||||
check(game.facts.has("code"), "Code obtainable before blackout")
|
||||
@@ -553,7 +559,7 @@ func run(target: Node) -> void:
|
||||
perform("safe")
|
||||
check(game.items.has("spare") and game.facts.has("route"), "Code opens safe on next call")
|
||||
|
||||
start(4)
|
||||
start_with_letter(4)
|
||||
perform("mail_hint")
|
||||
at(40)
|
||||
click("read_mail")
|
||||
|
||||
Reference in New Issue
Block a user