diff --git a/Content/CombatSystem/Blueprints/Actor/BP_DualToughSwords.uasset b/Content/CombatSystem/Blueprints/Actor/BP_DualToughSwords.uasset index 007eeed2..7b8eebb8 100644 Binary files a/Content/CombatSystem/Blueprints/Actor/BP_DualToughSwords.uasset and b/Content/CombatSystem/Blueprints/Actor/BP_DualToughSwords.uasset differ diff --git a/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset b/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset index b62941dd..40d0450b 100644 Binary files a/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset and b/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset differ diff --git a/Content/CombatSystem/Blueprints/Actor/BP_ShowcaseSwordAndShield.uasset b/Content/CombatSystem/Blueprints/Actor/BP_ShowcaseSwordAndShield.uasset index d705ad34..8ce587ab 100644 Binary files a/Content/CombatSystem/Blueprints/Actor/BP_ShowcaseSwordAndShield.uasset and b/Content/CombatSystem/Blueprints/Actor/BP_ShowcaseSwordAndShield.uasset differ diff --git a/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset b/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset index adac61e0..6425ead9 100644 Binary files a/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset and b/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset differ diff --git a/Content/ParagonKwang/Animations/ABP_Kwang.uasset b/Content/ParagonKwang/Animations/ABP_Kwang.uasset index c630aed8..2ad8ee40 100644 Binary files a/Content/ParagonKwang/Animations/ABP_Kwang.uasset and b/Content/ParagonKwang/Animations/ABP_Kwang.uasset differ diff --git a/Content/ParagonKwang/Animations/Defense/Deflect_InPlace_Anim1_Montage.uasset b/Content/ParagonKwang/Animations/Defense/Shield_Block_Montage.uasset similarity index 71% rename from Content/ParagonKwang/Animations/Defense/Deflect_InPlace_Anim1_Montage.uasset rename to Content/ParagonKwang/Animations/Defense/Shield_Block_Montage.uasset index 7122602a..13cd6dda 100644 Binary files a/Content/ParagonKwang/Animations/Defense/Deflect_InPlace_Anim1_Montage.uasset and b/Content/ParagonKwang/Animations/Defense/Shield_Block_Montage.uasset differ diff --git a/Content/ParagonKwang/Animations/Defense/Sword_BlockLoop.uasset b/Content/ParagonKwang/Animations/Defense/Sword_BlockLoop.uasset new file mode 100644 index 00000000..5ab425c3 Binary files /dev/null and b/Content/ParagonKwang/Animations/Defense/Sword_BlockLoop.uasset differ diff --git a/Content/ParagonKwang/Animations/Defense/Sword_BlockReaction.uasset b/Content/ParagonKwang/Animations/Defense/Sword_BlockReaction.uasset new file mode 100644 index 00000000..5de71490 Binary files /dev/null and b/Content/ParagonKwang/Animations/Defense/Sword_BlockReaction.uasset differ diff --git a/Content/ParagonKwang/Animations/Defense/Sword_BlockReaction_Montage.uasset b/Content/ParagonKwang/Animations/Defense/Sword_BlockReaction_Montage.uasset new file mode 100644 index 00000000..7447ef09 Binary files /dev/null and b/Content/ParagonKwang/Animations/Defense/Sword_BlockReaction_Montage.uasset differ diff --git a/Source/D1/Actor/BaseWeapon.cpp b/Source/D1/Actor/BaseWeapon.cpp index bcf415b9..b395fa4a 100644 --- a/Source/D1/Actor/BaseWeapon.cpp +++ b/Source/D1/Actor/BaseWeapon.cpp @@ -42,6 +42,8 @@ ABaseWeapon::ABaseWeapon() ActionDamageMultiplier.Add(FCombatGameplayTags::Get().Character_Action_Attack_ChargedAttack, 1.5f); ActionDamageMultiplier.Add(FCombatGameplayTags::Get().Character_Action_Attack_FallingAttack, 1.2f); ActionDamageMultiplier.Add(FCombatGameplayTags::Get().Character_Action_Attack_SprintAttack, 1.2f); + + bCanBlock = true; } void ABaseWeapon::OnEquipped() diff --git a/Source/D1/Actor/BaseWeapon.h b/Source/D1/Actor/BaseWeapon.h index 267e6f04..f92b066b 100644 --- a/Source/D1/Actor/BaseWeapon.h +++ b/Source/D1/Actor/BaseWeapon.h @@ -46,6 +46,8 @@ public: public: virtual TArray GetActionMontage(FGameplayTag characterAction); +public: + FORCEINLINE bool GetCanBlock() { return bCanBlock; } protected: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Initialization") FName HandSocketName; @@ -53,6 +55,8 @@ protected: ECombatType CombatType; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Initialization") TSubclassOf DamageTypeClass; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Initialization") + bool bCanBlock; UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="Components") TObjectPtr CombatComponent; diff --git a/Source/D1/Animation/CombatAnimInstance.cpp b/Source/D1/Animation/CombatAnimInstance.cpp index ca8edd0b..2345eb83 100644 --- a/Source/D1/Animation/CombatAnimInstance.cpp +++ b/Source/D1/Animation/CombatAnimInstance.cpp @@ -23,6 +23,7 @@ void UCombatAnimInstance::NativeInitializeAnimation() { CombatComponent->OnCombatToggled.AddUObject(this, &UCombatAnimInstance::UpdateCombatEnabled); CombatComponent->OnBlockingSet.AddUObject(this, &UCombatAnimInstance::OnBlockingSet_Event); + CombatComponent->OnShieldEquippedSet.AddUObject(this, &UCombatAnimInstance::OnShieldSet_Event); } } } @@ -59,3 +60,8 @@ void UCombatAnimInstance::OnBlockingSet_Event(bool bIsBlock) { IsBlocking = bIsBlock; } + +void UCombatAnimInstance::OnShieldSet_Event(bool bIsShieldEquipped) +{ + IsShieldEquipped = bIsShieldEquipped; +} diff --git a/Source/D1/Animation/CombatAnimInstance.h b/Source/D1/Animation/CombatAnimInstance.h index d341e9f2..4de372d9 100644 --- a/Source/D1/Animation/CombatAnimInstance.h +++ b/Source/D1/Animation/CombatAnimInstance.h @@ -26,6 +26,7 @@ public: public: //Delegate void UpdateCombatEnabled(bool combatEnabled); void OnBlockingSet_Event(bool bIsBlock); + void OnShieldSet_Event(bool bIsShieldEquipped); private: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="References", meta=(AllowPrivateAccess="true")) @@ -51,4 +52,6 @@ private: UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true")) bool IsBlocking; + UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true")) + bool IsShieldEquipped; }; diff --git a/Source/D1/CombatPlayerCharacter.cpp b/Source/D1/CombatPlayerCharacter.cpp index 75719d36..2514b844 100644 --- a/Source/D1/CombatPlayerCharacter.cpp +++ b/Source/D1/CombatPlayerCharacter.cpp @@ -1021,7 +1021,10 @@ bool ACombatPlayerCharacter::CanPerformBlock() ReturnValue &= !StateManagerComponent->IsCurrentStateEqualToAny(inputContainer); ReturnValue &= CombatComponent->GetCombatEnabled(); - ReturnValue &= CombatComponent->GetShieldEquipped(); + if(!IsValid(CombatComponent->GetMainWeapon())) + ReturnValue &= false; + else + ReturnValue &= CombatComponent->GetMainWeapon()->GetCanBlock(); ReturnValue &= bIsBlockPressed; //Block Key를 눌렀는가? return ReturnValue; diff --git a/Source/D1/Components/CombatComponent.h b/Source/D1/Components/CombatComponent.h index 121c77c6..64ccc280 100644 --- a/Source/D1/Components/CombatComponent.h +++ b/Source/D1/Components/CombatComponent.h @@ -8,6 +8,7 @@ DECLARE_MULTICAST_DELEGATE_OneParam(FOnCombatToggled, bool); DECLARE_MULTICAST_DELEGATE_OneParam(FOnBlockingSet, bool); +DECLARE_MULTICAST_DELEGATE_OneParam(FOnShieldEquippedSet, bool); class ABaseWeapon; UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) @@ -40,7 +41,11 @@ public: void SetBlockingState(bool enableBlocking); FORCEINLINE bool GetIsBlocking() { return bIsBlocking; } - FORCEINLINE void SetShieldEquipped(bool isEquipped) { bIsShieldEquipped = isEquipped; } + FORCEINLINE void SetShieldEquipped(bool isEquipped) + { + bIsShieldEquipped = isEquipped; + OnShieldEquippedSet.Broadcast(isEquipped); + } FORCEINLINE bool GetShieldEquipped() { return bIsShieldEquipped; } private: @@ -63,4 +68,5 @@ private: public: //Delegate FOnCombatToggled OnCombatToggled; FOnBlockingSet OnBlockingSet; + FOnShieldEquippedSet OnShieldEquippedSet; };