enemy grant hit ability + prep projectiles

This commit is contained in:
2026-05-06 19:55:05 +02:00
parent 7ba4a3db3f
commit 01a2e7582b
19 changed files with 390 additions and 64 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

@@ -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", "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"])

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,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"