87 lines
3.6 KiB
C#
87 lines
3.6 KiB
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace GazeLab.Data
|
|
{
|
|
[Serializable]
|
|
public struct WaveEnemyGroup
|
|
{
|
|
public EnemyArchetypeDefinition archetype;
|
|
[Range(1, 25)] public int count;
|
|
[Tooltip("If true, displays the Boss Health Bar and scales this unit as the wave's Boss introduction.")]
|
|
public bool isWaveBossLead;
|
|
[Tooltip("Multiplier applied to this unit's base scale (e.g. 1.25x when a regular ship debuts as Wave 5 Boss, or 0.7x when a former Boss returns later as an Elite).")]
|
|
[Range(0.4f, 2.0f)] public float roleScaleMultiplier;
|
|
[Range(0.5f, 8.0f)] public float healthMultiplier;
|
|
[Range(0.3f, 3.0f)] public float damageMultiplier;
|
|
[Min(0f)] public float initialSpawnDelay;
|
|
[Min(0.2f)] public float spawnInterval;
|
|
}
|
|
|
|
[Serializable]
|
|
public class WaveDefinition
|
|
{
|
|
public int waveNumber = 1;
|
|
public string waveTitle = "Asteroid Belt Sector 1";
|
|
public bool isBossWave = false;
|
|
[Tooltip("Optional modal tooltip shown at the start of this wave.")]
|
|
public TutorialTooltipDefinition waveStartTooltip;
|
|
|
|
[Header("Asteroid Spawning")]
|
|
[Range(0, 60)] public int normalAsteroidCount = 6;
|
|
[Range(0, 40)] 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 Minimum Resource Floor (Anti-RNG Protection)")]
|
|
[Tooltip("Ensures the player receives at least this many resources from the wave so progression gates (like Level 2 at Wave 5) are always reachable.")]
|
|
public ResourceCost guaranteedMinimumYield = new ResourceCost(12, 0, 0);
|
|
|
|
[Header("Enemy & Boss Groups")]
|
|
public WaveEnemyGroup[] enemyGroups;
|
|
}
|
|
|
|
[CreateAssetMenu(fileName = "WaveCatalog", menuName = "GazeLab/Core/Wave Catalog", order = 1)]
|
|
public sealed class WaveCatalog : ScriptableObject
|
|
{
|
|
[Header("Global Pacing & Scaling")]
|
|
[Tooltip("Boss waves occur every N waves (default: every 5 waves).")]
|
|
[Range(3, 15)] public int bossWaveInterval = 5;
|
|
[Range(0.05f, 0.65f)] public float baseBigAsteroidSplitChance = 0.25f;
|
|
|
|
[Header("Asteroid & Resource Sprites")]
|
|
public Sprite[] normalAsteroidSprites;
|
|
public Sprite[] scrapAsteroidSprites;
|
|
public Sprite[] goldAsteroidSprites;
|
|
public Sprite[] uraniumAsteroidSprites;
|
|
public Sprite[] scrapLootSprites;
|
|
public Sprite[] goldLootSprites;
|
|
public Sprite[] uraniumLootSprites;
|
|
|
|
[Header("Resource Pickup Configuration (Scales, Collision Radius, Suction)")]
|
|
[Tooltip("Adjustable configuration for in-game floating resources (Scrap, Gold, Uranium sizes, etc.).")]
|
|
public ResourcePickupConfigSO resourcePickupConfig;
|
|
|
|
[Header("Modular ScriptableObject Waves (Drag & Drop Wave Assets Here)")]
|
|
public WaveDefinitionSO[] authoredWaves;
|
|
|
|
[Header("Configured Waves (Fallback Legacy / Auto-Scales infinitely past the last entry)")]
|
|
public WaveDefinition[] waves;
|
|
|
|
public WaveDefinitionSO GetWaveSO(int waveNumber)
|
|
{
|
|
if (authoredWaves != null && authoredWaves.Length > 0)
|
|
{
|
|
int index = waveNumber - 1;
|
|
if (index >= 0 && index < authoredWaves.Length && authoredWaves[index] != null)
|
|
{
|
|
return authoredWaves[index];
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
|