# Update 01: Eye Types + Co-op Rework

**Status:** Approved Design — Ready for Implementation  
**Affects:** Eye system, Runner movement, inventory, extraction, shrines, GlobalRules  
**Breaking changes:** Yes — removes betrayal, strips innate runner abilities, reworks extraction

---

## Part A: Eye Types System

### Overview

The Eye is no longer a single archetype. Three distinct Eye types offer different playstyles, each built from the existing ability pool (Laser, Scan, TrapPlacer, Incarnation). Eye types are defined by `EyeType_SO` ScriptableObjects and selected in the lobby before match start.

### The 3 Eye Types

| Type | Primary Ability | Has Eyelids | Unique Trait |
|------|----------------|-------------|--------------|
| **The Watcher** | Scan | YES | Faster scan cooldown, wider scan radius, weaker laser (longer cooldown, smaller radius) |
| **The Predator** | Laser | NO | Stronger laser (shorter charge, larger radius), no scan ability, standard traps |
| **The Trapper** | Traps | YES | More active trap slots, cheaper trap Dread cost, no laser ability |

All three Eye types retain: Camera control, Dread Economy, Incarnation.

### Eyelid Mechanic

**Input:** Right-click (toggle) or hold middle-mouse (hold-to-close)

**When closed:**
- Screen goes fully black (render a black overlay, NOT disable camera)
- ALL abilities are locked (cannot fire, scan, place, or incarnate)
- UI remains visible: Dread bar, minimap silhouettes, flash duration indicator
- A "flash dodge window" indicator pulses if flash is incoming (audio cue only, no visual cheat)

**Flash interaction:**
- If flash hits while eyelids are OPEN → full blind for `flashDuration` seconds (white overlay, lose all vision + abilities)
- If flash hits while eyelids are CLOSED → completely dodged (0 effect)
- The Eye must predict when a flash is coming and commit to blindness preemptively

**Network sync:**
- `SyncVar<bool> _eyelidsClosed` on `EyeEyelidController`
- Server validates: if `_eyelidsClosed == true` when flash RPC arrives, flash is negated
- Runners see a visual indicator on the Eye (pupil narrows/closes) so they know the state

### Flash System (New)

**Source:** Shrine consumable item ("Flash Orb")
- Purchased at shrines using loot (costs defined in `ShrineItemData_SO`)
- One-use: activates immediately on use (Q key through existing `ShrineItemEffect`)
- Affects the Eye globally (not proximity-based — it's a flash against a giant eye in the sky)
- Flash duration: 4-6 seconds (tunable in `GlobalRules_SO`)
- Cooldown per team: 15 seconds (prevents flash-spam)

---

## Part B: Wearable Skill System

### Overview

Runners no longer have innate advanced movement. All parkour abilities (dash, wall-run, air-dash, slide, vault, grapple) are **wearable items** found in the world or purchased at shrines. This transforms the core loop: start basic → acquire skills → build your loadout.

### Base Runner (No Wearables)
- Run (8 m/s)
- Sprint (8 × 1.4 = 11.2 m/s, costs stamina)
- Jump (single, with coyote time + jump buffer)
- Crouch
- That's it. No dash, no wall-run, no slide, no vault, no air-dash.

### Wearable Slots
- **2 dedicated wearable slots** (separate from loot inventory)
- Wearables are **weightless** (do not affect WeightComponent)
- Wearables persist until manually unequipped or player is downed
- On death/down: wearables DROP as world items (other runners can pick them up)

### Skill Wearables (Initial Set)

| Wearable | Ability | Cooldown | Found/Bought |
|----------|---------|----------|--------------|
| Bracelet of Dash | Ground dash (5m, 0.2s) | 3s | World loot |
| Wall-Run Boots | Wall-run (min speed 4 m/s) | Passive (no CD) | World loot |
| Air Dash Wings | Mid-air dash (4m) | 5s | Shrine purchase |
| Slide Pads | Crouch-while-sprinting slides | Passive | World loot |
| Vault Gloves | Auto-vault low obstacles | Passive | World loot |
| Grappling Hook | Aim + fire grapple to surfaces | 8s | Shrine purchase (expensive) |

### Co-op Buff Items (Shrine Purchases)

| Item | Effect | Duration | Radius |
|------|--------|----------|--------|
| Linked Sprint Totem | +20% speed for all runners within 5m of holder | 30s | 5m |
| Flash Orb | Blinds the Eye for 5s (dodgeable with eyelids) | Instant | Global |
| Silence Shroud | Suppresses all noise from holder + nearby runners | 20s | 4m |
| Vitality Link | Nearby downed runners auto-revive over 10s | 10s | 3m |

### Inventory Architecture

```
PlayerInventory (existing)
├── _lootSlots: SyncList<string> (unchanged — loot items for extraction)
├── _wearableSlots: SyncList<string> (NEW — max 2, skill items)
└── _activeBuffs: SyncList<string> (NEW — timed co-op buffs, auto-expire)
```

---

## Part C: Co-op Mechanics

### Betrayal Removed

The "Paranoia" pillar is REPLACED with a new co-op pillar. Runners cannot hurt each other. All systems that allowed betrayal are removed.

### New Pillar: "Together or Dead"
Runners who work together move faster, reach more places, and survive longer. Solo play is viable but suboptimal — the game rewards proximity and coordination without forcing it.

**Design test:** "Can a solo runner do this equally well?" → If yes, add a co-op bonus or make the solo path harder/slower.

### Mechanic 1: Ledge Boost

**Setup:** One runner crouches against a wall at a high ledge. Another runner approaches and presses F.

**Execution:**
1. Boosted runner launches upward (2× jump height)
2. Boosting runner stays in place (vulnerable, crouched)
3. Creates access to high routes, shortcuts, hidden loot rooms

**Network flow:**
- Client presses F near crouching teammate + wall → `[ServerRpc] ServerRequestBoost(NetworkObject booster)`
- Server validates: booster is crouching, near wall, both alive, within range
- Server triggers boost physics on the requesting runner
- `[ObserversRpc]` plays boost VFX/SFX for all clients

### Mechanic 2: Bag Throw

**Setup:** Runner holds G (instead of tap to drop) while looking at a teammate within range.

**Execution:**
1. Item arcs toward targeted teammate
2. Range scales inversely with item weight (light items throw far, heavy items barely lob)
3. If teammate has inventory space, auto-pickup. If not, drops at their feet.

**Network flow:**
- Client holds G + aims at teammate → `[ServerRpc] ServerThrowItem(string itemId, NetworkObject target)`
- Server validates: item exists in inventory, target is alive runner, within max throw range
- Server removes from sender inventory, spawns temporary projectile
- On arrival: `TryAddItem` on target. If fails, spawn `WorldItem` at target position.

### Mechanic 3: Linked Sprint (Buff Item)

Purchased at shrine. When activated, creates a 5m aura around the holder for 30 seconds:
- All runners in radius get +20% sprint speed
- If ANY runner in the link gets hit by the Eye, ALL linked runners get a 1-second slow
- Creates a risk/reward clustering dynamic
- Visible tether VFX between linked runners

---

## Part D: Extraction Rework

### Overview

Extraction no longer works per-player. ALL alive runners must gather in the **Extraction Room** and survive 30 seconds together to escape.

### Flow

1. Team deposits loot at altars throughout the match (unchanged)
2. When `_teamLootDeposited >= extractionThreshold`, the Extraction Room unlocks
3. ALL alive runners must enter the Extraction Room
4. A 30-second countdown begins when all alive runners are inside
5. If ANY alive runner leaves the room, countdown pauses/resets
6. After 30 seconds: all runners in the room extract. Downed runners left behind.

### The Extraction Room

- A special room generated by `MapGenerator` (always present, locked until threshold met)
- **Dense with incarnation props** (eye paintings, gargoyles, mirrors) — the Eye can incarnate freely
- Eye objects are NOT new mechanics — they're existing `IncarnationProp` components at high density
- The room is a pressure cooker: runners move freely but the Eye has many attack vectors

### Anti-AFK / Griefer System

**Problem:** One alive player refuses to enter the room, blocking extraction.

**Solution:** Kill Ritual
1. 2+ runners can initiate a "Vote Kick" ritual near an altar (hold R together for 20s)
2. Target runner gets a warning ("Your team is voting to sacrifice you — return to group!")
3. After 20 seconds: target is killed (set to downed state, drops loot)
4. Target no longer counts as "alive" for extraction purposes
5. Requires majority of OTHER alive runners to participate

### ExtractionManager Changes

```csharp
// OLD: per-player extraction
TryExtract(NetworkObject player)

// NEW: room-based all-at-once
SyncVar<bool> _extractionRoomUnlocked
SyncVar<float> _extractionTimer (30s countdown)
SyncVar<int> _runnersInRoom

// Server Update: if all alive runners in room && timer > 0, tick down
// When timer hits 0: extract all runners in room
```

---

## Part E: GlobalRules_SO Additions

```csharp
[Header("Eye Types")]
public float flashDuration = 5f;
public float flashTeamCooldown = 15f;
public float watcherScanCooldownMultiplier = 0.6f;
public float predatorLaserCooldownMultiplier = 0.5f;
public float trapperDreadCostMultiplier = 0.6f;
public int trapperMaxActiveBonus = 3;

[Header("Wearables")]
public int maxWearableSlots = 2;
public float dashCooldown = 3f;
public float airDashCooldown = 5f;
public float grappleCooldown = 8f;
public float throwRangeBase = 8f;
public float throwRangeWeightScale = 0.5f;

[Header("Co-op")]
public float boostHeight = 2f;
public float boostRange = 1.5f;
public float linkedSprintBonus = 0.2f;
public float linkedSprintRadius = 5f;
public float linkedSprintSlowDuration = 1f;

[Header("Extraction Room")]
public float extractionChannelDuration = 30f;
public float antiAfkRitualDuration = 20f;
public int antiAfkMinVoters = 2;
```

---

## Part F: Pillar Updates

### REMOVED: Pillar 5 — "Paranoia is a Feature"

### NEW: Pillar 5 — "Together or Dead"
Runners who coordinate survive. The game rewards proximity, timing, and sacrifice. Solo play is viable but the optimal path always involves teammates. The Eye exploits separation — clustered runners are harder to isolate but easier to area-deny.

**Design test:** "Can a solo runner accomplish this equally well?" → If yes, add a co-op bonus that makes the team version faster/safer.

### UPDATED: Anti-Pillar 3
**OLD:** "NOT a team game with roles — No Tank/Healer/DPS archetypes. All Runners have the same toolkit. Trust is optional."

**NEW:** "NOT a class-based team game — No fixed roles or forced compositions. Any runner can equip any wearable. Teamwork is rewarded, not required for basic play."

---

## Part G: New ScriptableObjects Required

| Asset | Path | Purpose |
|-------|------|---------|
| `EyeType_SO` | `Assets/Scripts/Data/EyeType_SO.cs` | Defines an Eye type (abilities, eyelid, stat overrides) |
| `WearableData_SO` | `Assets/Scripts/Data/WearableData_SO.cs` | Defines a wearable skill item (ability type, cooldown, weight, icon) |
| Watcher.asset | `Assets/Resources/EyeTypes/Watcher.asset` | The Watcher Eye type |
| Predator.asset | `Assets/Resources/EyeTypes/Predator.asset` | The Predator Eye type |
| Trapper.asset | `Assets/Resources/EyeTypes/Trapper.asset` | The Trapper Eye type |
| BraceletOfDash.asset | `Assets/Resources/Items/Wearables/BraceletOfDash.asset` | Dash wearable |
| WallRunBoots.asset | `Assets/Resources/Items/Wearables/WallRunBoots.asset` | Wall-run wearable |
| AirDashWings.asset | `Assets/Resources/Items/Wearables/AirDashWings.asset` | Air dash wearable |
| SlidePads.asset | `Assets/Resources/Items/Wearables/SlidePads.asset` | Slide wearable |
| VaultGloves.asset | `Assets/Resources/Items/Wearables/VaultGloves.asset` | Vault wearable |
| GrapplingHook.asset | `Assets/Resources/Items/Wearables/GrapplingHook.asset` | Grapple wearable |
| FlashOrb.asset | `Assets/Resources/Items/Shrine/FlashOrb.asset` | Flash shrine item |
| LinkedSprintTotem.asset | `Assets/Resources/Items/Shrine/LinkedSprintTotem.asset` | Co-op buff |
| SilenceShroud.asset | `Assets/Resources/Items/Shrine/SilenceShroud.asset` | Co-op buff |
| VitalityLink.asset | `Assets/Resources/Items/Shrine/VitalityLink.asset` | Co-op buff |
