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

NyanoCombat 2, Part 1: Simple Melee Refactor #605

Conversation

VMSolidus
Copy link
Member

@VMSolidus VMSolidus commented Jul 28, 2024

Description

Done in partnership with @OldDanceJacket

This is a simple refactor of the Melee System, which introduces some new implementations of Contests, but more importantly lightly refactors melee so that "Light Attack"(Left Click) and "Heavy Attack"(Right Click) are now no longer hardcoded to be the same thing, and now can have different modifiers. We've set things up so that weapons can have different behaviors and bonuses if they are used in a heavy attack as opposed to a light attack, including range and damage.

In addition to simple code cleanup, I have done the following things:

  • Max Number of targets per Power Attack(Wide Swing) is now set via a CVar instead of a constant, but is still defaulted to 5.

All Blunt Weapons have been changed to

  • Deal 100% of Blunt as Stamina(up from 50%) by default
  • BluntDamageStaminaFactor can now be overridden by specific weapons

Light Attacks have been changed to:

  • Deal up to 25% less damage scaling with taken stamina damage
  • Deal up to 20% more damage with being injured

Heavy Attacks have been changed to:

  • Deal up to 50% less damage scaling with taken stamina damage
  • Deal up to 20% more damage with being injured
  • Now deal (by default) 10 points of stamina damage to the wielder
  • In a separate PR, nearly every weapon in the game is going to have their Wide Swing(Now "Power Attack") mode stats looked at.
  • When examining the damage a weapon deals, if it has any damage modifiers when power attacking, these values will be shown in addition to the light attack damage.

Heavy attacks can now have separate modifiers for:

  • Attack Range (multiply against light attack range)
  • Attack Damage (multiply against light attack damage)
  • Attack Speed (multiply against light attack speed)
  • Stamina Cost (overriding the default)

We will be building upon this PR throughout the week with additional PRs, to include a full rework of melee weapon values across the entire board. For the most part, this PR is primarily here to give new options for contributors to balance melee weapons.

Note For Maintainers:

@OldDanceJacket will be following this up with his own PR containing Part 2, which will include a comprehensive rework of the damage values for every melee weapon in the entire game. Due to this, I can't actually make that much in the way of significant changes to the components in review without messing with his side of things.

I also have my own Part 3 that I will be working in partnership with ODJ on throughout this week, which will consist of a pack of combat-system related Traits.

Changelog

🆑 @VMSolidus and @OldDanceJacket

  • add: Being injured now lets you deal up to 20% more damage in melee combat to simulate the adrenaline rush from taking a hit.
  • add: Taking stamina damage now makes you deal less damage in melee. Up to 25% less for Light Attacks, and 50% less for Power Attacks
  • add: Wide Swing has been reworked as "Power Attack". Power attacks cost 20 stamina(by default) to perform, and their effects can differ from Light attacks on a per-weapon basis. Individual weapons can also have different stamina costs to power attack with.

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: Localization Changes any ftl files labels Jul 28, 2024
@DangerRevolution
Copy link
Contributor

Shouldn't max targets per wide swing be a data field for weapons?

@VMSolidus
Copy link
Member Author

Shouldn't max targets per wide swing be a data field for weapons?

it was originally a Constant, I think for either network performance or balance reasons, not sure, and it wasn't clear why it was a constant before. But just in case there was an inherent reason why it was a constant, to be safe I made it a CVar rather than a variable on weapons. But if that isn't the case, I can actually do both by making it the Min of component.MaxTargets and CCVars.MaxTargets.

@VMSolidus VMSolidus added Priority: 2-High Needs to be resolved as soon as possible Size: 3-Medium For medium issues/PRs labels Jul 28, 2024
@github-actions github-actions bot added the Status: Needs Review Someone please review this label Jul 29, 2024
@DangerRevolution
Copy link
Contributor

I'd honestly want to see Part 2 & Part 3 and especially hear about the philosophy behind these changes

@VMSolidus
Copy link
Member Author

Shouldn't max targets per wide swing be a data field for weapons?

Done.

@DangerRevolution
Copy link
Contributor

Shouldn't max targets per wide swing be a data field for weapons?

Done.

Tests failing

@VMSolidus
Copy link
Member Author

Shouldn't max targets per wide swing be a data field for weapons?

Done.

Tests failing

Made a simple mistake, they should be passing now.

@VMSolidus
Copy link
Member Author

I've set the "Default Standard Power Attack" to have 20% slower attack rate, 20% bonus damage, and costs 20 stamina. This will be overridden on a per-weapon basis with Part 2. But me and ODJ have agreed upon this as a suitable default for anything not explicitly defined.

@DangerRevolution
Copy link
Contributor

Given this is a chonking PR, probably worth to have 3-4 approvals before merge :)

@DangerRevolution DangerRevolution removed the Priority: 2-High Needs to be resolved as soon as possible label Aug 9, 2024
@DangerRevolution DangerRevolution added Priority: 1-Urgent Must be resolved immediately Type: Feature Creation of or significant changes to a feature Type: Rework Large changes to a system, like a mix between the Balancing, Codebase, and Respace labels labels Aug 9, 2024
@DangerRevolution DangerRevolution requested a review from a team August 9, 2024 11:04
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Aug 10, 2024
@github-actions github-actions bot removed the Changes: Localization Changes any ftl files label Aug 10, 2024
@DangerRevolution
Copy link
Contributor

Resolved conflict; stamina cost went from 10 --> 20

@github-actions github-actions bot removed the Status: Merge Conflict FIX YOUR PR AAAGH label Aug 10, 2024
@VMSolidus
Copy link
Member Author

Lmao, this magically got turned into a single-line PR.

@OldDanceJacket OldDanceJacket merged commit b9bf6e6 into Simple-Station:master Aug 10, 2024
11 checks passed
SimpleStation14 added a commit that referenced this pull request Aug 10, 2024
tmcqueen pushed a commit to tmcqueen/Syndicate-Station that referenced this pull request Aug 24, 2024
# Description

Done in partnership with @OldDanceJacket 

This is a simple refactor of the Melee System, which introduces some new
implementations of Contests, but more importantly lightly refactors
melee so that "Light Attack"(Left Click) and "Heavy Attack"(Right Click)
are now no longer hardcoded to be the same thing, and now can have
different modifiers. We've set things up so that weapons can have
different behaviors and bonuses if they are used in a heavy attack as
opposed to a light attack, including range and damage.

In addition to simple code cleanup, I have done the following things:
- Max Number of targets per Power Attack(Wide Swing) is now set via a
CVar instead of a constant, but is still defaulted to 5.

All Blunt Weapons have been changed to
- Deal 100% of Blunt as Stamina(up from 50%) by default
- BluntDamageStaminaFactor can now be overridden by specific weapons

Light Attacks have been changed to:
- Deal up to 25% less damage scaling with taken stamina damage
- Deal up to 20% more damage with being injured

Heavy Attacks have been changed to:
- Deal up to 50% less damage scaling with taken stamina damage
- Deal up to 20% more damage with being injured
- Now deal (by default) 10 points of stamina damage to the wielder
- In a separate PR, nearly every weapon in the game is going to have
their Wide Swing(Now "Power Attack") mode stats looked at.
- When examining the damage a weapon deals, if it has any damage
modifiers when power attacking, these values will be shown in addition
to the light attack damage.

Heavy attacks can now have separate modifiers for:
- Attack Range (multiply against light attack range)
- Attack Damage (multiply against light attack damage)
- Attack Speed (multiply against light attack speed)
- Stamina Cost (overriding the default)

We will be building upon this PR throughout the week with additional
PRs, to include a full rework of melee weapon values across the entire
board. For the most part, this PR is primarily here to give new options
for contributors to balance melee weapons.

# Note For Maintainers:

@OldDanceJacket will be following this up with his own PR containing
Part 2, which will include a comprehensive rework of the damage values
for every melee weapon in the entire game. Due to this, I can't actually
make that much in the way of significant changes to the components in
review without messing with his side of things.

I also have my own Part 3 that I will be working in partnership with ODJ
on throughout this week, which will consist of a pack of combat-system
related Traits.

# Changelog

:cl: @VMSolidus and @OldDanceJacket 
- add: Being injured now lets you deal up to 20% more damage in melee
combat to simulate the adrenaline rush from taking a hit.
- add: Taking stamina damage now makes you deal less damage in melee. Up
to 25% less for Light Attacks, and 50% less for Power Attacks
- add: Wide Swing has been reworked as "Power Attack". Power attacks
cost 20 stamina(by default) to perform, and their effects can differ
from Light attacks on a per-weapon basis. Individual weapons can also
have different stamina costs to power attack with.

---------

Signed-off-by: Danger Revolution! <[email protected]>
Co-authored-by: Danger Revolution! <[email protected]>
tmcqueen pushed a commit to tmcqueen/Syndicate-Station that referenced this pull request Aug 24, 2024
tmcqueen pushed a commit to tmcqueen/Syndicate-Station that referenced this pull request Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Priority: 1-Urgent Must be resolved immediately Size: 3-Medium For medium issues/PRs Status: Needs Review Someone please review this Type: Feature Creation of or significant changes to a feature Type: Rework Large changes to a system, like a mix between the Balancing, Codebase, and Respace labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants