Added rider plugin and turned Empowered Action into a forge-resources-managed ability
This commit is contained in:
@@ -114,13 +114,19 @@ public partial class PlayerController : CharacterBody3D,
|
||||
[ExportGroup("General")]
|
||||
[Export]
|
||||
public ForgeTagContainer BaseTags { get; set; } = new();
|
||||
[Export] public REmpoweredAction EmpoweredAction = null!;
|
||||
[Export] public RManaRegen ManaRegen = null!;
|
||||
|
||||
[ExportGroup("Abilities")]
|
||||
[ExportSubgroup("Common and defaults")]
|
||||
[Export] public ForgeAbilityData EmpoweredActionAbility = null!;
|
||||
[Export] public ForgeAbilityData[] DefaultPermanentAbilities = [];
|
||||
[ExportSubgroup("WeaponThrow")]
|
||||
[Export] public RExplodingSword[] AbilityLoadout = [];
|
||||
|
||||
[ExportGroup("Effects")]
|
||||
[ExportSubgroup("Common and defaults")]
|
||||
[Export] public ForgeEffectData[] DefaultPermanentEffects = [];
|
||||
|
||||
// Combat stuff
|
||||
[ExportCategory("Combat")]
|
||||
[ExportGroup("General")]
|
||||
@@ -469,13 +475,21 @@ public partial class PlayerController : CharacterBody3D,
|
||||
Abilities = new(this);
|
||||
Events = new();
|
||||
|
||||
var empoweredActionData = EmpoweredAction.Ability(tagsManager);
|
||||
// Grant permanently
|
||||
_empoweredActionHandle = Abilities.GrantAbilityPermanently(
|
||||
empoweredActionData,
|
||||
EmpoweredActionAbility.GetAbilityData(),
|
||||
abilityLevel: 1,
|
||||
levelOverridePolicy: LevelComparison.None,
|
||||
sourceEntity: this);
|
||||
foreach (var ability in DefaultPermanentAbilities)
|
||||
{
|
||||
Abilities.GrantAbilityPermanently(
|
||||
ability.GetAbilityData(),
|
||||
abilityLevel: 1,
|
||||
levelOverridePolicy: LevelComparison.None,
|
||||
sourceEntity: this);
|
||||
}
|
||||
// var empoweredActionData = EmpoweredAction.Ability(tagsManager);
|
||||
// // Grant permanently
|
||||
|
||||
var manaRegenEffect = new Effect(ManaRegen.ManaRegen(tagsManager), new EffectOwnership(this, this));
|
||||
_manaRegenEffectHandle = EffectsManager.ApplyEffect(manaRegenEffect);
|
||||
@@ -2068,8 +2082,8 @@ public partial class PlayerController : CharacterBody3D,
|
||||
|
||||
// Inhibit Mana Regeneration for a while after using an empowered action
|
||||
// TODO: Use Forge events instead of relying on direct referencing
|
||||
_manaRegenEffectHandle!.SetInhibit(true);
|
||||
GetTree().CreateTimer(EmpoweredAction.ManaRegenPause).Timeout += () => {_manaRegenEffectHandle!.SetInhibit(false);};
|
||||
// _manaRegenEffectHandle!.SetInhibit(true);
|
||||
// GetTree().CreateTimer(EmpoweredAction.ManaRegenPause).Timeout += () => {_manaRegenEffectHandle!.SetInhibit(false);};
|
||||
|
||||
_isWallJumpAvailable = true;
|
||||
_canDashAirborne = true;
|
||||
|
||||
Reference in New Issue
Block a user