GKLEffects.h
Click a line number to link it. Shift-click to select a range.
| 1 | // Copyright (c) 2026 Reignance Studios. MIT License, see LICENSE. |
| 2 | |
| 3 | #pragma once |
| 4 | |
| 5 | #include "CoreMinimal.h" |
| 6 | #include "GameplayEffect.h" |
| 7 | #include "GKLEffects.generated.h" |
| 8 | |
| 9 | /* |
| 10 | * Gameplay effects defined in C++ so the kit works without any assets. |
| 11 | * Magnitudes come from SetByCaller tags (GKLTags::Data_*), so one class serves |
| 12 | * every ability. Subclass them in Blueprint if you prefer to tune in the editor. |
| 13 | */ |
| 14 | |
| 15 | /** Instant. Adds Data.Cost.Stamina and Data.Cost.Mana (negative) to Stamina and Mana. */ |
| 16 | UCLASS() |
| 17 | class GASKITLITE_API UGKLCostEffect : public UGameplayEffect |
| 18 | { |
| 19 | GENERATED_BODY() |
| 20 | |
| 21 | public: |
| 22 | UGKLCostEffect(); |
| 23 | }; |
| 24 | |
| 25 | /** Lasts Data.Cooldown seconds. Tags come from the ability (DynamicGrantedTags), not from this class. */ |
| 26 | UCLASS() |
| 27 | class GASKITLITE_API UGKLCooldownEffect : public UGameplayEffect |
| 28 | { |
| 29 | GENERATED_BODY() |
| 30 | |
| 31 | public: |
| 32 | UGKLCooldownEffect(); |
| 33 | }; |
| 34 | |
| 35 | /** Instant. Adds Data.Damage to the Damage meta attribute; the AttributeSet turns it into Health loss. */ |
| 36 | UCLASS() |
| 37 | class GASKITLITE_API UGKLDamageEffect : public UGameplayEffect |
| 38 | { |
| 39 | GENERATED_BODY() |
| 40 | |
| 41 | public: |
| 42 | UGKLDamageEffect(); |
| 43 | }; |
| 44 | |
| 45 | /** Instant. Adds Data.Healing to Health. */ |
| 46 | UCLASS() |
| 47 | class GASKITLITE_API UGKLHealEffect : public UGameplayEffect |
| 48 | { |
| 49 | GENERATED_BODY() |
| 50 | |
| 51 | public: |
| 52 | UGKLHealEffect(); |
| 53 | }; |
| 54 | |
| 55 | /** Infinite, every second: +10 Stamina, +2 Mana. Applied by the Regen passive on the server. */ |
| 56 | UCLASS() |
| 57 | class GASKITLITE_API UGKLRegenEffect : public UGameplayEffect |
| 58 | { |
| 59 | GENERATED_BODY() |
| 60 | |
| 61 | public: |
| 62 | UGKLRegenEffect(); |
| 63 | }; |