extends RefCounted ## Flashlight possession changes the route, not just the duration or wording. func run(qa: RefCounted) -> void: var game: Node = qa.game qa.start(2,2) qa.perform("keys_fast") qa.perform("front") qa.check(game.facts.has("lamp") and not game.items.has("lamp"),"Remembering a flashlight is not carrying one") qa.check(game.action_button("stairs") != null and game.action_button("stairs_lit") == null,"Without the item only a dark stair inspection is available") game.choose_action("stairs_lit") qa.check(game.busy.is_empty() and game.place == "landing","Hidden descent cannot bypass flashlight possession") qa.perform("stairs") qa.check(game.place == "landing" and game.heard.has("stairs_m"),"In the dark mother stays on the intact landing") qa.perform("return_flat") qa.check(game.place == "flat" and game.action_button("lamp_fast") != null,"Mother can return to fetch the flashlight") qa.finish("flat") qa.start(2,2) qa.perform("keys_fast") qa.perform("lamp_fast") qa.perform("front") qa.check(game.action_button("stairs") == null and game.action_button("stairs_lit") != null,"A working flashlight opens an actual descent") qa.perform("stairs_lit") qa.check(game.place == "stairwell" and game.heard.has("stairs_lit_m") and not game.heard.has("stairs_m"),"Lit response and movement agree") qa.check(game.action_button("side_open") == null and game.action_button("neighbor") == null,"Leaving the floor removes its doors from the cloud") qa.check(game.action_button("question") == null,"Katya does not ask whether mom is alone at home after she has left it") qa.perform("stairs_down") qa.check(game.action_button("stairs_down") != null,"The descent can continue instead of hitting an invented blockage") await qa.capture("phone-stairwell-route") qa.finish("stairwell") qa.click("next") qa.check(game.place == "flat" and game.items.is_empty(),"Redial resets movement and carried flashlight") qa.start(2,2) game.facts.erase("stairs") qa.perform("keys_fast") qa.perform("lamp_fast") qa.perform("front") qa.at(74) qa.click("stairs_lit") qa.check(game.place == "landing","Mother hears the complete instruction before starting to walk") qa.at(game.busy_start+game.voice_length("stairs_lit_k")+0.13) qa.check(game.place == "stairwell" and not game.facts.has("stairs"),"Movement can begin without granting an unfinished answer") qa.at(81.1) qa.check(game.busy.is_empty() and game.heard[-1] == "hum" and not game.facts.has("stairs"),"Fixed final line interrupts a late descent without granting knowledge") qa.finish("stairwell") qa.start(2,2) qa.perform("keys_fast") qa.perform("lamp_fast") qa.perform("front") qa.at(80) qa.click("stairs_lit") qa.at(81.1) qa.check(game.place == "landing","Interrupting Katya before her instruction ends cannot start a phantom descent") qa.finish("landing")