Core/RunTypes.cs
using System;
using System.Collections.Generic;

namespace Prototype;

public enum RunPhase { Lobby, Generating, Combat, RoomClear, Reward, Defeat }
public enum EnemyRole { Chaser, Gunner, Charger, Boss }

public readonly record struct WeaponSpec(
	string Id, string Name, float Damage, float ShotsPerSecond, float Range,
	float Spread, int Pellets, int Magazine, float ReloadSeconds, Color Color );

public readonly record struct EnemySpec(
	EnemyRole Role, float Health, float Speed, float Damage, float AttackRange,
	float AttackCooldown, Color Color, float Scale );

public readonly record struct RoomCell( int X, int Y )
{
	public Vector3 World( float spacing ) => new( X * spacing, Y * spacing, 0 );
}

public readonly record struct RoomLink( RoomCell From, RoomCell To );

public static class PrototypeCatalog
{
	public static readonly WeaponSpec Rifle = new(
		"rifle", "Pulse Rifle", 18f, 7.5f, 1450f, 1.7f, 1, 28, 1.25f, new Color( 0.2f, 0.85f, 1f ) );

	public static readonly WeaponSpec Scatter = new(
		"scatter", "Scatter Array", 10f, 1.35f, 850f, 9f, 7, 6, 1.8f, new Color( 1f, 0.55f, 0.15f ) );

	public static EnemySpec Enemy( EnemyRole role, int room )
	{
		var scale = 1f + room * 0.13f;
		return role switch
		{
			EnemyRole.Gunner => new( role, 46f * scale, 145f, 8f * scale, 620f, 1.15f, new Color( .95f, .32f, .28f ), .9f ),
			EnemyRole.Charger => new( role, 72f * scale, 115f, 18f * scale, 90f, 2.4f, new Color( 1f, .72f, .16f ), 1.1f ),
			EnemyRole.Boss => new( role, 520f * scale, 92f, 22f * scale, 720f, .72f, new Color( .72f, .2f, 1f ), 1.8f ),
			_ => new( role, 54f * scale, 175f, 12f * scale, 80f, .85f, new Color( .92f, .18f, .4f ), 1f )
		};
	}
}