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
Track Powerful Glove's charge from description #1020
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1020 +/- ##
============================================
+ Coverage 28.50% 28.51% +0.01%
- Complexity 13580 13588 +8
============================================
Files 1031 1031
Lines 160579 160598 +19
Branches 35281 35285 +4
============================================
+ Hits 45774 45800 +26
+ Misses 106369 106360 -9
- Partials 8436 8438 +2
Continue to review full report at Codecov.
|
You could make this even better. Consider this: When you enter a fight, unless your macro is executed as an autoattack, you will be shown an initial fight page, complete with the "skills" dropdown. adventure.php?snarfblat=149
FightRequest.parseAvailableCombatSkills(String responseText):
The pattern:
notice that: group(1) -> the skillId I think you could capture the entire phrase inside the () and determine right from there the charge on your powerful glove. Here are all the ones on MY skill dropdown that are not simply (XX Mojo Points):
|
Don't really plan to add more skill parsing to this PR, added cosplay only cos it occured to me. Probably should just share the same html file tbh |
Although it occurs to me that if we were going to track all this stuff, could add it into Consequences as something like |
Interesting. Notice FightRequest.parseAvailableCombatSkills:
Notice that If we have ConsequenceManager do COMBAT_SKILLS, it is exactly this spot in FightRequest that would call it, using exactly that substring of the responseText. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
I'm curious about this. Did KoL actually show the output of the previous rounds, but because Use The Force redirected to a choice, we didn't process that output? What did the session log say? I can try this out myself with debug log on and look at the requests submitted and the responses - and redirects - received. That might very well be a bug we need to deal with in another way. But fixing that does not invalidate anything about this PR. Should we open a new Bug to discuss it? Having conversations in the comments of approved/merged PRs doesn't seem the right way proceed. 😀 |
The TL;DR I executed a macro with replace then use the force. I had debug logs turned on for that test, no combat logs were returned. Just a redirect to saber. I'm not sure there's much you can do. |
Noticed the charge wasn't being tracked when an issue popped up with "Use the Force" being used in a macro which changed the final output of the resulting page to being a choice, meaning mafia never saw the combat page, meaning mafia never realized I used a powerful glove charge in fight to switch the monster.
Or basically.
If a charge is used without mafia knowing, mafia will never adjust for it. Feels strange this wasn't tracked previously.
Tracking when it is fully charged feels meaningless as it should only be inaccurate if someone was messing with the preference, but included for the full coverage.