Compare commits

...

4 Commits

Author SHA1 Message Date
a0e99a959f parrying projectiles
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 28s
Create tag and build when new code gets to main / Export (push) Successful in 6m44s
2026-05-14 16:11:22 +02:00
0cd942d90e homing projectiles 2026-05-10 12:26:43 +02:00
150e007b22 basic projectiles
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 26s
Create tag and build when new code gets to main / Export (push) Successful in 5m9s
2026-05-07 14:53:30 +02:00
01a2e7582b enemy grant hit ability + prep projectiles 2026-05-06 19:55:05 +02:00
33 changed files with 1035 additions and 109 deletions

View File

@@ -44,6 +44,10 @@ public partial class ForgeEntityNode : Node3D, IForgeEntity
public required Variables SharedVariables { get; set; }
public void OnReady()
{
}
public void OnResolved()
{
BaseTags ??= new ForgeTagContainer();
Tags = new EntityTags(BaseTags.GetTagContainer());
@@ -53,10 +57,7 @@ public partial class ForgeEntityNode : Node3D, IForgeEntity
SharedVariables = new Variables();
SharedVariableDefinitions?.PopulateVariables(SharedVariables);
}
public void OnResolved()
{
EffectsManager = new EffectsManager(this, CuesManager);
var effectApplier = new EffectApplier(this);
effectApplier.ApplyEffects(this, this, this);

View File

@@ -0,0 +1,60 @@
using Gamesmiths.Forge.Abilities;
using Gamesmiths.Forge.Core;
using Gamesmiths.Forge.Effects;
using Gamesmiths.Forge.Godot.Resources;
using Gamesmiths.Forge.Godot.Resources.Abilities;
using Godot;
using Movementtests.interfaces;
using Movementtests.tools;
namespace Movementtests.forge.abilities;
public record OnProjectileSpawned(Vector3 Direction, float SpeedMultiplier, Vector3? SpawnOffset = null, uint? CollisionOverride = null);
public class SpawnProjectileBehavior(PackedScene projectileScene) : IAbilityBehavior<OnProjectileSpawned>
{
public void OnStarted(AbilityBehaviorContext context, OnProjectileSpawned data)
{
if (context.Source is not Node3D source || projectileScene.Instantiate() is not Projectile projectile)
{
context.InstanceHandle.End();
return;
}
source.GetTree().GetCurrentScene().AddChild(projectile);
// Computing projectile properties
var offset = data.SpawnOffset ?? Vector3.Zero;
var startPos = source is ITargetable targetable ? targetable.GetTargetGlobalPosition() : source.GlobalPosition;
var target = context.Target as Node3D;
var magnitude = context.Magnitude != 0 ? context.Magnitude : 1;
var impulse = data.Direction * data.SpeedMultiplier * magnitude;
var collisionOverride = data.CollisionOverride ?? projectile.CollisionMask;
GD.Print(impulse);
// Setting up projectile
projectile.GlobalPosition = startPos + offset;
projectile.Target = target;
projectile.ImpulseDirection = impulse;
projectile.CollisionMask = collisionOverride;
if (projectile is ISpawnable spawnable) spawnable.Init();
context.AbilityHandle.CommitAbility();
context.InstanceHandle.End();
}
public void OnEnded(AbilityBehaviorContext context)
{
}
}
[Tool]
[GlobalClass]
public partial class ForgeSpawnProjectileBehavior : ForgeAbilityBehavior
{
[Export] public required PackedScene Projectile { get; set; }
public override IAbilityBehavior GetBehavior() => new SpawnProjectileBehavior(Projectile);
}

View File

@@ -0,0 +1 @@
uid://dxtjifb8hv8k4

View File

@@ -4,4 +4,4 @@
[resource]
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", "events.weapon.plantedtick", "events.weapon.unplanted", "abilities.weapon.planted"])
RegisteredTags = Array[String](["character.player", "character.enemy", "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", "events.weapon.plantedtick", "events.weapon.unplanted", "abilities.weapon.planted", "events.enemy.try_hit", "events.enemy.launch_projectile", "objects.projectile", "objects.weapon", "events.enemy.request_projectile", "events.player.parry"])

View File

@@ -11,6 +11,7 @@
[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="Resource" uid="uid://csh8jcxtrs11k" path="res://forge/resources/tag_containers/on_enemy_try_hit.tres" id="12_f6jpb"]
[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"]
@@ -154,5 +155,7 @@ script = ExtResource("13_4nn3y")
Name = "Hit"
CooldownEffects = [SubResource("Resource_0gdnn")]
AbilityBehavior = SubResource("Resource_m0osh")
TriggerSource = 1
TriggerTag = ExtResource("12_f6jpb")
ActivationBlockedTags = SubResource("Resource_msmv1")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"

View File

@@ -0,0 +1,23 @@
[gd_resource type="Resource" script_class="ForgeAbilityData" format=3 uid="uid://ckfbi6lu255ep"]
[ext_resource type="Texture2D" uid="uid://g0u88alm6hcb" path="res://assets/ui/IconGodotNode/node/icon_bullet.png" id="1_hixal"]
[ext_resource type="PackedScene" uid="uid://bhp6qunnwhncf" path="res://scenes/projectile/Projectile.tscn" id="2_ljwqp"]
[ext_resource type="Script" uid="uid://dxtjifb8hv8k4" path="res://forge/abilities/ForgeSpawnProjectileBehavior.cs" id="3_urund"]
[ext_resource type="Resource" uid="uid://bkr1xfokymvp4" path="res://forge/resources/tag_containers/on_enemy_lauch_project.tres" id="4_5yymv"]
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="5_xbj7n"]
[sub_resource type="Resource" id="Resource_idpl5"]
script = ExtResource("3_urund")
Projectile = ExtResource("2_ljwqp")
Name = "Spawn projectile"
Icon = ExtResource("1_hixal")
metadata/_custom_type_script = "uid://dxtjifb8hv8k4"
[resource]
script = ExtResource("5_xbj7n")
Name = "Launch projectile"
CooldownEffects = []
AbilityBehavior = SubResource("Resource_idpl5")
TriggerSource = 1
TriggerTag = ExtResource("4_5yymv")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"

View File

@@ -30,8 +30,8 @@ BaseValue = 1
[sub_resource type="Resource" id="Resource_hgeae"]
script = ExtResource("4_4348y")
Name = "Raise Planted Tick Periodically"
Modifiers = null
Components = null
Modifiers = []
Components = []
Executions = Array[Object]([SubResource("Resource_l3tir")])
DurationType = 1
HasPeriodicApplication = true
@@ -39,7 +39,7 @@ Period = SubResource("Resource_cykp3")
ExecuteOnApplication = true
StackLimit = SubResource("Resource_rvogu")
InitialStack = SubResource("Resource_yc0gp")
Cues = null
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="Resource" id="Resource_jiqxq"]

View File

@@ -6,5 +6,5 @@
[resource]
script = ExtResource("2_f5qgs")
EffectData = ExtResource("1_hlq5f")
Name = "Planted tick application"
Name = "Flying tick application"
metadata/_custom_type_script = "uid://cl5hudinl1rex"

View File

@@ -20,7 +20,7 @@ BaseValue = 1
[resource]
script = ExtResource("4_7ma6b")
Name = "Call Planted Tick Event Periodically"
Name = "Call Flying Tick Event Periodically"
Modifiers = []
Components = []
Executions = Array[Object]([ExtResource("1_cd13a")])

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="ForgeTag" format=3 uid="uid://bkr1xfokymvp4"]
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="1_ux16b"]
[resource]
script = ExtResource("1_ux16b")
Tag = "events.enemy.launch_projectile"
metadata/_custom_type_script = "uid://dpakv7agvir6y"

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="ForgeTag" format=3 uid="uid://csh8jcxtrs11k"]
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="1_3ab6s"]
[resource]
script = ExtResource("1_3ab6s")
Tag = "events.enemy.try_hit"
metadata/_custom_type_script = "uid://dpakv7agvir6y"

View File

@@ -50,7 +50,6 @@ EnemyToSpawn = ExtResource("5_iq67o")
MovementInputs = ExtResource("6_l44fp")
Target = NodePath("../Player")
SpawnInterval = 5.0
IsActiveOnStart = false
[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)

View File

@@ -6,9 +6,7 @@
[ext_resource type="PackedScene" uid="uid://dxt0e2ugmttqq" path="res://scenes/enemies/grounded_enemy/grounded_enemy.tscn" id="4_1cb4f"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="5_vuwkd"]
[ext_resource type="PackedScene" uid="uid://cmlud1hwkd6sv" path="res://scenes/enemies/flying_enemy/flying_enemy.tscn" id="7_vkl5g"]
[ext_resource type="PackedScene" uid="uid://c305mfrtumcyq" path="res://scenes/spawners/spawner.tscn" id="8_1upfw"]
[ext_resource type="Resource" uid="uid://bqq6uukbdfysr" path="res://scenes/enemies/grounded_enemy/grounded_enemy_movement.tres" id="9_ynw2y"]
[ext_resource type="Resource" uid="uid://bwqjaom4k7rc3" path="res://scenes/enemies/flying_enemy/flying_enemy_movement.tres" id="11_luuoi"]
[ext_resource type="PackedScene" uid="uid://dx3y8sjftqk8f" path="res://scenes/enemies/projectile_enemy/projectile_enemy.tscn" id="10_mm5sa"]
[sub_resource type="Resource" id="Resource_xixm3"]
script = ExtResource("5_vuwkd")
@@ -110,19 +108,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 7, -16)
Target = NodePath("../Player")
RMovement = SubResource("Resource_xixm3")
[node name="GroundedSpawner" parent="." index="14" unique_id=557145011 node_paths=PackedStringArray("Target") instance=ExtResource("8_1upfw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 2.5, -15)
EnemyToSpawn = ExtResource("4_1cb4f")
MovementInputs = ExtResource("9_ynw2y")
[node name="ProjectileEnemy" parent="." index="14" unique_id=1747444936 node_paths=PackedStringArray("Target") instance=ExtResource("10_mm5sa")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.0893264, -1.9073486e-06, -17.405575)
Target = NodePath("../Player")
IsActiveOnStart = false
[node name="FlyingSpawner" parent="." index="15" unique_id=974076606 node_paths=PackedStringArray("Target") instance=ExtResource("8_1upfw")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 11, -14)
EnemyToSpawn = ExtResource("7_vkl5g")
MovementInputs = ExtResource("11_luuoi")
Target = NodePath("../Player")
IsActiveOnStart = false
[node name="Player" parent="." index="17" unique_id=1309399929]
[node name="Player" parent="." index="16" unique_id=1309399929]
transform = Transform3D(0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994, 2, 1.5, 9.5)

View File

@@ -8,10 +8,12 @@ using Gamesmiths.Forge.Core;
using Gamesmiths.Forge.Cues;
using Gamesmiths.Forge.Effects;
using Gamesmiths.Forge.Events;
using Gamesmiths.Forge.Godot.Resources;
using Gamesmiths.Forge.Godot.Resources.Abilities;
using Gamesmiths.Forge.Statescript;
using Gamesmiths.Forge.Tags;
using Godot;
using Movementtests.forge.abilities;
using Movementtests.interfaces;
using Movementtests.scenes.components.knockback;
using Movementtests.systems;
@@ -44,7 +46,6 @@ public partial class Enemy : CharacterBody3D,
// Public export components
[Export]
public Node3D? Target { get; set; }
[Export] public required ForgeAbilityData HitAbility { get; set; }
[Export]
public float EnemyHeight { get; set; } = 1f;
[Export]
@@ -108,7 +109,6 @@ public partial class Enemy : CharacterBody3D,
public void OnReady()
{
Init();
SetupSignals();
}
public void Init()
@@ -117,8 +117,6 @@ public partial class Enemy : CharacterBody3D,
CMovement.RMovement = RMovement;
CKnockback = GetNode<Node>("CKnockback") as IKnockbackable ?? throw new Exception("Knockback component not found");
CKnockback.RKnockback = RKnockback;
_hitAbilityHandle = Abilities.GrantAbilityPermanently(HitAbility.GetAbilityData(), 1, LevelComparison.None, this);
}
public void OnResolved()
@@ -127,25 +125,34 @@ public partial class Enemy : CharacterBody3D,
HealthBarWrapper.ResourceBar.Init(healthAttribute);
healthAttribute.OnValueChanged += OnHealthChanged;
Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.hit"),
data => {GD.Print("Hit!");});
// Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.hit"), data => {GD.Print("Hit!");});
Events.Subscribe<DamageDone>(Tag.RequestTag(TagsManager, "events.combat.damage"), OnDamageReceived);
Events.Subscribe<KnockbackDone>(Tag.RequestTag(TagsManager, "events.combat.knockback_received"), OnKnockbackReceived);
Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.death"), OnDeath);
Events.Subscribe(Tag.RequestTag(TagsManager, "events.enemy.request_projectile"), ProjectileTokenRequested);
}
private void ProjectileTokenRequested(EventData obj)
{
// TODO: replace with token manager
Events.Raise(new EventData<OnProjectileSpawned>
{
EventTags = Tag.RequestTag(TagsManager, "events.enemy.launch_projectile").GetSingleTagContainer()!,
Source = this,
Target = Target as IForgeEntity,
Payload = new OnProjectileSpawned(Vector3.Up, 20, Vector3.Up)
});
}
public void OnKnockbackReceived(EventData<KnockbackDone> data)
{
RegisterKnockback(new KnockbackRecord(data.Payload.knockbackDirection, data.EventMagnitude));
}
public void SetupSignals()
{
}
public override void _PhysicsProcess(double delta)
{
// Only trigger gameplay related effects on specific frames
// Only trigger gameplay-related effects on specific frames
if(Engine.GetPhysicsFrames() % 10 == 0) ProcessGameplay(delta);
var targetPlanar = new Vector3(Target.GlobalPosition.X, GlobalPosition.Y, Target.GlobalPosition.Z);
@@ -165,16 +172,18 @@ public partial class Enemy : CharacterBody3D,
public void ProcessGameplay(double delta)
{
if (_hitAbilityHandle == null) return;
// if (_hitAbilityHandle == null) return;
var bodies = DamageBox.GetOverlappingBodies();
foreach (var body in bodies)
{
if (body is not IForgeEntity forgeEntity) continue;
var canActivate = _hitAbilityHandle.CanActivate(out var _);
if (!canActivate) return;
_hitAbilityHandle.Activate(out var _, forgeEntity);
Events.Raise(new EventData
{
EventTags = Tag.RequestTag(TagsManager, "events.enemy.try_hit").GetSingleTagContainer()!,
Source = this,
Target = forgeEntity
});
}
}

View File

@@ -10,8 +10,13 @@
[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://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="9_46wn3"]
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_dejyg"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="10_oj1ws"]
[ext_resource type="Resource" uid="uid://dt7a1io5o0b8s" path="res://scenes/enemies/flying_enemy/flying_enemy_knockback.tres" id="11_mpa2u"]
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="11_vfi88"]
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="12_hf6k8"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="13_m4ble"]
[sub_resource type="Resource" id="Resource_wxisp"]
script = ExtResource("8_46wn3")
@@ -25,7 +30,41 @@ Default = 1
Min = 1
Max = 100
[sub_resource type="ViewportTexture" id="ViewportTexture_ykkxn"]
[sub_resource type="Resource" id="Resource_t0vud"]
script = ExtResource("10_oj1ws")
BaseValue = 1
[sub_resource type="Resource" id="Resource_ecuuy"]
script = ExtResource("11_vfi88")
AbilityData = ExtResource("2_46wn3")
AbilityLevel = SubResource("Resource_t0vud")
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_sk2ji"]
script = ExtResource("12_hf6k8")
GrantAbilityConfigs = [SubResource("Resource_ecuuy")]
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
[sub_resource type="Resource" id="Resource_8x1id"]
script = ExtResource("10_oj1ws")
BaseValue = 1
[sub_resource type="Resource" id="Resource_66opa"]
script = ExtResource("10_oj1ws")
BaseValue = 1
[sub_resource type="Resource" id="Resource_7y1tn"]
script = ExtResource("13_m4ble")
Name = "GrantAbilities"
Modifiers = []
Components = Array[Object]([SubResource("Resource_sk2ji")])
Executions = []
StackLimit = SubResource("Resource_66opa")
InitialStack = SubResource("Resource_8x1id")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="ViewportTexture" id="ViewportTexture_4oy82"]
viewport_path = NodePath("SubViewport")
[sub_resource type="Resource" id="Resource_on7rt"]
@@ -57,7 +96,6 @@ collision_layer = 16
collision_mask = 273
motion_mode = 1
script = ExtResource("1_q8l7o")
HitAbility = ExtResource("2_46wn3")
EnemyHeight = 0.5
RKnockback = ExtResource("11_mpa2u")
RMovement = ExtResource("4_dejyg")
@@ -96,9 +134,14 @@ InitialAttributeValues = Dictionary[String, ExtResource("8_46wn3")]({
})
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
[node name="GrantEffect" type="Node" parent="ForgeEntityNode" unique_id=169684942]
script = ExtResource("9_46wn3")
EffectData = SubResource("Resource_7y1tn")
metadata/_custom_type_script = "uid://dps0oef50noil"
[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)
texture = SubResource("ViewportTexture_ykkxn")
texture = SubResource("ViewportTexture_4oy82")
[node name="CMovement" parent="." unique_id=1699571730 instance=ExtResource("7_vaeds")]
RMovement = SubResource("Resource_on7rt")

View File

@@ -1,8 +0,0 @@
[gd_resource type="Resource" script_class="RDamage" format=3 uid="uid://dgo65k2ceqfvy"]
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="1_h6law"]
[resource]
script = ExtResource("1_h6law")
DamageDealt = 1.0
metadata/_custom_type_script = "uid://jitubgv6judn"

View File

@@ -1,8 +0,0 @@
[gd_resource type="Resource" script_class="RHealth" format=3 uid="uid://dg1xbjhyhgnnk"]
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="1_jht15"]
[resource]
script = ExtResource("1_jht15")
StartingHealth = 5.0
metadata/_custom_type_script = "uid://baiapod3csndf"

View File

@@ -10,8 +10,13 @@
[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://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="9_4jf2q"]
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="10_jqqi6"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="10_ub34u"]
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="11_0mf3g"]
[ext_resource type="Resource" uid="uid://cektf6waf4s04" path="res://scenes/enemies/grounded_enemy/grounded_enemy_knockback.tres" id="11_8k3xb"]
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="12_v6xmd"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="13_jryek"]
[sub_resource type="Resource" id="Resource_x50ya"]
script = ExtResource("7_x50ya")
@@ -25,7 +30,41 @@ Default = 1
Min = 1
Max = 100
[sub_resource type="ViewportTexture" id="ViewportTexture_18xwy"]
[sub_resource type="Resource" id="Resource_msmv1"]
script = ExtResource("10_ub34u")
BaseValue = 1
[sub_resource type="Resource" id="Resource_m0osh"]
script = ExtResource("11_0mf3g")
AbilityData = ExtResource("6_4jf2q")
AbilityLevel = SubResource("Resource_msmv1")
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_3gkmr"]
script = ExtResource("12_v6xmd")
GrantAbilityConfigs = [SubResource("Resource_m0osh")]
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
[sub_resource type="Resource" id="Resource_oo2a1"]
script = ExtResource("10_ub34u")
BaseValue = 1
[sub_resource type="Resource" id="Resource_q86ag"]
script = ExtResource("10_ub34u")
BaseValue = 1
[sub_resource type="Resource" id="Resource_5eesh"]
script = ExtResource("13_jryek")
Name = "Grant abilities"
Modifiers = null
Components = Array[Object]([SubResource("Resource_3gkmr")])
Executions = null
StackLimit = SubResource("Resource_q86ag")
InitialStack = SubResource("Resource_oo2a1")
Cues = null
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="ViewportTexture" id="ViewportTexture_5lf6m"]
viewport_path = NodePath("SubViewport")
[sub_resource type="Resource" id="Resource_6d4gl"]
@@ -95,9 +134,14 @@ InitialAttributeValues = Dictionary[String, ExtResource("7_x50ya")]({
})
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
[node name="GrantEffect" type="Node" parent="ForgeEntityNode" unique_id=462009360]
script = ExtResource("9_4jf2q")
EffectData = SubResource("Resource_5eesh")
metadata/_custom_type_script = "uid://dps0oef50noil"
[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)
texture = SubResource("ViewportTexture_18xwy")
texture = SubResource("ViewportTexture_5lf6m")
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("7_qyswd")]
RMovement = SubResource("Resource_6d4gl")

View File

@@ -1,8 +0,0 @@
[gd_resource type="Resource" script_class="RDamage" format=3 uid="uid://otfc2snh8umc"]
[ext_resource type="Script" uid="uid://jitubgv6judn" path="res://scenes/components/damage/RDamage.cs" id="1_y415a"]
[resource]
script = ExtResource("1_y415a")
DamageDealt = 2.0
metadata/_custom_type_script = "uid://jitubgv6judn"

View File

@@ -1,8 +0,0 @@
[gd_resource type="Resource" script_class="RHealth" format=3 uid="uid://bohbojc68j7y1"]
[ext_resource type="Script" uid="uid://baiapod3csndf" path="res://scenes/components/health/RHealth.cs" id="1_h6jgd"]
[resource]
script = ExtResource("1_h6jgd")
StartingHealth = 20.0
metadata/_custom_type_script = "uid://baiapod3csndf"

View File

@@ -0,0 +1,281 @@
[gd_scene format=3 uid="uid://dx3y8sjftqk8f"]
[ext_resource type="Script" uid="uid://bn7sc6id7n166" path="res://scenes/enemies/Enemy.cs" id="1_ha67n"]
[ext_resource type="Resource" uid="uid://qpdw62ubaclc" path="res://forge/resources/ability_datas/grounded_enemy_hit.tres" id="2_nbf6l"]
[ext_resource type="Resource" uid="uid://ckfbi6lu255ep" path="res://forge/resources/ability_datas/lauche_projectile.tres" id="2_rlvdp"]
[ext_resource type="Resource" uid="uid://cektf6waf4s04" path="res://scenes/enemies/grounded_enemy/grounded_enemy_knockback.tres" id="3_gciy3"]
[ext_resource type="Resource" uid="uid://c3ys18t0tkbq8" path="res://scenes/enemies/projectile_enemy/projectile_enemy_knockback.tres" id="3_ymgar"]
[ext_resource type="Resource" uid="uid://rchgikroifmg" path="res://scenes/enemies/projectile_enemy/projectile_enemy_movement.tres" id="4_0f52b"]
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="5_ya0fp"]
[ext_resource type="Resource" uid="uid://bocsykxbh8l0g" path="res://forge/resources/tag_containers/enemy_base_tags.tres" id="6_ttkdf"]
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="7_2triq"]
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="8_ti0v2"]
[ext_resource type="PackedScene" uid="uid://bwx2um43k0ou4" path="res://scenes/components/health/CHealthbar.tscn" id="9_6ew2r"]
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="9_xdj1j"]
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="10_b62xo"]
[ext_resource type="PackedScene" uid="uid://dbr7ioio158ew" path="res://scenes/components/movement/CGroundedMovement.tscn" id="10_d3cra"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="11_f6vvi"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="11_fi4yv"]
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="12_7k8no"]
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="12_ssnfc"]
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="13_5ac6t"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="14_rlvdp"]
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="17_xabdf"]
[ext_resource type="Script" uid="uid://br7ut4lbau66w" path="res://forge/calculators/ForgeRaiseEventTagExecution.cs" id="18_ufku3"]
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="19_hgi6f"]
[ext_resource type="Script" uid="uid://cl5hudinl1rex" path="res://forge/abilities/ForgeEffectApplicationBehavior.cs" id="21_17f1o"]
[sub_resource type="Resource" id="Resource_x50ya"]
script = ExtResource("8_ti0v2")
Default = 1
Min = 1
Max = 100
[sub_resource type="Resource" id="Resource_yk4hc"]
script = ExtResource("8_ti0v2")
Default = 1
Min = 1
Max = 100
[sub_resource type="Resource" id="Resource_55uge"]
script = ExtResource("11_f6vvi")
BaseValue = 1
[sub_resource type="Resource" id="Resource_xabdf"]
script = ExtResource("12_ssnfc")
AbilityData = ExtResource("2_nbf6l")
AbilityLevel = SubResource("Resource_55uge")
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_5xe4r"]
script = ExtResource("17_xabdf")
ContainerTags = Array[String](["events.enemy.request_projectile"])
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
[sub_resource type="Resource" id="Resource_5hctm"]
script = ExtResource("18_ufku3")
EventTags = SubResource("Resource_5xe4r")
metadata/_custom_type_script = "uid://br7ut4lbau66w"
[sub_resource type="Resource" id="Resource_xq5v1"]
script = ExtResource("11_f6vvi")
BaseValue = 1
[sub_resource type="Resource" id="Resource_s7hsu"]
script = ExtResource("19_hgi6f")
BaseValue = 1.0
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
[sub_resource type="Resource" id="Resource_xuuuu"]
script = ExtResource("11_f6vvi")
BaseValue = 1
[sub_resource type="Resource" id="Resource_nr327"]
script = ExtResource("14_rlvdp")
Name = "Raise request projectile event periodically"
Modifiers = []
Components = []
Executions = Array[Object]([SubResource("Resource_5hctm")])
DurationType = 1
HasPeriodicApplication = true
Period = SubResource("Resource_s7hsu")
StackLimit = SubResource("Resource_xuuuu")
InitialStack = SubResource("Resource_xq5v1")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="Resource" id="Resource_ov8t2"]
script = ExtResource("21_17f1o")
EffectData = SubResource("Resource_nr327")
metadata/_custom_type_script = "uid://cl5hudinl1rex"
[sub_resource type="Resource" id="Resource_gg1oy"]
script = ExtResource("10_b62xo")
Name = "Request projectile token event raise"
CooldownEffects = []
AbilityBehavior = SubResource("Resource_ov8t2")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
[sub_resource type="Resource" id="Resource_r40oc"]
script = ExtResource("11_f6vvi")
BaseValue = 1
[sub_resource type="Resource" id="Resource_nu2lf"]
script = ExtResource("12_ssnfc")
AbilityData = SubResource("Resource_gg1oy")
AbilityLevel = SubResource("Resource_r40oc")
TryActivateOnGrant = true
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_rlvdp"]
script = ExtResource("11_f6vvi")
BaseValue = 1
[sub_resource type="Resource" id="Resource_ei7hs"]
script = ExtResource("12_ssnfc")
AbilityData = ExtResource("2_rlvdp")
AbilityLevel = SubResource("Resource_rlvdp")
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_ufku3"]
script = ExtResource("13_5ac6t")
GrantAbilityConfigs = [SubResource("Resource_xabdf"), SubResource("Resource_nu2lf"), SubResource("Resource_ei7hs")]
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
[sub_resource type="Resource" id="Resource_hgi6f"]
script = ExtResource("11_f6vvi")
BaseValue = 1
[sub_resource type="Resource" id="Resource_17f1o"]
script = ExtResource("11_f6vvi")
BaseValue = 1
[sub_resource type="Resource" id="Resource_ytrix"]
script = ExtResource("14_rlvdp")
Name = "Grant abilities"
Modifiers = []
Components = Array[Object]([SubResource("Resource_ufku3")])
Executions = []
StackLimit = SubResource("Resource_17f1o")
InitialStack = SubResource("Resource_hgi6f")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="ViewportTexture" id="ViewportTexture_xabdf"]
viewport_path = NodePath("SubViewport")
[sub_resource type="Resource" id="Resource_6d4gl"]
script = ExtResource("11_fi4yv")
Speed = 5.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_62kkh"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_3kqd1"]
albedo_color = Color(0.9888099, 0.33454797, 0.39278528, 1)
[sub_resource type="CapsuleMesh" id="CapsuleMesh_3uydm"]
material = SubResource("StandardMaterial3D_3kqd1")
[sub_resource type="SphereMesh" id="SphereMesh_4yfjf"]
radius = 0.05
height = 0.1
radial_segments = 4
rings = 4
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4yfjf"]
albedo_color = Color(0.06469653, 0.06469653, 0.06469653, 1)
[sub_resource type="BoxShape3D" id="BoxShape3D_4yfjf"]
size = Vector3(1, 2, 1.5)
[sub_resource type="SphereShape3D" id="SphereShape3D_k2cew"]
radius = 2.0
[node name="ProjectileEnemy" type="CharacterBody3D" unique_id=1747444936]
collision_layer = 16
collision_mask = 273
script = ExtResource("1_ha67n")
EnemyHeight = 2.0
LaunchProjectileAbility = ExtResource("2_rlvdp")
RKnockback = ExtResource("3_ymgar")
RMovement = ExtResource("4_0f52b")
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=289553407]
script = ExtResource("5_ya0fp")
BaseTags = ExtResource("6_ttkdf")
metadata/_custom_type_script = "uid://rpcbb54q4atx"
[node name="CharacterAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1699781551]
script = ExtResource("7_2triq")
AttributeSetClass = "CharacterAttributeSet"
InitialAttributeValues = Dictionary[String, ExtResource("8_ti0v2")]({
"Health": Object(RefCounted,"script":ExtResource("8_ti0v2"),"Default":100,"Min":0,"Max":100)
})
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
[node name="MetaAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=1794036161]
script = ExtResource("7_2triq")
AttributeSetClass = "MetaAttributeSet"
InitialAttributeValues = Dictionary[String, ExtResource("8_ti0v2")]({
"IncomingDamage": Object(RefCounted,"script":ExtResource("8_ti0v2"),"Default":0,"Min":0,"Max":1000)
})
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
[node name="EnnemyAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=804252284]
script = ExtResource("7_2triq")
AttributeSetClass = "EnemyAttributeSet"
InitialAttributeValues = Dictionary[String, ExtResource("8_ti0v2")]({
"Health": Object(RefCounted,"script":ExtResource("8_ti0v2"),"Default":100,"Min":0,"Max":100)
,
"Speed": SubResource("Resource_x50ya"),
"Strength": SubResource("Resource_yk4hc")
})
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
[node name="ForgeEffect" type="Node" parent="ForgeEntityNode" unique_id=401970791]
script = ExtResource("9_xdj1j")
EffectData = SubResource("Resource_ytrix")
metadata/_custom_type_script = "uid://dps0oef50noil"
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("9_6ew2r")]
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
texture = SubResource("ViewportTexture_xabdf")
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("10_d3cra")]
RMovement = SubResource("Resource_6d4gl")
WallInFrontRayCast = NodePath("../WallInFrontRayCast")
[node name="CKnockback" parent="." unique_id=1769689477 instance=ExtResource("12_7k8no")]
RKnockback = ExtResource("3_gciy3")
[node name="CTarget" type="Marker3D" parent="." unique_id=383414478]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=237956006]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_62kkh")
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=1261225229]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
layers = 33
mesh = SubResource("CapsuleMesh_3uydm")
[node name="MeshInstance3D2" type="MeshInstance3D" parent="." unique_id=934245732]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.2, 1.5, -0.5)
layers = 33
cast_shadow = 0
ignore_occlusion_culling = true
mesh = SubResource("SphereMesh_4yfjf")
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
[node name="MeshInstance3D3" type="MeshInstance3D" parent="." unique_id=1877433806]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.2, 1.5, -0.5)
layers = 33
cast_shadow = 0
ignore_occlusion_culling = true
mesh = SubResource("SphereMesh_4yfjf")
surface_material_override/0 = SubResource("StandardMaterial3D_4yfjf")
[node name="WallInFrontRayCast" type="RayCast3D" parent="." unique_id=834403687]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
target_position = Vector3(0, 0, -1.5)
collision_mask = 272
[node name="DamageBox" type="Area3D" parent="." unique_id=399872344]
collision_layer = 0
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="DamageBox" unique_id=978720734]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -0.25)
shape = SubResource("BoxShape3D_4yfjf")
[node name="AimAssistTarget" type="Area3D" parent="." unique_id=328174571]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
collision_layer = 64
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="AimAssistTarget" unique_id=1960476920]
shape = SubResource("SphereShape3D_k2cew")

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="RKnockback" format=3 uid="uid://c3ys18t0tkbq8"]
[ext_resource type="Script" uid="uid://b44cse62qru7j" path="res://scenes/components/knockback/RKnockback.cs" id="1_5r2lx"]
[resource]
script = ExtResource("1_5r2lx")
Modifier = 1.0
metadata/_custom_type_script = "uid://b44cse62qru7j"

View File

@@ -0,0 +1,8 @@
[gd_resource type="Resource" script_class="RMovement" format=3 uid="uid://rchgikroifmg"]
[ext_resource type="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="1_vkids"]
[resource]
script = ExtResource("1_vkids")
GravityModifier = 5.0
metadata/_custom_type_script = "uid://dtpxijlnb2c5"

View File

@@ -14,6 +14,7 @@
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="5_ue7xq"]
[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="Texture2D" uid="uid://g0u88alm6hcb" path="res://assets/ui/IconGodotNode/node/icon_bullet.png" id="7_2rkt1"]
[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="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="7_x835q"]
@@ -22,10 +23,13 @@
[ext_resource type="Resource" uid="uid://bs8b0oojixm4q" path="res://scenes/player_controller/resources/player_knockback.tres" id="8_m8gvy"]
[ext_resource type="Resource" uid="uid://c3e0ivgaxrsyb" path="res://inputs/base_mode/aim_down.tres" id="8_obsfv"]
[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://bhp6qunnwhncf" path="res://scenes/projectile/Projectile.tscn" id="8_u8yay"]
[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="Script" uid="uid://dxtjifb8hv8k4" path="res://forge/abilities/ForgeSpawnProjectileBehavior.cs" id="9_uqalc"]
[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://bdit2jy5gbpts" path="res://inputs/base_mode/jump.tres" id="10_4u7i3"]
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="10_b0xmb"]
[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="Resource" uid="uid://b5gx3q8nvu72e" path="res://inputs/base_mode/hit.tres" id="11_cresl"]
@@ -70,6 +74,27 @@ script = ExtResource("11_u8yay")
Tag = "immunity.damage"
metadata/_custom_type_script = "uid://dpakv7agvir6y"
[sub_resource type="Resource" id="Resource_xs7wf"]
script = ExtResource("9_uqalc")
Projectile = ExtResource("8_u8yay")
Name = "Spawn projectile on parry"
Icon = ExtResource("7_2rkt1")
metadata/_custom_type_script = "uid://dxtjifb8hv8k4"
[sub_resource type="Resource" id="Resource_cm4e8"]
script = ExtResource("11_u8yay")
Tag = "events.player.parry"
metadata/_custom_type_script = "uid://dpakv7agvir6y"
[sub_resource type="Resource" id="Resource_cmmfb"]
script = ExtResource("10_b0xmb")
Name = "Parry projectile"
CooldownEffects = null
AbilityBehavior = SubResource("Resource_xs7wf")
TriggerSource = 1
TriggerTag = SubResource("Resource_cm4e8")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
[sub_resource type="Resource" id="Resource_abfq8"]
script = ExtResource("3_cb2lu")
Modifier = 5.0
@@ -106,6 +131,9 @@ radius = 0.45
[sub_resource type="SphereShape3D" id="SphereShape3D_q14ux"]
radius = 1.0
[sub_resource type="SphereShape3D" id="SphereShape3D_n24vh"]
radius = 2.25
[sub_resource type="SphereShape3D" id="SphereShape3D_u8rdp"]
radius = 1.5
@@ -149,7 +177,7 @@ EmpoweredActionUsed = SubResource("Resource_5gbhg")
InvincibleTag = SubResource("Resource_2rkt1")
HitAbility = ExtResource("4_u8yay")
EmpoweredActionAbility = ExtResource("10_2rkt1")
DefaultGrantedAbilities = [ExtResource("5_u8yay")]
DefaultGrantedAbilities = [ExtResource("5_u8yay"), SubResource("Resource_cmmfb")]
DefaultPermanentEffects = [ExtResource("5_2rkt1")]
EmpoweredActionEffects = [ExtResource("6_u8yay")]
AimAssistStrength = 0.3
@@ -289,18 +317,28 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
MantleEndLocationDistanceFromWall = 0.3
MantleHeightCastStart = 2.5
[node name="WeaponHitbox" type="Area3D" parent="HeadSystem" unique_id=616313905]
[node name="WeaponHitbox" type="Area3D" parent="." unique_id=616313905]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
collision_layer = 0
collision_mask = 16
monitoring = false
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="HeadSystem/WeaponHitbox" unique_id=1617373708]
[node name="CollisionShape3D" type="CollisionShape3D" parent="WeaponHitbox" unique_id=1617373708]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1.5)
shape = SubResource("SphereShape3D_q14ux")
[node name="Parrybox" type="Area3D" parent="." unique_id=1452001086]
unique_name_in_owner = true
collision_layer = 0
collision_mask = 48
monitoring = false
monitorable = false
[node name="CollisionShape3D" type="CollisionShape3D" parent="Parrybox" unique_id=619469543]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -2)
shape = SubResource("SphereShape3D_n24vh")
[node name="StairsSystem" type="Node3D" parent="." unique_id=703342681]
script = ExtResource("7_bmt5a")

View File

@@ -180,11 +180,11 @@ public partial class HeadSystem : Node3D
public void OnParryboxActivated()
{
EmitSignalHitboxActivated();
EmitSignalParryboxActivated();
}
public void OnParryboxDeactivated()
{
EmitSignalHitboxDeactivated();
EmitSignalParryboxDeactivated();
}
internal bool FootstepEmitted;

View File

@@ -579,12 +579,12 @@ tracks/3/keys = {
}
tracks/4/type = "method"
tracks/4/imported = false
tracks/4/enabled = false
tracks/4/enabled = true
tracks/4/path = NodePath("../..")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"times": PackedFloat32Array(0.06666667, 0.18333334),
"times": PackedFloat32Array(0.01666667, 0.16666667),
"transitions": PackedFloat32Array(1, 1),
"values": [{
"args": [],

View File

@@ -91,9 +91,6 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
public Tag WeaponInHandStatusTag;
public Tag WeaponFlyingStatusTag;
public Tag WeaponPlantedStatusTag;
public Tag WeaponFlyingAbilityTag;
public Tag WeaponPlantedAbilityTag;
private AbilityHandle? _weaponFlyingAbility;
private AbilityHandle? _weaponPlantedAbility;
@@ -235,13 +232,11 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
// Manage weapon tick raising abilities
if (FlyingTickAbility != null)
{
WeaponFlyingAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.flying");
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
Events.Subscribe(WeaponStoppedFlyingEventTag, _ => { _weaponFlyingAbility.Cancel(); });
}
if (PlantedTickAbility != null)
{
WeaponPlantedAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.planted");
_weaponPlantedAbility = Abilities.GrantAbilityPermanently(PlantedTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
Events.Subscribe(WeaponUnplantedEventTag, _ => { _weaponPlantedAbility.Cancel(); });
}

View File

@@ -1,7 +1,6 @@
[gd_scene format=3 uid="uid://ckm3d6k08a72u"]
[ext_resource type="Script" uid="uid://iii3wfto4t5b" path="res://scenes/player_controller/components/weapon/WeaponSystem.cs" id="1_csqwk"]
[ext_resource type="Resource" uid="uid://dgjsi1my7nlnk" path="res://forge/resources/ability_datas/player_hit.tres" id="2_2wsgo"]
[ext_resource type="Script" uid="uid://cw525n4mjqgw0" path="res://addons/forge/resources/ForgeTagContainer.cs" id="2_l1xlx"]
[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"]
@@ -23,9 +22,9 @@
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="14_i0jsb"]
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="15_a8u16"]
[sub_resource type="Resource" id="Resource_7bruw"]
[sub_resource type="Resource" id="Resource_rgbou"]
script = ExtResource("2_l1xlx")
ContainerTags = Array[String](["weapon"])
ContainerTags = Array[String](["objects.weapon"])
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
[sub_resource type="Resource" id="Resource_pgbtr"]
@@ -125,13 +124,12 @@ continuous_cd = true
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("1_csqwk")
OnPlantedInEnemy = ExtResource("2_2wsgo")
FlyingTickAbility = ExtResource("4_7bruw")
PlantedTickAbility = ExtResource("3_7bruw")
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
script = ExtResource("5_7bruw")
BaseTags = SubResource("Resource_7bruw")
BaseTags = SubResource("Resource_rgbou")
metadata/_custom_type_script = "uid://rpcbb54q4atx"
[node name="WeaponAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=14845649]

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Chickensoft.Sync.Primitives;
@@ -22,6 +23,7 @@ using Godot;
using GodotStateCharts;
using Movementtests.addons.godot_state_charts.csharp;
using Movementtests.forge.abilities;
using Movementtests.interfaces;
using Movementtests.systems;
using Movementtests.player_controller.Scripts;
@@ -36,9 +38,11 @@ public record struct EmpoweredActionPayload;
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_character.png"), Meta(typeof(IAutoNode))]
public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandler, IDisposable
public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandler, IDisposable, ITargetable
{
public override void _Notification(int what) => this.Notify(what);
public record struct OnParryPayload(Vector3 ForwardVector);
#region Dependencies
[Dependency]
@@ -97,6 +101,7 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
[Node("CeilingDetector")] public required ShapeCast3D CeilingDetector { get; set; }
[Node("DirectGroundDetector")] public required RayCast3D DirectGroundDetector { get; set; }
[Node("%WeaponHitbox")] public required Area3D WeaponHitbox { get; set; }
[Node("%Parrybox")] public required Area3D Parrybox { get; set; }
[Node("SFXPlayer")] public required AudioStreamPlayer3D SfxPlayer { get; set; }
[Node("DashDamage")] public required ShapeCast3D DashDamageDetector { get; set; }
[Node("SlidingEnemyDetector")] public required Area3D SlidingEnemyDetector { get; set; }
@@ -461,6 +466,7 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
// Damage dealing
private readonly List<IForgeEntity> _hitEnemies = [];
private readonly List<IForgeEntity> _parriedEntities = [];
#endregion
@@ -506,8 +512,8 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
_playerRadius = playerShape.Radius;
// Combat stuff
WeaponHitbox.Monitoring = false;
WeaponHitbox.BodyEntered += RegisterHitEnnemy;
Parrybox.BodyEntered += RegisterParry;
#region StateManagement
@@ -569,6 +575,8 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
HeadSystem.Init();
HeadSystem.HitboxActivated += OnHitboxActivated;
HeadSystem.HitboxDeactivated += OnHitboxDeactivated;
HeadSystem.ParryboxActivated += OnParryboxActivated;
HeadSystem.ParryboxDeactivated += OnParryboxDeactivated;
HeadSystem.StepFoot += OnFootStepped;
HeadSystem.DeathAnimationFinished += OnDeathAnimationFinished;
@@ -670,8 +678,8 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
// Forge events
HealthAttribute.OnValueChanged += OnHealthChanged;
var weaponLeftToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStartedFlyingEventTag, OnWeaponLeft);
var weaponLandedToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStoppedFlyingEventTag, OnWeaponLanded);
// var weaponLeftToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStartedFlyingEventTag, OnWeaponLeft);
// var weaponLandedToken = WeaponSystem.Events.Subscribe(WeaponSystem.WeaponStoppedFlyingEventTag, OnWeaponLanded);
}
#region LifecycleManagement
@@ -1150,6 +1158,9 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
var wallHugContactPoint = _onWallRunning.Active ? _currentWallContactPoint : Vector3.Zero;
var moveInput = GetGlobalMoveInput();
WeaponHitbox.SetRotation(HeadSystem.GetGlobalLookRotation());
Parrybox.SetRotation(HeadSystem.GetGlobalLookRotation());
if (_isUsingGamepad)
inputLookDir += ComputeAimAssist();
@@ -2125,7 +2136,7 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
if (!HasParry) return;
var attackToDo = _isEnemyInDashAttackRange ? "dash_parry" : "standard_parry";
_playerState.SendEvent(attackToDo);
_playerState.SendEvent("standard_parry");
}
///////////////////////////
@@ -2579,14 +2590,49 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
WeaponHitbox.Monitoring = false;
TriggerDamage();
}
public void OnParryboxActivated()
{
Parrybox.Monitoring = true;
}
public void OnParryboxDeactivated()
{
Parrybox.Monitoring = false;
TriggerParry();
}
public void RegisterHitEnnemy(Node3D body)
{
if (body is not IForgeEntity entity) return;
_hitEnemies.Add(entity);
// return;
// if (body is not IDamageable damageable) return;
// _hitEnemies.Add(damageable);
}
public void RegisterParry(Node3D body)
{
if (body is not IForgeEntity entity) return;
_parriedEntities.Add(entity);
// TriggerParry();
}
public void TriggerParry()
{
var payload = new OnProjectileSpawned(
Direction: -HeadSystem.GetGlobalForwardVector(),
SpeedMultiplier: 100,
SpawnOffset: -HeadSystem.GetGlobalForwardVector(),
CollisionOverride: WeaponSystem.CollisionMask);
foreach (var entity in _parriedEntities.Where(entity => IsInstanceValid(entity as Node)))
{
Events.Raise(new EventData<OnProjectileSpawned>
{
EventTags = Tag.RequestTag(TagsManager, "events.player.parry").GetSingleTagContainer()!,
Source = this,
Payload = payload
});
if (entity is IKillable killable) killable.Kill();
else if (entity is Node node) node.QueueFree();
}
_parriedEntities.Clear();
}
public void TriggerDamage()
@@ -2708,4 +2754,9 @@ public partial class PlayerController : CharacterBody3D, IForgeEntity, ICueHandl
public void OnUpdate(IForgeEntity? target, CueParameters? parameters)
{
}
public Vector3 GetTargetGlobalPosition()
{
return HeadSystem.GlobalPosition;
}
}

View File

@@ -0,0 +1,153 @@
using Godot;
using System;
using Chickensoft.AutoInject;
using Chickensoft.Introspection;
using Gamesmiths.Forge.Abilities;
using Gamesmiths.Forge.Core;
using Gamesmiths.Forge.Cues;
using Gamesmiths.Forge.Effects;
using Gamesmiths.Forge.Events;
using Gamesmiths.Forge.Godot.Resources.Abilities;
using Gamesmiths.Forge.Statescript;
using Gamesmiths.Forge.Tags;
using Movementtests.interfaces;
using Movementtests.tools;
using Node = Godot.Node;
[GlobalClass, Icon("res://assets/ui/IconGodotNode/node_3D/icon_bullet.png"), Meta(typeof(IAutoNode))]
public partial class Projectile : RigidBody3D, IForgeEntity, ITargetable, IKillable, ISpawnable
{
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 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
[Node("ForgeEntityNode")] public required ForgeEntityNode ForgeEntity { get; set;}
[Export] public float Damage = 10f;
[Export] public float Speed = 10f;
[Export] public float HomingFactor = 0.2f;
public Node3D? Target { get; set; }
public Vector3? ImpulseDirection { get; set; }
public void Init()
{
ApplyCentralImpulse(ComputeImpulseToTarget());
}
public Vector3 ComputeImpulseToTarget()
{
if (ImpulseDirection != null) return ImpulseDirection.Value;
if (Target == null) return Vector3.Zero;
return Vector3.Up * Speed;
var targetDir = GlobalPosition.DirectionTo(Target.GlobalPosition);
var hDir = new Vector3(targetDir.X, 0, targetDir.Z).Normalized();
var throwDir = (hDir + 3*Vector3.Up).Normalized();
var distanceTo = GlobalPosition.DistanceTo(Target.GlobalPosition);
return throwDir * distanceTo*0.8f;
}
public override void _IntegrateForces(PhysicsDirectBodyState3D state)
{
base._IntegrateForces(state);
if (Target == null) return;
var targetPos = Target is ITargetable targetable ? targetable.GetTargetGlobalPosition() : Target.GlobalPosition;
var targetVel = state.LinearVelocity + GlobalPosition.DirectionTo(targetPos) * HomingFactor;
if (targetVel.Length() > Speed) targetVel = targetVel.Normalized() * Speed;
state.LinearVelocity = targetVel;
// var targetDir = GlobalPosition.DirectionTo(targetPos);
// var hDir = new Vector3(targetDir.X, 0, targetDir.Z).Normalized();
// var currentVelocityHDir = new Vector3(state.LinearVelocity.X, 0, state.LinearVelocity.Z);
// var finalHDir = hDir*HomingFactor + currentVelocityHDir;
// var combinedVelocity = new Vector3(finalHDir.X, state.LinearVelocity.Y, finalHDir.Z);
// if (combinedVelocity.Length() > Speed) combinedVelocity = combinedVelocity.Normalized() * Speed;
// state.LinearVelocity = combinedVelocity;
// state.LinearVelocity += targetDir/5.0f;
}
public void OnResolved()
{
BodyEntered += OnProjectileHit;
// Events.Subscribe(Tag.RequestTag(TagsManager, "events.weapon.flyingtick"), data => { GD.Print("tick"); });
}
private void OnProjectileHit(Node body)
{
if (body is IForgeEntity entity)
{
Events.Raise(new EventData
{
EventTags = Tag.RequestTag(TagsManager, "events.combat.hit").GetSingleTagContainer()!,
Source = this,
Target = entity,
EventMagnitude = Damage
});
}
Events.Raise(new EventData
{
EventTags = Tag.RequestTag(TagsManager, "events.weapon.planted").GetSingleTagContainer()!,
Source = this,
EventMagnitude = Damage
});
Kill();
}
public Vector3 GetTargetGlobalPosition()
{
return GlobalPosition;
}
public void Kill()
{
QueueFree(); // If thrown offmap
}
}

View File

@@ -0,0 +1 @@
uid://bmpfvyccbou3b

View File

@@ -0,0 +1,238 @@
[gd_scene format=3 uid="uid://bhp6qunnwhncf"]
[ext_resource type="Script" uid="uid://bmpfvyccbou3b" path="res://scenes/projectile/Projectile.cs" id="1_bwggc"]
[ext_resource type="Resource" uid="uid://btnnpqann3ktp" path="res://forge/resources/ability_datas/weapon_flying_tick_ability.tres" id="2_gxghe"]
[ext_resource type="Script" uid="uid://rpcbb54q4atx" path="res://forge/ForgeEntityNode.cs" id="3_0m0gv"]
[ext_resource type="Script" uid="uid://cxihb42t2mfqi" path="res://addons/forge/nodes/ForgeAttributeSet.cs" id="3_8gwhl"]
[ext_resource type="Script" uid="uid://ccovd5i0wr3kk" path="res://addons/forge/editor/attributes/AttributeValues.cs" id="4_bwggc"]
[ext_resource type="Script" uid="uid://dps0oef50noil" path="res://addons/forge/nodes/ForgeEffect.cs" id="6_j80uc"]
[ext_resource type="Script" uid="uid://dhxfbxh54pyxp" path="res://addons/forge/resources/abilities/ForgeAbilityData.cs" id="7_hwhpw"]
[ext_resource type="Resource" uid="uid://bpovqvlqv5bs5" path="res://forge/resources/effect_components/damageable.tres" id="7_ufml1"]
[ext_resource type="Resource" uid="uid://sn6kndc6ukic" path="res://forge/resources/tag_containers/on_damage_dealt.tres" id="8_4opcx"]
[ext_resource type="Script" uid="uid://1hgogislo1l6" path="res://addons/forge/resources/magnitudes/ForgeScalableInt.cs" id="8_eb14h"]
[ext_resource type="Resource" uid="uid://5tr54q0rdpho" path="res://forge/resources/tag_containers/on_damage_taken.tres" id="9_0m0gv"]
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="9_ah28r"]
[ext_resource type="Script" uid="uid://cfx62w40nd84v" path="res://forge/calculators/ForgeDamageExecution.cs" id="10_gxghe"]
[ext_resource type="Script" uid="uid://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="10_mss85"]
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="11_aepsp"]
[ext_resource type="Script" uid="uid://cn3b4ya15fg7e" path="res://addons/forge/resources/magnitudes/ForgeScalableFloat.cs" id="12_6slh1"]
[ext_resource type="Script" uid="uid://bdfcavbjyhxxa" path="res://addons/forge/resources/ForgeModifier.cs" id="13_nh3w7"]
[ext_resource type="Script" uid="uid://n6efm5o4uxvr" path="res://forge/abilities/ForgeSimpleHitBehavior.cs" id="15_7ctk5"]
[ext_resource type="Script" uid="uid://dpakv7agvir6y" path="res://addons/forge/resources/ForgeTag.cs" id="16_4opcx"]
[ext_resource type="Script" uid="uid://bnee6amtc2bhj" path="res://forge/abilities/ForgeExplodingSwordBehavior.cs" id="19_0m0gv"]
[ext_resource type="PackedScene" uid="uid://duju3atqgltkg" path="res://scenes/explosion/explosion.tscn" id="19_gxghe"]
[sub_resource type="Resource" id="Resource_n3xfy"]
script = ExtResource("10_gxghe")
DamageType = 1
DamageDealerEventTags = ExtResource("8_4opcx")
DamageReceiverEventTags = ExtResource("9_0m0gv")
metadata/_custom_type_script = "uid://cfx62w40nd84v"
[sub_resource type="Resource" id="Resource_5se5x"]
script = ExtResource("8_eb14h")
BaseValue = 1
[sub_resource type="Resource" id="Resource_tsnac"]
script = ExtResource("12_6slh1")
BaseValue = 1.0
[sub_resource type="Resource" id="Resource_4tmlu"]
script = ExtResource("12_6slh1")
[sub_resource type="Resource" id="Resource_nsq4o"]
script = ExtResource("12_6slh1")
[sub_resource type="Resource" id="Resource_wvq73"]
script = ExtResource("12_6slh1")
BaseValue = 1.0
[sub_resource type="Resource" id="Resource_ocyfe"]
script = ExtResource("12_6slh1")
[sub_resource type="Resource" id="Resource_idlka"]
script = ExtResource("12_6slh1")
[sub_resource type="Resource" id="Resource_uh7hr"]
script = ExtResource("12_6slh1")
BaseValue = 1.0
metadata/_custom_type_script = "uid://cn3b4ya15fg7e"
[sub_resource type="Resource" id="Resource_ckp55"]
script = ExtResource("13_nh3w7")
Attribute = "MetaAttributeSet.IncomingDamage"
Operation = 2
ScalableFloat = SubResource("Resource_uh7hr")
Coefficient = SubResource("Resource_wvq73")
PreMultiplyAdditiveValue = SubResource("Resource_idlka")
PostMultiplyAdditiveValue = SubResource("Resource_ocyfe")
CalculatorCoefficient = SubResource("Resource_tsnac")
CalculatorPreMultiplyAdditiveValue = SubResource("Resource_nsq4o")
CalculatorPostMultiplyAdditiveValue = SubResource("Resource_4tmlu")
metadata/_custom_type_script = "uid://bdfcavbjyhxxa"
[sub_resource type="Resource" id="Resource_yl520"]
script = ExtResource("8_eb14h")
BaseValue = 1
[sub_resource type="Resource" id="Resource_1kwc2"]
script = ExtResource("11_aepsp")
Name = "Projectile damate"
Modifiers = Array[Object]([SubResource("Resource_ckp55")])
Components = Array[Object]([ExtResource("7_ufml1")])
Executions = Array[Object]([SubResource("Resource_n3xfy")])
StackLimit = SubResource("Resource_yl520")
InitialStack = SubResource("Resource_5se5x")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="Resource" id="Resource_3icyc"]
script = ExtResource("15_7ctk5")
DamageEffect = SubResource("Resource_1kwc2")
metadata/_custom_type_script = "uid://n6efm5o4uxvr"
[sub_resource type="Resource" id="Resource_7ctk5"]
script = ExtResource("16_4opcx")
Tag = "events.combat.hit"
metadata/_custom_type_script = "uid://dpakv7agvir6y"
[sub_resource type="Resource" id="Resource_iburv"]
script = ExtResource("7_hwhpw")
Name = "On player hit"
CooldownEffects = []
AbilityBehavior = SubResource("Resource_3icyc")
TriggerSource = 1
TriggerTag = SubResource("Resource_7ctk5")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
[sub_resource type="Resource" id="Resource_ufml1"]
script = ExtResource("8_eb14h")
BaseValue = 1
[sub_resource type="Resource" id="Resource_4opcx"]
script = ExtResource("9_ah28r")
AbilityData = SubResource("Resource_iburv")
AbilityLevel = SubResource("Resource_ufml1")
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_uhv33"]
script = ExtResource("19_0m0gv")
Explosion = ExtResource("19_gxghe")
Radius = 10.0
metadata/_custom_type_script = "uid://bnee6amtc2bhj"
[sub_resource type="Resource" id="Resource_hnbha"]
script = ExtResource("16_4opcx")
Tag = "events.weapon.planted"
metadata/_custom_type_script = "uid://dpakv7agvir6y"
[sub_resource type="Resource" id="Resource_ynqlf"]
script = ExtResource("7_hwhpw")
Name = "Explode on contact"
CooldownEffects = []
AbilityBehavior = SubResource("Resource_uhv33")
TriggerSource = 1
TriggerTag = SubResource("Resource_hnbha")
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
[sub_resource type="Resource" id="Resource_ltce2"]
script = ExtResource("8_eb14h")
BaseValue = 1
[sub_resource type="Resource" id="Resource_xxtl1"]
script = ExtResource("9_ah28r")
AbilityData = SubResource("Resource_ynqlf")
AbilityLevel = SubResource("Resource_ltce2")
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_h6udq"]
script = ExtResource("8_eb14h")
BaseValue = 1
[sub_resource type="Resource" id="Resource_k64oi"]
script = ExtResource("9_ah28r")
AbilityData = ExtResource("2_gxghe")
AbilityLevel = SubResource("Resource_h6udq")
TryActivateOnGrant = true
metadata/_custom_type_script = "uid://72kj3n4lm1em"
[sub_resource type="Resource" id="Resource_0m0gv"]
script = ExtResource("10_mss85")
GrantAbilityConfigs = [SubResource("Resource_4opcx"), SubResource("Resource_xxtl1"), SubResource("Resource_k64oi")]
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
[sub_resource type="Resource" id="Resource_gxghe"]
script = ExtResource("8_eb14h")
BaseValue = 1
[sub_resource type="Resource" id="Resource_6slh1"]
script = ExtResource("8_eb14h")
BaseValue = 1
[sub_resource type="Resource" id="Resource_nh3w7"]
script = ExtResource("11_aepsp")
Name = "Grant abilities"
Modifiers = []
Components = Array[Object]([SubResource("Resource_0m0gv")])
Executions = []
StackLimit = SubResource("Resource_6slh1")
InitialStack = SubResource("Resource_gxghe")
Cues = []
metadata/_custom_type_script = "uid://b83hf13nj37k3"
[sub_resource type="SphereShape3D" id="SphereShape3D_16rri"]
radius = 0.2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_bwggc"]
albedo_color = Color(0.9999997, 0.34948558, 0.033228315, 1)
[sub_resource type="SphereMesh" id="SphereMesh_p7dfg"]
material = SubResource("StandardMaterial3D_bwggc")
radius = 0.4
height = 0.8
[sub_resource type="SphereShape3D" id="SphereShape3D_p7dfg"]
radius = 2.0
[node name="Projectile" type="RigidBody3D" unique_id=1536748036]
collision_layer = 32
collision_mask = 289
continuous_cd = true
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("1_bwggc")
Speed = 20.0
HomingFactor = 0.8
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1961065393]
script = ExtResource("3_0m0gv")
metadata/_custom_type_script = "uid://rpcbb54q4atx"
[node name="ForgeAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=100377985]
script = ExtResource("3_8gwhl")
AttributeSetClass = "MetaAttributeSet"
InitialAttributeValues = Dictionary[String, ExtResource("4_bwggc")]({
"IncomingDamage": Object(RefCounted,"script":ExtResource("4_bwggc"),"Default":0,"Min":0,"Max":1000)
,
"Level": Object(RefCounted,"script":ExtResource("4_bwggc"),"Default":1,"Min":1,"Max":1000)
})
metadata/_custom_type_script = "uid://cxihb42t2mfqi"
[node name="GrantAbilities" type="Node" parent="ForgeEntityNode" unique_id=699633438]
script = ExtResource("6_j80uc")
EffectData = SubResource("Resource_nh3w7")
metadata/_custom_type_script = "uid://dps0oef50noil"
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=2109664666]
shape = SubResource("SphereShape3D_16rri")
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=472918778]
mesh = SubResource("SphereMesh_p7dfg")
[node name="AimAssistTarget" type="Area3D" parent="." unique_id=734689820]
collision_layer = 64
collision_mask = 0
[node name="CollisionShape3D" type="CollisionShape3D" parent="AimAssistTarget" unique_id=1220912429]
shape = SubResource("SphereShape3D_p7dfg")

View File

@@ -34,12 +34,12 @@ public partial class Spawner : Node3D
if (EnemyToSpawn.Instantiate() is not Enemy spawnedInstance) return;
spawnedInstance.RequestReady();
GetTree().GetCurrentScene().AddChild(spawnedInstance);
spawnedInstance.GlobalPosition = GlobalPosition;
spawnedInstance.Target = Target;
spawnedInstance.RMovement = MovementInputs;
spawnedInstance.Init();
GetTree().GetCurrentScene().AddChild(spawnedInstance);
spawnedInstance.GlobalPosition = GlobalPosition;
}
public void StartSpawning()