61 lines
2.9 KiB
C#
61 lines
2.9 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace GazeLab.Data
|
|
{
|
|
[Serializable]
|
|
public struct WaveEnemySpawnEntry
|
|
{
|
|
public EnemyArchetypeDefinition archetype;
|
|
[Tooltip("Number of ships to spawn in this squad. If 0 or less, uses the Archetype's default squad count.")]
|
|
public int spawnCount;
|
|
[Tooltip("If true, triggers boss alerts and displays the Boss Health Bar.")]
|
|
public bool isWaveBossLead;
|
|
[Tooltip("Scale multiplier (leave 0 to auto-use Swarm/Standard Archetype default).")]
|
|
[Range(0f, 3.0f)] public float roleScaleMultiplier;
|
|
[Tooltip("HP multiplier (leave 0 to auto-use Swarm/Standard Archetype default).")]
|
|
[Range(0f, 10.0f)] public float healthMultiplier;
|
|
[Tooltip("Damage multiplier (leave 0 to auto-use Swarm/Standard Archetype default).")]
|
|
[Range(0f, 5.0f)] public float damageMultiplier;
|
|
[Min(0f)] public float initialSpawnDelay;
|
|
[Min(0.15f)] public float spawnInterval;
|
|
|
|
public int EffectiveCount => spawnCount > 0 ? spawnCount : (archetype != null ? archetype.defaultSquadSpawnCount : 1);
|
|
|
|
public float EffectiveScale => roleScaleMultiplier > 0.01f ? roleScaleMultiplier :
|
|
(archetype != null && archetype.roleTier == EnemyRoleTier.SwarmMinion ? archetype.swarmScaleMultiplier : 1f);
|
|
|
|
public float EffectiveHealth => healthMultiplier > 0.01f ? healthMultiplier :
|
|
(archetype != null && archetype.roleTier == EnemyRoleTier.SwarmMinion ? archetype.swarmHealthMultiplier : 1f);
|
|
|
|
public float EffectiveDamage => damageMultiplier > 0.01f ? damageMultiplier :
|
|
(archetype != null && archetype.roleTier == EnemyRoleTier.SwarmMinion ? archetype.swarmDamageMultiplier : 1f);
|
|
}
|
|
|
|
[CreateAssetMenu(fileName = "Wave_01", menuName = "GazeLab/Waves/Wave Definition", order = 1)]
|
|
public sealed class WaveDefinitionSO : ScriptableObject
|
|
{
|
|
[Header("Wave Identity")]
|
|
public int waveNumber = 1;
|
|
public string waveTitle = "Deep Sector Recon";
|
|
public bool isBossWave = false;
|
|
[Tooltip("Optional briefing modal that pauses the game the first time this wave starts.")]
|
|
public TutorialTooltipDefinition waveStartTooltip;
|
|
|
|
[Header("Asteroid Spawning")]
|
|
[Range(0, 80)] public int normalAsteroidCount = 6;
|
|
[Range(0, 50)] public int resourceAsteroidCount = 4;
|
|
[Range(0f, 1f)] public float rareUraniumGoldRatio = 0.2f;
|
|
[Range(0.2f, 4.0f)] public float asteroidSpawnInterval = 1.1f;
|
|
[Range(0.5f, 3.0f)] public float asteroidSpeedMultiplier = 1.0f;
|
|
|
|
[Header("Guaranteed Resource Yield (Anti-RNG Protection)")]
|
|
[Tooltip("Minimum scrap/gold/uranium awarded to ensure upgrades can be afforded regardless of luck.")]
|
|
public ResourceCost guaranteedMinimumYield = new ResourceCost(12, 0, 0);
|
|
|
|
[Header("Enemy Squad & Boss Spawns")]
|
|
public WaveEnemySpawnEntry[] enemySpawns;
|
|
}
|
|
}
|
|
|