Petrification status and HUD - UQcsse3200/2026-studio-4 GitHub Wiki

Petrification status and HUD

Task: #147
Feature: Status effects #96, HUD #98

Player-side petrification for Final Boss Stage 1 Wave 2. Slow values come from the boss event. HUD shows Petrified under the stats panel, not on the bottom E prompt.

Participants

  • FinalBossPetrificationComponent
  • PlayerPetrificationComponent
  • StatusEffectsControllerComponent
  • CombatStatsComponent
  • PlayerStatsDisplay

Behaviour

  • Hit: still in circle → slow from payload → HUD Petrified.
  • Dodge: left in time → no event.
  • Expire: speed restored, HUD hides.
  • Stage end: CLEAR_REQUESTED removes leftover slow.

Flowchart

flowchart TD
    A[Warning circle resolves] --> B{Player still inside?}
    B -->|no| C[Dodge: no slow, no HUD]
    B -->|yes| D[PETRIFICATION_EFFECT_REQUESTED]
    D --> E[PlayerPetrificationComponent.apply]
    E --> F[Add PetrificationEffect]
    F --> G[Movement speed multiplied]
    G --> H[HUD: Petrified]
    H --> I{Ends how?}
    I -->|timer| J[Effect expires]
    I -->|Stage 1 ends| K[PETRIFICATION_EFFECT_CLEAR_REQUESTED]
    J --> L[Restore speed, hide HUD]
    K --> L

Sequence diagram

sequenceDiagram
    participant Boss as FinalBossPetrification
    participant Player as PlayerPetrificationComponent
    participant Fx as StatusEffectsController
    participant Stats as CombatStatsComponent
    participant HUD as PlayerStatsDisplay

    alt still in circle
        Boss->>Player: PETRIFICATION_EFFECT_REQUESTED
        Player->>Fx: add PetrificationEffect
        Fx->>Stats: movement multiplier
        HUD->>Player: getHudText
        Player-->>HUD: Petrified
    else left in time
        Note over Boss: no player event
    end

    alt duration ends
        Fx->>Player: expired
        Player-->>HUD: empty
    else Stage 1 ends
        Boss->>Player: PETRIFICATION_EFFECT_CLEAR_REQUESTED
        Player->>Fx: remove petrification
        Player-->>HUD: empty
    end

Tests

  • PlayerPetrificationHudTest
  • PlayerPetrificationFlashTest