Skip to content

Conversation

@KRdaMystic
Copy link

@KRdaMystic KRdaMystic commented Dec 11, 2024

Savage & Martial tag functionality

Summary by Sourcery

Add "martial" and "savage" weapon tags to enable custom stat scaling for melee attacks.

New Features:

  • Introduce "martial" and "savage" weapon tags that scale melee attack with dexterity and strength respectively.

Tests:

  • Update melee attack calculations to include new tags and modifiers.

@EttyKitty
Copy link
Owner

I remember about this. Just hope to find some time to properly review everything.

@EttyKitty
Copy link
Owner

@KRdaMystic, can you recheck changed files? there seems to be a bunch of stuff unrelated to martial and savage, and in some places these tags got deleted.

@EttyKitty EttyKitty added the PR: Feature Adds something new label Dec 19, 2024
@EttyKitty EttyKitty changed the title Savage and Martial feat: New weapon tags for custom stat scaling Dec 19, 2024
@EttyKitty
Copy link
Owner

@sourcery-ai review

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 19, 2024

Reviewer's Guide by Sourcery

This PR introduces new weapon tags ("martial" and "savage") to enable custom stat scaling for melee attacks. Martial weapons scale with dexterity and experience, while savage weapons scale with strength and experience. Additionally, the melee attack calculation was refactored to use a modifier system.

File-Level Changes

Change Details Files
Added "martial" and "savage" tags
  • Introduced new weapon tags "martial" and "savage".
  • Implemented scaling for martial weapons with dexterity and experience.
  • Implemented scaling for savage weapons with strength and experience.
scripts/scr_marine_struct/scr_marine_struct.gml
Refactored melee attack calculation
  • Replaced the additive melee attack calculation with a multiplicative modifier system.
  • Added a new helper function _format_sign to format numbers with signs.
  • Simplified the logic for calculating sidearm damage.
  • Improved the explanation string generation for melee attack calculations.
scripts/scr_marine_struct/scr_marine_struct.gml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @KRdaMystic - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider extracting the weapon tag modifier logic into a reusable function to reduce code duplication between martial and savage handling
  • Replace magic numbers (40, 1000) with named constants to improve maintainability and make balance adjustments easier
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@EttyKitty EttyKitty added this to the Next Major Version milestone Dec 24, 2024
feat: Rewrite melee weapon damage formula
@EttyKitty
Copy link
Owner

@sourcery-ai review

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @KRdaMystic - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@EttyKitty EttyKitty merged commit 6e8af19 into EttyKitty:feat/weapon-balance Dec 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Balance PR: Feature Adds something new

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants