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

Treat Holidays and their associated modifiers as Events and include in modifiers.txt #1958

Merged
merged 20 commits into from
Sep 14, 2023

Conversation

gausie
Copy link
Contributor

@gausie gausie commented Sep 13, 2023

  • Express holiday and event modifiers in modifiers.txt
  • Allow calculation of multiple holidays on one day
  • Add Labor Day Eve (not exposed to the user)
  • Expose joint events as a list so we can check for the presence of one holiday if necessary
  • Refactor some functions to do less string comparison
  • Add tests

@gausie gausie requested a review from a team as a code owner September 13, 2023 16:29
@gausie
Copy link
Contributor Author

gausie commented Sep 13, 2023

I'm going to let the CI show me where I should add test coverage.

@gausie gausie marked this pull request as draft September 13, 2023 16:29
… refactor some functions to do less string comparison, add tests
@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Merging #1958 (5d1e2d7) into main (3e53a8d) will increase coverage by 0.03%.
The diff coverage is 93.37%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1958      +/-   ##
============================================
+ Coverage     36.57%   36.60%   +0.03%     
- Complexity    18978    18996      +18     
============================================
  Files          1087     1087              
  Lines        166925   166889      -36     
  Branches      35458    35439      -19     
============================================
+ Hits          61061    61098      +37     
+ Misses        95922    95854      -68     
+ Partials       9942     9937       -5     
Files Changed Coverage Δ
src/net/sourceforge/kolmafia/KoLmafia.java 36.78% <ø> (-0.15%) ⬇️
...ceforge/kolmafia/persistence/ModifierDatabase.java 58.69% <0.00%> (+0.13%) ⬆️
...et/sourceforge/kolmafia/swingui/CalendarFrame.java 70.23% <0.00%> (ø)
...c/net/sourceforge/kolmafia/swingui/LoginFrame.java 0.00% <0.00%> (ø)
...net/sourceforge/kolmafia/session/LoginManager.java 1.85% <60.00%> (+1.85%) ⬆️
...rceforge/kolmafia/persistence/HolidayDatabase.java 78.35% <97.54%> (+7.65%) ⬆️
src/net/sourceforge/kolmafia/KoLAdventure.java 64.61% <100.00%> (+0.47%) ⬆️
src/net/sourceforge/kolmafia/KoLCharacter.java 64.41% <100.00%> (-0.21%) ⬇️
...orge/kolmafia/persistence/ConsumablesDatabase.java 76.68% <100.00%> (ø)
...et/sourceforge/kolmafia/textui/RuntimeLibrary.java 40.78% <100.00%> (+0.23%) ⬆️
... and 2 more

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

@gausie gausie marked this pull request as ready for review September 14, 2023 12:16
Event Muscle Day Experience Percent (Muscle): [25*interact()]
Event Mysticality Day Experience Percent (Mysticality): [25*interact()]
Event Festival of Jarlsberg Mana Cost: -3
Event Lab&oacute;r Day Eve Adventures: +10
Copy link
Member

Choose a reason for hiding this comment

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

Does Labor day work in run? I can't recall.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The wiki suggests it does, so I did this. But I'll ask on Discord.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah people think that it does work in run

@gausie gausie merged commit 5bd4291 into main Sep 14, 2023
8 checks passed
@gausie gausie deleted the holidays-as-events branch September 14, 2023 16: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