Adding major combat changes and features
This commit is contained in:
parent
abcefcd7f1
commit
42ee0bf65d
28 changed files with 1653 additions and 46 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using UnityEngine;
|
||||
using TD.Core;
|
||||
|
||||
namespace TD.Towers
|
||||
{
|
||||
|
|
@ -68,29 +69,78 @@ namespace TD.Towers
|
|||
public GameObject TowerPrefab;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Combat — STUBBED
|
||||
// Combat
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
[Header("Combat (Stubbed — not consumed until combat system is implemented)")]
|
||||
[Tooltip("STUBBED. Damage dealt per hit to a single target.")]
|
||||
[Header("Combat — Targeting")]
|
||||
[Tooltip("How the tower's damage is typed. Determines lingering effects and enemy " +
|
||||
"resistance/weakness interactions.")]
|
||||
public DamageType DamageType;
|
||||
|
||||
[Tooltip("Which enemy in range the tower prioritizes.")]
|
||||
public TargetPriority TargetPriority;
|
||||
|
||||
[Tooltip("How damage is distributed: Single (one enemy), Splash (primary + radius), " +
|
||||
"Chain (primary then N nearest neighbours).")]
|
||||
public TargetType TargetType;
|
||||
|
||||
[Tooltip("When true, this tower can only target grounded enemies. " +
|
||||
"Default false = targets both grounded and flying units.")]
|
||||
public bool GroundedOnly;
|
||||
|
||||
[Header("Combat — Attack")]
|
||||
[Tooltip("Damage dealt per hit to the primary target, before resistances.")]
|
||||
public float Damage;
|
||||
|
||||
[Tooltip("STUBBED. Attack range in world units. Enemies within this radius are targetable.")]
|
||||
[Tooltip("Attack range in world units. Enemies within this radius are targetable. " +
|
||||
"Displayed as a translucent decal circle when the tower is selected.")]
|
||||
public float Range;
|
||||
|
||||
[Tooltip("STUBBED. Attacks per second.")]
|
||||
[Tooltip("Attacks per second.")]
|
||||
public float FireRate;
|
||||
|
||||
[Tooltip("STUBBED. Radius of splash damage around the impact point. 0 = single target.")]
|
||||
[Header("Combat — Area")]
|
||||
[Tooltip("Radius of splash damage around the primary impact point. " +
|
||||
"Only used when TargetType = Splash.")]
|
||||
public float SplashRadius;
|
||||
|
||||
[Tooltip("STUBBED. Fraction by which enemy movement speed is multiplied on hit. " +
|
||||
"1.0 = no slow. 0.5 = 50% slow.")]
|
||||
[Tooltip("Number of additional enemies damage chains to after the primary target. " +
|
||||
"Only used when TargetType = Chain.")]
|
||||
public int ChainCount;
|
||||
|
||||
[Tooltip("Maximum world-unit distance each chain jump can travel. " +
|
||||
"Only used when TargetType = Chain.")]
|
||||
public float ChainRange;
|
||||
|
||||
[Header("Combat — Effects")]
|
||||
[Tooltip("For Cold towers: fraction of movement speed retained on hit. " +
|
||||
"1.0 = no slow, 0.5 = half speed. Ignored for other damage types.")]
|
||||
[Range(0f, 1f)]
|
||||
public float SlowFactor = 1f;
|
||||
|
||||
[Tooltip("STUBBED. Projectile prefab fired at targets. Null = hitscan (instant hit, no " +
|
||||
"projectile travel).")]
|
||||
[Tooltip("For Fire / Poison towers: damage per second applied as a damage-over-time tick. " +
|
||||
"Ignored for other damage types.")]
|
||||
public float DotDamagePerSecond;
|
||||
|
||||
[Tooltip("Duration in seconds that any lingering effect (slow, burn, poison) persists " +
|
||||
"after the hit. 0 = no lingering effect.")]
|
||||
public float EffectDuration;
|
||||
|
||||
[Header("Combat — Projectile")]
|
||||
[Tooltip("Prefab fired at targets. Must have a Projectile component, NetworkObject, " +
|
||||
"and NetworkTransform at its root. Null = hitscan (instant hit, no travel).")]
|
||||
public GameObject ProjectilePrefab;
|
||||
|
||||
[Tooltip("World-units per second the projectile travels. Ignored when ProjectilePrefab is null.")]
|
||||
public float ProjectileSpeed = 10f;
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Upgrades
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
[Header("Upgrades")]
|
||||
[Tooltip("Tower definitions this tower can upgrade into. Leave empty for no upgrades. " +
|
||||
"Multiple entries create branching paths — the player chooses one.")]
|
||||
public TowerDefinition[] UpgradePaths;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue