Knowledge Retention Phase

Reflex Training
Mechanic Sector

(Engage card to reveal Pilot's Intelligence.)

Sector ID: 302F

The Pilot's Audit

"The AI Trap: "The Reference Web""

// AI-Generated Code: Spaghetti References
public class Enemy : MonoBehaviour {
    public UIManager ui;     // Dependency
    public AudioManager aud; // Dependency
    public VFXManager vfx;   // Dependency
    
    void Die() {
        ui.UpdateScore();
        aud.PlayBoom();
        vfx.SpawnFire();
    }
}

Protocol Analysis

This is "Coupling Overload." The Enemy script is now bloated with references to systems it shouldn't care about.

Audit Complete

Sector ID: 302A

The Pilot's Audit

"The AI Trap: "The Hardwired Input""

// AI-Generated Code: Rigid & Brittle
void Update() {
    // Audit Fail: Input is welded to the logic.
    // Cannot be undone, replayed, or AI-controlled easily.
    if (Input.GetKeyDown(KeyCode.Space)) {
        FireWeapon();
    }
}

Protocol Analysis

This is "Input Locking." If you want to add controller support or an AI pilot later, you have to rewrite the weapon script.

Audit Complete

Sector ID: 301D

The Pilot's Audit

"The AI Trap: "The Manager Dependency""

// AI-Generated Code: Hard-Wired Managers
public class QuestManager : MonoBehaviour {
    // Audit Fail: QuestManager cannot exist without AudioManager!
    public AudioManager audioMan; 

    public void CompleteQuest() {
        audioMan.PlaySuccessSound(); 
    }
}

Protocol Analysis

This is "System Entanglement." If you try to test a new scene that only needs quests, the game will crash because the `AudioManager` is missing. A professional Navigator uses a Static Event to broadcast the signal into the void, allowing listeners to pick it up if they are present.

Audit Complete

Sector ID: 301A

The Pilot's Audit

"The AI Trap: "The Duplicate Cockpit""

// AI-Generated Code: Dangerous and messy
public class ScoreManager : MonoBehaviour {
    void Awake() {
        // Audit Fail: If you return to this scene, 
        // a second ScoreManager will be created!
        DontDestroyOnLoad(this.gameObject);
    }
}

Protocol Analysis

This is "Instance Overload." Each time you reload the scene, a new ScoreManager appears. Soon, you have a fleet of managers all reporting different scores. A professional pilot audits the "Awake" loop to ensure only the original commander remains in charge.

Audit Complete

Sector ID: 300D

The Pilot's Audit

"The AI Trap: "The Trigger Maze""

// AI-Generated Code: Audit Failure (Messy & Heavy)
void Update() {
    // Audit Fail: This requires complex angle math or 
    // a giant 'Cone' trigger that kills physics performance.
    float angle = Vector3.Angle(transform.forward, player.position - transform.position);
    if (angle < 45f) {
        Attack();
    }
}

Protocol Analysis

`Vector3.Angle` is useful, but it uses expensive square root and inverse cosine calculations. For 100 enemies checking FOV every frame, this creates "Performance Turbulence."

Audit Complete

Sector ID: 303A

The Pilot's Audit

"The AI Trap: "The TV Static""

// AI-Generated Code: Chaos
float[,] GenerateMap(int width) {
    float[,] map = new float[width, width];
    for(int x=0; x<width; x++) {
        for(int y=0; y<width; y++) {
            // Audit Fail: Creates jagged, unnatural spikes.
            map[x,y] = Random.Range(0f, 1f);
        }
    }
    return map;
}

Protocol Analysis

This is "White Noise." It looks like a broken TV screen, not a landscape. No aircraft could land on it.

Audit Complete

Refresh Sector Protocols

Scanning database for new traps