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

Parse dart skill -> target #2235

Merged
merged 2 commits into from Mar 15, 2024
Merged

Parse dart skill -> target #2235

merged 2 commits into from Mar 15, 2024

Conversation

Veracity0
Copy link
Contributor

@Veracity0 Veracity0 commented Mar 13, 2024

  1. When we see a dartboard in fight.php, parse the various sectors and create a skill -> part map.
    Save it in _currentDartboard: "7512:arm,7513:wing,7514:leg,7515:head,7516:butt,7517:torso", for example.
    Since scripts have to split that on commas and pull the tokens from the left and right sides of the colon, they can make a skill->part and/or a part->skill map, as needed.
  2. Stationary Buttons installs skill buttons for all combat skills on the skill dropdown. Apparently dart skills appear there, so, no extra parsing is needed to make those buttons. However, now we map "Darts: Throw at %part3" to "darts: throw at butt", if that is what the mapping is this fight. We re-parse every round, so even if KoL changes the mapping, we will pick it up.

Maybe coming in a later PR: session logging.

Round 1: Veracity casts DARTS: THROW AT %PART3!
Round 2: smut orc screwer takes 918 damage.
Round 2: Veracity wins the fight!

and

Round 1: Veracity casts DARTS: THROW AT %PART1!
Round 2: War Frat 500th Infantrygentleman takes 397 damage.
Round 2: Veracity wins the fight!

How about if we map the %PARTX to the part we threw at?
Perhaps allow "throw at butt" as a CCS action and map to the correct skill, whatever it is, at run time.
And verify that deleveling, stat gains, whatever, log correctly with dart skills.

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 82.14286% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 37.38%. Comparing base (ba8f3e1) to head (179f253).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2235      +/-   ##
============================================
+ Coverage     37.37%   37.38%   +0.01%     
- Complexity    19789    19795       +6     
============================================
  Files          1109     1109              
  Lines        169495   169524      +29     
  Branches      35805    35809       +4     
============================================
+ Hits          63354    63383      +29     
- Misses        96101    96102       +1     
+ Partials      10040    10039       -1     
Files Coverage Δ
...net/sourceforge/kolmafia/request/FightRequest.java 36.02% <92.00%> (+0.26%) ⬆️
...orge/kolmafia/webui/StationaryButtonDecorator.java 47.48% <0.00%> (-0.41%) ⬇️

... and 3 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 ba8f3e1...179f253. Read the comment docs.

@Veracity0 Veracity0 marked this pull request as ready for review March 14, 2024 20:16
@Veracity0 Veracity0 requested a review from a team as a code owner March 14, 2024 20:16
@Veracity0 Veracity0 merged commit 8b84a6c into main Mar 15, 2024
8 checks passed
@Veracity0 Veracity0 deleted the parse-dart-targets branch March 15, 2024 16:54
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