Erweiterte Regeln: in jeder dritten Runde ein neutraler Wächter in jeder Lanemitte; wer beim Fall mehr Einheiten (dann mehr Leben) in 8 m hat, nimmt das Lager: Glutsegen (+10 % Schaden), Mondschild (Schild 10 %), Beute (50 Gold je Spieler). Fog of War (LuneFog, nur Darstellung): Gegner sichtbar in 9 m um eigene Einheiten, 10 m um Gebäude, 12 m um Späher; Späher (40 Gold, 3 Runden, Teamwirkung) zeigen in der Planung die gegnerische Armee ihrer Lane. HUD: Teampanel SPÄHER und LAGER, Lager-Sechseck, Nebel in Feld, Minimap, Namensschildern und Lane-Zählung. Kern 597/597 (s3 31), EditMode 33/33, PlayMode 18/18, Verify 718/0, Selbsttest 30/30, Golden 0, Fingerabdruck unverändert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Luneraria.Core.Tests
|
|
{
|
|
/// <summary>
|
|
/// A test suite in the style of the Godot reference tests: named checks, counted, failures
|
|
/// collected with their label. The same suites run in the .NET harness (tools/dotnet) and in
|
|
/// Unity's Test Runner (Unity/CoreSuiteTests.cs); check counts stay comparable with Godot.
|
|
/// </summary>
|
|
public abstract class CheckSuite
|
|
{
|
|
public int Checks { get; private set; }
|
|
public readonly List<string> Failures = new List<string>();
|
|
public readonly List<string> Notes = new List<string>();
|
|
/// <summary>Folder with the golden files (Assets/Luneraria/Tests/Core/Golden).</summary>
|
|
public string GoldenDirectory = "";
|
|
|
|
public abstract string Name { get; }
|
|
|
|
protected abstract void RunChecks();
|
|
|
|
public bool Run()
|
|
{
|
|
Checks = 0;
|
|
Failures.Clear();
|
|
Notes.Clear();
|
|
try
|
|
{
|
|
RunChecks();
|
|
}
|
|
catch (Exception error)
|
|
{
|
|
Failures.Add("EXCEPTION " + error.GetType().Name + ": " + error.Message + "\n" + error.StackTrace);
|
|
}
|
|
return Failures.Count == 0;
|
|
}
|
|
|
|
protected void Check(bool ok, string label)
|
|
{
|
|
Checks += 1;
|
|
if (!ok)
|
|
Failures.Add(label);
|
|
}
|
|
|
|
protected void Note(string text)
|
|
{
|
|
Notes.Add(text);
|
|
}
|
|
|
|
public static IList<CheckSuite> All()
|
|
{
|
|
return new List<CheckSuite> { new ContentSuite(), new CoreRulesSuite(), new M2RulesSuite(), new GoldenSuite(), new DeterminismSuite(), new NetSuite(), new NetRoundsSuite(), new H1HeroSuite(), new S1RulesSuite(), new S2RulesSuite(), new S3RulesSuite() };
|
|
}
|
|
}
|
|
}
|