diff --git a/forge/abilities/ForgeEffectApplicationBehavior.cs b/forge/abilities/ForgeEffectApplicationBehavior.cs index 5f625620..667e6763 100644 --- a/forge/abilities/ForgeEffectApplicationBehavior.cs +++ b/forge/abilities/ForgeEffectApplicationBehavior.cs @@ -13,8 +13,7 @@ public class EffectApplicationBehavior(EffectData effectData) : IAbilityBehavior private Effect? _effect; private ActiveEffectHandle? _effectHandle; public void OnStarted(AbilityBehaviorContext context) - { - GD.Print("This is applying the periodic effect to the flying weapon"); + { _effect = new Effect(effectData, new EffectOwnership(context.Owner, context.Owner)); _effectHandle = context.Owner.EffectsManager.ApplyEffect(_effect); context.AbilityHandle.CommitAbility(); @@ -22,7 +21,6 @@ public class EffectApplicationBehavior(EffectData effectData) : IAbilityBehavior public void OnEnded(AbilityBehaviorContext context) { - GD.Print("This is removing the periodic effect from the flying weapon"); if (_effectHandle is not null) context.Owner.EffectsManager.RemoveEffect(_effectHandle); context.InstanceHandle.End(); diff --git a/forge/abilities/ForgeExplodingSwordBehavior.cs b/forge/abilities/ForgeExplodingSwordBehavior.cs index 6d9b5581..cbb70358 100644 --- a/forge/abilities/ForgeExplodingSwordBehavior.cs +++ b/forge/abilities/ForgeExplodingSwordBehavior.cs @@ -6,7 +6,7 @@ using Godot; namespace Movementtests.forge.abilities; -public class ExplodingSwordBehavior(PackedScene explosion) : IAbilityBehavior +public class ExplodingSwordBehavior(PackedScene explosion, float radius) : IAbilityBehavior { public void OnStarted(AbilityBehaviorContext context) { @@ -28,10 +28,7 @@ public class ExplodingSwordBehavior(PackedScene explosion) : IAbilityBehavior context.InstanceHandle.End(); return; } - - GD.Print("EXPLOSION"); - - explo.Radius = 6f; + explo.Radius = radius; owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explo); explo.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition); @@ -50,8 +47,9 @@ public class ExplodingSwordBehavior(PackedScene explosion) : IAbilityBehavior public partial class ForgeExplodingSwordBehavior : ForgeAbilityBehavior { [Export] public PackedScene Explosion { get; set; } + [Export] public float Radius { get; set; } = 5f; public override IAbilityBehavior GetBehavior() { - return new ExplodingSwordBehavior(Explosion); + return new ExplodingSwordBehavior(Explosion, Radius); } } \ No newline at end of file diff --git a/forge/calculators/ForgeRaiseEventTagExecution.cs b/forge/calculators/ForgeRaiseEventTagExecution.cs index 86a51161..a1674ed3 100644 --- a/forge/calculators/ForgeRaiseEventTagExecution.cs +++ b/forge/calculators/ForgeRaiseEventTagExecution.cs @@ -22,10 +22,6 @@ public class RaiseEventTagExecution(TagContainer eventTags) : CustomExecution { var owner = effect.Ownership.Owner; if (owner == null) return []; - foreach (var tag in eventTags.Tags) - { - GD.Print(tag); - } owner.Events.Raise(new EventData { diff --git a/scenes/player_controller/components/weapon/WeaponSystem.cs b/scenes/player_controller/components/weapon/WeaponSystem.cs index ada6dbb6..4524acc3 100644 --- a/scenes/player_controller/components/weapon/WeaponSystem.cs +++ b/scenes/player_controller/components/weapon/WeaponSystem.cs @@ -268,11 +268,6 @@ public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity // TODO: Waiting on bug resolve _weaponFlyingAbility.Cancel(); }); - - Events.Subscribe(Tag.RequestTag(tagsManager, "events.weapon.flyingtick"), data => - { - GD.Print("Weapon tick triggered!"); - }); } public void WeaponLeft() diff --git a/scenes/player_controller/resources/forge/empowered_action.tres b/scenes/player_controller/resources/forge/empowered_action.tres index 89a9f909..bd8282ea 100644 --- a/scenes/player_controller/resources/forge/empowered_action.tres +++ b/scenes/player_controller/resources/forge/empowered_action.tres @@ -104,7 +104,7 @@ script = ExtResource("4_5fdax") [sub_resource type="Resource" id="Resource_uv4a1"] script = ExtResource("4_5fdax") -BaseValue = -30.0 +BaseValue = -50.0 metadata/_custom_type_script = "uid://cn3b4ya15fg7e" [sub_resource type="Resource" id="Resource_dhni4"] diff --git a/scenes/player_controller/resources/forge/inhibit_mana_regen_temporarily.tres b/scenes/player_controller/resources/forge/inhibit_mana_regen_temporarily.tres index 9dd1a139..4aec4a42 100644 --- a/scenes/player_controller/resources/forge/inhibit_mana_regen_temporarily.tres +++ b/scenes/player_controller/resources/forge/inhibit_mana_regen_temporarily.tres @@ -39,7 +39,7 @@ script = ExtResource("3_fp8ou") [sub_resource type="Resource" id="Resource_mbpss"] script = ExtResource("3_fp8ou") -BaseValue = 1.0 +BaseValue = 2.0 metadata/_custom_type_script = "uid://cn3b4ya15fg7e" [sub_resource type="Resource" id="Resource_exi3e"] diff --git a/scenes/player_controller/scripts/PlayerController.cs b/scenes/player_controller/scripts/PlayerController.cs index f3069f3b..1dbb33f1 100644 --- a/scenes/player_controller/scripts/PlayerController.cs +++ b/scenes/player_controller/scripts/PlayerController.cs @@ -2034,30 +2034,16 @@ public partial class PlayerController : CharacterBody3D, public bool CanPerformEmpoweredAction() { if(_empoweredActionHandle == null) return false; - var cooldowns = _empoweredActionHandle.GetCooldownData(); - foreach (var cd in cooldowns) - { - //GD.Print($"Cooldown remaining: {cd.RemainingTime}"); - } - var costs = _empoweredActionHandle.GetCostData(); - foreach (var cost in costs) - { - // Assuming you want to check Mana costs - if (cost.Attribute == "PlayerAttributeSet.Mana") - { - //GD.Print($"Mana Cost: {cost.Cost}"); - } - } + // var cooldowns = _empoweredActionHandle.GetCooldownData(); + // var costs = _empoweredActionHandle.GetCostData(); var canActivate = _empoweredActionHandle.CanActivate(out var failures); if (!canActivate) { - GD.PrintErr($"Cannot activate empowered action: {failures}"); if (failures.HasFlag(AbilityActivationFailures.Cooldown)) GD.PrintErr("In Cooldown"); if (failures.HasFlag(AbilityActivationFailures.InsufficientResources)) GD.PrintErr("Not Enough Mana"); } return canActivate; - return EmpoweredActionsLeft > 0 && TutorialDone; } public void PerformEmpoweredAction() { @@ -2066,19 +2052,10 @@ public partial class PlayerController : CharacterBody3D, var canActivate = _empoweredActionHandle.Activate(out var failures); if (!canActivate) { - GD.PrintErr($"Cannot activate empowered action: {failures}"); if (failures.HasFlag(AbilityActivationFailures.Cooldown)) GD.PrintErr("In Cooldown"); if (failures.HasFlag(AbilityActivationFailures.InsufficientResources)) GD.PrintErr("Not Enough Mana"); + return; } - else - { - GD.Print($"Remaining mana: {Attributes["PlayerAttributeSet.Mana"].CurrentValue}"); - } - - // 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);}; _isWallJumpAvailable = true; _canDashAirborne = true; @@ -2411,13 +2388,7 @@ public partial class PlayerController : CharacterBody3D, { // Manage head and camera movement LookAround(delta); - EffectsManager.UpdateEffects(delta); - // TODO: change for actual Cue - // var currentMana = Attributes["PlayerAttributeSet.Mana"].CurrentValue; - // if (Mathf.Abs(currentMana - _oldMana) > Mathf.Epsilon) - // PlayerUi.OnManaChanged(currentMana); - // _oldMana = currentMana; } ///////////////////////////