Attack Boon Changes
This commit is contained in:
@@ -38,5 +38,26 @@ namespace ProjectM.Tests
|
||||
Assert.DoesNotThrow(() => group.SortSystems(),
|
||||
"A [UpdateBefore/After] cycle in the run/cycle/combat chain throws here instead of only at Play world-creation.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void PredictedCombatChain_Sorts_Without_A_Dependency_Cycle()
|
||||
{
|
||||
// Phase 1.7 added DashTrailDamageSystem ([UpdateAfter(DashSystem)][UpdateBefore(HealthApplyDamageSystem)])
|
||||
// and KillRewardSystem ([UpdateAfter(HealthApplyDamageSystem)]) to the predicted combat chain. A cycle in
|
||||
// these [UpdateBefore/After] edges is INVISIBLE to per-system fixtures — it only throws at Play world
|
||||
// creation. Co-register the chain and sort to reproduce that headlessly (SortSystems only, never Update).
|
||||
using var world = new World("OrderCyclePredicted");
|
||||
var group = world.GetOrCreateSystemManaged<SimulationSystemGroup>();
|
||||
void Add<T>() where T : unmanaged, ISystem
|
||||
=> group.AddSystemToUpdateList(world.GetOrCreateSystem<T>());
|
||||
|
||||
Add<StatRecomputeSystem>(); Add<MeleeComboSystem>(); Add<DashSystem>(); Add<DashTrailDamageSystem>();
|
||||
Add<AbilityFireSystem>(); Add<ProjectileMoveSystem>(); Add<ProjectileDamageSystem>();
|
||||
Add<HealthApplyDamageSystem>(); Add<KillRewardSystem>();
|
||||
|
||||
Assert.DoesNotThrow(() => group.SortSystems(),
|
||||
"A cycle in the Phase 1.7 predicted combat chain throws here instead of only at Play world-creation.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user