Skip to content

Latest commit

Β 

History

History
273 lines (220 loc) Β· 8.39 KB

File metadata and controls

273 lines (220 loc) Β· 8.39 KB

FPL Retro: Crisis Mode Feature Design

Overview

Crisis Mode is an intelligent intervention system that prevents rash FPL decisions, specifically -4 point hits and emotional transfers.


🚨 Trigger Conditions

Crisis Mode activates when ANY of these conditions are met:

1. The -4 Hit Warning

  • User attempts more transfers than available free transfers
  • Hit value: -4, -8, -12, etc.

2. The Fixture Trap

  • Transferring OUT a player with next 3 fixtures rated "Easy" (difficulty ≀ 2.5)
  • Transferring IN a player with next 3 fixtures rated "Hard" (difficulty β‰₯ 4.0)

3. The Emotional Transfer

  • Player transferred out scored < 2 points last GW
  • User makes transfer within 2 hours of deadline
  • Pattern: Same player transferred out/in within 3 GWs

4. The Differential Risk

  • Transferring out a top-10 owned player
  • For a player with < 5% ownership and no recent form

5. The Captain Killer

  • Transferring out your current captain
  • Without having a clear replacement captain

🎨 UI Components

Crisis Alert Modal

╔══════════════════════════════════════════╗
β•‘ ⚠️ CRISIS MODE ACTIVATED ⚠️              β•‘
╠══════════════════════════════════════════╣
β•‘                                          β•‘
β•‘  You're about to take a -4 hit for:     β•‘
β•‘  ❌ Salah β†’ Son                          β•‘
β•‘                                          β•‘
β•‘  πŸ”΄ This may cost you 12 points          β•‘
β•‘     over the next 5 gameweeks           β•‘
β•‘                                          β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Visual Design:

  • Red pulsing border (animation)
  • Warning siren sound (optional)
  • Full-screen overlay with blur
  • Cannot be dismissed immediately (5-second delay)

Alternative Strategies Panel

Three data-driven alternatives presented:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ πŸ’‘ ALTERNATIVE STRATEGIES                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                     β”‚
β”‚ 1️⃣ KEEP & CAPTAIN                                   β”‚
β”‚    Keep Salah, captain him vs BOU (H)              β”‚
β”‚    Projected: 8-12 points                          β”‚
β”‚    [Select This]                                   β”‚
β”‚                                                     β”‚
β”‚ 2️⃣ WAIT FOR PRESSERS                              β”‚
β”‚    Son has ankle knock - wait for news             β”‚
β”‚    Set reminder for Friday 19:00                   β”‚
β”‚    [Remind Me]                                     β”‚
β”‚                                                     β”‚
β”‚ 3️⃣ DIFFERENTIAL PICK                              β”‚
β”‚    Consider Isak (4% owned, 3G in 2)              β”‚
β”‚    Projected: 6-10 points, better fixtures         β”‚
β”‚    [Compare Stats]                                 β”‚
β”‚                                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Stats Comparison View

Side-by-side player comparison:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MO SALAH      β”‚    SON          β”‚
β”‚   (Keep)        β”‚   (Transfer In) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Β£12.5m          β”‚ Β£9.7m           β”‚
β”‚ Form: 8.5       β”‚ Form: 4.2 ⬇️    β”‚
β”‚ Next 3: 🟒🟒🟑  β”‚ Next 3: πŸŸ‘πŸ”΄πŸ”΄  β”‚
β”‚ xG: 4.2         β”‚ xG: 1.8         β”‚
β”‚ %Owned: 45%     β”‚ %Owned: 22%     β”‚
β”‚ Captain %: 35%  β”‚ Captain %: 8%   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Fixture Difficulty Visual

Color-coded next 5 gameweeks:

Fixtures:
🟒 BOU (H)  🟒 LUT (A)  🟑 WHU (H)  🟒 BRE (A)  🟒 SHU (H)
  Easy        Easy        Medium       Easy        Easy

"Sleep On It" Button

  • Primary CTA - Largest button
  • Saves transfer to "Pending" state
  • Sends reminder notification before deadline
  • Tracks if user still wants transfer after cooling off

Impulse Score Badge

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  🧠 Impulse Score  β”‚
β”‚                    β”‚
β”‚  This Season: 3/10 β”‚
β”‚  🟒 Good control   β”‚
β”‚                    β”‚
β”‚  You avoided 12    β”‚
β”‚  potential hits!   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ›‘οΈ Prevention Mechanisms

1. Forced Cooldown

  • 10-second countdown before "Confirm Transfer" is clickable
  • Shows rotating tips: "Did you check the fixtures?"

2. Opportunity Cost Calculator

πŸ’° Opportunity Cost:
   -4 hit this GW
   + Potential captain points lost
   = -8 to -16 projected points
   
   Over 5 GWs: -12 points expected

3. Gamified Impulse Score

  • Tracks rash vs. thoughtful decisions
  • Rewards: "Cool-headed Manager" badge
  • Season-long metric displayed on profile

4. Community Intelligence

πŸ‘₯ Community Data:
   β€’ 78% of top 10k kept Salah this GW
   β€’ 12% transferred him out (avg rank drop: 45k)
   β€’ Only 3% brought in Son

5. AI Prediction Engine

πŸ€– AI Analysis (Kimi-powered):
   "Based on fixture difficulty, form, and 
    historical data, this transfer has a 
    73% chance of losing points over 5 GWs."

βš™οΈ Implementation Plan

Phase 1: Core Detection (Week 1)

  • Create crisisDetector.ts utility
  • Define trigger conditions
  • Hook into transfer confirmation flow

Phase 2: UI Components (Week 2)

  • CrisisModal component
  • AlternativeStrategies panel
  • StatsComparison view
  • FixtureVisualizer component

Phase 3: Smart Features (Week 3)

  • AI prediction integration
  • Community data aggregation
  • Impulse scoring system
  • "Sleep On It" reminders

Phase 4: Polish (Week 4)

  • Animations & sound
  • Settings (toggle Crisis Mode)
  • Analytics dashboard
  • Mobile optimization

πŸ“ File Structure

lib/
  crisis/
    detector.ts          # Trigger logic
    analyzer.ts          # Opportunity cost calc
    scorer.ts            # Impulse score tracking
    
components/
  crisis/
    CrisisModal.tsx      # Main intervention UI
    AlternativePanel.tsx # Strategy options
    StatsComparison.tsx  # Side-by-side view
    FixtureViz.tsx       # Fixture difficulty
    ImpulseBadge.tsx     # Score display
    
store/
  crisisStore.ts         # Zustand for crisis state

πŸ”Œ Integration Points

With Existing Store

// teamStore.ts - Add crisis check before transfer
confirmTransfer: () => {
  const crisis = detectCrisis(get().transfers);
  if (crisis.shouldIntervene) {
    set({ crisisAlert: crisis });
    return; // Block transfer, show modal
  }
  // Proceed with transfer...
}

With AI Advisor

  • Crisis Mode can call AI for prediction
  • "Should I make this transfer?" β†’ AI analysis

With Notifications

  • "Sleep On It" β†’ Push notification before deadline
  • Weekly: "You avoided X hits this week!"

πŸ“Š Success Metrics

  1. Intervention Rate - How often Crisis Mode triggers
  2. Compliance Rate - Users who change decision after alert
  3. Points Saved - Estimated points preserved
  4. Impulse Score Distribution - User behavior trends
  5. User Satisfaction - "This saved my season" feedback

🎨 Design Tokens

/* Crisis Mode Colors */
--crisis-red: #ef4444;
--crisis-orange: #f97316;
--crisis-glow: 0 0 20px rgba(239, 68, 68, 0.5);

/* Animations */
@keyframes pulse-warning {
  0%, 100% { border-color: var(--crisis-red); }
  50% { border-color: var(--crisis-orange); }
}

/* Cooldown Timer */
--cooldown-duration: 10s;

Designed by Gotchi N - 2026-02-03