Ersetze HealthComponent und StaminaComponent durch GAS-basierte AttributeSets (`UHealthAttributeSet`, `UStaminaAttributeSet`) und füge `UAbilitySystemComponent` hinzu. Implementiere neue GameplayEffects (`UGE_HealthDamage`, `UGE_HealthHealing`, `UGE_HealthDebuff`, `UGE_StaminaFatiguePenalty`) und eine Modifikator-Berechnung (`UMMC_MaxStaminaFatiguePenalty`). Erweitere `AKingshearthLegacyCharacter` um Methoden zur Attributmanipulation (`ApplyDamage`, `SpendStamina`, etc.) und Stamina-Regeneration. Aktualisiere UI-Widgets (`HealthBarWidget`, `StaminaBarWidget`) zur Nutzung der neuen AttributeSets. Entferne Legacy-Code für Health- und Stamina-Komponenten. Füge neue Assets (Niagara-Systeme, Materialien, Texturen) hinzu und passe Projektkonfiguration an (z. B. `GameplayAbilities`-Modul, `r.Substrate`).
20 lines
573 B
C++
20 lines
573 B
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameplayEffect.h"
|
|
#include "GE_StaminaFatiguePenalty.generated.h"
|
|
|
|
/**
|
|
* Always-on Infinite effect applied once in AKingshearthLegacyCharacter::BeginPlay: multiplies
|
|
* MaxStamina's CurrentValue by MMC_MaxStaminaFatiguePenalty's (1 - Fatigue), so MaxStamina tracks
|
|
* Fatigue automatically via GAS's aggregator - replaces the old hand-written GetEffectiveMaxStamina().
|
|
*/
|
|
UCLASS()
|
|
class KINGSHEARTHLEGACY_API UGE_StaminaFatiguePenalty : public UGameplayEffect
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
UGE_StaminaFatiguePenalty();
|
|
};
|