• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

orion-ecs / keen-eye / 30134259809

24 Jul 2026 11:37PM UTC coverage: 63.876% (-0.9%) from 64.782%
30134259809

Pull #1255

github

web-flow
Merge ceba7d2f5 into 073a2682b
Pull Request #1255: feat(samples): Add NOVAFALL Phase C — floor personalities, Flashover, Adrenaline Save, modes, persistence, TestBridge

8871 of 13117 branches covered (67.63%)

Branch coverage included in aggregate %.

305 of 852 new or added lines in 23 files covered. (35.8%)

6 existing lines in 4 files now uncovered.

52559 of 83053 relevant lines covered (63.28%)

1.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

41.03
/samples/KeenEyes.Sample.NovaFall/Systems/CrushSystem.cs
1
namespace KeenEyes.Sample.NovaFall;
2

3
/// <summary>
4
/// Resolves the ball touching the Furnace ceiling: death — unless the run's
5
/// one Adrenaline Save is still unspent, in which case the kill converts into
6
/// a 20%-speed last chance (see <see cref="AdrenalineSystem"/>). In Ember
7
/// Garden the crusher is configured off and the ceiling merely clamps.
8
/// </summary>
9
public sealed class CrushSystem : SystemBase
10
{
11
    /// <inheritdoc />
12
    public override void Update(float deltaTime)
13
    {
14
        ref var state = ref World.GetSingleton<GameState>();
1✔
15
        if (state.Phase != GamePhase.Playing)
1✔
16
        {
17
            return;
×
18
        }
19

20
        var settings = World.GetSingleton<RunConfig>().Settings;
1✔
21

22
        foreach (var entity in World.Query<Ball, Position2D>())
1✔
23
        {
24
            ref readonly var ball = ref World.Get<Ball>(entity);
1✔
25
            ref var position = ref World.Get<Position2D>(entity);
1✔
26

27
            if (position.Y - ball.Radius > Tuning.CeilingY)
1✔
28
            {
29
                break;
1✔
30
            }
31

32
            // Ember Garden: no crusher, no death — the ceiling is just a wall.
33
            if (!settings.CrusherEnabled)
1✔
34
            {
35
                position.Y = Tuning.CeilingY + ball.Radius;
1✔
36
                break;
1✔
37
            }
38

NEW
39
            ref var adrenaline = ref World.GetSingleton<AdrenalineState>();
×
40

41
            // The frame this would kill, the unspent Adrenaline Save fires
42
            // instead: time snaps to 20% for 1.5 real seconds — one last steer.
NEW
43
            if (settings.AdrenalineEnabled && adrenaline.Available)
×
44
            {
NEW
45
                adrenaline.Available = false;
×
NEW
46
                adrenaline.Active = true;
×
NEW
47
                adrenaline.RealSecondsRemaining = Tuning.AdrenalineRealSeconds;
×
NEW
48
                World.GetSingleton<TimeScale>().Value = Tuning.AdrenalineTimeScale;
×
NEW
49
                World.GetSingleton<FrameEvents>().AdrenalineTriggered = true;
×
NEW
50
                World.GetSingleton<RunEventCounters>().AdrenalineSavesUsed++;
×
51
                break;
×
52
            }
53

54
            // While the save window is open the Furnace holds its breath;
55
            // when it expires with the ball still here, this branch stops
56
            // being taken and the next line runs.
NEW
57
            if (adrenaline.Active)
×
58
            {
NEW
59
                break;
×
60
            }
61

NEW
62
            state.Phase = GamePhase.Dead;
×
63

NEW
64
            ref var score = ref World.GetSingleton<ScoreState>();
×
NEW
65
            score.Best = Math.Max(score.Best, (int)score.Score);
×
66

67
            // Only death resets heat.
NEW
68
            ResetHeat();
×
NEW
69
            break;
×
70
        }
71
    }
1✔
72

73
    private void ResetHeat()
74
    {
75
        ref var heat = ref World.GetSingleton<HeatState>();
×
76
        heat.Heat = 0f;
×
77
        heat.Tier = 0;
×
78
    }
×
79
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc