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

No NPE in can_adventure() in Standard for non-item zone #960

Merged
merged 3 commits into from Aug 9, 2022

Conversation

Veracity0
Copy link
Contributor

Which is a bug I just noticed.

I wrote a test for it and fixed it.

Other things:

  • Just as we have ASH can_adventure(location), which is validate1, now we have ASH prepare_for_adventure(location) which is validate2.
  • validate2 will now build a dingy dinghy, if necessary, for Island, Pirate, and IsleWar zones
  • Modernized a few more switch statements.

The following are (easy) things I am hoping to get in, but the bug is serious enough we shouldn't necessarily wait.
I can easily start yet another PR.

Throne Room:

  • King not killed
  • Have (and can equip) Harem Girl outfit and either effect or potion of Knob Goblin Perfume
  • or have (and can equip) Guardsman outfit and birthday cake.
  • (validate2 does all of that; validate1 should pre-check.)
  • Tests!

PFA:

  • validate2 will use the bean
  • Tests!

Isle War:

  • have (and can equip) appropriate outfit
  • validate2 will equip
  • Tests!

Pirate:

  • have (and can equip) appropriate outfit
  • validate2 will equip

Disguise zones:

  • validate1 should check have (and can equip) appropriate outfit
  • validate2 will equip
  • Tests!

Bat Hole:

  • (validate1 already check if have enough sonars for validate2)
  • (validate2 uses sonars)
  • Tests!

McLarge Huge (and Shrouded Peak):

  • Tests!

Investigating a Plaintive Telegram:

  • You can only go here if you have taken an LT&T quest
  • Having access to an item which will let you select it is good enough for validate1
  • (validate2 will detect if you have not selected a quest and will fail.)
  • Tests!

@Veracity0 Veracity0 requested a review from a team as a code owner August 9, 2022 03:55
@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #960 (d934bc9) into main (9360eb5) will increase coverage by 0.00%.
The diff coverage is 18.39%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main     #960   +/-   ##
=========================================
  Coverage     27.08%   27.08%           
- Complexity    12671    12674    +3     
=========================================
  Files          1029     1029           
  Lines        160289   160312   +23     
  Branches      35265    35272    +7     
=========================================
+ Hits          43414    43426   +12     
  Misses       108943   108943           
- Partials       7932     7943   +11     
Impacted Files Coverage Δ
src/net/sourceforge/kolmafia/KoLAdventure.java 27.18% <13.92%> (+0.19%) ⬆️
...et/sourceforge/kolmafia/textui/RuntimeLibrary.java 34.76% <40.00%> (+0.01%) ⬆️
...eforge/kolmafia/textui/command/JourneyCommand.java 94.66% <100.00%> (+0.03%) ⬆️
...rceforge/kolmafia/persistence/HolidayDatabase.java 34.57% <0.00%> (ø)
...orge/kolmafia/persistence/ConsumablesDatabase.java 65.46% <0.00%> (ø)
...et/sourceforge/kolmafia/objectpool/Concoction.java 59.85% <0.00%> (+0.36%) ⬆️

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 9360eb5...d934bc9. Read the comment docs.

@Veracity0 Veracity0 merged commit d168d76 into main Aug 9, 2022
@Veracity0 Veracity0 deleted the prepare-for-adventure branch August 9, 2022 04:56
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