Compare commits
4 Commits
v0.2.78
...
release/pl
| Author | SHA1 | Date | |
|---|---|---|---|
| aafd3cbfbf | |||
| 30817576b9 | |||
| 70d0f66df3 | |||
| c145c709e3 |
@@ -100,7 +100,7 @@ jobs:
|
|||||||
# - uses: actions/setup-dotnet@v5
|
# - uses: actions/setup-dotnet@v5
|
||||||
# name: 💽 Setup .NET SDK
|
# name: 💽 Setup .NET SDK
|
||||||
# with:
|
# with:
|
||||||
# dotnet-version: '9.0.x'
|
# dotnet-version: ${DOTNET_VERSION}
|
||||||
#
|
#
|
||||||
# - name: 📦 Restore Dependencies
|
# - name: 📦 Restore Dependencies
|
||||||
# run: |
|
# run: |
|
||||||
@@ -114,7 +114,7 @@ jobs:
|
|||||||
# with:
|
# with:
|
||||||
# # Version must include major, minor, and patch, and be >= 4.0.0
|
# # Version must include major, minor, and patch, and be >= 4.0.0
|
||||||
# # Pre-release label is optional.
|
# # Pre-release label is optional.
|
||||||
# version: '4.6.2'
|
# version: ${GODOT_VERSION}
|
||||||
# # Use .NET-enabled version of Godot (the default is also true).
|
# # Use .NET-enabled version of Godot (the default is also true).
|
||||||
# use-dotnet: true
|
# use-dotnet: true
|
||||||
# # Include the Godot Export Templates (the default is false).
|
# # Include the Godot Export Templates (the default is false).
|
||||||
@@ -126,21 +126,20 @@ jobs:
|
|||||||
# godot --version
|
# godot --version
|
||||||
#
|
#
|
||||||
# - name: 🧑🔬 Generate .NET Bindings
|
# - name: 🧑🔬 Generate .NET Bindings
|
||||||
# run: godot --headless --build-solutions --import --quit || exit 0
|
# run: godot --headless --build-solutions --quit || exit 0
|
||||||
#
|
#
|
||||||
# - name: 🦺 Build Projects
|
# - name: 🦺 Build Projects
|
||||||
# run: dotnet build --configuration ExportRelease
|
# run: dotnet build --configuration Release
|
||||||
#
|
#
|
||||||
# - name: Run C# Tests
|
# - name: Run C# Tests
|
||||||
# env:
|
# env:
|
||||||
# GODOT_BIN: /root/bin/godot
|
# GODOT_BIN: godot
|
||||||
# shell: bash
|
# shell: bash
|
||||||
# run: |
|
# run: |
|
||||||
# dotnet test --no-build --settings .runsettings --results-directory ./reports --logger "console;verbosity=normal" --logger "trx;LogFileName=results.xml" -- GdUnit4.Parameters="--headless --import --quit"
|
# dotnet test --no-build --settings .runsettings --results-directory ./reports --logger "console;verbosity=normal" --logger "trx;LogFileName=results.xml" -- GdUnit4.Parameters="--verbose --headless --import"
|
||||||
#
|
#
|
||||||
# - name: Upload test report
|
# - name: Upload test report
|
||||||
# uses: actions/upload-artifact@v3-node20
|
# uses: actions/upload-artifact@v3-node20
|
||||||
# if: always()
|
|
||||||
# with:
|
# with:
|
||||||
# name: Test Report
|
# name: Test Report
|
||||||
# path: ${{ github.workspace }}/reports/test-result.html
|
# path: ${{ github.workspace }}/reports/test-result.html
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
/builds
|
/builds
|
||||||
/communication
|
/communication
|
||||||
/reports
|
|
||||||
|
|
||||||
# Imported translations (automatically generated from CSV files)
|
# Imported translations (automatically generated from CSV files)
|
||||||
*.translation
|
*.translation
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<MaxCpuCount>1</MaxCpuCount>
|
<MaxCpuCount>1</MaxCpuCount>
|
||||||
<ResultsDirectory>./TestResults</ResultsDirectory>
|
<ResultsDirectory>./TestResults</ResultsDirectory>
|
||||||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
||||||
<TestSessionTimeout>60000</TestSessionTimeout>
|
<TestSessionTimeout>180000</TestSessionTimeout>
|
||||||
<TreatNoTestsAsError>true</TreatNoTestsAsError>
|
<TreatNoTestsAsError>true</TreatNoTestsAsError>
|
||||||
</RunConfiguration>
|
</RunConfiguration>
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<GdUnit4>
|
<GdUnit4>
|
||||||
<!-- Additional Godot runtime parameters. These are passed to the Godot executable when running tests.-->
|
<!-- Additional Godot runtime parameters. These are passed to the Godot executable when running tests.-->
|
||||||
<Parameters>"--verbose --headless --import --quit"</Parameters>
|
<Parameters>"--verbose"</Parameters>
|
||||||
|
|
||||||
<!-- Controls the display name format of test cases in the test results.
|
<!-- Controls the display name format of test cases in the test results.
|
||||||
Allowed values:
|
Allowed values:
|
||||||
|
|||||||
@@ -128,9 +128,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="addons\" />
|
<Folder Include="addons\" />
|
||||||
<Folder Include="tests\" />
|
<Folder Include="tests\" />
|
||||||
|
<Folder Include="tools\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Chickensoft.Sync" Version="2.3.0" />
|
|
||||||
<PackageReference Include="RustyOptions" Version="0.10.1" />
|
<PackageReference Include="RustyOptions" Version="0.10.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -32,21 +32,12 @@ func _exit_tree() -> void:
|
|||||||
|
|
||||||
func close() -> void:
|
func close() -> void:
|
||||||
menu_closing.emit()
|
menu_closing.emit()
|
||||||
hide()
|
|
||||||
queue_free()
|
|
||||||
|
|
||||||
func hide_menu() -> void:
|
|
||||||
_scene_tree.paused = _initial_pause_state
|
_scene_tree.paused = _initial_pause_state
|
||||||
Input.set_mouse_mode(_initial_mouse_mode)
|
Input.set_mouse_mode(_initial_mouse_mode)
|
||||||
if is_instance_valid(_initial_focus_control) and _initial_focus_control.is_inside_tree():
|
if is_instance_valid(_initial_focus_control) and _initial_focus_control.is_inside_tree():
|
||||||
_initial_focus_control.focus_mode = _initial_focus_mode
|
_initial_focus_control.focus_mode = _initial_focus_mode
|
||||||
_initial_focus_control.grab_focus()
|
_initial_focus_control.grab_focus()
|
||||||
|
queue_free()
|
||||||
GUIDE.disable_mapping_context(menu_context)
|
|
||||||
for previous_context in previous_mapping_contexts:
|
|
||||||
GUIDE.enable_mapping_context(previous_context)
|
|
||||||
|
|
||||||
visible = false
|
|
||||||
|
|
||||||
func _handle_cancel_input() -> void:
|
func _handle_cancel_input() -> void:
|
||||||
close()
|
close()
|
||||||
@@ -54,7 +45,7 @@ func _handle_cancel_input() -> void:
|
|||||||
func _on_close_button_pressed() -> void:
|
func _on_close_button_pressed() -> void:
|
||||||
close()
|
close()
|
||||||
|
|
||||||
func show_menu() -> void:
|
func _enter_tree() -> void:
|
||||||
_scene_tree = get_tree()
|
_scene_tree = get_tree()
|
||||||
_initial_pause_state = _scene_tree.paused
|
_initial_pause_state = _scene_tree.paused
|
||||||
_initial_mouse_mode = Input.get_mouse_mode()
|
_initial_mouse_mode = Input.get_mouse_mode()
|
||||||
@@ -70,11 +61,5 @@ func show_menu() -> void:
|
|||||||
for previous_context in previous_mapping_contexts:
|
for previous_context in previous_mapping_contexts:
|
||||||
GUIDE.disable_mapping_context(previous_context)
|
GUIDE.disable_mapping_context(previous_context)
|
||||||
GUIDE.enable_mapping_context(menu_context)
|
GUIDE.enable_mapping_context(menu_context)
|
||||||
|
|
||||||
visible = true
|
|
||||||
|
|
||||||
func _enter_tree() -> void:
|
|
||||||
print("enter_tree")
|
|
||||||
show_menu()
|
|
||||||
back_action.triggered.connect(_handle_cancel_input)
|
back_action.triggered.connect(_handle_cancel_input)
|
||||||
|
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
// Copyright © Gamesmiths Guild.
|
|
||||||
|
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Gamesmiths.Forge.Core;
|
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Events;
|
|
||||||
using Gamesmiths.Forge.Godot.Core;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources;
|
|
||||||
using Gamesmiths.Forge.Statescript;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Movementtests.tools;
|
|
||||||
|
|
||||||
[GlobalClass]
|
|
||||||
[Icon("uid://cu6ncpuumjo20")]
|
|
||||||
[Meta(typeof(IAutoNode))]
|
|
||||||
public partial class ForgeEntityNode : Node3D, IForgeEntity
|
|
||||||
{
|
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
|
||||||
|
|
||||||
[Dependency]
|
|
||||||
public TagsManager TagsManager => this.DependOn(() => ForgeManagers.Instance.TagsManager);
|
|
||||||
[Dependency]
|
|
||||||
public CuesManager CuesManager => this.DependOn(() => ForgeManagers.Instance.CuesManager);
|
|
||||||
|
|
||||||
[Export]
|
|
||||||
public ForgeTagContainer? BaseTags { get; set; }
|
|
||||||
[Export]
|
|
||||||
public ForgeSharedVariableSet? SharedVariableDefinitions { get; set; }
|
|
||||||
|
|
||||||
public required EntityAttributes Attributes { get; set; }
|
|
||||||
|
|
||||||
public required EntityTags Tags { get; set; }
|
|
||||||
|
|
||||||
public required EffectsManager EffectsManager { get; set; }
|
|
||||||
|
|
||||||
public required EntityAbilities Abilities { get; set; }
|
|
||||||
|
|
||||||
public required EventManager Events { get; set; }
|
|
||||||
|
|
||||||
public required Variables SharedVariables { get; set; }
|
|
||||||
|
|
||||||
public void OnReady()
|
|
||||||
{
|
|
||||||
BaseTags ??= new ForgeTagContainer();
|
|
||||||
Tags = new EntityTags(BaseTags.GetTagContainer());
|
|
||||||
Attributes = new EntityAttributes([.. ForgeUtils.CollectAttributeList(this)]);
|
|
||||||
Abilities = new EntityAbilities(this);
|
|
||||||
Events = new EventManager();
|
|
||||||
|
|
||||||
SharedVariables = new Variables();
|
|
||||||
SharedVariableDefinitions?.PopulateVariables(SharedVariables);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnResolved()
|
|
||||||
{
|
|
||||||
EffectsManager = new EffectsManager(this, CuesManager);
|
|
||||||
var effectApplier = new EffectApplier(this);
|
|
||||||
effectApplier.ApplyEffects(this, this, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void _Process(double delta)
|
|
||||||
{
|
|
||||||
base._Process(delta);
|
|
||||||
|
|
||||||
EffectsManager.UpdateEffects(delta);
|
|
||||||
Abilities.UpdateAbilities(delta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://rpcbb54q4atx
|
|
||||||
@@ -12,7 +12,6 @@ public class ExplodingSwordBehavior(PackedScene explosion, float radius) : IAbil
|
|||||||
{
|
{
|
||||||
if (context.Owner is not Node3D owner)
|
if (context.Owner is not Node3D owner)
|
||||||
{
|
{
|
||||||
GD.Print("Owner isn't a Node3D");
|
|
||||||
context.InstanceHandle.End();
|
context.InstanceHandle.End();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -30,8 +29,8 @@ public class ExplodingSwordBehavior(PackedScene explosion, float radius) : IAbil
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
explo.Radius = radius;
|
explo.Radius = radius;
|
||||||
|
|
||||||
owner.GetTree().GetCurrentScene().CallDeferred(Node.MethodName.AddChild, explo);
|
owner.GetTree().GetRoot().CallDeferred(Node.MethodName.AddChild, explo);
|
||||||
explo.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition);
|
explo.CallDeferred(Node3D.MethodName.SetGlobalPosition, owner.GlobalPosition);
|
||||||
|
|
||||||
context.AbilityHandle.CommitAbility();
|
context.AbilityHandle.CommitAbility();
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
using Gamesmiths.Forge.Abilities;
|
using Gamesmiths.Forge.Abilities;
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
using Godot;
|
using Godot;
|
||||||
|
|
||||||
namespace Movementtests.forge.abilities;
|
namespace Movementtests.forge.abilities;
|
||||||
|
|
||||||
public class InstantEndBehavior(ForgeEffectData? effectData) : IAbilityBehavior
|
public class InstantEndBehavior : IAbilityBehavior
|
||||||
{
|
{
|
||||||
public void OnStarted(AbilityBehaviorContext context)
|
public void OnStarted(AbilityBehaviorContext context)
|
||||||
{
|
{
|
||||||
if (effectData != null)
|
|
||||||
{
|
|
||||||
var effect = new Effect(effectData.GetEffectData(), new EffectOwnership(context.Owner, context.Owner));
|
|
||||||
context.Owner.EffectsManager.ApplyEffect(effect);
|
|
||||||
}
|
|
||||||
context.AbilityHandle.CommitAbility();
|
context.AbilityHandle.CommitAbility();
|
||||||
context.InstanceHandle.End();
|
context.InstanceHandle.End();
|
||||||
}
|
}
|
||||||
@@ -26,6 +19,5 @@ public class InstantEndBehavior(ForgeEffectData? effectData) : IAbilityBehavior
|
|||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
public partial class ForgeInstantEndBehavior : ForgeAbilityBehavior
|
public partial class ForgeInstantEndBehavior : ForgeAbilityBehavior
|
||||||
{
|
{
|
||||||
[Export] public ForgeEffectData? OptionalEffectData { get; set; }
|
public override IAbilityBehavior GetBehavior() => new InstantEndBehavior();
|
||||||
public override IAbilityBehavior GetBehavior() => new InstantEndBehavior(OptionalEffectData);
|
|
||||||
}
|
}
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Abilities;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Movementtests.forge.abilities;
|
|
||||||
|
|
||||||
public record SimpleHitEffectData(Vector3 SourceLocation, Vector3 TargetLocation, float Magnitude = 1);
|
|
||||||
|
|
||||||
public class SimpleHitBehavior(ForgeEffectData? damage) : IAbilityBehavior
|
|
||||||
{
|
|
||||||
public void OnStarted(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
if (context.Target == null || damage == null) return;
|
|
||||||
|
|
||||||
var sourceLocation = (context.Source as Node3D)?.GlobalPosition ?? Vector3.Zero;
|
|
||||||
var targetLocation = (context.Target as Node3D)?.GlobalPosition ?? Vector3.Zero;
|
|
||||||
|
|
||||||
var magnitude = context.Magnitude == 0 ? 1 : context.Magnitude;
|
|
||||||
var effect = new Effect(damage.GetEffectData(), new EffectOwnership(context.Owner, context.Owner));
|
|
||||||
context.Target.EffectsManager.ApplyEffect(effect, new SimpleHitEffectData(sourceLocation, targetLocation, magnitude));
|
|
||||||
|
|
||||||
// context.InstanceHandle.End();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnEnded(AbilityBehaviorContext context)
|
|
||||||
{
|
|
||||||
context.AbilityHandle.CommitAbility();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Tool]
|
|
||||||
[GlobalClass]
|
|
||||||
public partial class ForgeSimpleHitBehavior : ForgeAbilityBehavior
|
|
||||||
{
|
|
||||||
[Export] public ForgeEffectData? DamageEffect { get; set; }
|
|
||||||
public override IAbilityBehavior GetBehavior() => new SimpleHitBehavior(DamageEffect);
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://n6efm5o4uxvr
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Attributes;
|
|
||||||
|
|
||||||
namespace Movementtests.forge.attribute_sets;
|
|
||||||
|
|
||||||
public class CharacterAttributeSet : AttributeSet
|
|
||||||
{
|
|
||||||
public EntityAttribute Health { get; }
|
|
||||||
|
|
||||||
public CharacterAttributeSet()
|
|
||||||
{
|
|
||||||
Health = InitializeAttribute(nameof(Health), 100, 0, 100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://cikbxmilitd1m
|
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
using Gamesmiths.Forge.Attributes;
|
using Gamesmiths.Forge.Attributes;
|
||||||
|
|
||||||
namespace Movementtests.scenes.enemies;
|
namespace Movementtests.scenes.enemies;
|
||||||
|
|
||||||
public class EnemyAttributeSet : AttributeSet
|
public class EnemyAttributeSet : AttributeSet
|
||||||
{
|
{
|
||||||
|
public EntityAttribute Health { get; }
|
||||||
public EntityAttribute Strength { get; }
|
public EntityAttribute Strength { get; }
|
||||||
public EntityAttribute Speed { get; }
|
public EntityAttribute Speed { get; }
|
||||||
|
|
||||||
public EnemyAttributeSet()
|
public EnemyAttributeSet()
|
||||||
{
|
{
|
||||||
|
Health = InitializeAttribute(nameof(Health), 100, 0, 150);
|
||||||
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
|
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
|
||||||
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
|
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
using Gamesmiths.Forge.Attributes;
|
|
||||||
namespace Movementtests.scenes.enemies;
|
|
||||||
|
|
||||||
public class MetaAttributeSet : AttributeSet
|
|
||||||
{
|
|
||||||
public EntityAttribute IncomingDamage { get; private set; }
|
|
||||||
public EntityAttribute Level { get; private set; }
|
|
||||||
|
|
||||||
public MetaAttributeSet()
|
|
||||||
{
|
|
||||||
IncomingDamage = InitializeAttribute(nameof(IncomingDamage), 0, 0, 1000, channels: 4);
|
|
||||||
Level = InitializeAttribute(nameof(Level), 1, 1, 1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://d36s5oiy8ls0d
|
|
||||||
@@ -4,10 +4,16 @@ namespace Movementtests.scenes.player_controller.scripts;
|
|||||||
|
|
||||||
public class PlayerAttributeSet : AttributeSet
|
public class PlayerAttributeSet : AttributeSet
|
||||||
{
|
{
|
||||||
|
public EntityAttribute Health { get; }
|
||||||
public EntityAttribute Mana { get; }
|
public EntityAttribute Mana { get; }
|
||||||
|
public EntityAttribute Strength { get; }
|
||||||
|
public EntityAttribute Speed { get; }
|
||||||
|
|
||||||
public PlayerAttributeSet()
|
public PlayerAttributeSet()
|
||||||
{
|
{
|
||||||
|
Health = InitializeAttribute(nameof(Health), 100, 0, 150);
|
||||||
Mana = InitializeAttribute(nameof(Mana), 100, 0, 100);
|
Mana = InitializeAttribute(nameof(Mana), 100, 0, 100);
|
||||||
|
Strength = InitializeAttribute(nameof(Strength), 10, 0, 99);
|
||||||
|
Speed = InitializeAttribute(nameof(Speed), 5, 0, 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
namespace Movementtests.tools.calculators;
|
|
||||||
|
|
||||||
public enum DamageType
|
|
||||||
{
|
|
||||||
Physical = 0,
|
|
||||||
Magical = 1,
|
|
||||||
Elemental = 2,
|
|
||||||
Explosive = 3,
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bne5gra0fmvsr
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Gamesmiths.Forge.Attributes;
|
|
||||||
using Gamesmiths.Forge.Core;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Calculator;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Effects.Modifiers;
|
|
||||||
using Gamesmiths.Forge.Events;
|
|
||||||
using Gamesmiths.Forge.Godot.Core;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources.Calculators;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Godot;
|
|
||||||
using Movementtests.forge.abilities;
|
|
||||||
|
|
||||||
namespace Movementtests.tools.calculators;
|
|
||||||
|
|
||||||
public record DamageDone(DamageType DamageType, float Damage, float OverkillDamage);
|
|
||||||
|
|
||||||
public class DamageExecution : CustomExecution
|
|
||||||
{
|
|
||||||
private readonly DamageType _damageType;
|
|
||||||
private readonly ForgeTagContainer? _damageDealerEventTags;
|
|
||||||
private readonly ForgeTagContainer? _damageReceiverEventTags;
|
|
||||||
|
|
||||||
// Define attributes to capture and modify
|
|
||||||
public AttributeCaptureDefinition TargetHealth { get; }
|
|
||||||
|
|
||||||
public AttributeCaptureDefinition TargetIncomingDamage { get; }
|
|
||||||
|
|
||||||
public DamageExecution(DamageType damageType, ForgeTagContainer? damageDealerEventTags, ForgeTagContainer? damageReceiverEventTags)
|
|
||||||
{
|
|
||||||
// Capture target mana and magic resistance
|
|
||||||
TargetHealth = new AttributeCaptureDefinition(
|
|
||||||
"CharacterAttributeSet.Health",
|
|
||||||
AttributeCaptureSource.Target,
|
|
||||||
false);
|
|
||||||
|
|
||||||
TargetIncomingDamage = new AttributeCaptureDefinition(
|
|
||||||
"MetaAttributeSet.IncomingDamage",
|
|
||||||
AttributeCaptureSource.Target);
|
|
||||||
|
|
||||||
// Register attributes for capture
|
|
||||||
AttributesToCapture.Add(TargetHealth);
|
|
||||||
AttributesToCapture.Add(TargetIncomingDamage);
|
|
||||||
|
|
||||||
_damageType = damageType;
|
|
||||||
_damageDealerEventTags = damageDealerEventTags;
|
|
||||||
_damageReceiverEventTags = damageReceiverEventTags;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ModifierEvaluatedData[] EvaluateExecution(
|
|
||||||
Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
|
||||||
{
|
|
||||||
var results = new List<ModifierEvaluatedData>();
|
|
||||||
|
|
||||||
float targetIncomingDamage = CaptureAttributeMagnitude(
|
|
||||||
TargetIncomingDamage,
|
|
||||||
effect,
|
|
||||||
target,
|
|
||||||
effectEvaluatedData);
|
|
||||||
|
|
||||||
if (targetIncomingDamage <= 0)
|
|
||||||
{
|
|
||||||
return [.. results];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (effectEvaluatedData?.TryGetContextData(out SimpleHitEffectData? hitEffectData) == true)
|
|
||||||
{
|
|
||||||
targetIncomingDamage *= hitEffectData.Magnitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply health reduction to target if attribute exists
|
|
||||||
if (TargetHealth.TryGetAttribute(target, out EntityAttribute? targetHealthAttribute))
|
|
||||||
{
|
|
||||||
results.Add(new ModifierEvaluatedData(
|
|
||||||
targetHealthAttribute,
|
|
||||||
ModifierOperation.FlatBonus,
|
|
||||||
-targetIncomingDamage)); // Negative for damage
|
|
||||||
}
|
|
||||||
|
|
||||||
var finalDamage = targetIncomingDamage;
|
|
||||||
var overkillDamage = 0.0f;
|
|
||||||
if (targetHealthAttribute!.CurrentValue - targetIncomingDamage <= targetHealthAttribute.Min)
|
|
||||||
{
|
|
||||||
finalDamage = targetHealthAttribute.CurrentValue - targetHealthAttribute.Min;
|
|
||||||
overkillDamage = targetIncomingDamage - finalDamage;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_damageReceiverEventTags is null) return [.. results];
|
|
||||||
|
|
||||||
target.Events.Raise(new EventData<DamageDone>
|
|
||||||
{
|
|
||||||
EventTags = _damageReceiverEventTags.GetTagContainer(),
|
|
||||||
Source = effect.Ownership.Owner,
|
|
||||||
Target = target,
|
|
||||||
EventMagnitude = finalDamage,
|
|
||||||
Payload = new DamageDone(_damageType, finalDamage, overkillDamage)
|
|
||||||
});
|
|
||||||
|
|
||||||
if (effect.Ownership.Source is null || _damageDealerEventTags is null)
|
|
||||||
{
|
|
||||||
return [.. results];
|
|
||||||
}
|
|
||||||
|
|
||||||
effect.Ownership.Source.Events.Raise(new EventData<DamageDone>
|
|
||||||
{
|
|
||||||
EventTags = _damageDealerEventTags.GetTagContainer(),
|
|
||||||
Source = effect.Ownership.Owner,
|
|
||||||
Target = target,
|
|
||||||
EventMagnitude = finalDamage,
|
|
||||||
Payload = new DamageDone(_damageType, finalDamage, overkillDamage)
|
|
||||||
});
|
|
||||||
|
|
||||||
return [.. results];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
[Tool]
|
|
||||||
[GlobalClass]
|
|
||||||
public partial class ForgeDamageExecution : ForgeCustomExecution
|
|
||||||
{
|
|
||||||
[Export]
|
|
||||||
public DamageType DamageType { get; set; } = DamageType.Physical;
|
|
||||||
[Export]
|
|
||||||
public ForgeTagContainer? DamageDealerEventTags { get; set; }
|
|
||||||
[Export]
|
|
||||||
public ForgeTagContainer? DamageReceiverEventTags { get; set; }
|
|
||||||
|
|
||||||
public override CustomExecution GetExecutionClass()
|
|
||||||
{
|
|
||||||
return new DamageExecution(DamageType, DamageDealerEventTags, DamageReceiverEventTags);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://cfx62w40nd84v
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Gamesmiths.Forge.Core;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
|
||||||
using Gamesmiths.Forge.Effects.Calculator;
|
|
||||||
using Gamesmiths.Forge.Effects.Magnitudes;
|
|
||||||
using Gamesmiths.Forge.Events;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources.Calculators;
|
|
||||||
using Godot;
|
|
||||||
using Movementtests.forge.abilities;
|
|
||||||
using Movementtests.scenes.components.knockback;
|
|
||||||
|
|
||||||
namespace Movementtests.tools.calculators;
|
|
||||||
|
|
||||||
|
|
||||||
public record KnockbackDone(float KnockbackValue, Vector3 knockbackDirection);
|
|
||||||
|
|
||||||
public class KnockbackExecution : CustomExecution
|
|
||||||
{
|
|
||||||
private readonly RKnockback _knockback;
|
|
||||||
private readonly ForgeTag _knockbackTag;
|
|
||||||
private readonly ForgeTagContainer? _knockbackReceiverEventTags;
|
|
||||||
private readonly ForgeTagContainer? _knockbackDealerEventTags;
|
|
||||||
|
|
||||||
public AttributeCaptureDefinition TargetIncomingDamage { get; }
|
|
||||||
|
|
||||||
public KnockbackExecution(ForgeTag knockbackTag, RKnockback knockback, ForgeTagContainer? knockbackDealerEventTags, ForgeTagContainer? knockbackReceiverEventTags)
|
|
||||||
{
|
|
||||||
_knockback = knockback;
|
|
||||||
_knockbackTag = knockbackTag;
|
|
||||||
_knockbackDealerEventTags = knockbackDealerEventTags;
|
|
||||||
_knockbackReceiverEventTags = knockbackReceiverEventTags;
|
|
||||||
|
|
||||||
TargetIncomingDamage = new AttributeCaptureDefinition(
|
|
||||||
"MetaAttributeSet.IncomingDamage",
|
|
||||||
AttributeCaptureSource.Target);
|
|
||||||
AttributesToCapture.Add(TargetIncomingDamage);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
|
||||||
{
|
|
||||||
var results = new List<ModifierEvaluatedData>();
|
|
||||||
if (!target.Tags.CombinedTags.HasTag(_knockbackTag.GetTag()))
|
|
||||||
return [.. results];
|
|
||||||
|
|
||||||
float targetIncomingDamage = CaptureAttributeMagnitude(
|
|
||||||
TargetIncomingDamage,
|
|
||||||
effect,
|
|
||||||
target,
|
|
||||||
effectEvaluatedData);
|
|
||||||
|
|
||||||
if (targetIncomingDamage <= 0)
|
|
||||||
return [.. results];
|
|
||||||
|
|
||||||
var knockbackValue = _knockback.Modifier * targetIncomingDamage / 100.0f;
|
|
||||||
|
|
||||||
if (_knockbackReceiverEventTags is null)
|
|
||||||
return [.. results];
|
|
||||||
|
|
||||||
var knockbackDirection = Vector3.Zero;
|
|
||||||
if (effectEvaluatedData?.TryGetContextData(out SimpleHitEffectData? hitEffectData) == true)
|
|
||||||
{
|
|
||||||
knockbackDirection = hitEffectData.SourceLocation.DirectionTo(hitEffectData.TargetLocation);
|
|
||||||
}
|
|
||||||
target.Events.Raise(new EventData<KnockbackDone>
|
|
||||||
{
|
|
||||||
EventTags = _knockbackReceiverEventTags.GetTagContainer(),
|
|
||||||
Source = effect.Ownership.Owner,
|
|
||||||
Target = target,
|
|
||||||
EventMagnitude = knockbackValue,
|
|
||||||
Payload = new KnockbackDone(knockbackValue, knockbackDirection)
|
|
||||||
});
|
|
||||||
|
|
||||||
if (effect.Ownership.Source is null || _knockbackDealerEventTags is null)
|
|
||||||
return [.. results];
|
|
||||||
|
|
||||||
effect.Ownership.Source.Events.Raise(new EventData<KnockbackDone>
|
|
||||||
{
|
|
||||||
EventTags = _knockbackDealerEventTags.GetTagContainer(),
|
|
||||||
Source = effect.Ownership.Owner,
|
|
||||||
Target = target,
|
|
||||||
EventMagnitude = knockbackValue,
|
|
||||||
Payload = new KnockbackDone(knockbackValue, knockbackDirection)
|
|
||||||
});
|
|
||||||
|
|
||||||
return [.. results];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[GlobalClass]
|
|
||||||
public partial class ForgeKnockbackExecution : ForgeCustomExecution
|
|
||||||
{
|
|
||||||
[Export] public ForgeTag? KnockbackableTag { get; set; }
|
|
||||||
[Export] public RKnockback? Knockback { get; set; }
|
|
||||||
[Export] public ForgeTagContainer? KnockbackDealerEventTags { get; set; }
|
|
||||||
[Export] public ForgeTagContainer? KnockbackReceiverEventTags { get; set; }
|
|
||||||
public override CustomExecution GetExecutionClass()
|
|
||||||
{
|
|
||||||
if (Knockback == null || KnockbackableTag == null) throw new System.ArgumentException("Knockback or KnockbackableTag is null");
|
|
||||||
return new KnockbackExecution(KnockbackableTag, Knockback, KnockbackDealerEventTags, KnockbackReceiverEventTags);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://diondfg5xp78h
|
|
||||||
@@ -16,33 +16,19 @@ using Movementtests.systems;
|
|||||||
namespace Movementtests.tools.calculators;
|
namespace Movementtests.tools.calculators;
|
||||||
|
|
||||||
|
|
||||||
public class RaiseEventTagExecution(TagContainer? ownerEventTags, TagContainer? targetEventTags) : CustomExecution
|
public class RaiseEventTagExecution(TagContainer eventTags) : CustomExecution
|
||||||
{
|
{
|
||||||
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
public override ModifierEvaluatedData[] EvaluateExecution(Effect effect, IForgeEntity target, EffectEvaluatedData? effectEvaluatedData)
|
||||||
{
|
{
|
||||||
var owner = effect.Ownership.Owner;
|
var owner = effect.Ownership.Owner;
|
||||||
var magnitude = effectEvaluatedData is { ModifiersEvaluatedData.Length: > 0 }
|
if (owner == null) return [];
|
||||||
? effectEvaluatedData.ModifiersEvaluatedData[0].Magnitude
|
|
||||||
: 0f;
|
owner.Events.Raise(new EventData
|
||||||
if (owner != null && ownerEventTags != null)
|
|
||||||
{
|
{
|
||||||
owner.Events.Raise(new EventData
|
EventTags = eventTags,
|
||||||
{
|
Source = owner,
|
||||||
EventTags = ownerEventTags,
|
EventMagnitude = 12f
|
||||||
Source = owner,
|
});
|
||||||
EventMagnitude = magnitude
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (targetEventTags != null)
|
|
||||||
{
|
|
||||||
target.Events.Raise(new EventData
|
|
||||||
{
|
|
||||||
EventTags = targetEventTags,
|
|
||||||
Source = owner,
|
|
||||||
EventMagnitude = magnitude
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -53,11 +39,10 @@ public class RaiseEventTagExecution(TagContainer? ownerEventTags, TagContainer?
|
|||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
public partial class ForgeRaiseEventTagExecution : ForgeCustomExecution
|
public partial class ForgeRaiseEventTagExecution : ForgeCustomExecution
|
||||||
{
|
{
|
||||||
[Export] ForgeTagContainer? EventTags { get; set; }
|
[Export] ForgeTagContainer EventTags { get; set; }
|
||||||
[Export] ForgeTagContainer? TargetEventTags { get; set; }
|
|
||||||
|
|
||||||
public override CustomExecution GetExecutionClass()
|
public override CustomExecution GetExecutionClass()
|
||||||
{
|
{
|
||||||
return new RaiseEventTagExecution(EventTags?.GetTagContainer(), TargetEventTags?.GetTagContainer());
|
return new RaiseEventTagExecution(EventTags.GetTagContainer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_l686n")
|
script = ExtResource("1_l686n")
|
||||||
RegisteredTags = Array[String](["character.player", "character.enemy", "weapon", "status.stunned", "status.burning", "status.frozen", "abilities.weapon.land", "abilities.weapon.flying", "abilities.weapon.left", "events.combat.damage", "events.combat.hit", "events.weapon.flyingTick", "events.weapon.startedFlying", "events.weapon.stoppedFlying", "events.weapon.handToFlying", "events.weapon.flyingToHand", "events.weapon.plantedToHand", "events.weapon.plantedToFlying", "events.weapon.planted", "cooldown.empoweredAction", "cooldown.empoweredSwordThrow", "cues.resources.mana", "events.player.empowered_action_used", "cues.resources.mana.inhibited", "cues.resources.health", "cooldown.enemy.hit", "events.combat.death", "cooldown.hit", "events.player.hit", "cues.enemy.health", "immunity.damage", "status", "traits.damageable", "traits.knockbackable", "events.combat.knockback_dealt", "events.combat.knockback_received"])
|
RegisteredTags = Array[String](["character.player", "character.enemy", "weapon", "status.stunned", "status.burning", "status.frozen", "abilities.weapon.land", "abilities.weapon.flying", "abilities.weapon.left", "events.combat.damage", "events.combat.hit", "events.weapon.flyingTick", "events.weapon.startedFlying", "events.weapon.stoppedFlying", "events.weapon.handToFlying", "events.weapon.flyingToHand", "events.weapon.plantedToHand", "events.weapon.plantedToFlying", "events.weapon.planted", "cooldown.empoweredAction", "cooldown.empoweredSwordThrow", "cues.resources.mana", "events.player.empowered_action_used", "cues.resources.mana.inhibited"])
|
||||||
|
|||||||
@@ -1,113 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://nns16d5uhtl8"]
|
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://bpovqvlqv5bs5" path="res://forge/resources/effect_components/damageable.tres" id="1_w36j6"]
|
|
||||||
[ext_resource type="Resource" uid="uid://sn6kndc6ukic" path="res://forge/resources/tag_containers/on_damage_dealt.tres" id="2_3ma4g"]
|
|
||||||
[ext_resource type="Resource" uid="uid://5tr54q0rdpho" path="res://forge/resources/tag_containers/on_damage_taken.tres" id="3_kyfqu"]
|
|
||||||
[ext_resource type="Script" uid="uid://cfx62w40nd84v" path="res://forge/calculators/ForgeDamageExecution.cs" id="4_xfamx"]
|
|
||||||
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="5_tw4gc"]
|
|
||||||
[ext_resource type="Resource" uid="uid://bhn27s8ne0uyg" path="res://forge/resources/tag_containers/on_knockback_dealt.tres" id="6_nq3a0"]
|
|
||||||
[ext_resource type="Resource" uid="uid://bkr6uu57wm3o3" path="res://forge/resources/tag_containers/on_knockback_received.tres" id="7_3utx7"]
|
|
||||||
[ext_resource type="Resource" uid="uid://45l7vnfs72b" path="res://forge/resources/tag_containers/knockbackable_tag.tres" id="8_7hfxb"]
|
|
||||||
[ext_resource type="Script" uid="uid://diondfg5xp78h" path="res://forge/calculators/ForgeKnockbackExecution.cs" id="9_lysxe"]
|
|
||||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="10_sd7ih"]
|
|
||||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="11_bs6rs"]
|
|
||||||
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="12_a6jts"]
|
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="13_c85am"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://c2akxlg7tdb67" path="res://assets/ui/IconGodotNode/node/icon_projectile.png" id="14_ow2i8"]
|
|
||||||
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="15_ki7ct"]
|
|
||||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="16_hhyju"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_vy8wr"]
|
|
||||||
script = ExtResource("4_xfamx")
|
|
||||||
DamageType = 3
|
|
||||||
DamageDealerEventTags = ExtResource("2_3ma4g")
|
|
||||||
DamageReceiverEventTags = ExtResource("3_kyfqu")
|
|
||||||
metadata/_custom_type_script = "uid://cfx62w40nd84v"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ndb8p"]
|
|
||||||
script = ExtResource("5_tw4gc")
|
|
||||||
Modifier = 100.0
|
|
||||||
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_dy671"]
|
|
||||||
script = ExtResource("9_lysxe")
|
|
||||||
KnockbackableTag = ExtResource("8_7hfxb")
|
|
||||||
Knockback = SubResource("Resource_ndb8p")
|
|
||||||
KnockbackDealerEventTags = ExtResource("6_nq3a0")
|
|
||||||
KnockbackReceiverEventTags = ExtResource("7_3utx7")
|
|
||||||
metadata/_custom_type_script = "uid://diondfg5xp78h"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_i0sj3"]
|
|
||||||
script = ExtResource("10_sd7ih")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1mvp7"]
|
|
||||||
script = ExtResource("11_bs6rs")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_jxdlf"]
|
|
||||||
script = ExtResource("11_bs6rs")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_rslib"]
|
|
||||||
script = ExtResource("11_bs6rs")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_3l3du"]
|
|
||||||
script = ExtResource("11_bs6rs")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_qqpg8"]
|
|
||||||
script = ExtResource("11_bs6rs")
|
|
||||||
BaseValue = 10.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_igmn0"]
|
|
||||||
script = ExtResource("11_bs6rs")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_acqnn"]
|
|
||||||
script = ExtResource("11_bs6rs")
|
|
||||||
BaseValue = 50.0
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xwtie"]
|
|
||||||
script = ExtResource("12_a6jts")
|
|
||||||
Attribute = "MetaAttributeSet.IncomingDamage"
|
|
||||||
CalculationType = 1
|
|
||||||
ScalableFloat = SubResource("Resource_acqnn")
|
|
||||||
CapturedAttribute = "MetaAttributeSet.Level"
|
|
||||||
Coefficient = SubResource("Resource_3l3du")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_igmn0")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_qqpg8")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_1mvp7")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_rslib")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_jxdlf")
|
|
||||||
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ikb7l"]
|
|
||||||
script = ExtResource("10_sd7ih")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_jdvg8"]
|
|
||||||
script = ExtResource("13_c85am")
|
|
||||||
Name = "Explosion hit"
|
|
||||||
Modifiers = Array[Object]([SubResource("Resource_xwtie")])
|
|
||||||
Components = Array[Object]([ExtResource("1_w36j6")])
|
|
||||||
Executions = Array[Object]([SubResource("Resource_vy8wr"), SubResource("Resource_dy671")])
|
|
||||||
StackLimit = SubResource("Resource_ikb7l")
|
|
||||||
InitialStack = SubResource("Resource_i0sj3")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ba5lh"]
|
|
||||||
script = ExtResource("15_ki7ct")
|
|
||||||
DamageEffect = SubResource("Resource_jdvg8")
|
|
||||||
Name = "Explostion hit"
|
|
||||||
Description = "Called by explosion scene"
|
|
||||||
Icon = ExtResource("14_ow2i8")
|
|
||||||
metadata/_custom_type_script = "uid://n6efm5o4uxvr"
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("16_hhyju")
|
|
||||||
Name = "Explosion "
|
|
||||||
InstancingPolicy = 1
|
|
||||||
CooldownEffects = []
|
|
||||||
AbilityBehavior = SubResource("Resource_ba5lh")
|
|
||||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://qpdw62ubaclc"]
|
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://bpovqvlqv5bs5" path="res://forge/resources/effect_components/damageable.tres" id="1_q2jt5"]
|
|
||||||
[ext_resource type="Resource" uid="uid://dlu7l5egpexnn" path="res://forge/resources/custom_executions/raise_damage_dealing_events.tres" id="2_2dxcu"]
|
|
||||||
[ext_resource type="Resource" uid="uid://4rkwr10pc6tp" path="res://forge/resources/custom_executions/physical_damage_calculator.tres" id="2_f6jpb"]
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="4_0mce3"]
|
|
||||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="6_41lep"]
|
|
||||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="7_jf6ii"]
|
|
||||||
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="8_51ikp"]
|
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="9_bcnlx"]
|
|
||||||
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="10_m4f1m"]
|
|
||||||
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="11_8c5sq"]
|
|
||||||
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="12_2x5q6"]
|
|
||||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="13_4nn3y"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_rjo6h"]
|
|
||||||
script = ExtResource("6_41lep")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_8qlid"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_lbthk"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_hguc3"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ugrvo"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6406e"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_x0rol"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1s1j3"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
BaseValue = 10.0
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_khx4r"]
|
|
||||||
script = ExtResource("8_51ikp")
|
|
||||||
Attribute = "MetaAttributeSet.IncomingDamage"
|
|
||||||
Operation = 2
|
|
||||||
ScalableFloat = SubResource("Resource_1s1j3")
|
|
||||||
Coefficient = SubResource("Resource_ugrvo")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_x0rol")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_6406e")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_8qlid")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_hguc3")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_lbthk")
|
|
||||||
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xmw7i"]
|
|
||||||
script = ExtResource("6_41lep")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_lj45k"]
|
|
||||||
script = ExtResource("9_bcnlx")
|
|
||||||
Name = "SimpleHitEffect"
|
|
||||||
Modifiers = Array[Object]([SubResource("Resource_khx4r")])
|
|
||||||
Components = [ExtResource("1_q2jt5")]
|
|
||||||
Executions = [ExtResource("2_f6jpb"), ExtResource("2_2dxcu")]
|
|
||||||
StackLimit = SubResource("Resource_xmw7i")
|
|
||||||
InitialStack = SubResource("Resource_rjo6h")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_m0osh"]
|
|
||||||
script = ExtResource("10_m4f1m")
|
|
||||||
DamageEffect = SubResource("Resource_lj45k")
|
|
||||||
Name = "Simple hit"
|
|
||||||
Description = "This is a simple hit from an enemy"
|
|
||||||
metadata/_custom_type_script = "uid://n6efm5o4uxvr"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_msmv1"]
|
|
||||||
script = ExtResource("4_0mce3")
|
|
||||||
ContainerTags = Array[String](["status.stunned"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xdbds"]
|
|
||||||
script = ExtResource("4_0mce3")
|
|
||||||
ContainerTags = Array[String](["cooldown.enemy.hit"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_gna8g"]
|
|
||||||
script = ExtResource("11_8c5sq")
|
|
||||||
TagsToAdd = SubResource("Resource_xdbds")
|
|
||||||
metadata/_custom_type_script = "uid://dngf30hxy5go4"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_oo2a1"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_q86ag"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_5eesh"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_5lf6m"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_bv3hg"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tb7hu"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_bw6ul"]
|
|
||||||
script = ExtResource("7_jf6ii")
|
|
||||||
BaseValue = 1.0
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_g5uhf"]
|
|
||||||
script = ExtResource("12_2x5q6")
|
|
||||||
ScalableFloat = SubResource("Resource_bw6ul")
|
|
||||||
Coefficient = SubResource("Resource_5lf6m")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_tb7hu")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_bv3hg")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_oo2a1")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_5eesh")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_q86ag")
|
|
||||||
metadata/_custom_type_script = "uid://2gm1hdhi8u08"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_vl5ta"]
|
|
||||||
script = ExtResource("6_41lep")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_82a7m"]
|
|
||||||
script = ExtResource("6_41lep")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0gdnn"]
|
|
||||||
script = ExtResource("9_bcnlx")
|
|
||||||
Name = "HitCooldown"
|
|
||||||
Modifiers = []
|
|
||||||
Components = [SubResource("Resource_gna8g")]
|
|
||||||
Executions = []
|
|
||||||
DurationType = 2
|
|
||||||
Duration = SubResource("Resource_g5uhf")
|
|
||||||
StackLimit = SubResource("Resource_82a7m")
|
|
||||||
InitialStack = SubResource("Resource_vl5ta")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("13_4nn3y")
|
|
||||||
Name = "Hit"
|
|
||||||
CooldownEffects = [SubResource("Resource_0gdnn")]
|
|
||||||
AbilityBehavior = SubResource("Resource_m0osh")
|
|
||||||
ActivationBlockedTags = SubResource("Resource_msmv1")
|
|
||||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
|
||||||
@@ -1,95 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://b0ikxp5j8fn3n"]
|
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://cw2ytd34jsxj" path="res://forge/resources/tag_containers/immune_damage.tres" id="1_xjqwu"]
|
|
||||||
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="2_a16tf"]
|
|
||||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="3_1wliv"]
|
|
||||||
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="4_7dtdc"]
|
|
||||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="5_ewbg3"]
|
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="6_0akms"]
|
|
||||||
[ext_resource type="Script" uid="uid://cl5hudinl1rex" path="res://forge/abilities/ForgeEffectApplicationBehavior.cs" id="7_mhqpo"]
|
|
||||||
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="8_4vjp3"]
|
|
||||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="9_go27d"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_5ht6k"]
|
|
||||||
script = ExtResource("2_a16tf")
|
|
||||||
TagsToAdd = ExtResource("1_xjqwu")
|
|
||||||
metadata/_custom_type_script = "uid://dngf30hxy5go4"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_bn2qi"]
|
|
||||||
script = ExtResource("3_1wliv")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_pl2a2"]
|
|
||||||
script = ExtResource("3_1wliv")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_g02pf"]
|
|
||||||
script = ExtResource("3_1wliv")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_7ak88"]
|
|
||||||
script = ExtResource("3_1wliv")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_f12ll"]
|
|
||||||
script = ExtResource("3_1wliv")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xodo6"]
|
|
||||||
script = ExtResource("3_1wliv")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_mcqfd"]
|
|
||||||
script = ExtResource("3_1wliv")
|
|
||||||
BaseValue = 2.0
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_w3q2i"]
|
|
||||||
script = ExtResource("4_7dtdc")
|
|
||||||
ScalableFloat = SubResource("Resource_mcqfd")
|
|
||||||
Coefficient = SubResource("Resource_7ak88")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_xodo6")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_f12ll")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_bn2qi")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_g02pf")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_pl2a2")
|
|
||||||
metadata/_custom_type_script = "uid://2gm1hdhi8u08"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_vgvi5"]
|
|
||||||
script = ExtResource("5_ewbg3")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0ujop"]
|
|
||||||
script = ExtResource("5_ewbg3")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_s8mqp"]
|
|
||||||
script = ExtResource("6_0akms")
|
|
||||||
Name = "Add Invincible tag effect"
|
|
||||||
Modifiers = Array[Object]([])
|
|
||||||
Components = Array[Object]([SubResource("Resource_5ht6k")])
|
|
||||||
Executions = []
|
|
||||||
DurationType = 2
|
|
||||||
Duration = SubResource("Resource_w3q2i")
|
|
||||||
StackLimit = SubResource("Resource_0ujop")
|
|
||||||
InitialStack = SubResource("Resource_vgvi5")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tcrdt"]
|
|
||||||
script = ExtResource("7_mhqpo")
|
|
||||||
EffectData = SubResource("Resource_s8mqp")
|
|
||||||
Name = "OnHitInvincibility"
|
|
||||||
Description = "Adds the invincible tag for a given period"
|
|
||||||
metadata/_custom_type_script = "uid://cl5hudinl1rex"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xs7wf"]
|
|
||||||
script = ExtResource("8_4vjp3")
|
|
||||||
Tag = "events.combat.damage"
|
|
||||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("9_go27d")
|
|
||||||
Name = "OnHitInvincibility"
|
|
||||||
InstancingPolicy = 1
|
|
||||||
CooldownEffects = []
|
|
||||||
AbilityBehavior = SubResource("Resource_tcrdt")
|
|
||||||
TriggerSource = 1
|
|
||||||
TriggerTag = SubResource("Resource_xs7wf")
|
|
||||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://dgjsi1my7nlnk"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="1_l0l1a"]
|
|
||||||
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="1_n2s8d"]
|
|
||||||
[ext_resource type="Resource" uid="uid://bpovqvlqv5bs5" path="res://forge/resources/effect_components/damageable.tres" id="1_r7waw"]
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_w1wo0"]
|
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="2_5vjbv"]
|
|
||||||
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="2_jwyed"]
|
|
||||||
[ext_resource type="Resource" uid="uid://4rkwr10pc6tp" path="res://forge/resources/custom_executions/physical_damage_calculator.tres" id="2_l5emy"]
|
|
||||||
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="3_c4wry"]
|
|
||||||
[ext_resource type="Resource" uid="uid://cc1qrmbp12fk8" path="res://forge/resources/custom_executions/player_hit_knoback_calculation.tres" id="3_l5emy"]
|
|
||||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="3_w1wo0"]
|
|
||||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="4_c4wry"]
|
|
||||||
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="5_0cyim"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_0cyim"]
|
|
||||||
script = ExtResource("1_l0l1a")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_h8gc3"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ewmvj"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_8wvcn"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_no8t2"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_vioyh"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_m6xnn"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_uinv8"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
BaseValue = 40.0
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_04hqa"]
|
|
||||||
script = ExtResource("3_c4wry")
|
|
||||||
Attribute = "MetaAttributeSet.IncomingDamage"
|
|
||||||
Operation = 2
|
|
||||||
ScalableFloat = SubResource("Resource_uinv8")
|
|
||||||
Coefficient = SubResource("Resource_no8t2")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_m6xnn")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_vioyh")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_h8gc3")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_8wvcn")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_ewmvj")
|
|
||||||
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_8fbeq"]
|
|
||||||
script = ExtResource("1_l0l1a")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ees2v"]
|
|
||||||
script = ExtResource("2_5vjbv")
|
|
||||||
Name = "Player Hit Effect"
|
|
||||||
Modifiers = Array[Object]([SubResource("Resource_04hqa")])
|
|
||||||
Components = Array[Object]([ExtResource("1_r7waw")])
|
|
||||||
Executions = Array[Object]([ExtResource("2_l5emy"), ExtResource("3_l5emy")])
|
|
||||||
StackLimit = SubResource("Resource_8fbeq")
|
|
||||||
InitialStack = SubResource("Resource_0cyim")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_r7waw"]
|
|
||||||
script = ExtResource("1_n2s8d")
|
|
||||||
DamageEffect = SubResource("Resource_ees2v")
|
|
||||||
Name = "PlayerHitEffect"
|
|
||||||
Description = "Effect applied to target on player hit"
|
|
||||||
metadata/_custom_type_script = "uid://n6efm5o4uxvr"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_qk2av"]
|
|
||||||
script = ExtResource("1_w1wo0")
|
|
||||||
ContainerTags = Array[String](["status.stunned"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_w857g"]
|
|
||||||
script = ExtResource("1_w1wo0")
|
|
||||||
ContainerTags = Array[String](["cooldown.hit"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_n2s8d"]
|
|
||||||
script = ExtResource("2_jwyed")
|
|
||||||
TagsToAdd = SubResource("Resource_w857g")
|
|
||||||
metadata/_custom_type_script = "uid://dngf30hxy5go4"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_l5emy"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_agfn8"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tkxxk"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_e4qbe"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_coxn5"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_wak7n"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_bvwi7"]
|
|
||||||
script = ExtResource("4_c4wry")
|
|
||||||
BaseValue = 0.3
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_3wf5l"]
|
|
||||||
script = ExtResource("5_0cyim")
|
|
||||||
ScalableFloat = SubResource("Resource_bvwi7")
|
|
||||||
Coefficient = SubResource("Resource_e4qbe")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_wak7n")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_coxn5")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_l5emy")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_tkxxk")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_agfn8")
|
|
||||||
metadata/_custom_type_script = "uid://2gm1hdhi8u08"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xs7wf"]
|
|
||||||
script = ExtResource("1_l0l1a")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_cm4e8"]
|
|
||||||
script = ExtResource("1_l0l1a")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_cmmfb"]
|
|
||||||
script = ExtResource("2_5vjbv")
|
|
||||||
Name = "PlayerHitCooldown"
|
|
||||||
Modifiers = []
|
|
||||||
Components = Array[Object]([SubResource("Resource_n2s8d")])
|
|
||||||
Executions = []
|
|
||||||
DurationType = 2
|
|
||||||
Duration = SubResource("Resource_3wf5l")
|
|
||||||
StackLimit = SubResource("Resource_cm4e8")
|
|
||||||
InitialStack = SubResource("Resource_xs7wf")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("3_w1wo0")
|
|
||||||
Name = "PlayerHitAbility"
|
|
||||||
RetriggerInstancedAbility = true
|
|
||||||
CooldownEffects = [SubResource("Resource_cmmfb")]
|
|
||||||
AbilityBehavior = SubResource("Resource_r7waw")
|
|
||||||
ActivationBlockedTags = SubResource("Resource_qk2av")
|
|
||||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeCue" format=3 uid="uid://bsqvfefpb7jix"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_tvgrb"]
|
|
||||||
[ext_resource type="Script" uid="uid://cmrsxccn0ei4j" path="res://addons/forge/resources/ForgeCue.cs" id="2_dyb6j"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_f35o6"]
|
|
||||||
script = ExtResource("1_tvgrb")
|
|
||||||
ContainerTags = Array[String](["cues.resources.health", "character.player"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("2_dyb6j")
|
|
||||||
CueKeys = SubResource("Resource_f35o6")
|
|
||||||
MaxValue = 100
|
|
||||||
MagnitudeType = 2
|
|
||||||
MagnitudeAttribute = "PlayerAttributeSet.Health"
|
|
||||||
metadata/_custom_type_script = "uid://cmrsxccn0ei4j"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeDamageExecution" format=3 uid="uid://4rkwr10pc6tp"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cfx62w40nd84v" path="res://forge/calculators/ForgeDamageExecution.cs" id="1_bo86y"]
|
|
||||||
[ext_resource type="Resource" uid="uid://sn6kndc6ukic" path="res://forge/resources/tag_containers/on_damage_dealt.tres" id="1_hmxxf"]
|
|
||||||
[ext_resource type="Resource" uid="uid://5tr54q0rdpho" path="res://forge/resources/tag_containers/on_damage_taken.tres" id="2_6r7e6"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_bo86y")
|
|
||||||
DamageDealerEventTags = ExtResource("1_hmxxf")
|
|
||||||
DamageReceiverEventTags = ExtResource("2_6r7e6")
|
|
||||||
metadata/_custom_type_script = "uid://cfx62w40nd84v"
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeKnockbackExecution" format=3 uid="uid://cc1qrmbp12fk8"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="1_kcl5u"]
|
|
||||||
[ext_resource type="Resource" uid="uid://bhn27s8ne0uyg" path="res://forge/resources/tag_containers/on_knockback_dealt.tres" id="2_oqtq1"]
|
|
||||||
[ext_resource type="Resource" uid="uid://bkr6uu57wm3o3" path="res://forge/resources/tag_containers/on_knockback_received.tres" id="3_1va1b"]
|
|
||||||
[ext_resource type="Resource" uid="uid://45l7vnfs72b" path="res://forge/resources/tag_containers/knockbackable_tag.tres" id="4_0i0oh"]
|
|
||||||
[ext_resource type="Script" uid="uid://diondfg5xp78h" path="res://forge/calculators/ForgeKnockbackExecution.cs" id="5_babc1"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6x2ov"]
|
|
||||||
script = ExtResource("1_kcl5u")
|
|
||||||
Modifier = 50.0
|
|
||||||
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("5_babc1")
|
|
||||||
KnockbackableTag = ExtResource("4_0i0oh")
|
|
||||||
Knockback = SubResource("Resource_6x2ov")
|
|
||||||
KnockbackDealerEventTags = ExtResource("2_oqtq1")
|
|
||||||
KnockbackReceiverEventTags = ExtResource("3_1va1b")
|
|
||||||
metadata/_custom_type_script = "uid://diondfg5xp78h"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeRaiseEventTagExecution" format=3 uid="uid://dlu7l5egpexnn"]
|
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://sn6kndc6ukic" path="res://forge/resources/tag_containers/on_damage_dealt.tres" id="1_cum8v"]
|
|
||||||
[ext_resource type="Resource" uid="uid://5tr54q0rdpho" path="res://forge/resources/tag_containers/on_damage_taken.tres" id="2_w48xp"]
|
|
||||||
[ext_resource type="Script" uid="uid://br7ut4lbau66w" path="res://forge/calculators/ForgeRaiseEventTagExecution.cs" id="3_ggrwn"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("3_ggrwn")
|
|
||||||
EventTags = ExtResource("1_cum8v")
|
|
||||||
TargetEventTags = ExtResource("2_w48xp")
|
|
||||||
metadata/_custom_type_script = "uid://br7ut4lbau66w"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="TargetTagRequirements" format=3 uid="uid://bpovqvlqv5bs5"]
|
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://cw2ytd34jsxj" path="res://forge/resources/tag_containers/immune_damage.tres" id="1_8qlnl"]
|
|
||||||
[ext_resource type="Resource" uid="uid://bsogx7yhedjry" path="res://forge/resources/tag_containers/trait_damageable.tres" id="2_vxkk1"]
|
|
||||||
[ext_resource type="Script" uid="uid://b0eq12mjqfage" path="res://addons/forge/resources/components/TargetTagRequirements.cs" id="3_1mj5a"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("3_1mj5a")
|
|
||||||
ApplicationRequiredTags = ExtResource("2_vxkk1")
|
|
||||||
ApplicationIgnoredTags = ExtResource("1_8qlnl")
|
|
||||||
metadata/_custom_type_script = "uid://b0eq12mjqfage"
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeEffectData" format=3 uid="uid://c4ea6ktafqe0r"]
|
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://cw2ytd34jsxj" path="res://forge/resources/tag_containers/immune_damage.tres" id="1_suvh6"]
|
|
||||||
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="2_7y7k0"]
|
|
||||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="3_wdmyo"]
|
|
||||||
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="4_m2dme"]
|
|
||||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="5_uck3v"]
|
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="6_gt48y"]
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xltxv"]
|
|
||||||
script = ExtResource("2_7y7k0")
|
|
||||||
TagsToAdd = ExtResource("1_suvh6")
|
|
||||||
metadata/_custom_type_script = "uid://dngf30hxy5go4"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_60xl1"]
|
|
||||||
script = ExtResource("3_wdmyo")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_2rev5"]
|
|
||||||
script = ExtResource("3_wdmyo")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_kxytj"]
|
|
||||||
script = ExtResource("3_wdmyo")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_e5nje"]
|
|
||||||
script = ExtResource("3_wdmyo")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xc8ja"]
|
|
||||||
script = ExtResource("3_wdmyo")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_tan32"]
|
|
||||||
script = ExtResource("3_wdmyo")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_l52b0"]
|
|
||||||
script = ExtResource("3_wdmyo")
|
|
||||||
BaseValue = 0.3
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6jn6y"]
|
|
||||||
script = ExtResource("4_m2dme")
|
|
||||||
ScalableFloat = SubResource("Resource_l52b0")
|
|
||||||
Coefficient = SubResource("Resource_e5nje")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_tan32")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_xc8ja")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_60xl1")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_kxytj")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_2rev5")
|
|
||||||
metadata/_custom_type_script = "uid://2gm1hdhi8u08"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_ev6w4"]
|
|
||||||
script = ExtResource("5_uck3v")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_u8xa8"]
|
|
||||||
script = ExtResource("5_uck3v")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("6_gt48y")
|
|
||||||
Name = "ApplyInvincibility"
|
|
||||||
Modifiers = []
|
|
||||||
Components = Array[Object]([SubResource("Resource_xltxv")])
|
|
||||||
Executions = []
|
|
||||||
DurationType = 2
|
|
||||||
Duration = SubResource("Resource_6jn6y")
|
|
||||||
StackLimit = SubResource("Resource_u8xa8")
|
|
||||||
InitialStack = SubResource("Resource_ev6w4")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://bocsykxbh8l0g"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_kdy2b"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_kdy2b")
|
|
||||||
ContainerTags = Array[String](["character.enemy", "traits.damageable", "traits.knockbackable"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://cw2ytd34jsxj"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_vmvhu"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_vmvhu")
|
|
||||||
ContainerTags = Array[String](["immunity.damage"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTag" format=3 uid="uid://45l7vnfs72b"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="1_1cy5u"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_1cy5u")
|
|
||||||
Tag = "traits.knockbackable"
|
|
||||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://sn6kndc6ukic"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_4beov"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_4beov")
|
|
||||||
ContainerTags = Array[String](["events.combat.hit"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://5tr54q0rdpho"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_nvopg"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_nvopg")
|
|
||||||
ContainerTags = Array[String](["events.combat.damage"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://bhn27s8ne0uyg"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_kgxiq"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_kgxiq")
|
|
||||||
ContainerTags = Array[String](["events.combat.knockback_dealt"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://bkr6uu57wm3o3"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_ro1gp"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_ro1gp")
|
|
||||||
ContainerTags = Array[String](["events.combat.knockback_received"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeTagContainer" format=3 uid="uid://bsogx7yhedjry"]
|
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="1_wyb42"]
|
|
||||||
|
|
||||||
[resource]
|
|
||||||
script = ExtResource("1_wyb42")
|
|
||||||
ContainerTags = Array[String](["traits.damageable"])
|
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
|
||||||
12
interfaces/IAbilityBase.cs
Normal file
12
interfaces/IAbilityBase.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Gamesmiths.Forge.Abilities;
|
||||||
|
using Gamesmiths.Forge.Effects;
|
||||||
|
using Gamesmiths.Forge.Tags;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Movementtests.interfaces;
|
||||||
|
|
||||||
|
public interface IAbilityBase<TCreation, TPayload>
|
||||||
|
{
|
||||||
|
AbilityData Ability(TCreation creationData, TagContainer? tags);
|
||||||
|
IAbilityBehavior<TPayload> Behavior(TCreation creationData);
|
||||||
|
}
|
||||||
1
interfaces/IAbilityBase.cs.uid
Normal file
1
interfaces/IAbilityBase.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://de881c2xsbutk
|
||||||
9
interfaces/IDamageDealer.cs
Normal file
9
interfaces/IDamageDealer.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Movementtests.interfaces;
|
||||||
|
|
||||||
|
public interface IDamageDealer
|
||||||
|
{
|
||||||
|
[Export]
|
||||||
|
RDamage RDamage { get; set; }
|
||||||
|
}
|
||||||
1
interfaces/IDamageDealer.cs.uid
Normal file
1
interfaces/IDamageDealer.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://wdqo51131g5
|
||||||
14
interfaces/IDamageable.cs
Normal file
14
interfaces/IDamageable.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Movementtests.interfaces;
|
||||||
|
|
||||||
|
public record DamageRecord(Vector3 SourceLocation, RDamage Damage);
|
||||||
|
|
||||||
|
public interface IDamageable
|
||||||
|
{
|
||||||
|
event Action<IDamageable, DamageRecord> DamageTaken;
|
||||||
|
|
||||||
|
DamageRecord TakeDamage(DamageRecord damageRecord);
|
||||||
|
DamageRecord ComputeDamage(DamageRecord damageRecord);
|
||||||
|
}
|
||||||
1
interfaces/IDamageable.cs.uid
Normal file
1
interfaces/IDamageable.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://cf56b2ep3bu3j
|
||||||
18
interfaces/IHealthable.cs
Normal file
18
interfaces/IHealthable.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace Movementtests.interfaces;
|
||||||
|
|
||||||
|
public record HealthChangedRecord(float CurrentHealth, float PreviousHealth, float MaxHealth);
|
||||||
|
|
||||||
|
public interface IHealthable
|
||||||
|
{
|
||||||
|
event Action<IHealthable, HealthChangedRecord> HealthChanged;
|
||||||
|
event Action<IHealthable> HealthDepleted;
|
||||||
|
|
||||||
|
[Export] RHealth? RHealth { get; set; }
|
||||||
|
|
||||||
|
float CurrentHealth { get; set; }
|
||||||
|
|
||||||
|
HealthChangedRecord ReduceHealth(IDamageable source, DamageRecord damageRecord);
|
||||||
|
}
|
||||||
1
interfaces/IHealthable.cs.uid
Normal file
1
interfaces/IHealthable.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bea2kvnu3kuhu
|
||||||
@@ -2,5 +2,5 @@ namespace Movementtests.interfaces;
|
|||||||
|
|
||||||
public interface IKillable
|
public interface IKillable
|
||||||
{
|
{
|
||||||
void Kill();
|
void Kill(IHealthable source);
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using Movementtests.scenes.components.knockback;
|
|
||||||
|
|
||||||
namespace Movementtests.interfaces;
|
namespace Movementtests.interfaces;
|
||||||
|
|
||||||
public record KnockbackRecord(Vector3 Direction, float ForceMultiplier = 1.0f);
|
public record KnockbackRecord(DamageRecord DamageRecord, float ForceMultiplier = 1.0f);
|
||||||
|
|
||||||
public interface IKnockbackable
|
public interface IKnockbackable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ using Godot;
|
|||||||
|
|
||||||
interface ISpawnable
|
interface ISpawnable
|
||||||
{
|
{
|
||||||
void Init();
|
void Initialize();
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,10 @@ namespace Movementtests.interfaces;
|
|||||||
|
|
||||||
public static class NodeExtensions
|
public static class NodeExtensions
|
||||||
{
|
{
|
||||||
|
public static IDamageable[] ToIDamageables(this GodotObject[] nodes)
|
||||||
|
{
|
||||||
|
return nodes == null ? System.Array.Empty<IDamageable>() : nodes.OfType<IDamageable>().ToArray();
|
||||||
|
}
|
||||||
public static IKillable[] ToIKillables(this GodotObject[] nodes)
|
public static IKillable[] ToIKillables(this GodotObject[] nodes)
|
||||||
{
|
{
|
||||||
return nodes == null ? System.Array.Empty<IKillable>() : nodes.OfType<IKillable>().ToArray();
|
return nodes == null ? System.Array.Empty<IKillable>() : nodes.OfType<IKillable>().ToArray();
|
||||||
|
|||||||
@@ -1,81 +1,55 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Chickensoft.Sync.Primitives;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Movementtests.systems;
|
using Movementtests.systems;
|
||||||
|
|
||||||
namespace Movementtests.managers;
|
namespace Movementtests.managers;
|
||||||
|
|
||||||
public partial class WeaponEventAbilityData(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior ability)
|
public partial class WeaponEventAbilityData(WeaponSystem.WeaponEvent forEvent, Resource ability)
|
||||||
: RefCounted
|
: RefCounted
|
||||||
{
|
{
|
||||||
public WeaponSystem.WeaponEvent ForEvent { get; private set; } = forEvent;
|
public WeaponSystem.WeaponEvent ForEvent { get; private set; } = forEvent;
|
||||||
public ForgeAbilityBehavior Ability { get; private set; } = ability;
|
public Resource Ability { get; private set; } = ability;
|
||||||
}
|
}
|
||||||
|
|
||||||
[GlobalClass, Meta(typeof(IAutoNode))]
|
public partial class InventoryManager : Node
|
||||||
public partial class InventoryManager : Node, IDisposable
|
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
[Signal]
|
||||||
|
public delegate void InventoryChangedEventHandler();
|
||||||
#region Signals
|
|
||||||
|
|
||||||
|
[Signal]
|
||||||
|
public delegate void WeaponEventInventoryChangedEventHandler();
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void WeaponEventAbilityAddedEventHandler(WeaponEventAbilityData data);
|
public delegate void WeaponEventAbilityAddedEventHandler(WeaponEventAbilityData data);
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void WeaponEventAbilityRemovedEventHandler(WeaponEventAbilityData data);
|
public delegate void WeaponEventAbilityRemovedEventHandler(WeaponEventAbilityData data);
|
||||||
|
|
||||||
#endregion
|
public Dictionary<WeaponSystem.WeaponEvent, HashSet<Resource>> WeaponEventsInventory { get; } = [];
|
||||||
|
|
||||||
private AutoSet<ForgeAbilityBehavior> _startedFlyingAbilities = new();
|
public override void _Ready()
|
||||||
private AutoSet<ForgeAbilityBehavior> _flyingTickAbilities = new();
|
|
||||||
private AutoSet<ForgeAbilityBehavior> _stoppedFlyingAbilities = new();
|
|
||||||
|
|
||||||
public IAutoSet<ForgeAbilityBehavior> StartedFlyingAbilities => _startedFlyingAbilities;
|
|
||||||
public IAutoSet<ForgeAbilityBehavior> FlyingTickAbilities => _flyingTickAbilities;
|
|
||||||
public IAutoSet<ForgeAbilityBehavior> StoppedFlyingAbilities => _stoppedFlyingAbilities;
|
|
||||||
|
|
||||||
private readonly AutoMap<WeaponSystem.WeaponEvent, AutoSet<ForgeAbilityBehavior>> _weaponEventsInventory = new();
|
|
||||||
public IAutoMap<WeaponSystem.WeaponEvent, AutoSet<ForgeAbilityBehavior>> WeaponEventsInventory => _weaponEventsInventory;
|
|
||||||
|
|
||||||
public void OnReady()
|
|
||||||
{
|
{
|
||||||
_weaponEventsInventory[WeaponSystem.WeaponEvent.StartedFlying] = _startedFlyingAbilities;
|
WeaponEventsInventory[WeaponSystem.WeaponEvent.FlyingTick] = new HashSet<Resource>();
|
||||||
_weaponEventsInventory[WeaponSystem.WeaponEvent.FlyingTick] = _flyingTickAbilities;
|
WeaponEventsInventory[WeaponSystem.WeaponEvent.StartedFlying] = new HashSet<Resource>();
|
||||||
_weaponEventsInventory[WeaponSystem.WeaponEvent.StoppedFlying] = _stoppedFlyingAbilities;
|
WeaponEventsInventory[WeaponSystem.WeaponEvent.StoppedFlying] = new HashSet<Resource>();
|
||||||
}
|
|
||||||
|
|
||||||
public void InitializeFromResource(WeaponInventory inventory)
|
|
||||||
{
|
|
||||||
_startedFlyingAbilities = new AutoSet<ForgeAbilityBehavior>(inventory.OnWeaponStartedFlyingAbilities);
|
|
||||||
_flyingTickAbilities = new AutoSet<ForgeAbilityBehavior>(inventory.OnWeaponFlyingTickAbilities);
|
|
||||||
_stoppedFlyingAbilities = new AutoSet<ForgeAbilityBehavior>(inventory.OnWeaponStoppedFlyingAbilities);
|
|
||||||
}
|
|
||||||
|
|
||||||
public new void Dispose()
|
|
||||||
{
|
|
||||||
GC.SuppressFinalize(this);
|
|
||||||
|
|
||||||
_startedFlyingAbilities.Dispose();
|
|
||||||
_flyingTickAbilities.Dispose();
|
|
||||||
_stoppedFlyingAbilities.Dispose();
|
|
||||||
_weaponEventsInventory.Dispose();
|
|
||||||
|
|
||||||
base.Dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddAbilityForWeaponEvent(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
public void AddAbilityForWeaponEvent(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
||||||
{
|
{
|
||||||
var inventoryForEvent = _weaponEventsInventory[forEvent];
|
var inventoryForEvent = WeaponEventsInventory[forEvent];
|
||||||
inventoryForEvent.Add(abilityBehavior);
|
var addedAbilityToInventory = inventoryForEvent.Add(abilityBehavior);
|
||||||
|
if (!addedAbilityToInventory) return;
|
||||||
|
|
||||||
|
EmitSignalWeaponEventInventoryChanged();
|
||||||
|
EmitSignalWeaponEventAbilityAdded(new WeaponEventAbilityData(forEvent, abilityBehavior));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveAbilityForWeaponEvent(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
public void RemoveAbilityForWeaponEvent(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
||||||
{
|
{
|
||||||
var inventoryForEvent = _weaponEventsInventory[forEvent];
|
var inventoryForEvent = WeaponEventsInventory[forEvent];
|
||||||
inventoryForEvent.Remove(abilityBehavior);
|
var removedFromInventory = inventoryForEvent.Remove(abilityBehavior);
|
||||||
|
if (!removedFromInventory) return;
|
||||||
|
|
||||||
|
EmitSignalWeaponEventInventoryChanged();
|
||||||
|
EmitSignalWeaponEventAbilityRemoved(new WeaponEventAbilityData(forEvent, abilityBehavior));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
|
||||||
using Godot;
|
|
||||||
|
|
||||||
namespace Movementtests.managers;
|
|
||||||
|
|
||||||
[GlobalClass]
|
|
||||||
public partial class WeaponInventory(
|
|
||||||
ForgeAbilityBehavior[] onWeaponStartedFlyingAbilities,
|
|
||||||
ForgeAbilityBehavior[] onWeaponFlyingTickAbilities,
|
|
||||||
ForgeAbilityBehavior[] onWeaponStoppedFlyingAbilities
|
|
||||||
) : Resource
|
|
||||||
{
|
|
||||||
[Export]
|
|
||||||
public ForgeAbilityBehavior[] OnWeaponStartedFlyingAbilities { get; set; } = onWeaponStartedFlyingAbilities;
|
|
||||||
[Export]
|
|
||||||
public ForgeAbilityBehavior[] OnWeaponFlyingTickAbilities { get; set; } = onWeaponFlyingTickAbilities;
|
|
||||||
[Export]
|
|
||||||
public ForgeAbilityBehavior[] OnWeaponStoppedFlyingAbilities { get; set; } = onWeaponStoppedFlyingAbilities;
|
|
||||||
|
|
||||||
public WeaponInventory() : this([], [], []) {}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://cgaahnfgxcrr6
|
|
||||||
@@ -2,9 +2,6 @@ using Godot;
|
|||||||
using System;
|
using System;
|
||||||
using Chickensoft.AutoInject;
|
using Chickensoft.AutoInject;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Godot.Core;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Movementtests.interfaces;using Movementtests.managers;
|
using Movementtests.interfaces;using Movementtests.managers;
|
||||||
using Movementtests.systems;
|
using Movementtests.systems;
|
||||||
|
|
||||||
@@ -13,43 +10,37 @@ using Movementtests.systems;
|
|||||||
typeof(IAutoConnect),
|
typeof(IAutoConnect),
|
||||||
typeof(IProvider)
|
typeof(IProvider)
|
||||||
)]
|
)]
|
||||||
public partial class MainSceneTemplate : Node3D, IProvide<InventoryManager>, IProvide<TagsManager>, IProvide<CuesManager>
|
public partial class MainSceneTemplate : Node3D, IProvide<InventoryManager>
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
#region Nodes
|
|
||||||
|
|
||||||
[Node("PlayerFellRespawn")] public required Marker3D PlayerRespawnMarker { get; set; }
|
|
||||||
[Node("AnimationPlayer")] public required AnimationPlayer AnimationPlayer { get; set; }
|
|
||||||
[Node("PlayerFellTP")] public required Area3D PlayerFellPlane { get; set; }
|
|
||||||
[Node("DeathPlane")] public required Area3D DeathPlane { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private Node3D? Respawnabble { get; set; }
|
[Node("PlayerFellRespawn")] private Marker3D? PlayerRespawnMarker { get; set; }
|
||||||
|
private AnimationPlayer? _animationPlayer;
|
||||||
|
private Node3D? _respawnabble;
|
||||||
|
|
||||||
#region Exports
|
private Area3D? _playerFellPlane;
|
||||||
|
private Area3D? _deathPlane;
|
||||||
[Export] public WeaponInventory? InitialWeaponInventory { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public required InventoryManager InventoryManager { get; set; }
|
public required InventoryManager InventoryManager { get; set; }
|
||||||
InventoryManager IProvide<InventoryManager>.Value() => InventoryManager;
|
InventoryManager IProvide<InventoryManager>.Value() => InventoryManager;
|
||||||
|
|
||||||
TagsManager IProvide<TagsManager>.Value() => ForgeManagers.Instance.TagsManager;
|
|
||||||
CuesManager IProvide<CuesManager>.Value() => ForgeManagers.Instance.CuesManager;
|
|
||||||
|
|
||||||
public void OnReady()
|
public void OnReady()
|
||||||
{
|
{
|
||||||
PlayerFellPlane.BodyEntered += StartResetPlayerAnimation;
|
_animationPlayer = GetNode<AnimationPlayer>("AnimationPlayer");
|
||||||
DeathPlane.BodyEntered += KillEnemy;
|
|
||||||
|
|
||||||
|
_playerFellPlane = GetNode<Area3D>("PlayerFellTP");
|
||||||
|
_deathPlane = GetNode<Area3D>("DeathPlane");
|
||||||
|
|
||||||
|
if (PlayerRespawnMarker == null) throw new Exception("Player respawn marker is null");
|
||||||
|
if (_animationPlayer == null) throw new Exception("Animation player is null");
|
||||||
|
if (_playerFellPlane == null) throw new Exception("Player reset plane is null");
|
||||||
|
if (_deathPlane == null) throw new Exception("Enemy death plane is null");
|
||||||
|
|
||||||
|
_playerFellPlane.BodyEntered += StartResetPlayerAnimation;
|
||||||
|
_deathPlane.BodyEntered += KillEnemy;
|
||||||
|
|
||||||
InventoryManager = new InventoryManager();
|
InventoryManager = new InventoryManager();
|
||||||
if (InitialWeaponInventory != null)
|
|
||||||
InventoryManager.InitializeFromResource(InitialWeaponInventory);
|
|
||||||
AddChild(InventoryManager);
|
AddChild(InventoryManager);
|
||||||
|
|
||||||
this.Provide();
|
this.Provide();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,8 +53,8 @@ public partial class MainSceneTemplate : Node3D, IProvide<InventoryManager>, IPr
|
|||||||
|
|
||||||
public void ResetPlayerPosition()
|
public void ResetPlayerPosition()
|
||||||
{
|
{
|
||||||
if (Respawnabble == null || PlayerRespawnMarker == null) throw new Exception("Player or respawn marker is null");
|
if (_respawnabble == null || PlayerRespawnMarker == null) throw new Exception("Player or respawn marker is null");
|
||||||
Respawnabble.GlobalPosition = PlayerRespawnMarker.GlobalPosition;
|
_respawnabble.GlobalPosition = PlayerRespawnMarker.GlobalPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartResetPlayerAnimation(Node3D body)
|
public void StartResetPlayerAnimation(Node3D body)
|
||||||
@@ -75,18 +66,23 @@ public partial class MainSceneTemplate : Node3D, IProvide<InventoryManager>, IPr
|
|||||||
weapon.SetLinearVelocity(Vector3.Down);
|
weapon.SetLinearVelocity(Vector3.Down);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Respawnabble = body as PlayerController;
|
_respawnabble = body as PlayerController;
|
||||||
if (Respawnabble == null || AnimationPlayer == null) throw new Exception("Player or anim player is null");
|
if (_respawnabble == null || _animationPlayer == null) throw new Exception("Player or anim player is null");
|
||||||
AnimationPlayer.Play("player_fell");
|
_animationPlayer.Play("player_fell");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void KillEnemy(Node3D body)
|
public void KillEnemy(Node3D body)
|
||||||
{
|
{
|
||||||
if (body is not IKillable killable)
|
if (body is not IKillable killable)
|
||||||
{
|
{
|
||||||
// body.QueueFree();
|
body.QueueFree();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
killable.Kill();
|
if (killable is not IHealthable healthable)
|
||||||
|
{
|
||||||
|
body.QueueFree();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
killable.Kill(healthable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="5_dl1un"]
|
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="5_dl1un"]
|
||||||
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="6_465vr"]
|
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="6_465vr"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="7_egib5"]
|
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="7_egib5"]
|
||||||
|
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="8_a01g8"]
|
||||||
|
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="9_doqxp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b8aet6m4m2i83" path="res://scenes/tuto_trigger/TutoTrigger.tscn" id="10_vqwwk"]
|
[ext_resource type="PackedScene" uid="uid://b8aet6m4m2i83" path="res://scenes/tuto_trigger/TutoTrigger.tscn" id="10_vqwwk"]
|
||||||
[ext_resource type="Texture2D" uid="uid://nrhxjdpuje3f" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_lt_outline.svg" id="11_bdsxx"]
|
[ext_resource type="Texture2D" uid="uid://nrhxjdpuje3f" path="res://assets/ui/input-prompts/Xbox Series/Vector/xbox_lt_outline.svg" id="11_bdsxx"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dx2mk8qd6g8uh" path="res://assets/ui/input-prompts/Keyboard & Mouse/Vector/mouse_right_outline.svg" id="12_2usyc"]
|
[ext_resource type="Texture2D" uid="uid://dx2mk8qd6g8uh" path="res://assets/ui/input-prompts/Keyboard & Mouse/Vector/mouse_right_outline.svg" id="12_2usyc"]
|
||||||
@@ -24,6 +26,31 @@ script = ExtResource("6_465vr")
|
|||||||
GravityModifier = 5.0
|
GravityModifier = 5.0
|
||||||
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
|
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_xy0m1"]
|
||||||
|
script = ExtResource("8_a01g8")
|
||||||
|
StartingHealth = 100.0
|
||||||
|
metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_invhv"]
|
||||||
|
script = ExtResource("8_a01g8")
|
||||||
|
StartingHealth = 1.0
|
||||||
|
metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_cgfmf"]
|
||||||
|
script = ExtResource("9_doqxp")
|
||||||
|
DamageType = 2
|
||||||
|
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_05lnh"]
|
||||||
|
script = ExtResource("8_a01g8")
|
||||||
|
StartingHealth = 100.0
|
||||||
|
metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_t5o40"]
|
||||||
|
script = ExtResource("8_a01g8")
|
||||||
|
StartingHealth = 100.0
|
||||||
|
metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_xy0m1"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_xy0m1"]
|
||||||
size = Vector3(3, 3.75, 3)
|
size = Vector3(3, 3.75, 3)
|
||||||
|
|
||||||
@@ -37,7 +64,7 @@ size = Vector3(5, 2.25, 3.75)
|
|||||||
size = Vector3(5.5, 4.5, 2)
|
size = Vector3(5.5, 4.5, 2)
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_prjj8"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_prjj8"]
|
||||||
size = Vector3(2, 3.25, 4)
|
size = Vector3(2, 3.25, 5.25)
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_trte5"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_trte5"]
|
||||||
size = Vector3(6.75, 8.25, 7.25)
|
size = Vector3(6.75, 8.25, 7.25)
|
||||||
@@ -157,126 +184,151 @@ RMovement = SubResource("Resource_nwk5u")
|
|||||||
[node name="Enemy3" parent="Playground/GroundedEnemies" index="0" unique_id=1159989424 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy3" parent="Playground/GroundedEnemies" index="0" unique_id=1159989424 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 25, 0, -8.336809)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 25, 0, -8.336809)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy11" parent="Playground/GroundedEnemies" index="1" unique_id=1747444936 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy11" parent="Playground/GroundedEnemies" index="1" unique_id=1747444936 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 17, 8, 3.6631908)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 17, 8, 3.6631908)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy12" parent="Playground/GroundedEnemies" index="2" unique_id=283117081 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy12" parent="Playground/GroundedEnemies" index="2" unique_id=283117081 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 11, -4.836809)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 11, -4.836809)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy13" parent="Playground/GroundedEnemies" index="3" unique_id=970022638 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy13" parent="Playground/GroundedEnemies" index="3" unique_id=970022638 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 12, -19.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 12, -19.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy18" parent="Playground/GroundedEnemies" index="4" unique_id=2077088475 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy18" parent="Playground/GroundedEnemies" index="4" unique_id=2077088475 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 12, -19.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 12, -19.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy19" parent="Playground/GroundedEnemies" index="5" unique_id=2023773341 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy19" parent="Playground/GroundedEnemies" index="5" unique_id=2023773341 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 7.5, -19.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 7.5, -19.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy25" parent="Playground/GroundedEnemies" index="6" unique_id=1101329723 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy25" parent="Playground/GroundedEnemies" index="6" unique_id=1101329723 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 46, 7.5, -19.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 46, 7.5, -19.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy26" parent="Playground/GroundedEnemies" index="7" unique_id=855220553 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy26" parent="Playground/GroundedEnemies" index="7" unique_id=855220553 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 46, 12, -35.336807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 46, 12, -35.336807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy20" parent="Playground/GroundedEnemies" index="8" unique_id=1255215986 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy20" parent="Playground/GroundedEnemies" index="8" unique_id=1255215986 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 7.5, -19.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 7.5, -19.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy21" parent="Playground/GroundedEnemies" index="9" unique_id=2098915426 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy21" parent="Playground/GroundedEnemies" index="9" unique_id=2098915426 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 0.5, -19.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 36.5, 0.5, -19.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy22" parent="Playground/GroundedEnemies" index="10" unique_id=246912749 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy22" parent="Playground/GroundedEnemies" index="10" unique_id=246912749 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 0.5, -19.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 0.5, -19.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy14" parent="Playground/GroundedEnemies" index="11" unique_id=211015190 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy14" parent="Playground/GroundedEnemies" index="11" unique_id=211015190 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 41, 17.5, -33.336807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 41, 17.5, -33.336807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy15" parent="Playground/GroundedEnemies" index="12" unique_id=1164179421 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy15" parent="Playground/GroundedEnemies" index="12" unique_id=1164179421 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 31, 17.5, -33.336807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 31, 17.5, -33.336807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy16" parent="Playground/GroundedEnemies" index="13" unique_id=1169725422 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy16" parent="Playground/GroundedEnemies" index="13" unique_id=1169725422 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 24.5, 17.5, -33.336807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 24.5, 17.5, -33.336807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy17" parent="Playground/GroundedEnemies" index="14" unique_id=1951666189 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy17" parent="Playground/GroundedEnemies" index="14" unique_id=1951666189 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 17.5, 17.5, -22.836807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 17.5, 17.5, -22.836807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy23" parent="Playground/GroundedEnemies" index="15" unique_id=1348057502 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy23" parent="Playground/GroundedEnemies" index="15" unique_id=1348057502 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 17.5, 24.5, -43.336807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 17.5, 24.5, -43.336807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy24" parent="Playground/GroundedEnemies" index="16" unique_id=2068813971 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy24" parent="Playground/GroundedEnemies" index="16" unique_id=2068813971 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 45, 24.5, -43.336807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 45, 24.5, -43.336807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy4" parent="Playground/GroundedEnemies" index="17" unique_id=366059658 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy4" parent="Playground/GroundedEnemies" index="17" unique_id=366059658 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 10.5, 0, -18.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 10.5, 0, -18.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy7" parent="Playground/GroundedEnemies" index="18" unique_id=1389063523 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy7" parent="Playground/GroundedEnemies" index="18" unique_id=1389063523 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 25.5, 4, -27.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 25.5, 4, -27.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy27" parent="Playground/GroundedEnemies" index="19" unique_id=854456486 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy27" parent="Playground/GroundedEnemies" index="19" unique_id=854456486 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 20, 0, -44.836807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 20, 0, -44.836807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy10" parent="Playground/GroundedEnemies" index="20" unique_id=836898496 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy10" parent="Playground/GroundedEnemies" index="20" unique_id=836898496 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 11, -33.336807)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 30.5, 11, -33.336807)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy8" parent="Playground/GroundedEnemies" index="21" unique_id=1015624071 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy8" parent="Playground/GroundedEnemies" index="21" unique_id=1015624071 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 34.5, 1.5, -27.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 34.5, 1.5, -27.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy9" parent="Playground/GroundedEnemies" index="22" unique_id=827865590 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy9" parent="Playground/GroundedEnemies" index="22" unique_id=827865590 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 46.5, 0, -27.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 46.5, 0, -27.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy5" parent="Playground/GroundedEnemies" index="23" unique_id=1267116862 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy5" parent="Playground/GroundedEnemies" index="23" unique_id=1267116862 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 4, 0, -18.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 4, 0, -18.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy6" parent="Playground/GroundedEnemies" index="24" unique_id=1147823180 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy6" parent="Playground/GroundedEnemies" index="24" unique_id=1147823180 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 16.5, 7, -17.33681)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 16.5, 7, -17.33681)
|
||||||
Target = NodePath("../../../Player")
|
Target = NodePath("../../../Player")
|
||||||
|
RHealth = SubResource("Resource_xy0m1")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Tutorial" type="CSGCombiner3D" parent="." index="8" unique_id=1168290062]
|
[node name="Tutorial" type="CSGCombiner3D" parent="." index="8" unique_id=1168290062]
|
||||||
@@ -293,16 +345,22 @@ transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 1.3647223, 23.75, -13.7
|
|||||||
[node name="Enemy28" parent="Tutorial" index="2" unique_id=1765389924 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy28" parent="Tutorial" index="2" unique_id=1765389924 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -5, 22, 15.5)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -5, 22, 15.5)
|
||||||
Target = NodePath("../../Player")
|
Target = NodePath("../../Player")
|
||||||
|
RHealth = SubResource("Resource_invhv")
|
||||||
|
RDamage = SubResource("Resource_cgfmf")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy29" parent="Tutorial" index="3" unique_id=1071267369 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy29" parent="Tutorial" index="3" unique_id=1071267369 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -10, 22, 28.75)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, -10, 22, 28.75)
|
||||||
Target = NodePath("../../Player")
|
Target = NodePath("../../Player")
|
||||||
|
RHealth = SubResource("Resource_05lnh")
|
||||||
|
RDamage = SubResource("Resource_cgfmf")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Enemy30" parent="Tutorial" index="4" unique_id=1982933011 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
[node name="Enemy30" parent="Tutorial" index="4" unique_id=1982933011 node_paths=PackedStringArray("Target") instance=ExtResource("7_egib5")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0.25, 22, 28.75)
|
transform = Transform3D(-4.371139e-08, 0, 1, 0, 1, 0, -1, 0, -4.371139e-08, 0.25, 22, 28.75)
|
||||||
Target = NodePath("../../Player")
|
Target = NodePath("../../Player")
|
||||||
|
RHealth = SubResource("Resource_t5o40")
|
||||||
|
RDamage = SubResource("Resource_cgfmf")
|
||||||
RMovement = SubResource("Resource_nwk5u")
|
RMovement = SubResource("Resource_nwk5u")
|
||||||
|
|
||||||
[node name="Triggers" type="Node3D" parent="Tutorial" index="5" unique_id=1531131828]
|
[node name="Triggers" type="Node3D" parent="Tutorial" index="5" unique_id=1531131828]
|
||||||
@@ -362,7 +420,7 @@ input_related_text = "at enemy"
|
|||||||
tuto_text = "dash through"
|
tuto_text = "dash through"
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Tutorial/Triggers/TutoTrigger6" index="1" unique_id=1214410006]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Tutorial/Triggers/TutoTrigger6" index="1" unique_id=1214410006]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.625, 1.75, -0.125)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.625, 1.75, -0.75)
|
||||||
shape = SubResource("BoxShape3D_prjj8")
|
shape = SubResource("BoxShape3D_prjj8")
|
||||||
|
|
||||||
[node name="TutoTrigger7" parent="Tutorial/Triggers" index="5" unique_id=271532103 instance=ExtResource("10_vqwwk")]
|
[node name="TutoTrigger7" parent="Tutorial/Triggers" index="5" unique_id=271532103 instance=ExtResource("10_vqwwk")]
|
||||||
@@ -558,15 +616,15 @@ size = Vector3(7.25, 7.75, 2)
|
|||||||
material = ExtResource("3_4m8g1")
|
material = ExtResource("3_4m8g1")
|
||||||
|
|
||||||
[node name="CSGBox3D124" type="CSGBox3D" parent="Tutorial/DashWithMantle" index="26" unique_id=1068505352]
|
[node name="CSGBox3D124" type="CSGBox3D" parent="Tutorial/DashWithMantle" index="26" unique_id=1068505352]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.5, 19.237345, 11.25)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10.5, 19.487345, 11.25)
|
||||||
use_collision = true
|
use_collision = true
|
||||||
size = Vector3(3, 4.5, 8.5)
|
size = Vector3(3, 5, 8.5)
|
||||||
material = ExtResource("3_4m8g1")
|
material = ExtResource("3_4m8g1")
|
||||||
|
|
||||||
[node name="CSGBox3D129" type="CSGBox3D" parent="Tutorial/DashWithMantle" index="27" unique_id=302301078]
|
[node name="CSGBox3D129" type="CSGBox3D" parent="Tutorial/DashWithMantle" index="27" unique_id=302301078]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.25, 19.487345, 38)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.25, 19.487345, 38.625)
|
||||||
use_collision = true
|
use_collision = true
|
||||||
size = Vector3(9.5, 5, 13)
|
size = Vector3(9.5, 5, 11.75)
|
||||||
material = ExtResource("3_4m8g1")
|
material = ExtResource("3_4m8g1")
|
||||||
|
|
||||||
[node name="CSGBox3D133" type="CSGBox3D" parent="Tutorial/DashWithMantle" index="28" unique_id=672467040]
|
[node name="CSGBox3D133" type="CSGBox3D" parent="Tutorial/DashWithMantle" index="28" unique_id=672467040]
|
||||||
@@ -717,9 +775,5 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.5, 1.5, 0)
|
|||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 25, 4)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 25, 4)
|
||||||
|
|
||||||
[node name="OmniLight3D2" type="OmniLight3D" parent="." index="14" unique_id=2016820716]
|
[node name="OmniLight3D2" type="OmniLight3D" parent="." index="14" unique_id=2016820716]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 25, -10)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 25, -9.5)
|
||||||
omni_range = 12.0
|
|
||||||
|
|
||||||
[node name="OmniLight3D3" type="OmniLight3D" parent="." index="15" unique_id=845858088]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 25, -25.5)
|
|
||||||
omni_range = 12.0
|
omni_range = 12.0
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
[gd_scene format=3 uid="uid://ndnor8g7kq07"]
|
[gd_scene format=3 uid="uid://ndnor8g7kq07"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://55wehh6xombr" path="res://maps/_templates/main_scene_template.tscn" id="1_k7f42"]
|
[ext_resource type="PackedScene" uid="uid://55wehh6xombr" path="res://maps/_templates/main_scene_template.tscn" id="1_k7f42"]
|
||||||
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://forge/resources/behaviors/exploding_sword.tres" id="2_ctafv"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://y77cdg7gg3y7" path="res://maps/levels/_arenas/playtest_1.tscn" id="2_kutfq"]
|
[ext_resource type="PackedScene" uid="uid://y77cdg7gg3y7" path="res://maps/levels/_arenas/playtest_1.tscn" id="2_kutfq"]
|
||||||
[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/materials/greybox/m_greybox.tres" id="3_1qo78"]
|
[ext_resource type="Material" uid="uid://31aulub2nqov" path="res://assets/materials/greybox/m_greybox.tres" id="3_1qo78"]
|
||||||
[ext_resource type="Script" uid="uid://cgaahnfgxcrr6" path="res://managers/WeaponInventory.cs" id="3_nix1q"]
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="4_jaqjx"]
|
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="4_jaqjx"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="5_iq67o"]
|
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="5_iq67o"]
|
||||||
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="6_l44fp"]
|
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="6_l44fp"]
|
||||||
@@ -17,18 +15,10 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://qup00a7x2sji" path="res://scenes/fixed_dash_target/fixed_dashthrough_target.tscn" id="13_iq67o"]
|
[ext_resource type="PackedScene" uid="uid://qup00a7x2sji" path="res://scenes/fixed_dash_target/fixed_dashthrough_target.tscn" id="13_iq67o"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b8aet6m4m2i83" path="res://scenes/tuto_trigger/TutoTrigger.tscn" id="14_lthgu"]
|
[ext_resource type="PackedScene" uid="uid://b8aet6m4m2i83" path="res://scenes/tuto_trigger/TutoTrigger.tscn" id="14_lthgu"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_udq24"]
|
|
||||||
script = ExtResource("3_nix1q")
|
|
||||||
OnWeaponStartedFlyingAbilities = Array[Object]([ExtResource("2_ctafv")])
|
|
||||||
OnWeaponFlyingTickAbilities = Array[Object]([ExtResource("2_ctafv")])
|
|
||||||
OnWeaponStoppedFlyingAbilities = Array[Object]([ExtResource("2_ctafv")])
|
|
||||||
metadata/_custom_type_script = "uid://cgaahnfgxcrr6"
|
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_lthgu"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_lthgu"]
|
||||||
size = Vector3(7.5, 3.75, 10.25)
|
size = Vector3(7.5, 3.75, 10.25)
|
||||||
|
|
||||||
[node name="Main" unique_id=955321579 instance=ExtResource("1_k7f42")]
|
[node name="Main" unique_id=955321579 instance=ExtResource("1_k7f42")]
|
||||||
InitialWeaponInventory = SubResource("Resource_udq24")
|
|
||||||
|
|
||||||
[node name="PlaytestArena" parent="." index="6" unique_id=664535670 instance=ExtResource("2_kutfq")]
|
[node name="PlaytestArena" parent="." index="6" unique_id=664535670 instance=ExtResource("2_kutfq")]
|
||||||
|
|
||||||
@@ -45,7 +35,7 @@ MovementInputs = ExtResource("6_l44fp")
|
|||||||
HealthInputs = ExtResource("7_ucbss")
|
HealthInputs = ExtResource("7_ucbss")
|
||||||
DamageInputs = ExtResource("8_2brdd")
|
DamageInputs = ExtResource("8_2brdd")
|
||||||
Target = NodePath("../Player")
|
Target = NodePath("../Player")
|
||||||
SpawnInterval = 1.808
|
SpawnInterval = 5.0
|
||||||
|
|
||||||
[node name="GroundedSpawner2" parent="." index="9" unique_id=1026317919 node_paths=PackedStringArray("Target") instance=ExtResource("4_jaqjx")]
|
[node name="GroundedSpawner2" parent="." index="9" unique_id=1026317919 node_paths=PackedStringArray("Target") instance=ExtResource("4_jaqjx")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 46.5, 11.5, -34.5)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 46.5, 11.5, -34.5)
|
||||||
@@ -55,7 +45,6 @@ HealthInputs = ExtResource("7_ucbss")
|
|||||||
DamageInputs = ExtResource("8_2brdd")
|
DamageInputs = ExtResource("8_2brdd")
|
||||||
Target = NodePath("../Player")
|
Target = NodePath("../Player")
|
||||||
SpawnInterval = 5.0
|
SpawnInterval = 5.0
|
||||||
IsActiveOnStart = false
|
|
||||||
|
|
||||||
[node name="GroundedSpawner3" parent="." index="10" unique_id=241829575 node_paths=PackedStringArray("Target") instance=ExtResource("4_jaqjx")]
|
[node name="GroundedSpawner3" parent="." index="10" unique_id=241829575 node_paths=PackedStringArray("Target") instance=ExtResource("4_jaqjx")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 44.5, 0, -3)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 44.5, 0, -3)
|
||||||
|
|||||||
@@ -1,101 +1,83 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Movementtests.systems;
|
using Movementtests.systems;
|
||||||
|
|
||||||
[Tool, GlobalClass, Meta(typeof(IAutoConnect), typeof(IAutoOn))]
|
[Tool, GlobalClass]
|
||||||
public partial class AbilitySelection : Control
|
public partial class AbilitySelection : Control
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
|
||||||
|
|
||||||
#region Signals
|
|
||||||
|
|
||||||
[Signal] public delegate void AbilityAddedEventHandler(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior behavior);
|
[Signal] public delegate void AbilityAddedEventHandler(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior behavior);
|
||||||
[Signal] public delegate void AbilityRemovedEventHandler(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior behavior);
|
[Signal] public delegate void AbilityRemovedEventHandler(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior behavior);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Exports
|
|
||||||
|
|
||||||
[Export] public WeaponSystem.WeaponEvent ForEvent { get; set; } = WeaponSystem.WeaponEvent.StartedFlying;
|
[Export] public WeaponSystem.WeaponEvent ForEvent { get; set; } = WeaponSystem.WeaponEvent.StartedFlying;
|
||||||
[Export] public string Title { get; set; } = string.Empty;
|
|
||||||
[Export] public PackedScene? AbilitySelectedItem { get; set; }
|
|
||||||
[Export] public ForgeAbilityBehavior[] AbilityBehaviors { get; set; } = [];
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Nodes
|
|
||||||
|
|
||||||
[Node("%SelectedAbilities")] public required VBoxContainer SelectedAbilities { get; set; }
|
|
||||||
[Node("%AddAbility")] public required MenuButton AddAbility { get; set; }
|
|
||||||
public required PopupMenu AddAbilityMenu { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public void OnReady()
|
[Export] public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[Export] public PackedScene AbilitySelectedItem { get; set; }
|
||||||
|
|
||||||
|
[Export] public ForgeAbilityBehavior[] AbilityBehaviors { get; set; }
|
||||||
|
|
||||||
|
private VBoxContainer _selectedAbilities;
|
||||||
|
private MenuButton _addAbility;
|
||||||
|
private PopupMenu _addAbilityMenu;
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
// Initialize title (also in Editor as Tool)
|
|
||||||
var titleLabel = GetNode<Label>("%TitleLabel");
|
var titleLabel = GetNode<Label>("%TitleLabel");
|
||||||
titleLabel.Text = Title;
|
titleLabel.Text = Title;
|
||||||
|
|
||||||
AddAbilityMenu = AddAbility.GetPopup();
|
_selectedAbilities = GetNode<VBoxContainer>("%SelectedAbilities");
|
||||||
|
_addAbility = GetNode<MenuButton>("%AddAbility");
|
||||||
|
_addAbilityMenu = _addAbility.GetPopup();
|
||||||
|
|
||||||
if (Engine.IsEditorHint()) return; // Editor flow stops here
|
if (Engine.IsEditorHint()) return;
|
||||||
|
|
||||||
var i = 0;
|
var i = 0;
|
||||||
foreach (var behavior in AbilityBehaviors)
|
foreach (var behavior in AbilityBehaviors)
|
||||||
{
|
{
|
||||||
AddAbilityMenu.AddIconItem(behavior.Icon, behavior.Name);
|
_addAbilityMenu.AddIconItem(behavior.Icon, behavior.Name);
|
||||||
AddAbilityMenu.SetItemMetadata(i, behavior);
|
_addAbilityMenu.SetItemMetadata(i, behavior);
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddAbilityMenu.IndexPressed += AddAbilityMenuOnIndexPressed;
|
_addAbilityMenu.IndexPressed += AddAbilityMenuOnIndexPressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialize(IEnumerable<ForgeAbilityBehavior> equippedAbilities)
|
public void Initialize(IEnumerable<Resource> equippedAbilities)
|
||||||
{
|
{
|
||||||
foreach (var equippedAbility in equippedAbilities)
|
foreach (var equippedAbility in equippedAbilities)
|
||||||
{
|
{
|
||||||
AddSelectedAbility(equippedAbility);
|
if (equippedAbility is not ForgeAbilityBehavior ability) continue;
|
||||||
|
AddSelectedAbility(ability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddAbilityMenuOnIndexPressed(long index)
|
private void AddAbilityMenuOnIndexPressed(long index)
|
||||||
{
|
{
|
||||||
var indexInt = Convert.ToInt32(index);
|
var indexInt = Convert.ToInt32(index);
|
||||||
var metadata = (ForgeAbilityBehavior) AddAbilityMenu.GetItemMetadata(indexInt);
|
var metadata = (ForgeAbilityBehavior) _addAbilityMenu.GetItemMetadata(indexInt);
|
||||||
EmitSignalAbilityAdded(ForEvent, metadata);
|
EmitSignalAbilityAdded(ForEvent, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddSelectedAbility(ForgeAbilityBehavior behavior)
|
public void AddSelectedAbility(ForgeAbilityBehavior behavior)
|
||||||
{
|
{
|
||||||
if (AbilitySelectedItem?.Instantiate() is not SelectedAbility newSelectedAbilityItem) return;
|
var newSelectedAbilityItem = AbilitySelectedItem.Instantiate() as SelectedAbility;
|
||||||
|
if (newSelectedAbilityItem == null) return;
|
||||||
|
|
||||||
newSelectedAbilityItem.SetAbility(behavior);
|
newSelectedAbilityItem.SetAbility(behavior);
|
||||||
newSelectedAbilityItem.AbilityRemoved += ability => EmitSignalAbilityRemoved(ForEvent, ability);
|
newSelectedAbilityItem.AbilityRemoved += ability => EmitSignalAbilityRemoved(ForEvent, ability);
|
||||||
SelectedAbilities.AddChild(newSelectedAbilityItem);
|
_selectedAbilities.AddChild(newSelectedAbilityItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveSelectedAbility(ForgeAbilityBehavior behavior)
|
public void RemoveSelectedAbility(ForgeAbilityBehavior behavior)
|
||||||
{
|
{
|
||||||
foreach (var child in SelectedAbilities.GetChildren())
|
foreach (var child in _selectedAbilities.GetChildren())
|
||||||
{
|
{
|
||||||
if (child is not SelectedAbility selectedAbility || selectedAbility.Ability != behavior) continue;
|
if (child is not SelectedAbility selectedAbility || selectedAbility.Ability != behavior) continue;
|
||||||
SelectedAbilities.RemoveChild(selectedAbility);
|
_selectedAbilities.RemoveChild(selectedAbility);
|
||||||
AddAbility.GrabFocus();
|
_addAbility.GrabFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearAbilities()
|
|
||||||
{
|
|
||||||
foreach (var child in SelectedAbilities.GetChildren())
|
|
||||||
{
|
|
||||||
SelectedAbilities.RemoveChild(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://dmv685sskgh3l"]
|
[gd_scene format=3 uid="uid://dmv685sskgh3l"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://5emed8iegtui" path="res://menus/scenes/components/AbilitySelection.cs" id="1_fcxyu"]
|
[ext_resource type="Script" uid="uid://5emed8iegtui" path="res://menus/scenes/components/AbilitySelection.cs" id="1_fcxyu"]
|
||||||
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://forge/resources/behaviors/exploding_sword.tres" id="2_j1yif"]
|
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://scenes/player_controller/resources/forge/exploding_sword.tres" id="2_j1yif"]
|
||||||
[ext_resource type="Texture2D" uid="uid://by5v33lu8v1fm" path="res://assets/ui/input-prompts/Flairs/Vector/flair_plus.svg" id="2_uf3m5"]
|
[ext_resource type="Texture2D" uid="uid://by5v33lu8v1fm" path="res://assets/ui/input-prompts/Flairs/Vector/flair_plus.svg" id="2_uf3m5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cjnimmo2jyvx7" path="res://menus/scenes/components/selected_ability.tscn" id="3_cndde"]
|
[ext_resource type="PackedScene" uid="uid://cjnimmo2jyvx7" path="res://menus/scenes/components/selected_ability.tscn" id="3_cndde"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://cjnimmo2jyvx7"]
|
[gd_scene format=3 uid="uid://cjnimmo2jyvx7"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://duest06l5answ" path="res://menus/scenes/components/SelectedAbility.cs" id="1_dc51o"]
|
[ext_resource type="Script" uid="uid://duest06l5answ" path="res://menus/scenes/components/SelectedAbility.cs" id="1_dc51o"]
|
||||||
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://forge/resources/behaviors/exploding_sword.tres" id="2_um64s"]
|
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://scenes/player_controller/resources/forge/exploding_sword.tres" id="2_um64s"]
|
||||||
[ext_resource type="Texture2D" uid="uid://b3403ry3yxw1t" path="res://assets/ui/input-prompts/Flairs/Vector/flair_cross.svg" id="4_x7nho"]
|
[ext_resource type="Texture2D" uid="uid://b3403ry3yxw1t" path="res://assets/ui/input-prompts/Flairs/Vector/flair_cross.svg" id="4_x7nho"]
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_2nvj1"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_2nvj1"]
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Chickensoft.AutoInject;
|
using Chickensoft.AutoInject;
|
||||||
using Chickensoft.Introspection;
|
using Chickensoft.Introspection;
|
||||||
using Chickensoft.Sync.Primitives;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
using Gamesmiths.Forge.Effects;
|
||||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
using Godot;
|
using Godot;
|
||||||
@@ -11,7 +9,7 @@ using Movementtests.systems;
|
|||||||
|
|
||||||
|
|
||||||
[Tool, GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_crate.png"), Meta(typeof(IAutoNode))]
|
[Tool, GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_crate.png"), Meta(typeof(IAutoNode))]
|
||||||
public partial class InventoryUi : Control, IDisposable
|
public partial class InventoryUi : Control
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
public override void _Notification(int what) => this.Notify(what);
|
||||||
|
|
||||||
@@ -29,10 +27,6 @@ public partial class InventoryUi : Control, IDisposable
|
|||||||
public required AbilitySelection StoppedFlying { get; set; }
|
public required AbilitySelection StoppedFlying { get; set; }
|
||||||
#endregion Nodes
|
#endregion Nodes
|
||||||
|
|
||||||
public AutoSet<ForgeAbilityBehavior>.Binding StartedFlyingBinding { get; set; }
|
|
||||||
public AutoSet<ForgeAbilityBehavior>.Binding FlyingTickBinding { get; set; }
|
|
||||||
public AutoSet<ForgeAbilityBehavior>.Binding StoppedFlyingBinding { get; set; }
|
|
||||||
|
|
||||||
public void OnReady()
|
public void OnReady()
|
||||||
{
|
{
|
||||||
StartedFlying.AbilityAdded += AddAbilityForEvent;
|
StartedFlying.AbilityAdded += AddAbilityForEvent;
|
||||||
@@ -50,34 +44,16 @@ public partial class InventoryUi : Control, IDisposable
|
|||||||
WhileFlying.Initialize(InventoryManager.WeaponEventsInventory[WeaponSystem.WeaponEvent.FlyingTick]);
|
WhileFlying.Initialize(InventoryManager.WeaponEventsInventory[WeaponSystem.WeaponEvent.FlyingTick]);
|
||||||
StoppedFlying.Initialize(InventoryManager.WeaponEventsInventory[WeaponSystem.WeaponEvent.StoppedFlying]);
|
StoppedFlying.Initialize(InventoryManager.WeaponEventsInventory[WeaponSystem.WeaponEvent.StoppedFlying]);
|
||||||
|
|
||||||
StartedFlyingBinding = InventoryManager.StartedFlyingAbilities.Bind();
|
InventoryManager.WeaponEventAbilityAdded += OnWeaponEventInventoryAdded;
|
||||||
StartedFlyingBinding
|
InventoryManager.WeaponEventAbilityRemoved += OnWeaponEventInventoryRemoved;
|
||||||
.OnAdd(behavior => OnWeaponEventInventoryAdded(WeaponSystem.WeaponEvent.StartedFlying, behavior))
|
|
||||||
.OnRemove(behavior => OnWeaponEventInventoryRemoved(WeaponSystem.WeaponEvent.StartedFlying, behavior))
|
|
||||||
.OnClear(() => OnWeaponEventInventoryCleared(WeaponSystem.WeaponEvent.StartedFlying));
|
|
||||||
FlyingTickBinding = InventoryManager.FlyingTickAbilities.Bind();
|
|
||||||
FlyingTickBinding
|
|
||||||
.OnAdd(behavior => OnWeaponEventInventoryAdded(WeaponSystem.WeaponEvent.FlyingTick, behavior))
|
|
||||||
.OnRemove(behavior => OnWeaponEventInventoryRemoved(WeaponSystem.WeaponEvent.FlyingTick, behavior))
|
|
||||||
.OnClear(() => OnWeaponEventInventoryCleared(WeaponSystem.WeaponEvent.FlyingTick));
|
|
||||||
StoppedFlyingBinding = InventoryManager.StoppedFlyingAbilities.Bind();
|
|
||||||
StoppedFlyingBinding
|
|
||||||
.OnAdd(behavior => OnWeaponEventInventoryAdded(WeaponSystem.WeaponEvent.StoppedFlying, behavior))
|
|
||||||
.OnRemove(behavior => OnWeaponEventInventoryRemoved(WeaponSystem.WeaponEvent.StoppedFlying, behavior))
|
|
||||||
.OnClear(() => OnWeaponEventInventoryCleared(WeaponSystem.WeaponEvent.StoppedFlying));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public new void Dispose()
|
public void OnExitTree()
|
||||||
{
|
{
|
||||||
GC.SuppressFinalize(this);
|
InventoryManager.WeaponEventAbilityAdded -= OnWeaponEventInventoryAdded;
|
||||||
|
InventoryManager.WeaponEventAbilityRemoved -= OnWeaponEventInventoryRemoved;
|
||||||
StartedFlying.Dispose();
|
|
||||||
WhileFlying.Dispose();
|
|
||||||
StoppedFlying.Dispose();
|
|
||||||
|
|
||||||
base.Dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddAbilityForEvent(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
public void AddAbilityForEvent(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
||||||
{
|
{
|
||||||
InventoryManager.AddAbilityForWeaponEvent(forEvent, abilityBehavior);
|
InventoryManager.AddAbilityForWeaponEvent(forEvent, abilityBehavior);
|
||||||
@@ -88,23 +64,21 @@ public partial class InventoryUi : Control, IDisposable
|
|||||||
InventoryManager.RemoveAbilityForWeaponEvent(forEvent, abilityBehavior);
|
InventoryManager.RemoveAbilityForWeaponEvent(forEvent, abilityBehavior);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnWeaponEventInventoryAdded(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
public void OnWeaponEventInventoryAdded(WeaponEventAbilityData data)
|
||||||
{
|
{
|
||||||
var selection = GetAbilitySelection(forEvent);
|
if (data.Ability is not ForgeAbilityBehavior abilityBehavior) return;
|
||||||
|
|
||||||
|
var selection = GetAbilitySelection(data.ForEvent);
|
||||||
selection.AddSelectedAbility(abilityBehavior);
|
selection.AddSelectedAbility(abilityBehavior);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnWeaponEventInventoryRemoved(WeaponSystem.WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
public void OnWeaponEventInventoryRemoved(WeaponEventAbilityData data)
|
||||||
{
|
{
|
||||||
var selection = GetAbilitySelection(forEvent);
|
if (data.Ability is not ForgeAbilityBehavior abilityBehavior) return;
|
||||||
|
|
||||||
|
var selection = GetAbilitySelection(data.ForEvent);
|
||||||
selection.RemoveSelectedAbility(abilityBehavior);
|
selection.RemoveSelectedAbility(abilityBehavior);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnWeaponEventInventoryCleared(WeaponSystem.WeaponEvent forEvent)
|
|
||||||
{
|
|
||||||
var selection = GetAbilitySelection(forEvent);
|
|
||||||
selection.ClearAbilities();
|
|
||||||
}
|
|
||||||
|
|
||||||
public AbilitySelection GetAbilitySelection(WeaponSystem.WeaponEvent forEvent)
|
public AbilitySelection GetAbilitySelection(WeaponSystem.WeaponEvent forEvent)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,8 +8,5 @@ extends OverlaidMenu
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
if Engine.is_editor_hint(): return
|
if Engine.is_editor_hint(): return
|
||||||
|
|
||||||
func _handle_cancel_input() -> void:
|
|
||||||
hide_menu()
|
|
||||||
|
|
||||||
func _on_close_button_pressed() -> void:
|
func _on_close_button_pressed() -> void:
|
||||||
hide_menu()
|
close()
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ extends OverlaidMenu
|
|||||||
@onready var player_damage_spin_box: SpinBox = %PlayerDamageSpinBox
|
@onready var player_damage_spin_box: SpinBox = %PlayerDamageSpinBox
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
player_invicible_toggle.button_pressed = player.IsInvincible
|
player_invicible_toggle.button_pressed = player.IsInvincibleOverride
|
||||||
|
player_health_spin_box.value = player.RHealth.StartingHealth
|
||||||
|
player_damage_spin_box.value = player.RDamage.DamageDealt
|
||||||
|
|
||||||
|
|
||||||
func _on_kill_player_button_pressed() -> void:
|
func _on_kill_player_button_pressed() -> void:
|
||||||
@@ -19,7 +21,7 @@ func _on_kill_player_button_pressed() -> void:
|
|||||||
close()
|
close()
|
||||||
|
|
||||||
func _on_player_invicible_toggled(toggled_on: bool) -> void:
|
func _on_player_invicible_toggled(toggled_on: bool) -> void:
|
||||||
player.IsInvincible = toggled_on
|
player.IsInvincibleOverride = toggled_on
|
||||||
|
|
||||||
|
|
||||||
func _on_restart_current_level_pressed() -> void:
|
func _on_restart_current_level_pressed() -> void:
|
||||||
@@ -36,8 +38,8 @@ func _on_level_selected() -> void:
|
|||||||
close()
|
close()
|
||||||
|
|
||||||
func _on_player_health_changed(value: float) -> void:
|
func _on_player_health_changed(value: float) -> void:
|
||||||
pass
|
player.SetPlayerHealthOverride(value)
|
||||||
|
|
||||||
|
|
||||||
func _on_player_damage_changed(value: float) -> void:
|
func _on_player_damage_changed(value: float) -> void:
|
||||||
pass
|
player.SetPlayerDamageOverride(value)
|
||||||
|
|||||||
31
scenes/components/damage/CDamageable.cs
Normal file
31
scenes/components/damage/CDamageable.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using Movementtests.interfaces;
|
||||||
|
|
||||||
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_skull.png")]
|
||||||
|
public partial class CDamageable : Node, IDamageable
|
||||||
|
{
|
||||||
|
public event Action<IDamageable, DamageRecord> DamageTaken;
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public RDamageModifier[] DamageModifiers { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public DamageRecord TakeDamage(DamageRecord damageRecord)
|
||||||
|
{
|
||||||
|
var finalDamage = 0f;
|
||||||
|
foreach (var damageable in DamageModifiers.ToIDamageables())
|
||||||
|
finalDamage += damageable.TakeDamage(damageRecord).Damage.DamageDealt;
|
||||||
|
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||||
|
DamageTaken?.Invoke(this, finalDamageRecord);
|
||||||
|
return finalDamageRecord;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DamageRecord ComputeDamage(DamageRecord damageRecord)
|
||||||
|
{
|
||||||
|
var finalDamage = 0f;
|
||||||
|
foreach (var damageable in DamageModifiers.ToIDamageables())
|
||||||
|
finalDamage += damageable.ComputeDamage(damageRecord).Damage.DamageDealt;
|
||||||
|
return damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||||
|
}
|
||||||
|
}
|
||||||
1
scenes/components/damage/CDamageable.cs.uid
Normal file
1
scenes/components/damage/CDamageable.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://b0u23nkpaimyc
|
||||||
6
scenes/components/damage/CDamageable.tscn
Normal file
6
scenes/components/damage/CDamageable.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene format=3 uid="uid://hpsg4fqwrx1u"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://scenes/components/damage/CDamageable.cs" id="1_qp8bd"]
|
||||||
|
|
||||||
|
[node name="CDamageable" type="Node" unique_id=482221079]
|
||||||
|
script = ExtResource("1_qp8bd")
|
||||||
9
scenes/components/damage/EDamageTypes.cs
Normal file
9
scenes/components/damage/EDamageTypes.cs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Movementtests.systems.damage;
|
||||||
|
|
||||||
|
public enum EDamageTypes
|
||||||
|
{
|
||||||
|
Normal,
|
||||||
|
Fire,
|
||||||
|
Ice,
|
||||||
|
Explosion,
|
||||||
|
}
|
||||||
1
scenes/components/damage/EDamageTypes.cs.uid
Normal file
1
scenes/components/damage/EDamageTypes.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dubmiwfuunxmu
|
||||||
20
scenes/components/damage/RDamage.cs
Normal file
20
scenes/components/damage/RDamage.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using Movementtests.systems.damage;
|
||||||
|
|
||||||
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_skull.png")]
|
||||||
|
public partial class RDamage : Resource
|
||||||
|
{
|
||||||
|
[Export(PropertyHint.Range, "0,10,0.1,or_greater")]
|
||||||
|
public float DamageDealt { get; set;}
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public EDamageTypes DamageType { get; set;}
|
||||||
|
|
||||||
|
public RDamage() : this(1.0f, EDamageTypes.Normal) {}
|
||||||
|
public RDamage(float damageDealt, EDamageTypes damageType)
|
||||||
|
{
|
||||||
|
DamageDealt = damageDealt;
|
||||||
|
DamageType = damageType;
|
||||||
|
}
|
||||||
|
}
|
||||||
1
scenes/components/damage/RDamage.cs.uid
Normal file
1
scenes/components/damage/RDamage.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://jitubgv6judn
|
||||||
43
scenes/components/damage/RDamageModifier.cs
Normal file
43
scenes/components/damage/RDamageModifier.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using Movementtests.interfaces;
|
||||||
|
using Movementtests.systems.damage;
|
||||||
|
|
||||||
|
[Icon("res://assets/ui/IconGodotNode/white/icon_freeze.png")]
|
||||||
|
[GlobalClass]
|
||||||
|
public partial class RDamageModifier : Resource, IDamageable
|
||||||
|
{
|
||||||
|
public event Action<IDamageable, DamageRecord> DamageTaken = null!;
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public EDamageTypes DamageType { get; set;}
|
||||||
|
[Export]
|
||||||
|
public float Modifier { get; set;}
|
||||||
|
|
||||||
|
public RDamageModifier() : this(EDamageTypes.Normal, 1.0f) {}
|
||||||
|
public RDamageModifier(EDamageTypes damageType, float modifier)
|
||||||
|
{
|
||||||
|
Modifier = modifier;
|
||||||
|
DamageType = damageType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DamageRecord TakeDamage(DamageRecord damageRecord)
|
||||||
|
{
|
||||||
|
if (damageRecord.Damage.DamageType != DamageType)
|
||||||
|
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
|
||||||
|
|
||||||
|
var finalDamage = damageRecord.Damage.DamageDealt * Modifier;
|
||||||
|
var finalDamageRecord = damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||||
|
DamageTaken?.Invoke(this, finalDamageRecord);
|
||||||
|
return finalDamageRecord;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DamageRecord ComputeDamage(DamageRecord damageRecord)
|
||||||
|
{
|
||||||
|
if (damageRecord.Damage.DamageType != DamageType)
|
||||||
|
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
|
||||||
|
|
||||||
|
var finalDamage = damageRecord.Damage.DamageDealt * Modifier;
|
||||||
|
return damageRecord with { Damage = new RDamage(finalDamage, damageRecord.Damage.DamageType) };
|
||||||
|
}
|
||||||
|
}
|
||||||
1
scenes/components/damage/RDamageModifier.cs.uid
Normal file
1
scenes/components/damage/RDamageModifier.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://b6y3ugfydvch0
|
||||||
35
scenes/components/health/CHealth.cs
Normal file
35
scenes/components/health/CHealth.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using Movementtests.interfaces;
|
||||||
|
|
||||||
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_heart.png")]
|
||||||
|
public partial class CHealth : Node, IHealthable
|
||||||
|
{
|
||||||
|
public event Action<IHealthable, HealthChangedRecord> HealthChanged = null!;
|
||||||
|
public event Action<IHealthable> HealthDepleted = null!;
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public RHealth RHealth { get; set; } = null!;
|
||||||
|
|
||||||
|
public float CurrentHealth { get; set; }
|
||||||
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
CurrentHealth = RHealth.StartingHealth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HealthChangedRecord ReduceHealth(IDamageable source, DamageRecord damageRecord)
|
||||||
|
{
|
||||||
|
var previousHealth = CurrentHealth;
|
||||||
|
CurrentHealth -= damageRecord.Damage.DamageDealt;
|
||||||
|
var record = new HealthChangedRecord(CurrentHealth, previousHealth, RHealth.StartingHealth);
|
||||||
|
HealthChanged?.Invoke(this, record);
|
||||||
|
|
||||||
|
if (CurrentHealth <= 0)
|
||||||
|
{
|
||||||
|
CurrentHealth = 0;
|
||||||
|
HealthDepleted?.Invoke(this);
|
||||||
|
}
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
}
|
||||||
1
scenes/components/health/CHealth.cs.uid
Normal file
1
scenes/components/health/CHealth.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bjwrpv3jpsc1e
|
||||||
6
scenes/components/health/CHealth.tscn
Normal file
6
scenes/components/health/CHealth.tscn
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[gd_scene format=3 uid="uid://c4ikbhojckpnc"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://scenes/components/health/CHealth.cs" id="1_75uyt"]
|
||||||
|
|
||||||
|
[node name="CHealth" type="Node" unique_id=1940090217]
|
||||||
|
script = ExtResource("1_75uyt")
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_heart.png"), Meta(typeof(IAutoConnect))]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_heart.png")]
|
||||||
public partial class CHealthbar : Sprite3D
|
public partial class CHealthbar : Sprite3D
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
private Healthbar _healthbar;
|
||||||
|
public Healthbar Healthbar => _healthbar;
|
||||||
[Node("%Healthbar")] public required ResourceBar ResourceBar { get; set;}
|
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
_healthbar = GetNode<Healthbar>("%Healthbar");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ using Movementtests.interfaces;
|
|||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_thunder.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_thunder.png")]
|
||||||
public partial class RDeathEffect : Resource, IKillable
|
public partial class RDeathEffect : Resource, IKillable
|
||||||
{
|
{
|
||||||
public void Kill()
|
public void Kill(IHealthable source)
|
||||||
{
|
{
|
||||||
GD.Print($"Death Effect triggered");
|
GD.Print($"Death Effect triggered on {source}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
scenes/components/health/RHealth.cs
Normal file
12
scenes/components/health/RHealth.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
using Movementtests.interfaces;
|
||||||
|
|
||||||
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_heart.png")]
|
||||||
|
public partial class RHealth(float startingHealth) : Resource
|
||||||
|
{
|
||||||
|
[Export]
|
||||||
|
public float StartingHealth { get; set;} = startingHealth;
|
||||||
|
|
||||||
|
public RHealth() : this(100.0f) {}
|
||||||
|
}
|
||||||
1
scenes/components/health/RHealth.cs.uid
Normal file
1
scenes/components/health/RHealth.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://baiapod3csndf
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
|
using System;
|
||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
|
|
||||||
namespace Movementtests.scenes.components.knockback;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_wind.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_wind.png")]
|
||||||
public partial class CKnockback : Node3D, IKnockbackable
|
public partial class CKnockback : Node3D, IKnockbackable
|
||||||
{
|
{
|
||||||
[Export] public RKnockback RKnockback { get; set;} = null!;
|
[Export] public RKnockback RKnockback { get; set;} = null!;
|
||||||
|
|
||||||
private KnockbackRecord? _knockbackRecord;
|
private KnockbackRecord _knockbackRecord = null!;
|
||||||
|
|
||||||
public void RegisterKnockback(KnockbackRecord knockbackRecord)
|
public void RegisterKnockback(KnockbackRecord knockbackRecord)
|
||||||
{
|
{
|
||||||
@@ -19,8 +18,9 @@ public partial class CKnockback : Node3D, IKnockbackable
|
|||||||
{
|
{
|
||||||
if (_knockbackRecord == null) return Vector3.Zero;
|
if (_knockbackRecord == null) return Vector3.Zero;
|
||||||
|
|
||||||
var finalKnockback = _knockbackRecord.Direction.Normalized() * RKnockback.Modifier * _knockbackRecord.ForceMultiplier;
|
var knockbackDirection = GlobalPosition - _knockbackRecord.DamageRecord.SourceLocation;
|
||||||
_knockbackRecord = null;
|
var finalKnockback = knockbackDirection.Normalized() * RKnockback.Modifier * _knockbackRecord.ForceMultiplier;
|
||||||
|
_knockbackRecord = null!;
|
||||||
return finalKnockback;
|
return finalKnockback;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
|
using System;
|
||||||
namespace Movementtests.scenes.components.knockback;
|
using Movementtests.interfaces;
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_wind.png")]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/white/icon_wind.png")]
|
||||||
public partial class RKnockback(float modifier) : Resource
|
public partial class RKnockback : Resource
|
||||||
{
|
{
|
||||||
[Export]
|
[Export]
|
||||||
public float Modifier { get; set;} = modifier;
|
public float Modifier { get; set;}
|
||||||
|
|
||||||
public RKnockback() : this(1.0f) {}
|
public RKnockback() : this(1.0f) {}
|
||||||
}
|
public RKnockback(float modifier)
|
||||||
|
{
|
||||||
|
Modifier = modifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,26 +1,24 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Gamesmiths.Forge.Abilities;
|
|
||||||
using Gamesmiths.Forge.Attributes;
|
|
||||||
using Gamesmiths.Forge.Core;
|
using Gamesmiths.Forge.Core;
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
using Gamesmiths.Forge.Effects;
|
||||||
using Gamesmiths.Forge.Events;
|
using Gamesmiths.Forge.Events;
|
||||||
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
using Gamesmiths.Forge.Godot.Core;
|
||||||
|
using Gamesmiths.Forge.Godot.Nodes;
|
||||||
using Gamesmiths.Forge.Statescript;
|
using Gamesmiths.Forge.Statescript;
|
||||||
using Gamesmiths.Forge.Tags;
|
using Gamesmiths.Forge.Tags;
|
||||||
using Godot;
|
using Godot;
|
||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
using Movementtests.scenes.components.knockback;
|
using Movementtests.scenes.enemies;
|
||||||
|
using Movementtests.scenes.player_controller.scripts;
|
||||||
using Movementtests.systems;
|
using Movementtests.systems;
|
||||||
using Movementtests.tools;
|
using Movementtests.tools;
|
||||||
using Movementtests.tools.calculators;
|
|
||||||
using Node = Godot.Node;
|
using Node = Godot.Node;
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_beetle.png"), Meta(typeof(IAutoNode))]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_beetle.png")]
|
||||||
public partial class Enemy : CharacterBody3D,
|
public partial class Enemy : CharacterBody3D,
|
||||||
|
IDamageable,
|
||||||
|
IDamageDealer,
|
||||||
|
IHealthable,
|
||||||
IKillable,
|
IKillable,
|
||||||
IMoveable,
|
IMoveable,
|
||||||
ISpawnable,
|
ISpawnable,
|
||||||
@@ -29,119 +27,115 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
IStunnable,
|
IStunnable,
|
||||||
IForgeEntity
|
IForgeEntity
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
// Signals and events
|
||||||
|
public event Action<IDamageable, DamageRecord> DamageTaken = null!;
|
||||||
#region Dependencies
|
public event Action<IHealthable, HealthChangedRecord> HealthChanged = null!;
|
||||||
|
public event Action<IHealthable> HealthDepleted = null!;
|
||||||
[Dependency]
|
|
||||||
public TagsManager TagsManager => this.DependOn<TagsManager>();
|
|
||||||
[Dependency]
|
|
||||||
public CuesManager CuesManager => this.DependOn<CuesManager>();
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Inspector
|
|
||||||
|
|
||||||
// Public export components
|
// Public export components
|
||||||
[Export]
|
[Export]
|
||||||
public Node3D? Target { get; set; }
|
public Node3D Target { get; set; } = null!;
|
||||||
[Export] public required ForgeAbilityData HitAbility { get; set; }
|
|
||||||
[Export]
|
[Export]
|
||||||
public float EnemyHeight { get; set; } = 1f;
|
public float EnemyHeight { get; set; } = 1f;
|
||||||
|
|
||||||
|
[ExportGroup("Health")]
|
||||||
[Export]
|
[Export]
|
||||||
public RDeathEffect[] DeathEffects { get; set; } = [];
|
public RHealth RHealth { get; set; } = null!;
|
||||||
|
[Export]
|
||||||
|
public RDeathEffect[] DeathEffects { get; set; } = null!;
|
||||||
|
public IHealthable CHealth { get; set; } = null!;
|
||||||
|
|
||||||
|
[ExportGroup("Damage")]
|
||||||
|
[Export]
|
||||||
|
public RDamage RDamage { get; set; } = null!;
|
||||||
|
public IDamageable CDamageable { get; set; } = null!;
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public RKnockback? RKnockback { get; set; }
|
public RKnockback RKnockback { get; set; } = null!;
|
||||||
public IKnockbackable? CKnockback { get; set; }
|
public IKnockbackable CKnockback { get; set; } = null!;
|
||||||
|
|
||||||
[ExportGroup("Movement")]
|
[ExportGroup("Movement")]
|
||||||
[Export]
|
[Export]
|
||||||
public required RMovement RMovement { get; set; }
|
public RMovement RMovement { get; set; } = null!;
|
||||||
public required IMoveable CMovement { get; set; }
|
public IMoveable CMovement { get; set; } = null!;
|
||||||
|
|
||||||
#endregion
|
// Public stuff
|
||||||
|
public float CurrentHealth
|
||||||
|
{
|
||||||
|
get => CHealth.CurrentHealth;
|
||||||
|
set => CHealth.CurrentHealth = value;
|
||||||
|
}
|
||||||
|
|
||||||
#region IForgeEntity
|
|
||||||
|
|
||||||
// Perfectly forward the IForgeEntity interface to the ForgeEntity component
|
// Perfectly forward the IForgeEntity interface to the ForgeEntity component
|
||||||
public EntityAttributes Attributes
|
public EntityAttributes Attributes
|
||||||
{
|
{
|
||||||
get => ForgeEntity.Attributes;
|
get => _forgeEntity.Attributes;
|
||||||
set => ForgeEntity.Attributes = value;
|
set => _forgeEntity.Attributes = value;
|
||||||
}
|
}
|
||||||
public EntityTags Tags
|
public EntityTags Tags
|
||||||
{
|
{
|
||||||
get => ForgeEntity.Tags;
|
get => _forgeEntity.Tags;
|
||||||
set => ForgeEntity.Tags = value;
|
set => _forgeEntity.Tags = value;
|
||||||
}
|
}
|
||||||
public EffectsManager EffectsManager
|
public EffectsManager EffectsManager
|
||||||
{
|
{
|
||||||
get => ForgeEntity.EffectsManager;
|
get => _forgeEntity.EffectsManager;
|
||||||
set => ForgeEntity.EffectsManager = value;
|
set => _forgeEntity.EffectsManager = value;
|
||||||
}
|
}
|
||||||
public EntityAbilities Abilities
|
public EntityAbilities Abilities
|
||||||
{
|
{
|
||||||
get => ForgeEntity.Abilities;
|
get => _forgeEntity.Abilities;
|
||||||
set => ForgeEntity.Abilities = value;
|
set => _forgeEntity.Abilities = value;
|
||||||
}
|
}
|
||||||
public EventManager Events
|
public EventManager Events
|
||||||
{
|
{
|
||||||
get => ForgeEntity.Events;
|
get => _forgeEntity.Events;
|
||||||
set => ForgeEntity.Events = value;
|
set => _forgeEntity.Events = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Variables SharedVariables
|
public Variables SharedVariables { get; }
|
||||||
{
|
|
||||||
get => ForgeEntity.SharedVariables;
|
|
||||||
set => ForgeEntity.SharedVariables = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
// Private stuff
|
||||||
|
private Area3D _damageBox = null!;
|
||||||
[Node("DamageBox")] public required Area3D DamageBox { get; set;}
|
internal Node3D _target = null!;
|
||||||
[Node("CTarget")] public required Node3D TargetComponent { get; set;}
|
private Healthbar _healthbar = null!;
|
||||||
[Node("CHealthBar")] public required CHealthbar HealthBarWrapper { get; set;}
|
private ForgeEntity _forgeEntity;
|
||||||
[Node("ForgeEntityNode")] public required ForgeEntityNode ForgeEntity { get; set;}
|
|
||||||
|
|
||||||
private AbilityHandle? _hitAbilityHandle;
|
public override void _Ready()
|
||||||
|
|
||||||
public void OnReady()
|
|
||||||
{
|
{
|
||||||
Init();
|
Initialize();
|
||||||
SetupSignals();
|
SetupSignals();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Init()
|
public void Initialize()
|
||||||
{
|
{
|
||||||
CMovement = GetNode<Node>("CMovement") as IMoveable ?? throw new Exception("Movement component not found");
|
_damageBox = GetNode<Area3D>("DamageBox");
|
||||||
CMovement.RMovement = RMovement;
|
_target = GetNode<Node3D>("CTarget");
|
||||||
CKnockback = GetNode<Node>("CKnockback") as IKnockbackable ?? throw new Exception("Knockback component not found");
|
_forgeEntity = GetNode<ForgeEntity>("ForgeEntity");
|
||||||
CKnockback.RKnockback = RKnockback;
|
|
||||||
|
|
||||||
_hitAbilityHandle = Abilities.GrantAbilityPermanently(HitAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnResolved()
|
|
||||||
{
|
|
||||||
var healthAttribute = Attributes["CharacterAttributeSet.Health"];
|
|
||||||
HealthBarWrapper.ResourceBar.Init(healthAttribute);
|
|
||||||
healthAttribute.OnValueChanged += OnHealthChanged;
|
|
||||||
|
|
||||||
Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.hit"),
|
CDamageable = (GetNode<Node>("CDamageable") as IDamageable)!;
|
||||||
data => {GD.Print("Hit!");});
|
CMovement = (GetNode<Node>("CMovement") as IMoveable)!;
|
||||||
Events.Subscribe<DamageDone>(Tag.RequestTag(TagsManager, "events.combat.damage"), OnDamageReceived);
|
CHealth = (GetNode<Node>("CHealth") as IHealthable)!;
|
||||||
Events.Subscribe<KnockbackDone>(Tag.RequestTag(TagsManager, "events.combat.knockback_received"), OnKnockbackReceived);
|
CKnockback = (GetNode<Node>("CKnockback") as IKnockbackable)!;
|
||||||
Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.death"), OnDeath);
|
|
||||||
}
|
_healthbar = GetNode<CHealthbar>("CHealthBar").Healthbar;
|
||||||
|
|
||||||
public void OnKnockbackReceived(EventData<KnockbackDone> data)
|
CMovement.RMovement = RMovement;
|
||||||
{
|
CHealth.RHealth = RHealth;
|
||||||
RegisterKnockback(new KnockbackRecord(data.Payload.knockbackDirection, data.EventMagnitude));
|
CHealth.CurrentHealth = RHealth.StartingHealth;
|
||||||
|
CKnockback.RKnockback = RKnockback;
|
||||||
|
|
||||||
|
_healthbar.Initialize(CHealth.CurrentHealth);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetupSignals()
|
public void SetupSignals()
|
||||||
{
|
{
|
||||||
|
// Anonymous function call to erase return values of ReduceHealth
|
||||||
|
CDamageable.DamageTaken += (source, record) => ReduceHealth(source, record);
|
||||||
|
CDamageable.DamageTaken += (_, record) => RegisterKnockback(new KnockbackRecord(record));
|
||||||
|
CHealth.HealthDepleted += Kill;
|
||||||
|
HealthChanged += (_, record) => _healthbar.SetHealth(record.CurrentHealth);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void _PhysicsProcess(double delta)
|
public override void _PhysicsProcess(double delta)
|
||||||
@@ -166,49 +160,49 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
|
|
||||||
public void ProcessGameplay(double delta)
|
public void ProcessGameplay(double delta)
|
||||||
{
|
{
|
||||||
if (IsStunned || _hitAbilityHandle == null) return;
|
if (IsStunned) return;
|
||||||
|
|
||||||
var bodies = DamageBox.GetOverlappingBodies();
|
var bodies = _damageBox.GetOverlappingBodies();
|
||||||
foreach (var body in bodies)
|
foreach (var body in bodies)
|
||||||
{
|
{
|
||||||
if (body is not IForgeEntity forgeEntity) continue;
|
if(body is IDamageable spawnable)
|
||||||
var canActivate = _hitAbilityHandle.CanActivate(out var _);
|
spawnable.TakeDamage(new DamageRecord(GlobalPosition, RDamage));
|
||||||
if (!canActivate) return;
|
|
||||||
|
|
||||||
_hitAbilityHandle.Activate(out var _, forgeEntity);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 ComputeVelocity(MovementInputs inputs)
|
public Vector3 ComputeVelocity(MovementInputs inputs)
|
||||||
{
|
{
|
||||||
|
if (CMovement is null) return Vector3.Zero;
|
||||||
return CMovement.ComputeVelocity(inputs);
|
return CMovement.ComputeVelocity(inputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnDamageReceived(EventData<DamageDone> data)
|
|
||||||
{
|
|
||||||
var source = data.Source as Node;
|
|
||||||
var sourceName = source?.Name ?? "unknown damage dealer";
|
|
||||||
GD.Print($"Ouch! Fuck you {sourceName}!");
|
|
||||||
if (data.Payload.OverkillDamage > 0) GD.Print($"Overkill! {data.Payload.OverkillDamage} damage");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnHealthChanged(EntityAttribute healthAttribute, int i)
|
public DamageRecord TakeDamage(DamageRecord damageRecord)
|
||||||
{
|
{
|
||||||
if (healthAttribute.CurrentValue > healthAttribute.Min) return;
|
if (CDamageable is null)
|
||||||
|
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
|
||||||
|
|
||||||
Events.Raise(new EventData
|
var finalDamage = CDamageable.TakeDamage(damageRecord);
|
||||||
{
|
DamageTaken?.Invoke(this, finalDamage);
|
||||||
EventTags = Tag.RequestTag(TagsManager, "events.combat.death").GetSingleTagContainer()!
|
return finalDamage;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DamageRecord ComputeDamage(DamageRecord damageRecord)
|
||||||
public void OnDeath(EventData data)
|
|
||||||
{
|
{
|
||||||
Kill();
|
if (CDamageable is null)
|
||||||
|
return damageRecord with { Damage = new RDamage(0, damageRecord.Damage.DamageType) };
|
||||||
|
|
||||||
|
return CDamageable.ComputeDamage(damageRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Kill()
|
public HealthChangedRecord ReduceHealth(IDamageable source, DamageRecord damageRecord)
|
||||||
|
{
|
||||||
|
if (CHealth is null) return new HealthChangedRecord(0, 0, 0);
|
||||||
|
var record = CHealth.ReduceHealth(source, damageRecord);
|
||||||
|
HealthChanged?.Invoke(this, record);
|
||||||
|
return record;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Kill(IHealthable source)
|
||||||
{
|
{
|
||||||
// Remove weapon that might be planted there
|
// Remove weapon that might be planted there
|
||||||
foreach (var child in GetChildren())
|
foreach (var child in GetChildren())
|
||||||
@@ -224,24 +218,24 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
|
|
||||||
foreach (var killable in DeathEffects.ToIKillables())
|
foreach (var killable in DeathEffects.ToIKillables())
|
||||||
{
|
{
|
||||||
killable.Kill();
|
killable.Kill(source);
|
||||||
}
|
}
|
||||||
CallDeferred(Node.MethodName.QueueFree);
|
CallDeferred(Node.MethodName.QueueFree);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RegisterKnockback(KnockbackRecord knockbackRecord)
|
public void RegisterKnockback(KnockbackRecord knockbackRecord)
|
||||||
{
|
{
|
||||||
CKnockback!.RegisterKnockback(knockbackRecord);
|
CKnockback.RegisterKnockback(knockbackRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 ComputeKnockback()
|
public Vector3 ComputeKnockback()
|
||||||
{
|
{
|
||||||
return CKnockback!.ComputeKnockback();
|
return CKnockback.ComputeKnockback();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Vector3 GetTargetGlobalPosition()
|
public Vector3 GetTargetGlobalPosition()
|
||||||
{
|
{
|
||||||
return TargetComponent.GlobalPosition;
|
return _target == null ? GlobalPosition : _target.GlobalPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stun management
|
// Stun management
|
||||||
|
|||||||
@@ -1,18 +1,32 @@
|
|||||||
[gd_scene format=3 uid="uid://cmlud1hwkd6sv"]
|
[gd_scene format=3 uid="uid://cmlud1hwkd6sv"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_q8l7o"]
|
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_q8l7o"]
|
||||||
[ext_resource type="Resource" uid="uid://qpdw62ubaclc" path="res://forge/resources/ability_datas/grounded_enemy_hit.tres" id="2_46wn3"]
|
[ext_resource type="Script" uid="uid://b6y3ugfydvch0" path="res://scenes/components/damage/RDamageModifier.cs" id="2_1bsgx"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dg1xbjhyhgnnk" path="res://scenes/enemies/flying_enemy/flying_enemy_health.tres" id="2_ma2bq"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dgo65k2ceqfvy" path="res://scenes/enemies/flying_enemy/flying_enemy_damage.tres" id="2_on7rt"]
|
||||||
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="4_dejyg"]
|
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="4_dejyg"]
|
||||||
|
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://scenes/components/health/CHealth.cs" id="4_ys4jv"]
|
||||||
|
[ext_resource type="Script" uid="uid://8uj04dfe8oql" path="res://addons/forge/nodes/ForgeEntity.cs" id="6_wxisp"]
|
||||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="7_2digf"]
|
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="7_2digf"]
|
||||||
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="7_46wn3"]
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="7_46wn3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dmw5ibwrb483f" path="res://scenes/components/movement/CFlyingMovement.tscn" id="7_vaeds"]
|
[ext_resource type="PackedScene" uid="uid://dmw5ibwrb483f" path="res://scenes/components/movement/CFlyingMovement.tscn" id="7_vaeds"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bwx2um43k0ou4" path="res://scenes/components/health/CHealthbar.tscn" id="7_ykkxn"]
|
[ext_resource type="PackedScene" uid="uid://bwx2um43k0ou4" path="res://scenes/components/health/CHealthbar.tscn" id="7_ykkxn"]
|
||||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="8_46wn3"]
|
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="8_46wn3"]
|
||||||
[ext_resource type="Resource" uid="uid://bocsykxbh8l0g" path="res://forge/resources/tag_containers/enemy_base_tags.tres" id="8_oj1ws"]
|
|
||||||
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="8_on7rt"]
|
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="8_on7rt"]
|
||||||
|
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://scenes/components/damage/CDamageable.cs" id="8_uotso"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_dejyg"]
|
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_dejyg"]
|
||||||
[ext_resource type="Resource" uid="uid://dt7a1io5o0b8s" path="res://scenes/enemies/flying_enemy/flying_enemy_knockback.tres" id="11_mpa2u"]
|
[ext_resource type="Resource" uid="uid://dt7a1io5o0b8s" path="res://scenes/enemies/flying_enemy/flying_enemy_knockback.tres" id="11_mpa2u"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_vfi88"]
|
||||||
|
script = ExtResource("7_46wn3")
|
||||||
|
ContainerTags = Array[String](["character.enemy"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_oj1ws"]
|
||||||
|
script = ExtResource("8_46wn3")
|
||||||
|
Default = 50
|
||||||
|
Max = 100
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_wxisp"]
|
[sub_resource type="Resource" id="Resource_wxisp"]
|
||||||
script = ExtResource("8_46wn3")
|
script = ExtResource("8_46wn3")
|
||||||
Default = 2
|
Default = 2
|
||||||
@@ -25,9 +39,19 @@ Default = 1
|
|||||||
Min = 1
|
Min = 1
|
||||||
Max = 100
|
Max = 100
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ykkxn"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_hf6k8"]
|
||||||
viewport_path = NodePath("SubViewport")
|
viewport_path = NodePath("SubViewport")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_jnv07"]
|
||||||
|
script = ExtResource("2_1bsgx")
|
||||||
|
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_53j1c"]
|
||||||
|
script = ExtResource("2_1bsgx")
|
||||||
|
DamageType = 3
|
||||||
|
Modifier = 1.0
|
||||||
|
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_on7rt"]
|
[sub_resource type="Resource" id="Resource_on7rt"]
|
||||||
script = ExtResource("8_on7rt")
|
script = ExtResource("8_on7rt")
|
||||||
Speed = 3.0
|
Speed = 3.0
|
||||||
@@ -57,48 +81,41 @@ collision_layer = 16
|
|||||||
collision_mask = 273
|
collision_mask = 273
|
||||||
motion_mode = 1
|
motion_mode = 1
|
||||||
script = ExtResource("1_q8l7o")
|
script = ExtResource("1_q8l7o")
|
||||||
HitAbility = ExtResource("2_46wn3")
|
|
||||||
EnemyHeight = 0.5
|
EnemyHeight = 0.5
|
||||||
|
RHealth = ExtResource("2_ma2bq")
|
||||||
|
DeathEffects = Array[Object]([])
|
||||||
|
RDamage = ExtResource("2_on7rt")
|
||||||
RKnockback = ExtResource("11_mpa2u")
|
RKnockback = ExtResource("11_mpa2u")
|
||||||
RMovement = ExtResource("4_dejyg")
|
RMovement = ExtResource("4_dejyg")
|
||||||
|
|
||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1255429192]
|
[node name="ForgeEntity" type="Node" parent="." unique_id=622209781]
|
||||||
script = ExtResource("7_46wn3")
|
script = ExtResource("6_wxisp")
|
||||||
BaseTags = ExtResource("8_oj1ws")
|
BaseTags = SubResource("Resource_vfi88")
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://8uj04dfe8oql"
|
||||||
|
|
||||||
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=418635308]
|
[node name="ForgeAttributeSet" type="Node" parent="ForgeEntity" unique_id=1840910245]
|
||||||
script = ExtResource("7_2digf")
|
|
||||||
AttributeSetClass = "CharacterAttributeSet"
|
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("8_46wn3")]({
|
|
||||||
"Health": Object(RefCounted,"script":ExtResource("8_46wn3"),"Default":100,"Min":0,"Max":100)
|
|
||||||
|
|
||||||
})
|
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
|
||||||
|
|
||||||
[node name="MetaAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=88776122]
|
|
||||||
script = ExtResource("7_2digf")
|
|
||||||
AttributeSetClass = "MetaAttributeSet"
|
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("8_46wn3")]({
|
|
||||||
"IncomingDamage": Object(RefCounted,"script":ExtResource("8_46wn3"),"Default":0,"Min":0,"Max":1000)
|
|
||||||
|
|
||||||
})
|
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
|
||||||
|
|
||||||
[node name="EnemyAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1840910245]
|
|
||||||
script = ExtResource("7_2digf")
|
script = ExtResource("7_2digf")
|
||||||
AttributeSetClass = "EnemyAttributeSet"
|
AttributeSetClass = "EnemyAttributeSet"
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("8_46wn3")]({
|
InitialAttributeValues = Dictionary[String, ExtResource("8_46wn3")]({
|
||||||
"Health": Object(RefCounted,"script":ExtResource("8_46wn3"),"Default":50,"Min":0,"Max":50)
|
"Health": SubResource("Resource_oj1ws"),
|
||||||
,
|
|
||||||
"Speed": SubResource("Resource_wxisp"),
|
"Speed": SubResource("Resource_wxisp"),
|
||||||
"Strength": SubResource("Resource_yk4hc")
|
"Strength": SubResource("Resource_yk4hc")
|
||||||
})
|
})
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||||
|
|
||||||
|
[node name="CHealth" type="Node" parent="." unique_id=1717035166]
|
||||||
|
script = ExtResource("4_ys4jv")
|
||||||
|
RHealth = ExtResource("2_ma2bq")
|
||||||
|
metadata/_custom_type_script = "uid://bjwrpv3jpsc1e"
|
||||||
|
|
||||||
[node name="CHealthBar" parent="." unique_id=1635725931 instance=ExtResource("7_ykkxn")]
|
[node name="CHealthBar" parent="." unique_id=1635725931 instance=ExtResource("7_ykkxn")]
|
||||||
transform = Transform3D(0.3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.70000005, 0)
|
transform = Transform3D(0.3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.70000005, 0)
|
||||||
texture = SubResource("ViewportTexture_ykkxn")
|
texture = SubResource("ViewportTexture_hf6k8")
|
||||||
|
|
||||||
|
[node name="CDamageable" type="Node" parent="." unique_id=1785297232]
|
||||||
|
script = ExtResource("8_uotso")
|
||||||
|
DamageModifiers = Array[Object]([SubResource("Resource_jnv07"), SubResource("Resource_53j1c")])
|
||||||
|
metadata/_custom_type_script = "uid://b0u23nkpaimyc"
|
||||||
|
|
||||||
[node name="CMovement" parent="." unique_id=1699571730 instance=ExtResource("7_vaeds")]
|
[node name="CMovement" parent="." unique_id=1699571730 instance=ExtResource("7_vaeds")]
|
||||||
RMovement = SubResource("Resource_on7rt")
|
RMovement = SubResource("Resource_on7rt")
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_yq03x")
|
script = ExtResource("1_yq03x")
|
||||||
Modifier = 2.0
|
Modifier = 20.0
|
||||||
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
||||||
|
|||||||
@@ -1,18 +1,32 @@
|
|||||||
[gd_scene format=3 uid="uid://dxt0e2ugmttqq"]
|
[gd_scene format=3 uid="uid://dxt0e2ugmttqq"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_r6506"]
|
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_r6506"]
|
||||||
|
[ext_resource type="Resource" uid="uid://otfc2snh8umc" path="res://scenes/enemies/grounded_enemy/grounded_enemy_damage.tres" id="2_bn56u"]
|
||||||
|
[ext_resource type="Script" uid="uid://bjwrpv3jpsc1e" path="res://scenes/components/health/CHealth.cs" id="2_gsmti"]
|
||||||
|
[ext_resource type="Script" uid="uid://b6y3ugfydvch0" path="res://scenes/components/damage/RDamageModifier.cs" id="2_r3cnf"]
|
||||||
|
[ext_resource type="Resource" uid="uid://bohbojc68j7y1" path="res://scenes/enemies/grounded_enemy/grounded_enemy_health.tres" id="2_w4lm8"]
|
||||||
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="4_na24f"]
|
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="4_na24f"]
|
||||||
[ext_resource type="Resource" uid="uid://qpdw62ubaclc" path="res://forge/resources/ability_datas/grounded_enemy_hit.tres" id="6_4jf2q"]
|
[ext_resource type="Script" uid="uid://8uj04dfe8oql" path="res://addons/forge/nodes/ForgeEntity.cs" id="6_x50ya"]
|
||||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="6_yk4hc"]
|
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="6_yk4hc"]
|
||||||
|
[ext_resource type="Script" uid="uid://b0u23nkpaimyc" path="res://scenes/components/damage/CDamageable.cs" id="7_1tw73"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bwx2um43k0ou4" path="res://scenes/components/health/CHealthbar.tscn" id="7_18xwy"]
|
[ext_resource type="PackedScene" uid="uid://bwx2um43k0ou4" path="res://scenes/components/health/CHealthbar.tscn" id="7_18xwy"]
|
||||||
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="7_f22p3"]
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="7_f22p3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dbr7ioio158ew" path="res://scenes/components/movement/CGroundedMovement.tscn" id="7_qyswd"]
|
[ext_resource type="PackedScene" uid="uid://dbr7ioio158ew" path="res://scenes/components/movement/CGroundedMovement.tscn" id="7_qyswd"]
|
||||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="7_x50ya"]
|
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="7_x50ya"]
|
||||||
[ext_resource type="Resource" uid="uid://bocsykxbh8l0g" path="res://forge/resources/tag_containers/enemy_base_tags.tres" id="8_4jf2q"]
|
|
||||||
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="8_6d4gl"]
|
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="8_6d4gl"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_jqqi6"]
|
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_jqqi6"]
|
||||||
[ext_resource type="Resource" uid="uid://cektf6waf4s04" path="res://scenes/enemies/grounded_enemy/grounded_enemy_knockback.tres" id="11_8k3xb"]
|
[ext_resource type="Resource" uid="uid://cektf6waf4s04" path="res://scenes/enemies/grounded_enemy/grounded_enemy_knockback.tres" id="11_8k3xb"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_4jf2q"]
|
||||||
|
script = ExtResource("7_f22p3")
|
||||||
|
ContainerTags = Array[String](["character.enemy"])
|
||||||
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_f22p3"]
|
||||||
|
script = ExtResource("7_x50ya")
|
||||||
|
Default = 100
|
||||||
|
Max = 100
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_x50ya"]
|
[sub_resource type="Resource" id="Resource_x50ya"]
|
||||||
script = ExtResource("7_x50ya")
|
script = ExtResource("7_x50ya")
|
||||||
Default = 1
|
Default = 1
|
||||||
@@ -25,9 +39,20 @@ Default = 1
|
|||||||
Min = 1
|
Min = 1
|
||||||
Max = 100
|
Max = 100
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_18xwy"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_ub34u"]
|
||||||
viewport_path = NodePath("SubViewport")
|
viewport_path = NodePath("SubViewport")
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_qj0ob"]
|
||||||
|
script = ExtResource("2_r3cnf")
|
||||||
|
Modifier = 1.0
|
||||||
|
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_18xwy"]
|
||||||
|
script = ExtResource("2_r3cnf")
|
||||||
|
DamageType = 3
|
||||||
|
Modifier = 1.0
|
||||||
|
metadata/_custom_type_script = "uid://b6y3ugfydvch0"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6d4gl"]
|
[sub_resource type="Resource" id="Resource_6d4gl"]
|
||||||
script = ExtResource("8_6d4gl")
|
script = ExtResource("8_6d4gl")
|
||||||
Speed = 5.0
|
Speed = 5.0
|
||||||
@@ -56,48 +81,41 @@ radius = 2.0
|
|||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
collision_mask = 273
|
collision_mask = 273
|
||||||
script = ExtResource("1_r6506")
|
script = ExtResource("1_r6506")
|
||||||
HitAbility = ExtResource("6_4jf2q")
|
|
||||||
EnemyHeight = 2.0
|
EnemyHeight = 2.0
|
||||||
|
RHealth = ExtResource("2_w4lm8")
|
||||||
|
DeathEffects = Array[Object]([])
|
||||||
|
RDamage = ExtResource("2_bn56u")
|
||||||
RKnockback = ExtResource("11_8k3xb")
|
RKnockback = ExtResource("11_8k3xb")
|
||||||
RMovement = ExtResource("4_na24f")
|
RMovement = ExtResource("4_na24f")
|
||||||
|
|
||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=289553407]
|
[node name="ForgeEntity" type="Node" parent="." unique_id=432521027]
|
||||||
script = ExtResource("7_f22p3")
|
script = ExtResource("6_x50ya")
|
||||||
BaseTags = ExtResource("8_4jf2q")
|
BaseTags = SubResource("Resource_4jf2q")
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://8uj04dfe8oql"
|
||||||
|
|
||||||
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1699781551]
|
[node name="ForgeAttributeSet" type="Node" parent="ForgeEntity" unique_id=804252284]
|
||||||
script = ExtResource("6_yk4hc")
|
|
||||||
AttributeSetClass = "CharacterAttributeSet"
|
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("7_x50ya")]({
|
|
||||||
"Health": Object(RefCounted,"script":ExtResource("7_x50ya"),"Default":100,"Min":0,"Max":100)
|
|
||||||
|
|
||||||
})
|
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
|
||||||
|
|
||||||
[node name="MetaAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1794036161]
|
|
||||||
script = ExtResource("6_yk4hc")
|
|
||||||
AttributeSetClass = "MetaAttributeSet"
|
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("7_x50ya")]({
|
|
||||||
"IncomingDamage": Object(RefCounted,"script":ExtResource("7_x50ya"),"Default":0,"Min":0,"Max":1000)
|
|
||||||
|
|
||||||
})
|
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
|
||||||
|
|
||||||
[node name="EnnemyAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=804252284]
|
|
||||||
script = ExtResource("6_yk4hc")
|
script = ExtResource("6_yk4hc")
|
||||||
AttributeSetClass = "EnemyAttributeSet"
|
AttributeSetClass = "EnemyAttributeSet"
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("7_x50ya")]({
|
InitialAttributeValues = Dictionary[String, ExtResource("7_x50ya")]({
|
||||||
"Health": Object(RefCounted,"script":ExtResource("7_x50ya"),"Default":100,"Min":0,"Max":100)
|
"Health": SubResource("Resource_f22p3"),
|
||||||
,
|
|
||||||
"Speed": SubResource("Resource_x50ya"),
|
"Speed": SubResource("Resource_x50ya"),
|
||||||
"Strength": SubResource("Resource_yk4hc")
|
"Strength": SubResource("Resource_yk4hc")
|
||||||
})
|
})
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||||
|
|
||||||
|
[node name="CHealth" type="Node" parent="." unique_id=188153645]
|
||||||
|
script = ExtResource("2_gsmti")
|
||||||
|
RHealth = ExtResource("2_w4lm8")
|
||||||
|
metadata/_custom_type_script = "uid://bjwrpv3jpsc1e"
|
||||||
|
|
||||||
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("7_18xwy")]
|
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("7_18xwy")]
|
||||||
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
|
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
|
||||||
texture = SubResource("ViewportTexture_18xwy")
|
texture = SubResource("ViewportTexture_ub34u")
|
||||||
|
|
||||||
|
[node name="CDamageable" type="Node" parent="." unique_id=1601518000]
|
||||||
|
script = ExtResource("7_1tw73")
|
||||||
|
DamageModifiers = Array[Object]([SubResource("Resource_qj0ob"), SubResource("Resource_18xwy")])
|
||||||
|
metadata/_custom_type_script = "uid://b0u23nkpaimyc"
|
||||||
|
|
||||||
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("7_qyswd")]
|
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("7_qyswd")]
|
||||||
RMovement = SubResource("Resource_6d4gl")
|
RMovement = SubResource("Resource_6d4gl")
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_vdia8")
|
script = ExtResource("1_vdia8")
|
||||||
Modifier = 1.0
|
Modifier = 30.0
|
||||||
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_hsy8g")
|
script = ExtResource("1_hsy8g")
|
||||||
Speed = 4.0
|
Speed = 5.0
|
||||||
Acceleration = 1.0
|
Acceleration = 3.0
|
||||||
GravityModifier = 5.0
|
GravityModifier = 5.0
|
||||||
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
|
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
|
||||||
|
|||||||
@@ -1,42 +1,22 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Gamesmiths.Forge.Core;
|
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Tags;
|
|
||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
using Movementtests.tools;
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_projectile.png"), Meta(typeof(IAutoNode))]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_projectile.png")]
|
||||||
public partial class Explosion : Area3D, IProvide<CuesManager>
|
public partial class Explosion : Area3D, IDamageDealer
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
[Export] public RDamage RDamage { get; set;}
|
||||||
|
[Export] public float Radius { get; set;}
|
||||||
[Dependency]
|
|
||||||
public CuesManager CuesManager => this.DependOn<CuesManager>();
|
|
||||||
CuesManager IProvide<CuesManager>.Value() => CuesManager;
|
|
||||||
|
|
||||||
[Export] public float Damage { get; set; } = 1.0f;
|
|
||||||
[Export] public float Radius { get; set; } = 1.0f;
|
|
||||||
[Export] public float ExplosionTime { get; set; } = 0.2f;
|
[Export] public float ExplosionTime { get; set; } = 0.2f;
|
||||||
|
|
||||||
[Node("CollisionShape3D")] public required CollisionShape3D CollisionShape { get; set; }
|
public override void _Ready()
|
||||||
[Node("MeshInstance3D")] public required MeshInstance3D CollisionMesh { get; set; }
|
|
||||||
[Node("ForgeEntityNode")] public required ForgeEntityNode ForgeEntityNode { get; set; }
|
|
||||||
|
|
||||||
public void OnReady()
|
|
||||||
{
|
{
|
||||||
if (CollisionShape.Shape is SphereShape3D sphereShape) sphereShape.Radius = Radius;
|
var sphereShape = GetNode<CollisionShape3D>("CollisionShape3D").Shape as SphereShape3D;
|
||||||
if (CollisionMesh.Mesh is not SphereMesh sphereMesh) return;
|
sphereShape!.Radius = Radius;
|
||||||
sphereMesh.Radius = Radius;
|
var sphereMesh = GetNode<MeshInstance3D>("MeshInstance3D").Mesh as SphereMesh;
|
||||||
sphereMesh.Height = Radius * 2f;
|
sphereMesh!.Radius = Radius;
|
||||||
}
|
sphereMesh!.Height = Radius*2f;
|
||||||
|
|
||||||
public void OnResolved()
|
|
||||||
{
|
|
||||||
this.Provide();
|
|
||||||
GetTree().CreateTimer(ExplosionTime).Timeout += TriggerExplosion;
|
GetTree().CreateTimer(ExplosionTime).Timeout += TriggerExplosion;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,10 +25,12 @@ public partial class Explosion : Area3D, IProvide<CuesManager>
|
|||||||
var bodies = GetOverlappingBodies();
|
var bodies = GetOverlappingBodies();
|
||||||
foreach (var body in bodies)
|
foreach (var body in bodies)
|
||||||
{
|
{
|
||||||
if (body is not IForgeEntity target) continue;
|
if (body is IDamageable damageable)
|
||||||
foreach (var ability in ForgeEntityNode.Abilities.GrantedAbilities.Where(ability => ability.CanActivate(out _, target)))
|
damageable.TakeDamage(new DamageRecord(GlobalPosition, RDamage));
|
||||||
ability.Activate(out _, target, Damage);
|
if (body is IStunnable stunnable)
|
||||||
|
stunnable.Stun();
|
||||||
}
|
}
|
||||||
|
|
||||||
QueueFree();
|
QueueFree();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
[gd_scene format=3 uid="uid://duju3atqgltkg"]
|
[gd_scene format=3 uid="uid://duju3atqgltkg"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cnlu64l7oxvv3" path="res://scenes/explosion/Explosion.cs" id="1_82hkh"]
|
[ext_resource type="Script" uid="uid://cnlu64l7oxvv3" path="res://scenes/explosion/Explosion.cs" id="1_82hkh"]
|
||||||
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="3_wikc1"]
|
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_hys74"]
|
||||||
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="4_f5lqq"]
|
|
||||||
[ext_resource type="Resource" uid="uid://nns16d5uhtl8" path="res://forge/resources/ability_datas/explosion_hit.tres" id="5_nphml"]
|
[sub_resource type="Resource" id="Resource_ffdh3"]
|
||||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="5_nqbbv"]
|
script = ExtResource("2_hys74")
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="8_qslwq"]
|
DamageDealt = 10.0
|
||||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="10_1ve7p"]
|
DamageType = 3
|
||||||
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="11_l63t1"]
|
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="11_nqbbv"]
|
|
||||||
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="12_e6gfx"]
|
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_82hkh"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_82hkh"]
|
||||||
radius = 1.0
|
radius = 1.0
|
||||||
@@ -21,45 +19,12 @@ transparency = 1
|
|||||||
cull_mode = 2
|
cull_mode = 2
|
||||||
albedo_color = Color(0.9607843, 0.27058825, 0, 0.7176471)
|
albedo_color = Color(0.9607843, 0.27058825, 0, 0.7176471)
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_5c2oj"]
|
|
||||||
script = ExtResource("5_nqbbv")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_17s7w"]
|
|
||||||
script = ExtResource("11_l63t1")
|
|
||||||
AbilityData = ExtResource("5_nphml")
|
|
||||||
AbilityLevel = SubResource("Resource_5c2oj")
|
|
||||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_pmtlp"]
|
|
||||||
script = ExtResource("12_e6gfx")
|
|
||||||
GrantAbilityConfigs = [SubResource("Resource_17s7w")]
|
|
||||||
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_pvvi5"]
|
|
||||||
script = ExtResource("5_nqbbv")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_4lkfq"]
|
|
||||||
script = ExtResource("5_nqbbv")
|
|
||||||
BaseValue = 1
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_pjqsn"]
|
|
||||||
script = ExtResource("8_qslwq")
|
|
||||||
Name = "Grant Explosion Ability"
|
|
||||||
Modifiers = []
|
|
||||||
Components = Array[Object]([SubResource("Resource_pmtlp")])
|
|
||||||
Executions = []
|
|
||||||
StackLimit = SubResource("Resource_4lkfq")
|
|
||||||
InitialStack = SubResource("Resource_pvvi5")
|
|
||||||
Cues = []
|
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
|
||||||
|
|
||||||
[node name="Explosion" type="Area3D" unique_id=1876014452]
|
[node name="Explosion" type="Area3D" unique_id=1876014452]
|
||||||
collision_layer = 0
|
collision_layer = 0
|
||||||
collision_mask = 16
|
collision_mask = 16
|
||||||
monitorable = false
|
monitorable = false
|
||||||
script = ExtResource("1_82hkh")
|
script = ExtResource("1_82hkh")
|
||||||
|
RDamage = SubResource("Resource_ffdh3")
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1259903749]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1259903749]
|
||||||
shape = SubResource("SphereShape3D_82hkh")
|
shape = SubResource("SphereShape3D_82hkh")
|
||||||
@@ -67,23 +32,3 @@ shape = SubResource("SphereShape3D_82hkh")
|
|||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1864409522]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1864409522]
|
||||||
mesh = SubResource("SphereMesh_82hkh")
|
mesh = SubResource("SphereMesh_82hkh")
|
||||||
surface_material_override/0 = SubResource("StandardMaterial3D_hys74")
|
surface_material_override/0 = SubResource("StandardMaterial3D_hys74")
|
||||||
|
|
||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=806020391]
|
|
||||||
script = ExtResource("3_wikc1")
|
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
|
||||||
|
|
||||||
[node name="ForgeEffect" type="Node" parent="ForgeEntityNode" unique_id=2068515708]
|
|
||||||
script = ExtResource("4_f5lqq")
|
|
||||||
EffectData = SubResource("Resource_pjqsn")
|
|
||||||
metadata/_custom_type_script = "uid://dps0oef50noil"
|
|
||||||
|
|
||||||
[node name="ForgeAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=813420941]
|
|
||||||
script = ExtResource("10_1ve7p")
|
|
||||||
AttributeSetClass = "MetaAttributeSet"
|
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("11_nqbbv")]({
|
|
||||||
"IncomingDamage": Object(RefCounted,"script":ExtResource("11_nqbbv"),"Default":0,"Min":0,"Max":1000)
|
|
||||||
,
|
|
||||||
"Level": Object(RefCounted,"script":ExtResource("11_nqbbv"),"Default":1,"Min":1,"Max":1000)
|
|
||||||
|
|
||||||
})
|
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
|
||||||
|
|||||||
@@ -3,17 +3,22 @@
|
|||||||
[ext_resource type="Script" uid="uid://bbbrf5ckydfna" path="res://scenes/player_controller/scripts/PlayerController.cs" id="1_poq2x"]
|
[ext_resource type="Script" uid="uid://bbbrf5ckydfna" path="res://scenes/player_controller/scripts/PlayerController.cs" id="1_poq2x"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cf3rrgr1imvv4" path="res://scenes/path/path.tscn" id="2_6lejt"]
|
[ext_resource type="PackedScene" uid="uid://cf3rrgr1imvv4" path="res://scenes/path/path.tscn" id="2_6lejt"]
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_u8yay"]
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_u8yay"]
|
||||||
|
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_x835q"]
|
||||||
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="3_cb2lu"]
|
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="3_cb2lu"]
|
||||||
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://inputs/base_mode/base_mode.tres" id="3_cresl"]
|
[ext_resource type="Resource" uid="uid://bl5crtu1gkrtr" path="res://inputs/base_mode/base_mode.tres" id="3_cresl"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://c4ikbhojckpnc" path="res://scenes/components/health/CHealth.tscn" id="3_q7bng"]
|
||||||
|
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="4_abfq8"]
|
||||||
|
[ext_resource type="Resource" uid="uid://bjyd801wvverk" path="res://scenes/player_controller/resources/player_health.tres" id="4_m8gvy"]
|
||||||
[ext_resource type="Resource" uid="uid://cpdaw41ah5gic" path="res://inputs/base_mode/rotate_y.tres" id="4_rxwoh"]
|
[ext_resource type="Resource" uid="uid://cpdaw41ah5gic" path="res://inputs/base_mode/rotate_y.tres" id="4_rxwoh"]
|
||||||
[ext_resource type="Resource" uid="uid://dgjsi1my7nlnk" path="res://forge/resources/ability_datas/player_hit.tres" id="4_u8yay"]
|
[ext_resource type="Resource" uid="uid://dh437cuxgjv6b" path="res://scenes/player_controller/resources/forge/mana_regeneration.tres" id="5_2rkt1"]
|
||||||
[ext_resource type="Resource" uid="uid://dh437cuxgjv6b" path="res://forge/resources/effect_datas/mana_regeneration.tres" id="5_2rkt1"]
|
|
||||||
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://inputs/base_mode/rotate_floorplane.tres" id="5_4u7i3"]
|
[ext_resource type="Resource" uid="uid://ccrb5xsnphc8" path="res://inputs/base_mode/rotate_floorplane.tres" id="5_4u7i3"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://hpsg4fqwrx1u" path="res://scenes/components/damage/CDamageable.tscn" id="5_jb43f"]
|
||||||
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://inputs/base_mode/move_left.tres" id="5_q14ux"]
|
[ext_resource type="Resource" uid="uid://f3vs6l4m623s" path="res://inputs/base_mode/move_left.tres" id="5_q14ux"]
|
||||||
[ext_resource type="Resource" uid="uid://b0ikxp5j8fn3n" path="res://forge/resources/ability_datas/on_hit_invinciblity.tres" id="5_u8yay"]
|
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://scenes/player_controller/resources/forge/exploding_sword.tres" id="5_u8yay"]
|
||||||
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="5_ue7xq"]
|
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="5_ue7xq"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dyru7mxo121w6" path="res://scenes/player_controller/resources/player_normal_damage_mod.tres" id="6_cmijs"]
|
||||||
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://inputs/base_mode/move_right.tres" id="6_q7bng"]
|
[ext_resource type="Resource" uid="uid://t612lts1wi1s" path="res://inputs/base_mode/move_right.tres" id="6_q7bng"]
|
||||||
[ext_resource type="Resource" uid="uid://cffil4tic3ysg" path="res://forge/resources/effect_datas/inhibit_mana_regen_temporarily.tres" id="6_u8yay"]
|
[ext_resource type="Resource" uid="uid://cffil4tic3ysg" path="res://scenes/player_controller/resources/forge/inhibit_mana_regen_temporarily.tres" id="6_u8yay"]
|
||||||
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://scenes/player_controller/scripts/StairsSystem.cs" id="7_bmt5a"]
|
[ext_resource type="Script" uid="uid://cwbvxlfvmocc1" path="res://scenes/player_controller/scripts/StairsSystem.cs" id="7_bmt5a"]
|
||||||
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
[ext_resource type="Resource" uid="uid://brswsknpgwal2" path="res://inputs/base_mode/move_front.tres" id="7_m8gvy"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="7_x835q"]
|
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="7_x835q"]
|
||||||
@@ -24,7 +29,7 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://scenes/player_controller/components/mantle/mantle_system.tscn" id="8_qu4wy"]
|
[ext_resource type="PackedScene" uid="uid://wq1okogkhc5l" path="res://scenes/player_controller/components/mantle/mantle_system.tscn" id="8_qu4wy"]
|
||||||
[ext_resource type="AudioStream" uid="uid://clfggn87oeg1s" path="res://scenes/player_controller/audio/InteractiveSFX.tres" id="9_jb43f"]
|
[ext_resource type="AudioStream" uid="uid://clfggn87oeg1s" path="res://scenes/player_controller/audio/InteractiveSFX.tres" id="9_jb43f"]
|
||||||
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
|
[ext_resource type="Resource" uid="uid://bebstkm608wxx" path="res://inputs/base_mode/aim_pressed.tres" id="9_nob5r"]
|
||||||
[ext_resource type="Resource" uid="uid://dccuj66egxfwh" path="res://forge/resources/ability_datas/empowered_action.tres" id="10_2rkt1"]
|
[ext_resource type="Resource" uid="uid://dccuj66egxfwh" path="res://scenes/player_controller/resources/forge/empowered_action.tres" id="10_2rkt1"]
|
||||||
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://inputs/base_mode/jump.tres" id="10_4u7i3"]
|
[ext_resource type="Resource" uid="uid://bdit2jy5gbpts" path="res://inputs/base_mode/jump.tres" id="10_4u7i3"]
|
||||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="10_pw5r7"]
|
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="10_pw5r7"]
|
||||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="11_2rkt1"]
|
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="11_2rkt1"]
|
||||||
@@ -53,11 +58,11 @@
|
|||||||
[ext_resource type="Texture2D" uid="uid://chvt6g0xn5c2m" path="res://scenes/player_controller/components/dash/light-ring.jpg" id="32_lgpc8"]
|
[ext_resource type="Texture2D" uid="uid://chvt6g0xn5c2m" path="res://scenes/player_controller/components/dash/light-ring.jpg" id="32_lgpc8"]
|
||||||
[ext_resource type="Script" uid="uid://b4dwolbvt8our" path="res://addons/godot_state_charts/history_state.gd" id="41_ruloh"]
|
[ext_resource type="Script" uid="uid://b4dwolbvt8our" path="res://addons/godot_state_charts/history_state.gd" id="41_ruloh"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c40orhfdgsim" path="res://assets/ui/IconGodotNode/white/icon_circle.png" id="45_u8rdp"]
|
[ext_resource type="Texture2D" uid="uid://c40orhfdgsim" path="res://assets/ui/IconGodotNode/white/icon_circle.png" id="45_u8rdp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cyw8p0p6a78tl" path="res://scenes/ui/resourcebar/healthbar.tscn" id="47_76kmc"]
|
[ext_resource type="PackedScene" uid="uid://cyw8p0p6a78tl" path="res://scenes/ui/healthbar/healthbar.tscn" id="47_76kmc"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_mpigw"]
|
[sub_resource type="Resource" id="Resource_mpigw"]
|
||||||
script = ExtResource("2_u8yay")
|
script = ExtResource("2_u8yay")
|
||||||
ContainerTags = Array[String](["character.player", "traits.damageable"])
|
ContainerTags = Array[String](["character.player"])
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_5gbhg"]
|
[sub_resource type="Resource" id="Resource_5gbhg"]
|
||||||
@@ -65,16 +70,21 @@ script = ExtResource("11_u8yay")
|
|||||||
Tag = "events.player.empowered_action_used"
|
Tag = "events.player.empowered_action_used"
|
||||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_2rkt1"]
|
[sub_resource type="Resource" id="Resource_cb2lu"]
|
||||||
script = ExtResource("11_u8yay")
|
script = ExtResource("2_x835q")
|
||||||
Tag = "immunity.damage"
|
DamageDealt = 10.0
|
||||||
metadata/_custom_type_script = "uid://dpakv7agvir6y"
|
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_abfq8"]
|
[sub_resource type="Resource" id="Resource_abfq8"]
|
||||||
script = ExtResource("3_cb2lu")
|
script = ExtResource("3_cb2lu")
|
||||||
Modifier = 5.0
|
Modifier = 5.0
|
||||||
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
metadata/_custom_type_script = "uid://b44cse62qru7j"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_ue7xq"]
|
||||||
|
script = ExtResource("4_abfq8")
|
||||||
|
StartingHealth = 10.0
|
||||||
|
metadata/_custom_type_script = "uid://baiapod3csndf"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_u8yay"]
|
[sub_resource type="Resource" id="Resource_u8yay"]
|
||||||
script = ExtResource("11_2rkt1")
|
script = ExtResource("11_2rkt1")
|
||||||
Default = 100
|
Default = 100
|
||||||
@@ -122,9 +132,6 @@ height = 1.0
|
|||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_abfq8"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_abfq8"]
|
||||||
radius = 2.0
|
radius = 2.0
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_ue7xq"]
|
|
||||||
radius = 1.5
|
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_cmijs"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_cmijs"]
|
||||||
radius = 1.0
|
radius = 1.0
|
||||||
|
|
||||||
@@ -135,6 +142,9 @@ height = 3.5
|
|||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_nob5r"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_nob5r"]
|
||||||
radius = 0.4
|
radius = 0.4
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape3D" id="SphereShape3D_ue7xq"]
|
||||||
|
radius = 1.5
|
||||||
|
|
||||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_2q0ik"]
|
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_2q0ik"]
|
||||||
blend_mode = 1
|
blend_mode = 1
|
||||||
|
|
||||||
@@ -146,16 +156,16 @@ collision_mask = 272
|
|||||||
script = ExtResource("1_poq2x")
|
script = ExtResource("1_poq2x")
|
||||||
BaseTags = SubResource("Resource_mpigw")
|
BaseTags = SubResource("Resource_mpigw")
|
||||||
EmpoweredActionUsed = SubResource("Resource_5gbhg")
|
EmpoweredActionUsed = SubResource("Resource_5gbhg")
|
||||||
InvincibleTag = SubResource("Resource_2rkt1")
|
|
||||||
HitAbility = ExtResource("4_u8yay")
|
|
||||||
EmpoweredActionAbility = ExtResource("10_2rkt1")
|
EmpoweredActionAbility = ExtResource("10_2rkt1")
|
||||||
DefaultGrantedAbilities = [ExtResource("5_u8yay")]
|
WeaponExplosionBehavior = ExtResource("5_u8yay")
|
||||||
DefaultPermanentEffects = [ExtResource("5_2rkt1")]
|
DefaultPermanentEffects = [ExtResource("5_2rkt1")]
|
||||||
EmpoweredActionEffects = [ExtResource("6_u8yay")]
|
EmpoweredActionEffects = [ExtResource("6_u8yay")]
|
||||||
AimAssistStrength = 0.3
|
AimAssistStrength = 0.3
|
||||||
AimAssistReductionWhenCloseToTarget = 0.1
|
AimAssistReductionWhenCloseToTarget = 0.1
|
||||||
AimAssistReductionStartDistance = 8.0
|
AimAssistReductionStartDistance = 8.0
|
||||||
|
RDamage = SubResource("Resource_cb2lu")
|
||||||
RKnockback = SubResource("Resource_abfq8")
|
RKnockback = SubResource("Resource_abfq8")
|
||||||
|
RHealth = SubResource("Resource_ue7xq")
|
||||||
TargetingDistance = 5.0
|
TargetingDistance = 5.0
|
||||||
Explosion = ExtResource("5_ue7xq")
|
Explosion = ExtResource("5_ue7xq")
|
||||||
WalkSpeed = 7.5
|
WalkSpeed = 7.5
|
||||||
@@ -213,23 +223,11 @@ InitialAttributeValues = Dictionary[String, ExtResource("11_2rkt1")]({
|
|||||||
})
|
})
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
||||||
|
|
||||||
[node name="CharaAttributeSet" type="Node" parent="." unique_id=2058864775]
|
[node name="CHealth" parent="." unique_id=1244478698 instance=ExtResource("3_q7bng")]
|
||||||
script = ExtResource("10_pw5r7")
|
RHealth = ExtResource("4_m8gvy")
|
||||||
AttributeSetClass = "CharacterAttributeSet"
|
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("11_2rkt1")]({
|
|
||||||
"Health": Object(RefCounted,"script":ExtResource("11_2rkt1"),"Default":100,"Min":0,"Max":100)
|
|
||||||
|
|
||||||
})
|
[node name="CDamageable" parent="." unique_id=1375668972 instance=ExtResource("5_jb43f")]
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
DamageModifiers = Array[Object]([ExtResource("6_cmijs")])
|
||||||
|
|
||||||
[node name="MetaAttributeSet" type="Node" parent="." unique_id=1777903944]
|
|
||||||
script = ExtResource("10_pw5r7")
|
|
||||||
AttributeSetClass = "MetaAttributeSet"
|
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("11_2rkt1")]({
|
|
||||||
"IncomingDamage": Object(RefCounted,"script":ExtResource("11_2rkt1"),"Default":0,"Min":0,"Max":1000)
|
|
||||||
|
|
||||||
})
|
|
||||||
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
|
|
||||||
|
|
||||||
[node name="CKnockback" parent="." unique_id=80423377 instance=ExtResource("7_x835q")]
|
[node name="CKnockback" parent="." unique_id=80423377 instance=ExtResource("7_x835q")]
|
||||||
RKnockback = ExtResource("8_m8gvy")
|
RKnockback = ExtResource("8_m8gvy")
|
||||||
@@ -239,6 +237,12 @@ stream = ExtResource("9_jb43f")
|
|||||||
autoplay = true
|
autoplay = true
|
||||||
bus = &"SFX"
|
bus = &"SFX"
|
||||||
|
|
||||||
|
[node name="WallRunSnapper" type="RayCast3D" parent="." unique_id=1342764801]
|
||||||
|
unique_name_in_owner = true
|
||||||
|
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 0, 0, 0)
|
||||||
|
target_position = Vector3(0, 0, -5)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
[node name="InputController" type="Node3D" parent="." unique_id=846069741]
|
[node name="InputController" type="Node3D" parent="." unique_id=846069741]
|
||||||
script = ExtResource("16_v31n3")
|
script = ExtResource("16_v31n3")
|
||||||
base_mode = ExtResource("3_cresl")
|
base_mode = ExtResource("3_cresl")
|
||||||
@@ -409,16 +413,6 @@ target_position = Vector3(0, 0, 0)
|
|||||||
max_results = 512
|
max_results = 512
|
||||||
collision_mask = 16
|
collision_mask = 16
|
||||||
|
|
||||||
[node name="SlidingEnemyDetector" type="Area3D" parent="." unique_id=42873532]
|
|
||||||
collision_layer = 0
|
|
||||||
collision_mask = 16
|
|
||||||
monitoring = false
|
|
||||||
monitorable = false
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="SlidingEnemyDetector" unique_id=1287455053]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
|
||||||
shape = SubResource("SphereShape3D_ue7xq")
|
|
||||||
|
|
||||||
[node name="CloseEnemyDetector" type="ShapeCast3D" parent="." unique_id=2109861596]
|
[node name="CloseEnemyDetector" type="ShapeCast3D" parent="." unique_id=2109861596]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.6, 0)
|
||||||
@@ -432,10 +426,6 @@ target_position = Vector3(0, 0, -6)
|
|||||||
collision_mask = 112
|
collision_mask = 112
|
||||||
collide_with_areas = true
|
collide_with_areas = true
|
||||||
|
|
||||||
[node name="DirectGroundDetector" type="RayCast3D" parent="." unique_id=1037335553]
|
|
||||||
target_position = Vector3(0, -2, 0)
|
|
||||||
collision_mask = 256
|
|
||||||
|
|
||||||
[node name="GroundDetector" type="ShapeCast3D" parent="." unique_id=1681055424]
|
[node name="GroundDetector" type="ShapeCast3D" parent="." unique_id=1681055424]
|
||||||
shape = SubResource("CapsuleShape3D_6lejt")
|
shape = SubResource("CapsuleShape3D_6lejt")
|
||||||
collision_mask = 256
|
collision_mask = 256
|
||||||
@@ -447,6 +437,20 @@ shape = SubResource("SphereShape3D_nob5r")
|
|||||||
target_position = Vector3(0, 0.4, 0)
|
target_position = Vector3(0, 0.4, 0)
|
||||||
collision_mask = 256
|
collision_mask = 256
|
||||||
|
|
||||||
|
[node name="DirectGroundDetector" type="RayCast3D" parent="." unique_id=1037335553]
|
||||||
|
target_position = Vector3(0, -2, 0)
|
||||||
|
collision_mask = 256
|
||||||
|
|
||||||
|
[node name="SlidingEnemyDetector" type="Area3D" parent="." unique_id=42873532]
|
||||||
|
collision_layer = 0
|
||||||
|
collision_mask = 16
|
||||||
|
monitoring = false
|
||||||
|
monitorable = false
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="SlidingEnemyDetector" unique_id=1287455053]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||||
|
shape = SubResource("SphereShape3D_ue7xq")
|
||||||
|
|
||||||
[node name="InvincibilityTime" type="Timer" parent="." unique_id=1244463585]
|
[node name="InvincibilityTime" type="Timer" parent="." unique_id=1244463585]
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
using Godot;
|
using Godot;
|
||||||
using System;
|
using System;
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Gamesmiths.Forge.Attributes;
|
|
||||||
using Gamesmiths.Forge.Core;
|
using Gamesmiths.Forge.Core;
|
||||||
using Gamesmiths.Forge.Cues;
|
using Gamesmiths.Forge.Cues;
|
||||||
using Gamesmiths.Forge.Godot.Core;
|
using Gamesmiths.Forge.Godot.Core;
|
||||||
@@ -10,17 +7,12 @@ using Gamesmiths.Forge.Tags;
|
|||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
using Movementtests.tools;
|
using Movementtests.tools;
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_text_panel.png"), Meta(typeof(IAutoNode))]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/control/icon_text_panel.png")]
|
||||||
public partial class PlayerUi : Control
|
public partial class PlayerUi : Control, ICueHandler
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
private TextureRect _enemyTarget = null!;
|
||||||
|
private Healthbar _healthbar = null!;
|
||||||
[Dependency]
|
private Healthbar _manabar = null!;
|
||||||
public TagsManager TagsManager => this.DependOn<TagsManager>();
|
|
||||||
[Dependency]
|
|
||||||
public CuesManager CuesManager => this.DependOn<CuesManager>();
|
|
||||||
|
|
||||||
#region Utils
|
|
||||||
|
|
||||||
public enum TargetState
|
public enum TargetState
|
||||||
{
|
{
|
||||||
@@ -28,40 +20,29 @@ public partial class PlayerUi : Control
|
|||||||
TargetWouldNotKill,
|
TargetWouldNotKill,
|
||||||
TargetWouldKill
|
TargetWouldKill
|
||||||
}
|
}
|
||||||
|
|
||||||
public record TargetProperties(TargetState State, Vector2 Position);
|
public record TargetProperties(TargetState State, Vector2 Position);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Nodes
|
|
||||||
|
|
||||||
[Node] public required TextureRect EnemyTarget { get; set; }
|
|
||||||
[Node] public required ResourceBar Healthbar { get; set; }
|
|
||||||
[Node] public required ResourceBar Manabar { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Exports
|
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public Color WouldKillColor { get; set; } = new Color("009c8f");
|
public Color WouldKillColor { get; set; } = new Color("009c8f");
|
||||||
[Export]
|
[Export]
|
||||||
public Color WouldNotKillColor { get; set; } = new Color("fc001c");
|
public Color WouldNotKillColor { get; set; } = new Color("fc001c");
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private EntityAttribute? _health;
|
public override void _Ready()
|
||||||
private EntityAttribute? _mana;
|
|
||||||
public void Init(EntityAttribute health, EntityAttribute mana)
|
|
||||||
{
|
{
|
||||||
_health = health;
|
_enemyTarget = GetNode<TextureRect>("%EnemyTarget");
|
||||||
_mana = mana;
|
_healthbar = GetNode<Healthbar>("%Healthbar");
|
||||||
|
_manabar = GetNode<Healthbar>("%Manabar");
|
||||||
|
|
||||||
|
var tagsManager = ForgeManagers.Instance.TagsManager;
|
||||||
|
var cuesManager = ForgeManagers.Instance.CuesManager;
|
||||||
|
cuesManager.RegisterCue(Tag.RequestTag(tagsManager, "cues.resources.mana"), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnResolved()
|
public void Initialize(float initialHealth, float initialMana)
|
||||||
{
|
{
|
||||||
if (_health == null || _mana == null) throw new Exception("Health and mana attributes are not set");
|
_healthbar.Initialize(initialHealth);
|
||||||
Healthbar.Init(_health);
|
_manabar.Initialize(initialMana);
|
||||||
Manabar.Init(_mana);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetEnemyTargetProperties(TargetProperties targetProperties)
|
public void SetEnemyTargetProperties(TargetProperties targetProperties)
|
||||||
@@ -76,8 +57,38 @@ public partial class PlayerUi : Control
|
|||||||
TargetState.TargetWouldKill => WouldKillColor,
|
TargetState.TargetWouldKill => WouldKillColor,
|
||||||
_ => WouldNotKillColor
|
_ => WouldNotKillColor
|
||||||
};
|
};
|
||||||
EnemyTarget.SetVisible(visible);
|
_enemyTarget.SetVisible(visible);
|
||||||
EnemyTarget.SetPosition(position - EnemyTarget.Size / 2);
|
_enemyTarget.SetPosition(position - _enemyTarget.Size / 2);
|
||||||
EnemyTarget.SetModulate(modulation);
|
_enemyTarget.SetModulate(modulation);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnHealthChanged(IHealthable healthable, HealthChangedRecord healthChanged)
|
||||||
|
{
|
||||||
|
_healthbar.CurrentHealth = healthChanged.CurrentHealth;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnManaChanged(float newValue)
|
||||||
|
{
|
||||||
|
_manabar.CurrentHealth = newValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnExecute(IForgeEntity? target, CueParameters? parameters)
|
||||||
|
{
|
||||||
|
if (target == null || !parameters.HasValue || !IsInstanceValid(_manabar)) return;
|
||||||
|
|
||||||
|
float magnitude = parameters.Value.Magnitude;
|
||||||
|
_manabar.CurrentHealth += magnitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnApply(IForgeEntity? target, CueParameters? parameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnRemove(IForgeEntity? target, bool interrupted)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnUpdate(IForgeEntity? target, CueParameters? parameters)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ tracks/3/keys = {
|
|||||||
}
|
}
|
||||||
tracks/4/type = "method"
|
tracks/4/type = "method"
|
||||||
tracks/4/imported = false
|
tracks/4/imported = false
|
||||||
tracks/4/enabled = true
|
tracks/4/enabled = false
|
||||||
tracks/4/path = NodePath("../..")
|
tracks/4/path = NodePath("../..")
|
||||||
tracks/4/interp = 1
|
tracks/4/interp = 1
|
||||||
tracks/4/loop_wrap = true
|
tracks/4/loop_wrap = true
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Chickensoft.AutoInject;
|
|
||||||
using Chickensoft.Introspection;
|
|
||||||
using Gamesmiths.Forge.Abilities;
|
using Gamesmiths.Forge.Abilities;
|
||||||
using Gamesmiths.Forge.Attributes;
|
using Gamesmiths.Forge.Attributes;
|
||||||
using Gamesmiths.Forge.Core;
|
using Gamesmiths.Forge.Core;
|
||||||
using Gamesmiths.Forge.Cues;
|
|
||||||
using Gamesmiths.Forge.Effects;
|
using Gamesmiths.Forge.Effects;
|
||||||
using Gamesmiths.Forge.Effects.Calculator;
|
using Gamesmiths.Forge.Effects.Calculator;
|
||||||
using Gamesmiths.Forge.Effects.Components;
|
using Gamesmiths.Forge.Effects.Components;
|
||||||
@@ -22,53 +19,68 @@ using Gamesmiths.Forge.Tags;
|
|||||||
using Godot;
|
using Godot;
|
||||||
using GodotStateCharts;
|
using GodotStateCharts;
|
||||||
using Movementtests.addons.godot_state_charts.csharp;
|
using Movementtests.addons.godot_state_charts.csharp;
|
||||||
|
using Movementtests.forge.abilities;
|
||||||
using Movementtests.interfaces;
|
using Movementtests.interfaces;
|
||||||
|
using Movementtests.scenes.player_controller.components.weapon;
|
||||||
|
using Movementtests.systems.damage;
|
||||||
using Movementtests.tools;
|
using Movementtests.tools;
|
||||||
|
using Movementtests.tools.calculators;
|
||||||
using Node = Godot.Node;
|
using Node = Godot.Node;
|
||||||
|
|
||||||
namespace Movementtests.systems;
|
namespace Movementtests.systems;
|
||||||
|
|
||||||
|
|
||||||
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_sword.png"), Meta(typeof(IAutoNode))]
|
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_sword.png")]
|
||||||
public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
public partial class WeaponSystem : RigidBody3D, IDamageDealer, IForgeEntity
|
||||||
{
|
{
|
||||||
public override void _Notification(int what) => this.Notify(what);
|
|
||||||
|
|
||||||
#region Dependencies
|
|
||||||
|
|
||||||
[Dependency]
|
|
||||||
public TagsManager TagsManager => this.DependOn<TagsManager>();
|
|
||||||
[Dependency]
|
|
||||||
public CuesManager CuesManager => this.DependOn<CuesManager>();
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Enums
|
|
||||||
|
|
||||||
public enum WeaponEvent
|
|
||||||
{
|
|
||||||
StartedFlying,
|
|
||||||
StoppedFlying,
|
|
||||||
FlyingTick
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Signals
|
|
||||||
|
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void WeaponThrownEventHandler();
|
public delegate void WeaponThrownEventHandler();
|
||||||
|
|
||||||
[Signal]
|
[Signal]
|
||||||
public delegate void WeaponRetrievedEventHandler();
|
public delegate void WeaponRetrievedEventHandler();
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public ForgeTagContainer BaseTags { get; set; }
|
||||||
|
[Export] public ForgeAbilityData FlyingTickAbility { get; set; }
|
||||||
|
|
||||||
|
[Export]
|
||||||
|
public RDamage RDamage { get; set; }
|
||||||
|
[Export(PropertyHint.Range, "0,2,0.01,or_greater")]
|
||||||
|
public float ThrowForce { get; set; } = 1f;
|
||||||
|
[Export(PropertyHint.Range, "0,0.2,0.01,or_greater")]
|
||||||
|
public float StraightThrowDuration { get; set; } = 0.1f;
|
||||||
|
|
||||||
|
public EntityAttributes Attributes { get; set; } = null!;
|
||||||
|
public EntityTags Tags { get; set; } = null!;
|
||||||
|
public EffectsManager EffectsManager { get; set; } = null!;
|
||||||
|
public EntityAbilities Abilities { get; set; } = null!;
|
||||||
|
public EventManager Events { get; set; } = null!;
|
||||||
|
public Variables SharedVariables { get; }
|
||||||
|
|
||||||
#endregion
|
private StateChart _weaponState = null!;
|
||||||
|
public StateChartState InHandState = null!;
|
||||||
|
public StateChartState FlyingState = null!;
|
||||||
|
public StateChartState PlantedState = null!;
|
||||||
|
private Transition _handToFlying = null!;
|
||||||
|
private Transition _flyingToHand = null!;
|
||||||
|
private Transition _plantedToHand = null!;
|
||||||
|
private Transition _plantedToFlying = null!;
|
||||||
|
private Transition _toPlanted = null!;
|
||||||
|
|
||||||
#region Forge
|
private ShapeCast3D _dashCast3D = null!;
|
||||||
|
public Timer WeaponFlyingTick = null!;
|
||||||
|
|
||||||
|
private Transform3D _startTransform;
|
||||||
|
private Vector3 _startMeshRotation;
|
||||||
|
|
||||||
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStartedFlyingAbilities = new();
|
private Vector3 _throwDirection;
|
||||||
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStoppedFlyingAbilities = new();
|
public Vector3 PlantLocation { get; set; }
|
||||||
private readonly Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponFlyingTickAbilities = new();
|
public Vector3 PlantNormal { get; set; }
|
||||||
|
public Node? PlantObject { get; set; }
|
||||||
|
|
||||||
|
public MeshInstance3D WeaponLocationIndicator { get; set; } = null!;
|
||||||
|
public StandardMaterial3D WeaponLocationIndicatorMaterial { get; set; } = null!;
|
||||||
|
public MeshInstance3D WeaponMesh { get; set; } = null!;
|
||||||
|
|
||||||
public Tag WeaponFlyingTickEventTag;
|
public Tag WeaponFlyingTickEventTag;
|
||||||
public Tag WeaponStartedFlyingEventTag;
|
public Tag WeaponStartedFlyingEventTag;
|
||||||
@@ -87,94 +99,8 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
|
|
||||||
private AbilityHandle? _weaponFlyingAbility;
|
private AbilityHandle? _weaponFlyingAbility;
|
||||||
|
|
||||||
#endregion
|
public void Init()
|
||||||
|
|
||||||
#region Inspector
|
|
||||||
[Export] public ForgeAbilityData? FlyingTickAbility { get; set; }
|
|
||||||
|
|
||||||
[Export(PropertyHint.Range, "0,2,0.01,or_greater")]
|
|
||||||
public float ThrowForce { get; set; } = 1f;
|
|
||||||
[Export(PropertyHint.Range, "0,0.2,0.01,or_greater")]
|
|
||||||
public float StraightThrowDuration { get; set; } = 0.1f;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IForgeEntity
|
|
||||||
|
|
||||||
// Perfectly forward the IForgeEntity interface to the ForgeEntity component
|
|
||||||
public EntityAttributes Attributes
|
|
||||||
{
|
{
|
||||||
get => ForgeEntity.Attributes;
|
|
||||||
set => ForgeEntity.Attributes = value;
|
|
||||||
}
|
|
||||||
public EntityTags Tags
|
|
||||||
{
|
|
||||||
get => ForgeEntity.Tags;
|
|
||||||
set => ForgeEntity.Tags = value;
|
|
||||||
}
|
|
||||||
public EffectsManager EffectsManager
|
|
||||||
{
|
|
||||||
get => ForgeEntity.EffectsManager;
|
|
||||||
set => ForgeEntity.EffectsManager = value;
|
|
||||||
}
|
|
||||||
public EntityAbilities Abilities
|
|
||||||
{
|
|
||||||
get => ForgeEntity.Abilities;
|
|
||||||
set => ForgeEntity.Abilities = value;
|
|
||||||
}
|
|
||||||
public EventManager Events
|
|
||||||
{
|
|
||||||
get => ForgeEntity.Events;
|
|
||||||
set => ForgeEntity.Events = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Variables SharedVariables
|
|
||||||
{
|
|
||||||
get => ForgeEntity.SharedVariables;
|
|
||||||
set => ForgeEntity.SharedVariables = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Publics
|
|
||||||
|
|
||||||
public StateChartState InHandState = null!;
|
|
||||||
public StateChartState FlyingState = null!;
|
|
||||||
public StateChartState PlantedState = null!;
|
|
||||||
|
|
||||||
public Vector3 PlantLocation { get; set; }
|
|
||||||
public Vector3 PlantNormal { get; set; }
|
|
||||||
public Node? PlantObject { get; set; }
|
|
||||||
public StandardMaterial3D WeaponLocationIndicatorMaterial { get; set; } = null!;
|
|
||||||
|
|
||||||
[Node("ForgeEntityNode")] public required ForgeEntityNode ForgeEntity { get; set;}
|
|
||||||
[Node("Weapon")] public required MeshInstance3D WeaponMesh { get; set; }
|
|
||||||
[Node("WeaponLocationIndicator")] public required MeshInstance3D WeaponLocationIndicator { get; set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Privates
|
|
||||||
|
|
||||||
private StateChart _weaponState = null!;
|
|
||||||
private Transition _handToFlying = null!;
|
|
||||||
private Transition _flyingToHand = null!;
|
|
||||||
private Transition _plantedToHand = null!;
|
|
||||||
private Transition _plantedToFlying = null!;
|
|
||||||
private Transition _toPlanted = null!;
|
|
||||||
|
|
||||||
private ShapeCast3D _dashCast3D = null!;
|
|
||||||
|
|
||||||
private Transform3D _startTransform;
|
|
||||||
private Vector3 _startMeshRotation;
|
|
||||||
|
|
||||||
private Vector3 _throwDirection;
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public void OnReady()
|
|
||||||
{
|
|
||||||
#region StateManagement
|
|
||||||
|
|
||||||
_weaponState = StateChart.Of(GetNode("StateChart"));
|
_weaponState = StateChart.Of(GetNode("StateChart"));
|
||||||
InHandState = StateChartState.Of(GetNode("StateChart/Root/InHand"));
|
InHandState = StateChartState.Of(GetNode("StateChart/Root/InHand"));
|
||||||
FlyingState = StateChartState.Of(GetNode("StateChart/Root/Flying"));
|
FlyingState = StateChartState.Of(GetNode("StateChart/Root/Flying"));
|
||||||
@@ -184,46 +110,67 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
_plantedToHand = Transition.Of(GetNode("StateChart/Root/Planted/ToHand"));
|
_plantedToHand = Transition.Of(GetNode("StateChart/Root/Planted/ToHand"));
|
||||||
_plantedToFlying = Transition.Of(GetNode("StateChart/Root/Planted/ToFlying"));
|
_plantedToFlying = Transition.Of(GetNode("StateChart/Root/Planted/ToFlying"));
|
||||||
_toPlanted = Transition.Of(GetNode("StateChart/Root/ToPlanted"));
|
_toPlanted = Transition.Of(GetNode("StateChart/Root/ToPlanted"));
|
||||||
|
|
||||||
|
WeaponLocationIndicator = GetNode<MeshInstance3D>("WeaponLocationIndicator");
|
||||||
|
WeaponLocationIndicator.Visible = false;
|
||||||
|
WeaponLocationIndicatorMaterial = (WeaponLocationIndicator.GetActiveMaterial(0) as StandardMaterial3D)!;
|
||||||
|
|
||||||
|
WeaponFlyingTick = GetNode<Timer>("WeaponFlyingTick");
|
||||||
|
|
||||||
#endregion
|
WeaponMesh = GetNode<MeshInstance3D>("Weapon");
|
||||||
|
|
||||||
// Initial setup
|
|
||||||
_startMeshRotation = WeaponMesh.Rotation;
|
_startMeshRotation = WeaponMesh.Rotation;
|
||||||
|
|
||||||
_startTransform = Transform;
|
_startTransform = Transform;
|
||||||
Freeze = true;
|
Freeze = true;
|
||||||
Visible = false;
|
Visible = false;
|
||||||
|
|
||||||
WeaponLocationIndicator.Visible = false;
|
|
||||||
WeaponLocationIndicatorMaterial = (WeaponLocationIndicator.GetActiveMaterial(0) as StandardMaterial3D)!;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnResolved()
|
|
||||||
{
|
|
||||||
// Forge
|
// Forge
|
||||||
WeaponFlyingTickEventTag = Tag.RequestTag(TagsManager, "events.weapon.flyingTick");
|
var tagsManager = ForgeManagers.Instance.TagsManager;
|
||||||
WeaponStartedFlyingEventTag = Tag.RequestTag(TagsManager, "events.weapon.startedFlying");
|
var cuesManager = ForgeManagers.Instance.CuesManager;
|
||||||
WeaponStoppedFlyingEventTag = Tag.RequestTag(TagsManager, "events.weapon.stoppedFlying");
|
|
||||||
WeaponHandToFlyingEventTag = Tag.RequestTag(TagsManager, "events.weapon.handToFlying");
|
|
||||||
WeaponFlyingToHandEventTag = Tag.RequestTag(TagsManager, "events.weapon.flyingToHand");
|
|
||||||
WeaponPlantedToHandEventTag = Tag.RequestTag(TagsManager, "events.weapon.plantedToHand");
|
|
||||||
WeaponPlantedToFlyingEventTag = Tag.RequestTag(TagsManager, "events.weapon.plantedToFlying");
|
|
||||||
WeaponPlantedEventTag = Tag.RequestTag(TagsManager, "events.weapon.planted");
|
|
||||||
|
|
||||||
// WeaponInHandStatusTag = Tag.RequestTag(TagsManager, "status.weapon.inHand");
|
WeaponFlyingTickEventTag = Tag.RequestTag(tagsManager, "events.weapon.flyingTick");
|
||||||
// WeaponFlyingStatusTag = Tag.RequestTag(TagsManager, "status.weapon.flying");
|
WeaponStartedFlyingEventTag = Tag.RequestTag(tagsManager, "events.weapon.startedFlying");
|
||||||
// WeaponPlantedStatusTag = Tag.RequestTag(TagsManager, "status.weapon.planted");
|
WeaponStoppedFlyingEventTag = Tag.RequestTag(tagsManager, "events.weapon.stoppedFlying");
|
||||||
|
WeaponHandToFlyingEventTag = Tag.RequestTag(tagsManager, "events.weapon.handToFlying");
|
||||||
|
WeaponFlyingToHandEventTag = Tag.RequestTag(tagsManager, "events.weapon.flyingToHand");
|
||||||
|
WeaponPlantedToHandEventTag = Tag.RequestTag(tagsManager, "events.weapon.plantedToHand");
|
||||||
|
WeaponPlantedToFlyingEventTag = Tag.RequestTag(tagsManager, "events.weapon.plantedToFlying");
|
||||||
|
WeaponPlantedEventTag = Tag.RequestTag(tagsManager, "events.weapon.planted");
|
||||||
|
|
||||||
// Manage weapon flying tick raising ability
|
// WeaponInHandStatusTag = Tag.RequestTag(tagsManager, "status.weapon.inHand");
|
||||||
WeaponFlyingAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.flying");
|
// WeaponFlyingStatusTag = Tag.RequestTag(tagsManager, "status.weapon.flying");
|
||||||
|
// WeaponPlantedStatusTag = Tag.RequestTag(tagsManager, "status.weapon.planted");
|
||||||
|
|
||||||
|
WeaponFlyingAbilityTag = Tag.RequestTag(tagsManager,"abilities.weapon.flying");
|
||||||
|
|
||||||
|
List<AttributeSet> attributeSetList = [];
|
||||||
|
foreach (Node node in GetChildren())
|
||||||
|
{
|
||||||
|
if (node is ForgeAttributeSet attributeSetNode)
|
||||||
|
{
|
||||||
|
AttributeSet? attributeSet = attributeSetNode.GetAttributeSet();
|
||||||
|
|
||||||
|
if (attributeSet is not null)
|
||||||
|
{
|
||||||
|
attributeSetList.Add(attributeSet);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Attributes = new EntityAttributes([.. attributeSetList]);
|
||||||
|
|
||||||
|
Tags = new(BaseTags.GetTagContainer());
|
||||||
|
EffectsManager = new EffectsManager(this, cuesManager);
|
||||||
|
Abilities = new(this);
|
||||||
|
Events = new();
|
||||||
|
|
||||||
|
// TODO: Waiting on bug resolve
|
||||||
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
||||||
Events.Subscribe(WeaponStoppedFlyingEventTag, _ => { _weaponFlyingAbility.Cancel(); });
|
|
||||||
|
|
||||||
BodyEntered += OnThrownWeaponReachesGround;
|
BodyEntered += OnThrownWeaponReachesGround;
|
||||||
|
|
||||||
InHandState.StateExited += WeaponLeft;
|
InHandState.StateExited += WeaponLeft;
|
||||||
InHandState.StateEntered += WeaponBack;
|
InHandState.StateEntered += WeaponBack;
|
||||||
|
|
||||||
#region EventRaising
|
|
||||||
|
|
||||||
_handToFlying.Taken += () =>
|
_handToFlying.Taken += () =>
|
||||||
{
|
{
|
||||||
Events.Raise(new EventData
|
Events.Raise(new EventData
|
||||||
@@ -290,12 +237,24 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
#endregion
|
Events.Subscribe(WeaponStoppedFlyingEventTag, _ => { _weaponFlyingAbility.Cancel(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStartedFlyingAbilities = new ();
|
||||||
|
private Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponStoppedFlyingAbilities = new ();
|
||||||
|
private Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> _grantedWeaponFlyingTickAbilities = new ();
|
||||||
|
|
||||||
|
public enum WeaponEvent
|
||||||
|
{
|
||||||
|
StartedFlying,
|
||||||
|
StoppedFlying,
|
||||||
|
FlyingTick
|
||||||
|
}
|
||||||
|
|
||||||
public void GrantNewAbilityForEvent(WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
public void GrantNewAbilityForEvent(WeaponEvent forEvent, ForgeAbilityBehavior abilityBehavior)
|
||||||
{
|
{
|
||||||
var relevantMap = GetGrantedAbilities(forEvent);
|
var relevantMap = GetGrantedAbilities(forEvent);
|
||||||
|
GD.Print($"Granted {abilityBehavior} for {forEvent}");
|
||||||
if (relevantMap.ContainsKey(abilityBehavior)) return;
|
if (relevantMap.ContainsKey(abilityBehavior)) return;
|
||||||
|
|
||||||
var eventTagsMap = new Dictionary<WeaponEvent, Tag>
|
var eventTagsMap = new Dictionary<WeaponEvent, Tag>
|
||||||
@@ -337,24 +296,6 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
relevantMap.Remove(abilityBehavior);
|
relevantMap.Remove(abilityBehavior);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveAllEventAbilities()
|
|
||||||
{
|
|
||||||
foreach (var weaponEvent in Enum.GetValues<WeaponEvent>())
|
|
||||||
{
|
|
||||||
RemoveAbilitiesForEvent(weaponEvent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveAbilitiesForEvent(WeaponEvent weaponEvent)
|
|
||||||
{
|
|
||||||
var abilities = GetGrantedAbilities(weaponEvent);
|
|
||||||
foreach (var ability in abilities.Values)
|
|
||||||
{
|
|
||||||
EffectsManager.RemoveEffect(ability);
|
|
||||||
}
|
|
||||||
abilities.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> GetGrantedAbilities(WeaponEvent forEvent)
|
public Dictionary<ForgeAbilityBehavior, ActiveEffectHandle> GetGrantedAbilities(WeaponEvent forEvent)
|
||||||
{
|
{
|
||||||
var abilitiesMap = new Dictionary<WeaponEvent, Dictionary<ForgeAbilityBehavior, ActiveEffectHandle>>
|
var abilitiesMap = new Dictionary<WeaponEvent, Dictionary<ForgeAbilityBehavior, ActiveEffectHandle>>
|
||||||
@@ -418,10 +359,10 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
if (enemy is IForgeEntity victim) _plantedEntity = victim;
|
if (enemy is IForgeEntity victim) _plantedEntity = victim;
|
||||||
else _plantedEntity = null;
|
else _plantedEntity = null;
|
||||||
|
|
||||||
// if (enemy is IDamageable damageable)
|
if (enemy is IDamageable damageable)
|
||||||
// {
|
{
|
||||||
// damageable.TakeDamage(new DamageRecord(GlobalPosition, RDamage));
|
damageable.TakeDamage(new DamageRecord(GlobalPosition, RDamage));
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RethrowWeapon()
|
public void RethrowWeapon()
|
||||||
@@ -480,7 +421,6 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
|
|
||||||
public override void _Process(double delta)
|
public override void _Process(double delta)
|
||||||
{
|
{
|
||||||
Abilities.UpdateAbilities(delta);
|
|
||||||
EffectsManager.UpdateEffects(delta);
|
EffectsManager.UpdateEffects(delta);
|
||||||
|
|
||||||
if (!FlyingState.Active) return;
|
if (!FlyingState.Active) return;
|
||||||
|
|||||||
@@ -2,21 +2,26 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
|
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_l1xlx"]
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_l1xlx"]
|
||||||
|
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="2_m0v1h"]
|
||||||
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_3xjpi"]
|
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_3xjpi"]
|
||||||
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
|
[ext_resource type="Script" uid="uid://couw105c3bde4" path="res://addons/godot_state_charts/state_chart.gd" id="3_5owyf"]
|
||||||
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
|
[ext_resource type="ArrayMesh" uid="uid://cho5fixitrbds" path="res://assets/meshes/swords/resources/sword23.tres" id="3_svc06"]
|
||||||
[ext_resource type="Resource" uid="uid://btnnpqann3ktp" path="res://forge/resources/ability_datas/weapon_flying_tick_ability.tres" id="4_7bruw"]
|
[ext_resource type="Resource" uid="uid://btnnpqann3ktp" path="res://scenes/player_controller/resources/forge/weapon_flying_tick_ability.tres" id="4_7bruw"]
|
||||||
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_q6xv7"]
|
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_q6xv7"]
|
||||||
[ext_resource type="Script" uid="uid://jk2jm1g6q853" path="res://addons/godot_state_charts/compound_state.gd" id="4_svc06"]
|
[ext_resource type="Script" uid="uid://jk2jm1g6q853" path="res://addons/godot_state_charts/compound_state.gd" id="4_svc06"]
|
||||||
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="5_7bruw"]
|
|
||||||
[ext_resource type="Script" uid="uid://cytafq8i1y8qm" path="res://addons/godot_state_charts/atomic_state.gd" id="5_m0v1h"]
|
[ext_resource type="Script" uid="uid://cytafq8i1y8qm" path="res://addons/godot_state_charts/atomic_state.gd" id="5_m0v1h"]
|
||||||
[ext_resource type="Script" uid="uid://cf1nsco3w0mf6" path="res://addons/godot_state_charts/transition.gd" id="6_jpdh0"]
|
[ext_resource type="Script" uid="uid://cf1nsco3w0mf6" path="res://addons/godot_state_charts/transition.gd" id="6_jpdh0"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_7bruw"]
|
[sub_resource type="Resource" id="Resource_06gln"]
|
||||||
script = ExtResource("2_l1xlx")
|
script = ExtResource("2_l1xlx")
|
||||||
ContainerTags = Array[String](["weapon"])
|
ContainerTags = Array[String](["weapon"])
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_jpdh0"]
|
||||||
|
script = ExtResource("2_m0v1h")
|
||||||
|
DamageDealt = 2.0
|
||||||
|
metadata/_custom_type_script = "uid://jitubgv6judn"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_pgbtr"]
|
[sub_resource type="Resource" id="Resource_pgbtr"]
|
||||||
script = ExtResource("4_q6xv7")
|
script = ExtResource("4_q6xv7")
|
||||||
Default = 1
|
Default = 1
|
||||||
@@ -58,14 +63,11 @@ continuous_cd = true
|
|||||||
contact_monitor = true
|
contact_monitor = true
|
||||||
max_contacts_reported = 1
|
max_contacts_reported = 1
|
||||||
script = ExtResource("1_csqwk")
|
script = ExtResource("1_csqwk")
|
||||||
|
BaseTags = SubResource("Resource_06gln")
|
||||||
FlyingTickAbility = ExtResource("4_7bruw")
|
FlyingTickAbility = ExtResource("4_7bruw")
|
||||||
|
RDamage = SubResource("Resource_jpdh0")
|
||||||
|
|
||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
|
[node name="WeaponAttributeSet" type="Node" parent="." unique_id=14845649]
|
||||||
script = ExtResource("5_7bruw")
|
|
||||||
BaseTags = SubResource("Resource_7bruw")
|
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
|
||||||
|
|
||||||
[node name="WeaponAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=14845649]
|
|
||||||
script = ExtResource("3_3xjpi")
|
script = ExtResource("3_3xjpi")
|
||||||
AttributeSetClass = "WeaponAttributeSet"
|
AttributeSetClass = "WeaponAttributeSet"
|
||||||
InitialAttributeValues = Dictionary[String, ExtResource("4_q6xv7")]({
|
InitialAttributeValues = Dictionary[String, ExtResource("4_q6xv7")]({
|
||||||
|
|||||||
@@ -1,22 +1,16 @@
|
|||||||
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://dccuj66egxfwh"]
|
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://dccuj66egxfwh"]
|
||||||
|
|
||||||
[ext_resource type="Resource" uid="uid://c4ea6ktafqe0r" path="res://forge/resources/effect_datas/temp_invincibility.tres" id="1_ent4t"]
|
[ext_resource type="Resource" uid="uid://crgwob8t8yysq" path="res://scenes/player_controller/resources/forge/instant_end_behavior.tres" id="1_x7d0c"]
|
||||||
[ext_resource type="Script" uid="uid://c7s5v7ii4nujg" path="res://forge/abilities/ForgeInstantEndBehavior.cs" id="2_ent4t"]
|
|
||||||
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_prg0a"]
|
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_prg0a"]
|
||||||
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="3_k72m0"]
|
[ext_resource type="Script" uid="uid://dngf30hxy5go4" path="res://addons/forge/resources/components/ModifierTags.cs" id="3_k72m0"]
|
||||||
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="4_5fdax"]
|
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="4_5fdax"]
|
||||||
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="5_5qmmj"]
|
[ext_resource type="Script" uid="uid://2gm1hdhi8u08" path="res://addons/forge/resources/magnitudes/ForgeModifierMagnitude.cs" id="5_5qmmj"]
|
||||||
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="6_yi0bg"]
|
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="6_yi0bg"]
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="7_0rp6y"]
|
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="7_0rp6y"]
|
||||||
[ext_resource type="Resource" uid="uid://dn7b8frkoxpxr" path="res://forge/resources/cues/player_mana_changed_cue.tres" id="8_0olwd"]
|
[ext_resource type="Resource" uid="uid://dn7b8frkoxpxr" path="res://scenes/player_controller/resources/forge/player_mana_changed_cue.tres" id="8_0olwd"]
|
||||||
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="9_wluo0"]
|
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="9_wluo0"]
|
||||||
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="10_2sq4o"]
|
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="10_2sq4o"]
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_xltxv"]
|
|
||||||
script = ExtResource("2_ent4t")
|
|
||||||
OptionalEffectData = ExtResource("1_ent4t")
|
|
||||||
metadata/_custom_type_script = "uid://c7s5v7ii4nujg"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_h116a"]
|
[sub_resource type="Resource" id="Resource_h116a"]
|
||||||
script = ExtResource("2_prg0a")
|
script = ExtResource("2_prg0a")
|
||||||
ContainerTags = Array[String](["cooldown.empoweredaction"])
|
ContainerTags = Array[String](["cooldown.empoweredaction"])
|
||||||
@@ -84,42 +78,6 @@ InitialStack = SubResource("Resource_lmnuh")
|
|||||||
Cues = []
|
Cues = []
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_3usj8"]
|
|
||||||
script = ExtResource("4_5fdax")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_5q60v"]
|
|
||||||
script = ExtResource("4_5fdax")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_eo5h0"]
|
|
||||||
script = ExtResource("4_5fdax")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_c7uae"]
|
|
||||||
script = ExtResource("4_5fdax")
|
|
||||||
BaseValue = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_7d1b0"]
|
|
||||||
script = ExtResource("4_5fdax")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_jiq0x"]
|
|
||||||
script = ExtResource("4_5fdax")
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_kpieu"]
|
|
||||||
script = ExtResource("4_5fdax")
|
|
||||||
BaseValue = 0.3
|
|
||||||
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_rwc4g"]
|
|
||||||
script = ExtResource("5_5qmmj")
|
|
||||||
ScalableFloat = SubResource("Resource_kpieu")
|
|
||||||
Coefficient = SubResource("Resource_c7uae")
|
|
||||||
PreMultiplyAdditiveValue = SubResource("Resource_jiq0x")
|
|
||||||
PostMultiplyAdditiveValue = SubResource("Resource_7d1b0")
|
|
||||||
CalculatorCoefficient = SubResource("Resource_3usj8")
|
|
||||||
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_eo5h0")
|
|
||||||
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_5q60v")
|
|
||||||
metadata/_custom_type_script = "uid://2gm1hdhi8u08"
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_8dsdw"]
|
[sub_resource type="Resource" id="Resource_8dsdw"]
|
||||||
script = ExtResource("6_yi0bg")
|
script = ExtResource("6_yi0bg")
|
||||||
BaseValue = 1
|
BaseValue = 1
|
||||||
@@ -171,7 +129,6 @@ Name = "Empowered Action Cost"
|
|||||||
Modifiers = Array[Object]([SubResource("Resource_dhni4")])
|
Modifiers = Array[Object]([SubResource("Resource_dhni4")])
|
||||||
Components = []
|
Components = []
|
||||||
Executions = []
|
Executions = []
|
||||||
Duration = SubResource("Resource_rwc4g")
|
|
||||||
StackLimit = SubResource("Resource_w5rmc")
|
StackLimit = SubResource("Resource_w5rmc")
|
||||||
InitialStack = SubResource("Resource_8dsdw")
|
InitialStack = SubResource("Resource_8dsdw")
|
||||||
Cues = Array[Object]([ExtResource("8_0olwd")])
|
Cues = Array[Object]([ExtResource("8_0olwd")])
|
||||||
@@ -182,5 +139,5 @@ script = ExtResource("10_2sq4o")
|
|||||||
Name = "Empowered Action"
|
Name = "Empowered Action"
|
||||||
CooldownEffects = [SubResource("Resource_egh2b")]
|
CooldownEffects = [SubResource("Resource_egh2b")]
|
||||||
CostEffect = SubResource("Resource_mtef8")
|
CostEffect = SubResource("Resource_mtef8")
|
||||||
AbilityBehavior = SubResource("Resource_xltxv")
|
AbilityBehavior = ExtResource("1_x7d0c")
|
||||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user