updating mana through cues
This commit is contained in:
@@ -10,13 +10,10 @@ public partial class ForgeManager : Node
|
||||
public TagsManager TagsManager { get; private set; } = new TagsManager(
|
||||
[
|
||||
"character.player",
|
||||
"class.warrior",
|
||||
"status.stunned",
|
||||
"status.burning",
|
||||
"status.immune.fire",
|
||||
"cues.damage.fire",
|
||||
"events.combat.damage",
|
||||
"events.combat.hit",
|
||||
"cooldown.empoweredAction",
|
||||
"cues.resources.mana",
|
||||
]);
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Gamesmiths.Forge.Abilities;
|
||||
using Gamesmiths.Forge.Cues;
|
||||
using Gamesmiths.Forge.Effects;
|
||||
using Gamesmiths.Forge.Effects.Components;
|
||||
using Gamesmiths.Forge.Effects.Duration;
|
||||
@@ -25,7 +26,7 @@ public partial class REmpoweredAction(float cost, float cooldown, float manaRege
|
||||
{
|
||||
}
|
||||
|
||||
public EffectData CostEffect()
|
||||
public EffectData CostEffect(TagsManager tagsManager)
|
||||
{
|
||||
return new(
|
||||
"Empowered Action Mana Cost",
|
||||
@@ -40,6 +41,16 @@ public partial class REmpoweredAction(float cost, float cooldown, float manaRege
|
||||
new ScalableFloat(-Cost)
|
||||
)
|
||||
)
|
||||
},
|
||||
cues: new []
|
||||
{
|
||||
new CueData(
|
||||
CueTags: Tag.RequestTag(tagsManager, "cues.resources.mana").GetSingleTagContainer(),
|
||||
MinValue: 0,
|
||||
MaxValue: 100,
|
||||
MagnitudeType: CueMagnitudeType.AttributeValueChange,
|
||||
MagnitudeAttribute: "PlayerAttributeSet.Mana"
|
||||
)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using Gamesmiths.Forge.Cues;
|
||||
using Gamesmiths.Forge.Effects;
|
||||
using Gamesmiths.Forge.Effects.Duration;
|
||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
||||
using Gamesmiths.Forge.Effects.Modifiers;
|
||||
using Gamesmiths.Forge.Effects.Periodic;
|
||||
using Gamesmiths.Forge.Tags;
|
||||
using Godot;
|
||||
|
||||
namespace Movementtests.tools.effects;
|
||||
@@ -20,7 +22,7 @@ public partial class RManaRegen(float manaRegenRate, float frequency) : Resource
|
||||
{
|
||||
}
|
||||
|
||||
public EffectData ManaRegen()
|
||||
public EffectData ManaRegen(TagsManager tagsManager)
|
||||
{
|
||||
return new EffectData(
|
||||
"Mana Regen",
|
||||
@@ -36,6 +38,16 @@ public partial class RManaRegen(float manaRegenRate, float frequency) : Resource
|
||||
new ScalableFloat(ManaRegenRate * Frequency))
|
||||
)
|
||||
],
|
||||
cues: new []
|
||||
{
|
||||
new CueData(
|
||||
CueTags: Tag.RequestTag(tagsManager, "cues.resources.mana").GetSingleTagContainer(),
|
||||
MinValue: 0,
|
||||
MaxValue: 100,
|
||||
MagnitudeType: CueMagnitudeType.AttributeValueChange,
|
||||
MagnitudeAttribute: "PlayerAttributeSet.Mana"
|
||||
)
|
||||
},
|
||||
periodicData: new PeriodicData(
|
||||
Period: new ScalableFloat(Frequency),
|
||||
ExecuteOnApplication: true,
|
||||
|
||||
Reference in New Issue
Block a user