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

BSO - Colosseum Combat Achievement Fix #6182

Merged
merged 4 commits into from
Nov 9, 2024
Merged

Conversation

TastyPumPum
Copy link
Contributor

@TastyPumPum TastyPumPum commented Nov 8, 2024

Add a fix for the combat achievements One-Off and Denied which is currently only working if you die at wave 11 and 7 respectively or later, rather than colo completions too.

  • I have tested all my changes thoroughly.

Important

Fixes One-Off combat achievement logic in elite.ts and master.ts to award completion regardless of wave death.

  • Behavior:
    • Fixes One-Off combat achievement in elite.ts and master.ts to award completion if player dies before or after wave 11.
  • Logic:
    • Updates hasChance function to check if diedAt[index] is undefined or greater than 11 in master.ts and greater than 7 in elite.ts.

This description was created by Ellipsis for 1e2ab17. It will automatically update as commits are pushed.

@TastyPumPum
Copy link
Contributor Author

@ellipsis-dev review this pr

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 1e2ab17 in 26 seconds

More details
  • Looked at 29 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. src/lib/combat_achievements/elite.ts:1525
  • Draft comment:
    Avoid using the non-null assertion operator ! as it can lead to runtime errors if the assumption is incorrect. Instead, ensure the value is checked properly.
(!data.diedAt || (Array.isArray(data.diedAt) && (data.diedAt[index] === undefined || data.diedAt[index] > 7)))
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The change in the condition is correct, but the use of the non-null assertion operator (!) is unnecessary and can be avoided for better code clarity and safety.
2. src/lib/combat_achievements/master.ts:1476
  • Draft comment:
    Avoid using the non-null assertion operator ! as it can lead to runtime errors if the assumption is incorrect. Instead, ensure the value is checked properly.
(!data.diedAt || (Array.isArray(data.diedAt) && (data.diedAt[index] === undefined || data.diedAt[index] > 11)))
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The change in the condition is correct, but the use of the non-null assertion operator (!) is unnecessary and can be avoided for better code clarity and safety.

Workflow ID: wflow_1X8bllR5QaQmlFnT


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@nwjgit
Copy link
Contributor

nwjgit commented Nov 8, 2024

This is something I forgot to fix post multi colo, thanks for doing it. I went ahead and tested it and these are working properly.

Here is my debug/testing:

  • Test code:
    Code_U9O15ZdlJR
  • One-off triggering:
    Code_QZ562shc2U
  • Denied triggering:
    Code_Zsj902WFcp
  • Showing has chance being false if user dies before the specified wave:
    Code_pA2b45pMvk
    Discord_g4ORPNOSgo

@gc gc merged commit 0af1b20 into oldschoolgg:bso Nov 9, 2024
4 checks passed
@TastyPumPum TastyPumPum deleted the colo-ca-fix branch November 9, 2024 10:51
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.

3 participants