Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for quest tracking in The Sea #1313

Merged
merged 13 commits into from Nov 27, 2022
Merged

Tests for quest tracking in The Sea #1313

merged 13 commits into from Nov 27, 2022

Conversation

Veracity0
Copy link
Contributor

@Veracity0 Veracity0 commented Nov 23, 2022

Official KoL "quests" appear in the Quest Log with a name. Progress is tracked by "steps" in the quest log and also in quest nudges in the charpane. KoLmafia tracks this progression from UNSTARTED (nothing in the quest log) to STARTED to step1, step2, ... to FINISHED (noted in the quest log but no more quest nudges).

Our convention is to advance the quest step when we see the action that does so, but also to deduce that you have achieved such-and-such a step when we notice something that implies you must be at a particular step (or later).

An Old Guy and The Ocean

  1. Talking to the Old Man the first time -> STARTED
    Talking to the Old Man again without boot -> STARTED

"The Old Man wants you to find his boot in The Sea."

  1. Buying the damp old boot from Big Brother -> step1 (and dampOldBootPurchased = true)

"Take the boot back to the Old Man."

  1. Returning the damp old boot to the Old Man -> FINISHED
    Seeing the old man snoring -> FINISHED

"You helped the Old Man retrieve his boot from The Sea. Marvelous!"

Hey Hey, Find The Monkees

The Sea Floor with only An Octopus's Garden is UNSTARTED
Getting the wriggling fly trap pellet is still UNSTARTED, as far as KoL is concerned.

  1. Using the wriggling fly trap pellet -> STARTED
    See the monkey castle on The Sea Floor -> STARTED
    Seeing only little brother in the castle -> STARTED

"Go see Little Brother in the Sea Monkee Castle."

  1. Talking to little brother and opening The Wreck of the Edgar Fitzsimmons -> step1
    Seeing The Sea Floor with The Wreck of the Edgar Fitzsimmons -> step1

"Rescue Big Brother from the Wreck of the Edgar Fitzsimmons."

  1. Releasing big brother from the wreck -> step2 (and bigBrotherReleased = true)
    Seeing big brother in the castle -> step2 (and bigBrotherReleased = true)

"Go see Big Brother in the Sea Monkee Castle."

  1. Talking to big brother and getting bubblin' stone -> step3)

"Check in with Little Brother in the Sea Monkee Castle."

  1. Talking to little brother about grandpa -> step4
    Seeing the class-appropriate area on the sea floor where grandpa -> step4)

"Find Grandpa in The Marinara Trench."

  1. Talking to Grandpa for the third time while adventuring -> step5
    Seeing grandpa in castle -> step5

"Have a chat with Grandpa in the Sea Monkee Castle."

  1. Asking grandpa about grandma -> step6
    Seeing outpost on sea floor -> step6

"Search for clues to Grandma's location in the Mer-Kin Outpost."

  1. Getting grandma's note -> step7
    Talking to grandpa with note in inventory about note -> step7

"Figure out what to do with Grandma's note... Perhaps Grandpa will have some ideas?"

  1. Talking to grandpa with note and two yarns gives us grandma's map -> step8

"Rescue Grandma from the Mer-Kin Outpost."

  1. Rescuing grandma in the outpost -> step9
    Seeing whichshop=grandma in the castle -> step9

"Check back in with Little Brother in the Sea Monkee Castle."

  1. Little brother says Big Brother has been acting weird -> step10

"Go check on Big Brother in the Sea Monkee Castle."

  1. Big brother tells us he found black glass -> step11

"Buy the black glass from Big Brother in the Sea Monkee Castle."

  1. We buy the black glass (and get a refund) -> step12
    Wearing black glass and seeing abyss on sea floor -> step12

"Use the black glass to explore the Caliginous Abyss."

  1. Rescuing mom -> FINISHED
    Seeing mom in the castle -> FINISHED
    Getting a status effect from mom (as in via the "mom" command) -> FINISHED

"You have rescued the entire family of Sea Monkees. Well, except for Dad, but we shouldn't talk about that."

Mer-Kin Deepcity

For some reason, this is done with properties, rather than as a Quest.
Probably because, unlike the above two, KoL does not log any quest steps.

  1. intenseCurrents (new property)
    Using Mer-kin trailmap sets to true
    Seeing currents on sea floor sets to true

  2. corralUnlocked (existing property)
    Set when we ask grandpa about currents
    Set when we see corral on sea floor

  3. seahorseName (existing property)
    Set when we tame it in corral
    Set when we ride it to the Mer-Kin Deepcity

Existing Bugs Fixed

  • The sea monkey quest does not start when you acquire the wriggling flytrap pellet. Only when you use it.
  • Freeing Big Brother did not advance quest because the wrong choice option was being checked.
  • Talking to Grandpa the third time did not advance quest because that happens in a choice adventure, not an adventure.php non-combat.

Future Considerations

  1. There are some properties that essentially duplicate quest steps
  • dampOldBootPurchased - same as Quest.SEA_OLD_GUY at "step1"
  • bigBrotherRescued - same as Quest.SEAMONKEES at "step2"
  1. The Mer-Kin Deepcity, is, essentially, a quest, but we use properties to track it.
  • intenseCurrents - when you follow the Mer-kin trailmap
  • corralAvailable - when you ask Grandpa about the currents
  • seahorseName - when you tame a seahorse and can follow the currents.

@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Merging #1313 (243334c) into main (150e911) will increase coverage by 0.13%.
The diff coverage is 86.48%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1313      +/-   ##
============================================
+ Coverage     32.96%   33.10%   +0.13%     
- Complexity    16454    16547      +93     
============================================
  Files          1045     1045              
  Lines        162843   162854      +11     
  Branches      35340    35341       +1     
============================================
+ Hits          53688    53907     +219     
+ Misses        99744    99528     -216     
- Partials       9411     9419       +8     
Impacted Files Coverage Δ
.../net/sourceforge/kolmafia/objectpool/ItemPool.java 14.28% <ø> (ø)
.../sourceforge/kolmafia/preferences/Preferences.java 86.30% <ø> (ø)
...et/sourceforge/kolmafia/session/ChoiceControl.java 8.79% <75.00%> (+0.10%) ⬆️
...net/sourceforge/kolmafia/session/QuestManager.java 41.34% <86.20%> (+3.42%) ⬆️
...t/sourceforge/kolmafia/request/UseItemRequest.java 13.51% <100.00%> (+0.09%) ⬆️
.../sourceforge/kolmafia/session/ResultProcessor.java 26.78% <100.00%> (+1.05%) ⬆️
...rceforge/kolmafia/persistence/HolidayDatabase.java 62.53% <0.00%> (-0.26%) ⬇️
...eforge/kolmafia/swingui/panel/GearChangePanel.java 58.87% <0.00%> (-0.14%) ⬇️
...rc/net/sourceforge/kolmafia/session/LimitMode.java 75.91% <0.00%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 150e911...243334c. Read the comment docs.

@Veracity0 Veracity0 changed the title Tests for quest tracking Tests for quest tracking in The Sea Nov 26, 2022
@Veracity0 Veracity0 marked this pull request as ready for review November 26, 2022 13:02
@Veracity0 Veracity0 requested a review from a team as a code owner November 26, 2022 13:02
Copy link
Contributor

@jaadams5 jaadams5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thing it wasn't 54 Java files... ;-)

@Veracity0 Veracity0 merged commit 603f3ac into main Nov 27, 2022
@Veracity0 Veracity0 deleted the quest-update branch November 27, 2022 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants