basic projectiles
This commit is contained in:
42
forge/abilities/ForgeSpawnProjectileBehavior.cs
Normal file
42
forge/abilities/ForgeSpawnProjectileBehavior.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using Gamesmiths.Forge.Abilities;
|
||||||
|
using Gamesmiths.Forge.Effects;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources;
|
||||||
|
using Gamesmiths.Forge.Godot.Resources.Abilities;
|
||||||
|
using Godot;
|
||||||
|
using Movementtests.interfaces;
|
||||||
|
|
||||||
|
namespace Movementtests.forge.abilities;
|
||||||
|
|
||||||
|
|
||||||
|
public class SpawnProjectileBehavior(PackedScene projectileScene) : IAbilityBehavior
|
||||||
|
{
|
||||||
|
public void OnStarted(AbilityBehaviorContext context)
|
||||||
|
{
|
||||||
|
if (context.Target is not Node3D target || context.Source is not Node3D source) return;
|
||||||
|
|
||||||
|
var sourceLocation = source.GlobalPosition;
|
||||||
|
|
||||||
|
if (projectileScene.Instantiate() is not Projectile projectile) return;
|
||||||
|
source.GetTree().GetCurrentScene().AddChild(projectile);
|
||||||
|
|
||||||
|
projectile.GlobalPosition = source is ITargetable targetable ? targetable.GetTargetGlobalPosition() : sourceLocation;
|
||||||
|
projectile.Target = target;
|
||||||
|
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);
|
||||||
|
}
|
||||||
1
forge/abilities/ForgeSpawnProjectileBehavior.cs.uid
Normal file
1
forge/abilities/ForgeSpawnProjectileBehavior.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://dxtjifb8hv8k4
|
||||||
@@ -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", "events.weapon.plantedtick", "events.weapon.unplanted", "abilities.weapon.planted", "events.enemy.try_hit", "events.enemy.launch_projectile"])
|
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"])
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ BaseValue = 1
|
|||||||
[sub_resource type="Resource" id="Resource_hgeae"]
|
[sub_resource type="Resource" id="Resource_hgeae"]
|
||||||
script = ExtResource("4_4348y")
|
script = ExtResource("4_4348y")
|
||||||
Name = "Raise Planted Tick Periodically"
|
Name = "Raise Planted Tick Periodically"
|
||||||
Modifiers = null
|
Modifiers = []
|
||||||
Components = null
|
Components = []
|
||||||
Executions = Array[Object]([SubResource("Resource_l3tir")])
|
Executions = Array[Object]([SubResource("Resource_l3tir")])
|
||||||
DurationType = 1
|
DurationType = 1
|
||||||
HasPeriodicApplication = true
|
HasPeriodicApplication = true
|
||||||
@@ -39,7 +39,7 @@ Period = SubResource("Resource_cykp3")
|
|||||||
ExecuteOnApplication = true
|
ExecuteOnApplication = true
|
||||||
StackLimit = SubResource("Resource_rvogu")
|
StackLimit = SubResource("Resource_rvogu")
|
||||||
InitialStack = SubResource("Resource_yc0gp")
|
InitialStack = SubResource("Resource_yc0gp")
|
||||||
Cues = null
|
Cues = []
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_jiqxq"]
|
[sub_resource type="Resource" id="Resource_jiqxq"]
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_f5qgs")
|
script = ExtResource("2_f5qgs")
|
||||||
EffectData = ExtResource("1_hlq5f")
|
EffectData = ExtResource("1_hlq5f")
|
||||||
Name = "Planted tick application"
|
Name = "Flying tick application"
|
||||||
metadata/_custom_type_script = "uid://cl5hudinl1rex"
|
metadata/_custom_type_script = "uid://cl5hudinl1rex"
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ BaseValue = 1
|
|||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("4_7ma6b")
|
script = ExtResource("4_7ma6b")
|
||||||
Name = "Call Planted Tick Event Periodically"
|
Name = "Call Flying Tick Event Periodically"
|
||||||
Modifiers = []
|
Modifiers = []
|
||||||
Components = []
|
Components = []
|
||||||
Executions = Array[Object]([ExtResource("1_cd13a")])
|
Executions = Array[Object]([ExtResource("1_cd13a")])
|
||||||
|
|||||||
@@ -116,8 +116,6 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
CMovement.RMovement = RMovement;
|
CMovement.RMovement = RMovement;
|
||||||
CKnockback = GetNode<Node>("CKnockback") as IKnockbackable ?? throw new Exception("Knockback component not found");
|
CKnockback = GetNode<Node>("CKnockback") as IKnockbackable ?? throw new Exception("Knockback component not found");
|
||||||
CKnockback.RKnockback = RKnockback;
|
CKnockback.RKnockback = RKnockback;
|
||||||
|
|
||||||
// _hitAbilityHandle = Abilities.GrantAbilityPermanently(HitAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnResolved()
|
public void OnResolved()
|
||||||
@@ -126,13 +124,18 @@ public partial class Enemy : CharacterBody3D,
|
|||||||
HealthBarWrapper.ResourceBar.Init(healthAttribute);
|
HealthBarWrapper.ResourceBar.Init(healthAttribute);
|
||||||
healthAttribute.OnValueChanged += OnHealthChanged;
|
healthAttribute.OnValueChanged += OnHealthChanged;
|
||||||
|
|
||||||
Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.hit"),
|
// Events.Subscribe(Tag.RequestTag(TagsManager, "events.combat.hit"), data => {GD.Print("Hit!");});
|
||||||
data => {GD.Print("Hit!");});
|
|
||||||
Events.Subscribe<DamageDone>(Tag.RequestTag(TagsManager, "events.combat.damage"), OnDamageReceived);
|
Events.Subscribe<DamageDone>(Tag.RequestTag(TagsManager, "events.combat.damage"), OnDamageReceived);
|
||||||
Events.Subscribe<KnockbackDone>(Tag.RequestTag(TagsManager, "events.combat.knockback_received"), OnKnockbackReceived);
|
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.combat.death"), OnDeath);
|
||||||
|
Events.Subscribe(Tag.RequestTag(TagsManager, "events.enemy.request_projectile"), ProjectileTokenRequested);
|
||||||
|
|
||||||
GetTree().CreateTimer(3).Timeout += () => Events.Raise(new EventData
|
}
|
||||||
|
|
||||||
|
private void ProjectileTokenRequested(EventData obj)
|
||||||
|
{
|
||||||
|
// TODO: replace with token manager
|
||||||
|
Events.Raise(new EventData
|
||||||
{
|
{
|
||||||
EventTags = Tag.RequestTag(TagsManager, "events.enemy.launch_projectile").GetSingleTagContainer()!,
|
EventTags = Tag.RequestTag(TagsManager, "events.enemy.launch_projectile").GetSingleTagContainer()!,
|
||||||
Source = this,
|
Source = this,
|
||||||
|
|||||||
@@ -15,12 +15,18 @@
|
|||||||
[ext_resource type="PackedScene" uid="uid://dbr7ioio158ew" path="res://scenes/components/movement/CGroundedMovement.tscn" id="10_d3cra"]
|
[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://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="Script" uid="uid://dtpxijlnb2c5" path="res://scenes/components/movement/RMovement.cs" id="11_fi4yv"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bhp6qunnwhncf" path="res://scenes/projectile/Projectile.tscn" id="12_5ac6t"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="12_7k8no"]
|
[ext_resource type="PackedScene" uid="uid://bctpe34ddamg5" path="res://scenes/components/knockback/CKnockback.tscn" id="12_7k8no"]
|
||||||
[ext_resource type="Resource" uid="uid://ifeavnlps7hy" path="res://forge/resources/behaviors/exploding_sword.tres" id="12_f6vvi"]
|
[ext_resource type="Texture2D" uid="uid://g0u88alm6hcb" path="res://assets/ui/IconGodotNode/node/icon_bullet.png" id="12_rlvdp"]
|
||||||
[ext_resource type="Script" uid="uid://72kj3n4lm1em" path="res://addons/forge/resources/components/ForgeGrantAbilityConfig.cs" id="12_ssnfc"]
|
[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://b3wo2uge4ddnj" path="res://addons/forge/resources/components/GrantAbility.cs" id="13_5ac6t"]
|
||||||
|
[ext_resource type="Script" uid="uid://dxtjifb8hv8k4" path="res://forge/abilities/ForgeSpawnProjectileBehavior.cs" id="13_rlvdp"]
|
||||||
[ext_resource type="Resource" uid="uid://bkr1xfokymvp4" path="res://forge/resources/tag_containers/on_enemy_lauch_project.tres" id="13_ssnfc"]
|
[ext_resource type="Resource" uid="uid://bkr1xfokymvp4" path="res://forge/resources/tag_containers/on_enemy_lauch_project.tres" id="13_ssnfc"]
|
||||||
[ext_resource type="Script" uid="uid://b83hf13nj37k3" path="res://addons/forge/resources/ForgeEffectData.cs" id="14_rlvdp"]
|
[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"]
|
[sub_resource type="Resource" id="Resource_x50ya"]
|
||||||
script = ExtResource("8_ti0v2")
|
script = ExtResource("8_ti0v2")
|
||||||
@@ -44,11 +50,18 @@ AbilityData = ExtResource("2_nbf6l")
|
|||||||
AbilityLevel = SubResource("Resource_55uge")
|
AbilityLevel = SubResource("Resource_55uge")
|
||||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_idpl5"]
|
||||||
|
script = ExtResource("13_rlvdp")
|
||||||
|
Projectile = ExtResource("12_5ac6t")
|
||||||
|
Name = "Spawn projectile"
|
||||||
|
Icon = ExtResource("12_rlvdp")
|
||||||
|
metadata/_custom_type_script = "uid://dxtjifb8hv8k4"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_5ac6t"]
|
[sub_resource type="Resource" id="Resource_5ac6t"]
|
||||||
script = ExtResource("10_b62xo")
|
script = ExtResource("10_b62xo")
|
||||||
Name = "Test projectile"
|
Name = "Launch projectile"
|
||||||
CooldownEffects = []
|
CooldownEffects = []
|
||||||
AbilityBehavior = ExtResource("12_f6vvi")
|
AbilityBehavior = SubResource("Resource_idpl5")
|
||||||
TriggerSource = 1
|
TriggerSource = 1
|
||||||
TriggerTag = ExtResource("13_ssnfc")
|
TriggerTag = ExtResource("13_ssnfc")
|
||||||
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
metadata/_custom_type_script = "uid://dhxfbxh54pyxp"
|
||||||
@@ -63,9 +76,69 @@ AbilityData = SubResource("Resource_5ac6t")
|
|||||||
AbilityLevel = SubResource("Resource_rlvdp")
|
AbilityLevel = SubResource("Resource_rlvdp")
|
||||||
metadata/_custom_type_script = "uid://72kj3n4lm1em"
|
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_ufku3"]
|
[sub_resource type="Resource" id="Resource_ufku3"]
|
||||||
script = ExtResource("13_5ac6t")
|
script = ExtResource("13_5ac6t")
|
||||||
GrantAbilityConfigs = [SubResource("Resource_xabdf"), SubResource("Resource_ei7hs")]
|
GrantAbilityConfigs = [SubResource("Resource_xabdf"), SubResource("Resource_ei7hs"), SubResource("Resource_nu2lf")]
|
||||||
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
|
metadata/_custom_type_script = "uid://b3wo2uge4ddnj"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_hgi6f"]
|
[sub_resource type="Resource" id="Resource_hgi6f"]
|
||||||
@@ -79,15 +152,15 @@ BaseValue = 1
|
|||||||
[sub_resource type="Resource" id="Resource_ytrix"]
|
[sub_resource type="Resource" id="Resource_ytrix"]
|
||||||
script = ExtResource("14_rlvdp")
|
script = ExtResource("14_rlvdp")
|
||||||
Name = "Grant abilities"
|
Name = "Grant abilities"
|
||||||
Modifiers = null
|
Modifiers = []
|
||||||
Components = Array[Object]([SubResource("Resource_ufku3")])
|
Components = Array[Object]([SubResource("Resource_ufku3")])
|
||||||
Executions = null
|
Executions = []
|
||||||
StackLimit = SubResource("Resource_17f1o")
|
StackLimit = SubResource("Resource_17f1o")
|
||||||
InitialStack = SubResource("Resource_hgi6f")
|
InitialStack = SubResource("Resource_hgi6f")
|
||||||
Cues = null
|
Cues = []
|
||||||
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
metadata/_custom_type_script = "uid://b83hf13nj37k3"
|
||||||
|
|
||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_3kqd1"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_f6vvi"]
|
||||||
viewport_path = NodePath("SubViewport")
|
viewport_path = NodePath("SubViewport")
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6d4gl"]
|
[sub_resource type="Resource" id="Resource_6d4gl"]
|
||||||
@@ -122,7 +195,6 @@ radius = 2.0
|
|||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
collision_mask = 273
|
collision_mask = 273
|
||||||
script = ExtResource("1_ha67n")
|
script = ExtResource("1_ha67n")
|
||||||
HitAbility = ExtResource("2_nbf6l")
|
|
||||||
EnemyHeight = 2.0
|
EnemyHeight = 2.0
|
||||||
RKnockback = ExtResource("3_ymgar")
|
RKnockback = ExtResource("3_ymgar")
|
||||||
RMovement = ExtResource("4_0f52b")
|
RMovement = ExtResource("4_0f52b")
|
||||||
@@ -168,7 +240,7 @@ metadata/_custom_type_script = "uid://dps0oef50noil"
|
|||||||
|
|
||||||
[node name="CHealthBar" parent="." unique_id=1278247727 instance=ExtResource("9_6ew2r")]
|
[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)
|
transform = Transform3D(0.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.2, 0)
|
||||||
texture = SubResource("ViewportTexture_3kqd1")
|
texture = SubResource("ViewportTexture_f6vvi")
|
||||||
|
|
||||||
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("10_d3cra")]
|
[node name="CMovement" parent="." unique_id=1080640834 node_paths=PackedStringArray("WallInFrontRayCast") instance=ExtResource("10_d3cra")]
|
||||||
RMovement = SubResource("Resource_6d4gl")
|
RMovement = SubResource("Resource_6d4gl")
|
||||||
|
|||||||
@@ -92,9 +92,6 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
public Tag WeaponFlyingStatusTag;
|
public Tag WeaponFlyingStatusTag;
|
||||||
public Tag WeaponPlantedStatusTag;
|
public Tag WeaponPlantedStatusTag;
|
||||||
|
|
||||||
public Tag WeaponFlyingAbilityTag;
|
|
||||||
public Tag WeaponPlantedAbilityTag;
|
|
||||||
|
|
||||||
private AbilityHandle? _weaponFlyingAbility;
|
private AbilityHandle? _weaponFlyingAbility;
|
||||||
private AbilityHandle? _weaponPlantedAbility;
|
private AbilityHandle? _weaponPlantedAbility;
|
||||||
|
|
||||||
@@ -235,13 +232,11 @@ public partial class WeaponSystem : RigidBody3D, IForgeEntity
|
|||||||
// Manage weapon tick raising abilities
|
// Manage weapon tick raising abilities
|
||||||
if (FlyingTickAbility != null)
|
if (FlyingTickAbility != null)
|
||||||
{
|
{
|
||||||
WeaponFlyingAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.flying");
|
|
||||||
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
_weaponFlyingAbility = Abilities.GrantAbilityPermanently(FlyingTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
||||||
Events.Subscribe(WeaponStoppedFlyingEventTag, _ => { _weaponFlyingAbility.Cancel(); });
|
Events.Subscribe(WeaponStoppedFlyingEventTag, _ => { _weaponFlyingAbility.Cancel(); });
|
||||||
}
|
}
|
||||||
if (PlantedTickAbility != null)
|
if (PlantedTickAbility != null)
|
||||||
{
|
{
|
||||||
WeaponPlantedAbilityTag = Tag.RequestTag(TagsManager,"abilities.weapon.planted");
|
|
||||||
_weaponPlantedAbility = Abilities.GrantAbilityPermanently(PlantedTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
_weaponPlantedAbility = Abilities.GrantAbilityPermanently(PlantedTickAbility.GetAbilityData(), 1, LevelComparison.None, this);
|
||||||
Events.Subscribe(WeaponUnplantedEventTag, _ => { _weaponPlantedAbility.Cancel(); });
|
Events.Subscribe(WeaponUnplantedEventTag, _ => { _weaponPlantedAbility.Cancel(); });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://ckm3d6k08a72u"]
|
[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="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://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://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"]
|
||||||
@@ -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://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"]
|
[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")
|
script = ExtResource("2_l1xlx")
|
||||||
ContainerTags = Array[String](["weapon"])
|
ContainerTags = Array[String](["objects.weapon"])
|
||||||
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
metadata/_custom_type_script = "uid://cw525n4mjqgw0"
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_pgbtr"]
|
[sub_resource type="Resource" id="Resource_pgbtr"]
|
||||||
@@ -125,13 +124,12 @@ 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")
|
||||||
OnPlantedInEnemy = ExtResource("2_2wsgo")
|
|
||||||
FlyingTickAbility = ExtResource("4_7bruw")
|
FlyingTickAbility = ExtResource("4_7bruw")
|
||||||
PlantedTickAbility = ExtResource("3_7bruw")
|
PlantedTickAbility = ExtResource("3_7bruw")
|
||||||
|
|
||||||
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
|
[node name="ForgeEntityNode" type="Node3D" parent="." unique_id=1798885192]
|
||||||
script = ExtResource("5_7bruw")
|
script = ExtResource("5_7bruw")
|
||||||
BaseTags = SubResource("Resource_7bruw")
|
BaseTags = SubResource("Resource_rgbou")
|
||||||
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
metadata/_custom_type_script = "uid://rpcbb54q4atx"
|
||||||
|
|
||||||
[node name="WeaponAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=14845649]
|
[node name="WeaponAttributeSet" type="Node" parent="ForgeEntityNode" unique_id=14845649]
|
||||||
|
|||||||
124
scenes/projectile/Projectile.cs
Normal file
124
scenes/projectile/Projectile.cs
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
public Node3D Target { get; set; }
|
||||||
|
|
||||||
|
public void Init()
|
||||||
|
{
|
||||||
|
ApplyCentralImpulse(Vector3.Up * 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void _IntegrateForces(PhysicsDirectBodyState3D state)
|
||||||
|
{
|
||||||
|
var direction = GlobalPosition.DirectionTo(Target.GlobalPosition);
|
||||||
|
state.LinearVelocity += direction / 10.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
|
||||||
|
}
|
||||||
|
}
|
||||||
1
scenes/projectile/Projectile.cs.uid
Normal file
1
scenes/projectile/Projectile.cs.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://bmpfvyccbou3b
|
||||||
236
scenes/projectile/Projectile.tscn
Normal file
236
scenes/projectile/Projectile.tscn
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
[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 = 10.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")
|
||||||
|
|
||||||
|
[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")
|
||||||
Reference in New Issue
Block a user