LANTERN kit into the shipping scene + frame rename (audit H2/M4)
H2 was the audit's sharpest finding: in Game.unity every player spawned with four ability sockets pointing at SparkIds the baked AbilityDatabase did not contain, so all four resolved to Damage=0 Range=0 Cooldown=0. Melee and dash were the only working combat verbs in the built game. Cause: the 5 LANTERN Sparks were added to GymSub.unity and never to Gameplay.unity. - Gameplay.unity's AbilityDatabaseAuthoring now carries all 9 defs (the 4 legacy ids keep their numbers; Sparks are 5-9) with their effect prefabs. Live-verified in Play: sockets now read Vortex 8dmg/6range/420cd, Blink 20range/1cd, Hook & Pull 15dmg/25range/120cd, Light Zone 6dmg/5range/480cd. - Removed 6 orphaned authoring GameObjects the purge left behind in the subscene (StorageSpawner, StructureCatalog, ItemDatabase, SpitterProjectileConfig, BoonCatalog, MetaCatalog) and the RoomDressing object in Game.unity — the latter is what scattered 47 Synty desert props into the seabed murk. - Deleted 4 now-unreferenced prefabs: EnemySpit, Pylon, Storage, Wall. - Frame rename (M4): FrameKind.Warrior/Ranger -> Bathynaut/Harpooner, 93 identifier sites. Byte values pinned (2/3), so no ghost-hash or save impact. The menu said "Warrior"/"Ranger" to players three weeks after the frames were renamed in design. - Menu now reads LANTERN / "Light is territory — co-op descent" instead of "PROJECT M" / "Frontier colony — co-op" (the Awakening-Engine tagline, two directions stale). - Removed the "Replay Tutorial" button and the Settings ONBOARDING section: both drove coach-marks DR-051 deleted. The settings fields still round-trip so existing settings files load unchanged. All four project scenes + all prefabs verified free of missing scripts. Server measured at 59.6 ticks/s against a 60 Hz target. 295/295 green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,7 +7,7 @@ namespace ProjectM.Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Slice 2 — the pure class mapping: which Fire ability each class gets, and that the DRG-asymmetric trait
|
||||
/// seeds fold the right direction (Warrior = melee bruiser / tankier / slower; Ranger = ranged / faster /
|
||||
/// seeds fold the right direction (Bathynaut = melee bruiser / tankier / slower; Harpooner = ranged / faster /
|
||||
/// squishier + a wider auto-assist co-op hook), all on the reserved <see cref="Tuning.ClassSourceId"/> range.
|
||||
/// </summary>
|
||||
public class ClassTraitsTests
|
||||
@@ -27,21 +27,21 @@ namespace ProjectM.Tests
|
||||
[Test]
|
||||
public void Normalize_DefaultsToWarrior()
|
||||
{
|
||||
Assert.AreEqual(ClassTraits.WarriorClass, ClassTraits.Normalize(0));
|
||||
Assert.AreEqual(ClassTraits.WarriorClass, ClassTraits.Normalize(99));
|
||||
Assert.AreEqual(ClassTraits.RangerClass, ClassTraits.Normalize(ClassTraits.RangerClass));
|
||||
Assert.AreEqual(ClassTraits.BathynautFrame, ClassTraits.Normalize(0));
|
||||
Assert.AreEqual(ClassTraits.BathynautFrame, ClassTraits.Normalize(99));
|
||||
Assert.AreEqual(ClassTraits.HarpoonerFrame, ClassTraits.Normalize(ClassTraits.HarpoonerFrame));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Warrior_Seeds_Buff_Melee_And_Tankiness_And_Slow()
|
||||
{
|
||||
using var world = new World("ClassTraitsWarrior");
|
||||
var mods = SeededBuffer(world, ClassTraits.WarriorClass);
|
||||
Assert.AreEqual(4, mods.Length, "Warrior seeds 4 trait modifiers.");
|
||||
Assert.Greater(StatMath.Apply(10f, StatTarget.MeleeDamage, mods), 10f, "Warrior hits harder in melee.");
|
||||
Assert.Greater(StatMath.Apply(2.6f, StatTarget.MeleeRange, mods), 2.6f, "Warrior reaches further in melee.");
|
||||
Assert.Less(StatMath.Apply(5f, StatTarget.MoveSpeed, mods), 5f, "Warrior moves slower.");
|
||||
Assert.Greater(StatMath.Apply(100f, StatTarget.MaxHealth, mods), 100f, "Warrior is tankier.");
|
||||
var mods = SeededBuffer(world, ClassTraits.BathynautFrame);
|
||||
Assert.AreEqual(4, mods.Length, "Bathynaut seeds 4 trait modifiers.");
|
||||
Assert.Greater(StatMath.Apply(10f, StatTarget.MeleeDamage, mods), 10f, "Bathynaut hits harder in melee.");
|
||||
Assert.Greater(StatMath.Apply(2.6f, StatTarget.MeleeRange, mods), 2.6f, "Bathynaut reaches further in melee.");
|
||||
Assert.Less(StatMath.Apply(5f, StatTarget.MoveSpeed, mods), 5f, "Bathynaut moves slower.");
|
||||
Assert.Greater(StatMath.Apply(100f, StatTarget.MaxHealth, mods), 100f, "Bathynaut is tankier.");
|
||||
for (int i = 0; i < mods.Length; i++)
|
||||
Assert.GreaterOrEqual(mods[i].SourceId, Tuning.ClassSourceId, "class seeds use the reserved SourceId range.");
|
||||
}
|
||||
@@ -50,13 +50,13 @@ namespace ProjectM.Tests
|
||||
public void Ranger_Seeds_Buff_Range_Speed_Assist_And_Leave_Melee_Weak()
|
||||
{
|
||||
using var world = new World("ClassTraitsRanger");
|
||||
var mods = SeededBuffer(world, ClassTraits.RangerClass);
|
||||
Assert.AreEqual(4, mods.Length, "Ranger seeds 4 trait modifiers.");
|
||||
Assert.Greater(StatMath.Apply(5f, StatTarget.MoveSpeed, mods), 5f, "Ranger moves faster.");
|
||||
Assert.Less(StatMath.Apply(100f, StatTarget.MaxHealth, mods), 100f, "Ranger is squishier.");
|
||||
Assert.Greater(StatMath.Apply(20f, StatTarget.Range, mods), 20f, "Ranger has longer projectile range.");
|
||||
Assert.Greater(StatMath.Apply(0f, StatTarget.AutoTargetRange, mods), 0f, "Ranger has a wider auto-assist (the co-op hook).");
|
||||
Assert.AreEqual(10f, StatMath.Apply(10f, StatTarget.MeleeDamage, mods), 0.001f, "Ranger melee is unbuffed (weaker than the Warrior).");
|
||||
var mods = SeededBuffer(world, ClassTraits.HarpoonerFrame);
|
||||
Assert.AreEqual(4, mods.Length, "Harpooner seeds 4 trait modifiers.");
|
||||
Assert.Greater(StatMath.Apply(5f, StatTarget.MoveSpeed, mods), 5f, "Harpooner moves faster.");
|
||||
Assert.Less(StatMath.Apply(100f, StatTarget.MaxHealth, mods), 100f, "Harpooner is squishier.");
|
||||
Assert.Greater(StatMath.Apply(20f, StatTarget.Range, mods), 20f, "Harpooner has longer projectile range.");
|
||||
Assert.Greater(StatMath.Apply(0f, StatTarget.AutoTargetRange, mods), 0f, "Harpooner has a wider auto-assist (the co-op hook).");
|
||||
Assert.AreEqual(10f, StatMath.Apply(10f, StatTarget.MeleeDamage, mods), 0.001f, "Harpooner melee is unbuffed (weaker than the Bathynaut).");
|
||||
}
|
||||
|
||||
static int CountClassSeeds(DynamicBuffer<StatModifier> mods)
|
||||
@@ -77,7 +77,7 @@ namespace ProjectM.Tests
|
||||
[Test]
|
||||
public void AppendSeeds_EmitsExactlyClassSeedCount_AllInClassRange()
|
||||
{
|
||||
foreach (var classId in new[] { ClassTraits.WarriorClass, ClassTraits.RangerClass })
|
||||
foreach (var classId in new[] { ClassTraits.BathynautFrame, ClassTraits.HarpoonerFrame })
|
||||
{
|
||||
using var world = new World("ClassTraitsCount");
|
||||
var em = world.EntityManager;
|
||||
@@ -99,24 +99,24 @@ namespace ProjectM.Tests
|
||||
var e = em.CreateEntity();
|
||||
em.AddBuffer<StatModifier>(e);
|
||||
|
||||
// Seed Warrior, swap to Ranger, then back to Warrior.
|
||||
ClassTraits.Reapply(ClassTraits.WarriorClass, em.GetBuffer<StatModifier>(e));
|
||||
Assert.AreEqual(ClassTraits.ClassSeedCount, CountClassSeeds(em.GetBuffer<StatModifier>(e)), "Warrior seeds the class-seed count.");
|
||||
// Seed Bathynaut, swap to Harpooner, then back to Bathynaut.
|
||||
ClassTraits.Reapply(ClassTraits.BathynautFrame, em.GetBuffer<StatModifier>(e));
|
||||
Assert.AreEqual(ClassTraits.ClassSeedCount, CountClassSeeds(em.GetBuffer<StatModifier>(e)), "Bathynaut seeds the class-seed count.");
|
||||
|
||||
ClassTraits.Reapply(ClassTraits.RangerClass, em.GetBuffer<StatModifier>(e));
|
||||
Assert.AreEqual(ClassTraits.ClassSeedCount, CountClassSeeds(em.GetBuffer<StatModifier>(e)), "Ranger leaves exactly the class-seed count (old seeds stripped).");
|
||||
Assert.Greater(StatMath.Apply(5f, StatTarget.MoveSpeed, em.GetBuffer<StatModifier>(e)), 5f, "Ranger moves faster after the swap.");
|
||||
ClassTraits.Reapply(ClassTraits.HarpoonerFrame, em.GetBuffer<StatModifier>(e));
|
||||
Assert.AreEqual(ClassTraits.ClassSeedCount, CountClassSeeds(em.GetBuffer<StatModifier>(e)), "Harpooner leaves exactly the class-seed count (old seeds stripped).");
|
||||
Assert.Greater(StatMath.Apply(5f, StatTarget.MoveSpeed, em.GetBuffer<StatModifier>(e)), 5f, "Harpooner moves faster after the swap.");
|
||||
|
||||
ClassTraits.Reapply(ClassTraits.WarriorClass, em.GetBuffer<StatModifier>(e));
|
||||
ClassTraits.Reapply(ClassTraits.BathynautFrame, em.GetBuffer<StatModifier>(e));
|
||||
var back = em.GetBuffer<StatModifier>(e);
|
||||
Assert.AreEqual(ClassTraits.ClassSeedCount, CountClassSeeds(back), "Warrior again: no accumulation across swaps.");
|
||||
Assert.AreEqual(ClassTraits.ClassSeedCount, CountClassSeeds(back), "Bathynaut again: no accumulation across swaps.");
|
||||
|
||||
// Value-equality vs a fresh-spawned Warrior buffer (the ECB overload) — catches same-target PercentMult
|
||||
// Value-equality vs a fresh-spawned Bathynaut buffer (the ECB overload) — catches same-target PercentMult
|
||||
// doubling or a strip-order regression that a count-only assert would miss.
|
||||
using var refWorld = new World("ClassTraitsWarriorRef");
|
||||
var fresh = SeededBuffer(refWorld, ClassTraits.WarriorClass);
|
||||
Assert.AreEqual(StatMath.Apply(100f, StatTarget.MaxHealth, fresh), StatMath.Apply(100f, StatTarget.MaxHealth, back), 1e-4f, "MaxHealth folds identically to a fresh Warrior.");
|
||||
Assert.AreEqual(StatMath.Apply(5f, StatTarget.MoveSpeed, fresh), StatMath.Apply(5f, StatTarget.MoveSpeed, back), 1e-4f, "MoveSpeed folds identically to a fresh Warrior.");
|
||||
var fresh = SeededBuffer(refWorld, ClassTraits.BathynautFrame);
|
||||
Assert.AreEqual(StatMath.Apply(100f, StatTarget.MaxHealth, fresh), StatMath.Apply(100f, StatTarget.MaxHealth, back), 1e-4f, "MaxHealth folds identically to a fresh Bathynaut.");
|
||||
Assert.AreEqual(StatMath.Apply(5f, StatTarget.MoveSpeed, fresh), StatMath.Apply(5f, StatTarget.MoveSpeed, back), 1e-4f, "MoveSpeed folds identically to a fresh Bathynaut.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -133,7 +133,7 @@ namespace ProjectM.Tests
|
||||
seed.Add(new StatModifier { Target = (byte)StatTarget.Damage, Op = (byte)ModOp.PercentAdd, Value = 0.25f, SourceId = 0x00DEB061u });
|
||||
seed.Add(new StatModifier { Target = (byte)StatTarget.MaxHealth, Op = (byte)ModOp.Flat, Value = 10f, SourceId = boundary });
|
||||
|
||||
ClassTraits.Reapply(ClassTraits.RangerClass, em.GetBuffer<StatModifier>(e));
|
||||
ClassTraits.Reapply(ClassTraits.HarpoonerFrame, em.GetBuffer<StatModifier>(e));
|
||||
var after = em.GetBuffer<StatModifier>(e);
|
||||
|
||||
Assert.AreEqual(ClassTraits.ClassSeedCount, CountClassSeeds(after), "exactly the class-seed count of class seeds present.");
|
||||
|
||||
Reference in New Issue
Block a user