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

Add Refund of charges to Colosseum #5956

Merged
merged 10 commits into from
Jul 24, 2024

Conversation

TastyPumPum
Copy link
Contributor

@TastyPumPum TastyPumPum commented Jul 14, 2024

Adds a refund of charges to the colosseum if you die before finishing

  • I have tested all my changes thoroughly.

🚀 This description was created by Ellipsis for commit 506a234

Summary:

Added functionality to refund charges for specific items if a user dies before completing the Colosseum.

Key points:

  • Added: Refund of charges for scythe_of_vitur, venator_bow, and blood_fury if a user dies before completing the Colosseum in src/lib/colosseum.ts.
  • Updated: startColosseumRun function in src/lib/colosseum.ts to include charge calculations.
  • Added: refundChargeBank function in src/lib/degradeableItems.ts to handle the refund logic.
  • Updated: colosseumCommand in src/lib/colosseum.ts to pass charge information.
  • Updated: ColoTaskOptions interface in src/lib/types/minions.ts to include charge fields.
  • Updated: colosseumTask in src/tasks/minions/colosseumActivity.ts to process charge refunds on death.
  • Updated: simulateColosseumRuns in src/mahoji/commands/simulate.ts to include charge parameters.

Generated with ❤️ by ellipsis.dev

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
Adds a refund of charges to the colosseum if you die before finishing
@TastyPumPum

This comment was marked as outdated.

ellipsis-dev[bot]

This comment was marked as outdated.

@TastyPumPum TastyPumPum marked this pull request as ready for review July 16, 2024 17:18
@TastyPumPum TastyPumPum changed the title (WIP) Add Refund of charges to Colosseum Add Refund of charges to Colosseum Jul 16, 2024
@TastyPumPum
Copy link
Contributor Author

@ellipsis-dev can you 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.

❌ Changes requested. Reviewed everything up to 506a234 in 39 seconds

More details
  • Looked at 302 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_JiNjRazXk4kZriUP


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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 506a234 in 38 seconds

More details
  • Looked at 302 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. src/lib/degradeableItems.ts:437
  • Draft comment:
    The implementation of refundChargeBank function is correct and handles the refund logic appropriately for degradeable items based on the charges in the chargeBank. It properly updates the user's charge count and provides a detailed message about the refund.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The refundChargeBank function in degradeableItems.ts is designed to handle the refund of charges for degradeable items. It iterates over each item in the chargeBank, finds the corresponding degradeable item, calculates the new total charges, and updates the user's data accordingly. The function also constructs a result message for each item, indicating the number of charges refunded and the new total. This function is crucial for ensuring that users are correctly refunded for their unused item charges, especially in scenarios like the Colosseum where users may not use all their charges before dying. The function appears to be well-implemented with checks for valid degradeable items and updates the user's data in the database.

Workflow ID: wflow_sqjWMn4KhmN4uXXi


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

@gc gc merged commit 156f0db into oldschoolgg:master Jul 24, 2024
4 checks passed
@TastyPumPum TastyPumPum deleted the colo-refund-charges branch July 24, 2024 10:14
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.

None yet

2 participants