diff --git a/Assets/_Project/Definitions/BuilderSpells/FireballSpell.asset b/Assets/_Project/Definitions/BuilderSpells/FireballSpell.asset index f813362..d505a3a 100644 --- a/Assets/_Project/Definitions/BuilderSpells/FireballSpell.asset +++ b/Assets/_Project/Definitions/BuilderSpells/FireballSpell.asset @@ -12,13 +12,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 22b36bfcd0ae4af4098d908138e874e1, type: 3} m_Name: FireballSpell m_EditorClassIdentifier: Assembly-CSharp::TD.Gameplay.BuilderSpells.FireballSpellDefinition - DisplayName: - Description: + DisplayName: Fireball + Description: Shoot a fireball Icon: {fileID: 0} Cooldown: 5 TargetType: 0 Radius: 3 enemyLayerMask: serializedVersion: 2 - m_Bits: 128 + m_Bits: 1024 Damage: 50 diff --git a/Assets/_Project/Definitions/BuilderSpells/SlowAreaSpell.asset b/Assets/_Project/Definitions/BuilderSpells/SlowAreaSpell.asset index d45c506..74694ff 100644 --- a/Assets/_Project/Definitions/BuilderSpells/SlowAreaSpell.asset +++ b/Assets/_Project/Definitions/BuilderSpells/SlowAreaSpell.asset @@ -20,6 +20,6 @@ MonoBehaviour: Radius: 5 enemyLayerMask: serializedVersion: 2 - m_Bits: 128 + m_Bits: 1024 SlowFactor: 0.5 EffectDuration: 3 diff --git a/Assets/_Project/Scripts/Gameplay/BuilderSpells/FireballSpellDefinition.cs b/Assets/_Project/Scripts/Gameplay/BuilderSpells/FireballSpellDefinition.cs index b21e70c..5fe9ee9 100644 --- a/Assets/_Project/Scripts/Gameplay/BuilderSpells/FireballSpellDefinition.cs +++ b/Assets/_Project/Scripts/Gameplay/BuilderSpells/FireballSpellDefinition.cs @@ -10,7 +10,7 @@ namespace TD.Gameplay.BuilderSpells /// /// /// is - /// — the cast controller shows only a fixed-size reticle, even though + /// — the cast controller shows only a fixed-size reticule, even though /// is still used internally here as the splash /// radius (0 = no splash, direct hit only). /// @@ -19,6 +19,14 @@ namespace TD.Gameplay.BuilderSpells { public override BuilderSpellKind Kind => BuilderSpellKind.Fireball; + [Header("Impact VFX")] + [Tooltip("Prefab spawned at the target point on a successful cast. Optional — leave empty for no visual.")] + [SerializeField] private GameObject impactVfxPrefab; + + [Tooltip("Seconds before the spawned VFX instance is destroyed.")] + [Min(0f)] + [SerializeField] private float impactVfxLifetime = 2f; + [Header("Fireball")] [Tooltip("Damage dealt to every enemy within Radius of the target point.")] [Min(0f)] @@ -43,5 +51,11 @@ namespace TD.Gameplay.BuilderSpells return hitAny; } + + public override void ClientPlayVfx(Vector3 targetPoint) + { + if (impactVfxPrefab != null) + Destroy(Instantiate(impactVfxPrefab, targetPoint, Quaternion.identity), impactVfxLifetime); + } } }