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,5 +1,48 @@
|
|||
namespace TD.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// How a tower's attack damage is typed. Determines which lingering effect is applied
|
||||
/// on hit and how enemy resistances/weaknesses are calculated (Phase 1.5+).
|
||||
/// </summary>
|
||||
public enum DamageType : byte
|
||||
{
|
||||
Physical = 0,
|
||||
Piercing = 1,
|
||||
Cold = 2,
|
||||
Fire = 3,
|
||||
Poison = 4,
|
||||
Holy = 5,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// How a tower selects which enemy in range to attack.
|
||||
/// </summary>
|
||||
public enum TargetPriority : byte
|
||||
{
|
||||
/// <summary>Nearest enemy to the tower's center.</summary>
|
||||
Closest = 0,
|
||||
/// <summary>Enemy with the lowest current HP.</summary>
|
||||
Weakest = 1,
|
||||
/// <summary>Enemy with the highest current HP.</summary>
|
||||
Strongest = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// How a tower's damage is distributed across enemies.
|
||||
/// Orthogonal to <see cref="TowerDefinition.ProjectilePrefab"/>: any target type
|
||||
/// can be delivered by a projectile or hitscan.
|
||||
/// </summary>
|
||||
public enum TargetType : byte
|
||||
{
|
||||
/// <summary>Hits one enemy for full damage.</summary>
|
||||
Single = 0,
|
||||
/// <summary>Hits the primary target, then all enemies within SplashRadius.</summary>
|
||||
Splash = 1,
|
||||
/// <summary>Chains damage to up to ChainCount additional nearby enemies.</summary>
|
||||
Chain = 2,
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Identifies a player slot in a match. Backed by byte to keep grid arrays compact.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
using UnityEngine;
|
||||
using TD.Core;
|
||||
|
||||
public class GridCoordsTest : MonoBehaviour
|
||||
{
|
||||
void Start()
|
||||
{
|
||||
Debug.Log($"Tile (5,7) world center: {GridCoordinates.GridToWorld(new Vector2Int(5, 7))}");
|
||||
Debug.Log($"World (5.3, 0, 6.8) maps to tile: {GridCoordinates.WorldToGrid(new Vector3(5.3f, 0, 6.8f))}");
|
||||
Debug.Log($"2x2 footprint at (5,7) center: {GridCoordinates.GetFootprintCenterWorld(new Vector2Int(5, 7), new Vector2Int(2, 2))}");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9c2af3b2731bd314e8502ac9db3a8bc5
|
||||
Loading…
Add table
Add a link
Reference in a new issue