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

Update queue ticks to add combat flinching #492

Merged
merged 19 commits into from
Mar 18, 2024
Merged

Update queue ticks to add combat flinching #492

merged 19 commits into from
Mar 18, 2024

Conversation

GregHib
Copy link
Owner

@GregHib GregHib commented Mar 18, 2024

More accurately emulate runescape queues by adding a pending list and decrementing rather than using exact ticks. This is more accurate as queues called by interfaces fire 1 tick earlier than subsequent queues due to interface instructions being handled earlier in the tick than queues.

  • Add correct combat flinching formula closes Add combat flinching #490
  • Switch queues from using exact tick to decrementing
  • Add queue pending list
  • Add clearing in_combat on target exiting wander radius
  • Rename under_attack to in_combat
  • Combine skill_delay and hit_delay into action_delay
  • Add dynamic initial cooking delay
  • Fix item on item queue delays
  • Add inPvp check to allow non-combat-level determined fighting outside of the wilderness

Copy link

github-actions bot commented Mar 18, 2024

Qodana Community for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

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

Project coverage is 26.38%. Comparing base (157f695) to head (3687406).

Files Patch % Lines
.../gregs/voidps/world/activity/skill/ItemOnItems.kts 11.11% 3 Missing and 5 partials ⚠️
...regs/voidps/world/interact/entity/combat/Target.kt 27.27% 3 Missing and 5 partials ⚠️
...lin/world/gregs/voidps/engine/queue/ActionQueue.kt 66.66% 4 Missing ⚠️
...egs/voidps/world/interact/entity/combat/Combat.kts 84.61% 1 Missing and 3 partials ⚠️
.../voidps/world/interact/entity/combat/Wilderness.kt 62.50% 2 Missing and 1 partial ⚠️
.../world/map/lumbridge/combat_hall/ArcheryTarget.kts 0.00% 3 Missing ⚠️
...voidps/engine/entity/character/npc/hunt/Hunting.kt 0.00% 2 Missing ⚠️
.../world/gregs/voidps/bot/skill/combat/CombatBot.kts 0.00% 2 Missing ⚠️
...ine/entity/character/mode/combat/CombatMovement.kt 0.00% 1 Missing ⚠️
...n/kotlin/world/gregs/voidps/engine/queue/Action.kt 75.00% 0 Missing and 1 partial ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #492      +/-   ##
============================================
+ Coverage     26.35%   26.38%   +0.02%     
- Complexity     3940     3946       +6     
============================================
  Files          1219     1218       -1     
  Lines         38582    38592      +10     
  Branches       8163     8164       +1     
============================================
+ Hits          10169    10183      +14     
+ Misses        25741    25734       -7     
- Partials       2672     2675       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GregHib GregHib merged commit 2d37e98 into main Mar 18, 2024
5 checks passed
@GregHib GregHib deleted the flinching branch March 18, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add combat flinching
1 participant