diff --git a/docs/STORY.md b/docs/STORY.md index a15b971..c8c3d2c 100644 --- a/docs/STORY.md +++ b/docs/STORY.md @@ -45,6 +45,6 @@ Nothing forgets them. *X will remember that.* Each one's last page says what happened, what you did that made it happen, and what it cost whom. -- **Five on the plane.** The twentieth morning; everyone gets on. The page says whether the count closed and how, what Marit will answer for at the other end, what Dov did with the report, what Teo knows, and what Aksel had. +- **Five on the plane.** The twentieth morning; everyone gets on. The page says whether the count closed and how, what Marit will answer for at the other end, what Dov did with the report, what Teo knows, and what Aksel had — and, if he asked you on the strip to say four and you said five, that it cost him the last winter he had asked for. - **The dark flight.** Dov reported it. Base sent the plane in the dark on the twelfth day, in a two-hour window. It landed — the first dark flight in fifty years, and the last one killed the pilot. It took Aksel, and Marit, relieved on the spot. Three of you finished the winter. The page is honest that the flight went well and could not have. - **Aksel stayed.** He was on the strip when the plane came and gone across the bay before the pilot counted heads, because you let him. The ship comes in August. Marit saw, and said nothing. diff --git a/src/overwinter/achievements.py b/src/overwinter/achievements.py index fba127a..ebf3020 100644 --- a/src/overwinter/achievements.py +++ b/src/overwinter/achievements.py @@ -17,7 +17,7 @@ from tak import arcade -from overwinter import facts, flags, people +from overwinter import facts, people ACHIEVEMENTS = [ { @@ -133,10 +133,7 @@ def catchUp(state): def _rememberedSomething(state): # Flags are never forgotten in Overwinter, so a remembered choice is - # still on the state: any of the ones people hold you to, or the last - # one on the strip. - if flags.BACKED_AKSEL_STAYING in state.flags: - return True + # still on the state: any of the ones people hold you to. return any(flag in state.flags for flag in people.REMEMBERED) diff --git a/src/overwinter/endings.py b/src/overwinter/endings.py index bb5d5a6..90e412d 100644 --- a/src/overwinter/endings.py +++ b/src/overwinter/endings.py @@ -116,27 +116,43 @@ def _people(state): def _aksel(state): + # Saying five on the strip is the last thing he will remember, and it + # undoes "he had his winter" - he did not get the end of it. + refused = state.flags.get(flags.BACKED_AKSEL_STAYING) is False if state.flags.get(flags.BROUGHT_AKSEL_IN): - return ( + paragraph = ( "AKSEL. You asked him to come in and he came, with his crates on " "the sledge, and ate at the table with the rest of you. Dov " "learned what was going on at supper that night, from his face." ) - if state.flags.get(flags.AKSEL_WALKED_IN): - return ( + elif state.flags.get(flags.AKSEL_WALKED_IN): + paragraph = ( "AKSEL. He walked in on his own the night the store ran out, " "because he had been counting too. You had not found him. He " "found you." ) - if state.flags.get(flags.LEFT_AKSEL_AT_HUT): - return ( + elif state.flags.get(flags.LEFT_AKSEL_AT_HUT): + paragraph = ( "AKSEL. You left him in the hut, as he asked, and walked across " - "with what he needed when he needed it. He had his winter." + "with what he needed when he needed it." ) - return ( - "AKSEL. You knew where he was and never said what you wanted of him. " - "He had his winter, and you had your count." - ) + if not refused: + paragraph += " He had his winter." + else: + paragraph = ( + "AKSEL. You knew where he was and never said what you wanted of him." + ) + if not refused: + paragraph += " He had his winter, and you had your count." + if refused: + paragraph += ( + " On the strip he asked you to say four and let him go back " + "across, and you said five. He got on the plane and did not look " + "at the bay again. It cost him the hut, the holes and the August " + "ship - the last winter he had asked for - and he knows whose " + "word took it." + ) + return paragraph def _fiveOut(state): diff --git a/src/overwinter/people.py b/src/overwinter/people.py index bca902c..652d20e 100644 --- a/src/overwinter/people.py +++ b/src/overwinter/people.py @@ -15,6 +15,7 @@ from overwinter import facts from overwinter.flags import ( AKSEL_WALKED_IN, + BACKED_AKSEL_STAYING, BROUGHT_AKSEL_IN, COVERED_FOR_TEO, DOV_HOLDS, @@ -589,4 +590,5 @@ def atTheTable(): COVERED_FOR_TEO: "Teo", BROUGHT_AKSEL_IN: "Aksel", LEFT_AKSEL_AT_HUT: "Aksel", + BACKED_AKSEL_STAYING: "Aksel", # set on the strip, not in conversation } diff --git a/tests/test_ending_pages.py b/tests/test_ending_pages.py index 691dd52..ffab10f 100644 --- a/tests/test_ending_pages.py +++ b/tests/test_ending_pages.py @@ -1,7 +1,7 @@ """The last pages, built straight from a state: every remembered choice gets its sentence, and the count says how it closed.""" -from overwinter import endings, facts, flags +from overwinter import endings, facts, flags, people from overwinter.state import State @@ -84,6 +84,30 @@ def test_aksel_on_the_five_out_page_follows_how_he_came_to_the_table(): assert len(_starting(state, line)) == 1, setFlags +def test_saying_five_on_the_strip_is_remembered_and_takes_back_his_winter(): + refusal = "On the strip he asked you to say four" + for setFlags in ( + {flags.BROUGHT_AKSEL_IN: True}, + {flags.AKSEL_WALKED_IN: True}, + {flags.LEFT_AKSEL_AT_HUT: True}, + {}, + ): + refused = _ended( + facts.FIVE_OUT, **dict(setFlags, **{flags.BACKED_AKSEL_STAYING: False}) + ) + (aksel,) = _starting(refused, "AKSEL.") + assert refusal in aksel, setFlags + assert "the last winter he had asked for" in aksel + assert "He had his winter" not in aksel, setFlags + + (unasked,) = _starting(_ended(facts.FIVE_OUT, **setFlags), "AKSEL.") + assert refusal not in unasked, setFlags + + +def test_the_strip_choice_is_one_people_remember(): + assert people.REMEMBERED[flags.BACKED_AKSEL_STAYING] == "Aksel" + + def test_the_count_names_every_way_it_was_closed(): state = _ended( facts.FIVE_OUT, **{flags.DEPOT_FETCHED: True, flags.HALF_RATIONS: True} diff --git a/tests/test_game.py b/tests/test_game.py index 3a53f85..df8dcdb 100644 --- a/tests/test_game.py +++ b/tests/test_game.py @@ -107,6 +107,7 @@ def test_the_winter_can_be_finished_with_five_on_the_plane(scripted): assert flags.GENERATOR_RAN_DRY not in state.flags assert state.flags[flags.DEPOT_FETCHED] is True assert state.flags[flags.BACKED_AKSEL_STAYING] is False + assert ui.saw("On the strip he asked you to say four") # The count closed: there was food on the shelf on the last morning. assert flags.STORE_EMPTIED_ON not in state.flags assert state.food > 0 diff --git a/version.txt b/version.txt index 6e8bf73..17e51c3 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.1.0 +0.1.1