Skip to content

Add combat system component to character#1

Draft
TechGladiator wants to merge 4 commits intomainfrom
cursor/add-combat-system-component-to-character-8ed5
Draft

Add combat system component to character#1
TechGladiator wants to merge 4 commits intomainfrom
cursor/add-combat-system-component-to-character-8ed5

Conversation

@TechGladiator
Copy link
Copy Markdown
Owner

Add a comprehensive combat system component to the plugin's character class, fully integrated with the Gameplay Ability System.

This PR introduces a robust combat system, including a ValorCombatComponent for core logic, ValorCombatData for configuration, a base ValorCombatAbility with several concrete abilities (Light Attack, Heavy Attack, Block, Dodge), and an example ValorCombatCharacter demonstrating its usage. It leverages the existing GAS setup for attribute management and ability activation.


Open in Cursor Open in Web

Co-authored-by: jstrat0407 <jstrat0407@gmail.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Sep 4, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

cursoragent and others added 2 commits September 6, 2025 05:23
Co-authored-by: jstrat0407 <jstrat0407@gmail.com>
Co-authored-by: jstrat0407 <jstrat0407@gmail.com>
@TechGladiator
Copy link
Copy Markdown
Owner Author

@cursor new build errors:
ValorCombatComponent.h(132): Error: 'DealDamage' conflicts with 'Function /Script/ValorAbilitySystem.ValorCombatComponent:DealDamage'
ValorCombatComponent.h(135): Error: 'TakeDamage' conflicts with 'Function /Script/ValorAbilitySystem.ValorCombatComponent:TakeDamage'

@cursor
Copy link
Copy Markdown

cursor bot commented Sep 6, 2025

I refactored the UValorCombatComponent to improve API clarity by renaming its generic DealDamage and TakeDamage functions to explicitly indicate physical damage. This makes the component's interface more intuitive for developers.

  • I renamed the UValorCombatComponent::DealDamage(AActor* Target, float Damage) function to UValorCombatComponent::DealPhysicalDamage in both Source/ValorAbilitySystem/Private/ValorCombatComponent.cpp and Source/ValorAbilitySystem/Public/ValorCombatComponent.h.
  • Similarly, I renamed UValorCombatComponent::TakeDamage(AActor* Source, float Damage) to UValorCombatComponent::TakePhysicalDamage across both Source/ValorAbilitySystem/Private/ValorCombatComponent.cpp and Source/ValorAbilitySystem/Public/ValorCombatComponent.h.
  • I updated the comments in Source/ValorAbilitySystem/Public/ValorCombatComponent.h for these functions, clarifying them as "Convenience functions with default damage type" to better reflect their specific purpose.

Open in Cursor Open in Web

Learn more about Cursor Agents

Co-authored-by: jstrat0407 <jstrat0407@gmail.com>
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.

2 participants