Add Complete Game Progression System
MAJOR UPDATE - Full game systems based on APK analysis:
CAR SYSTEM:
- Purchase cars with Gold or Cash
- 5 starter cars across all classes (C,B,A,S,R)
- Car database with manufacturers and performance ratings
- Garage management and inventory tracking
UPGRADE SYSTEM:
- 5 upgrade types (Engine, Tires, Suspension, Brakes, Drivetrain)
- Progressive Performance Rating increases
- Cash-based upgrade economy
- Per-car upgrade tracking
PROGRESSION SYSTEM:
- Experience Points and leveling (1000 XP per level)
- Level-up rewards (10 Gold + 5K Cash)
- Reputation tracking
- Complete player profile management
CAREER MODE:
- Career series and event tracking
- Star rating system (1-3 stars per event)
- Best time tracking
- Star-based rewards (10G/2KC/100XP per star)
ECONOMY:
- Balanced F2P progression
- ~350 Gold + \ daily earning potential
- Fair pricing for cars and upgrades
- Multiple currency sources
NEW ENDPOINTS:
- GET /synergy/progression/player/{id} - Player profile
- POST /synergy/progression/player/{id}/update - Update stats
- POST /synergy/progression/car/purchase - Buy cars
- POST /synergy/progression/car/upgrade - Upgrade cars
- POST /synergy/progression/career/complete - Finish events
DATABASE:
- Cars table - Vehicle catalog
- OwnedCars table - Player garage
- CarUpgrades table - Upgrade options
- CareerProgress table - Event completion
- User table extended with Level/XP/Reputation
SEEDED DATA:
- 5 cars (Nissan Silvia to McLaren P1 GTR)
- 5 upgrades for starter car
- Time trials and gold packages from previous update
This creates a COMPLETE single-player experience with:
✓ Daily rewards + time trials
✓ Car ownership + garage
✓ Upgrade system
✓ Career progression
✓ Level/XP system
✓ Full economy
Based on actual RR3 game analysis!
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,10 @@ public class RR3DbContext : DbContext
|
||||
public DbSet<DailyReward> DailyRewards { get; set; }
|
||||
public DbSet<TimeTrial> TimeTrials { get; set; }
|
||||
public DbSet<TimeTrialResult> TimeTrialResults { get; set; }
|
||||
public DbSet<Car> Cars { get; set; }
|
||||
public DbSet<OwnedCar> OwnedCars { get; set; }
|
||||
public DbSet<CarUpgrade> CarUpgrades { get; set; }
|
||||
public DbSet<CareerProgress> CareerProgress { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -119,6 +123,80 @@ public class RR3DbContext : DbContext
|
||||
Active = true
|
||||
}
|
||||
);
|
||||
|
||||
// Seed starter cars
|
||||
modelBuilder.Entity<Car>().HasData(
|
||||
new Car
|
||||
{
|
||||
Id = 1,
|
||||
CarId = "nissan_silvia_s15",
|
||||
Name = "Nissan Silvia Spec-R",
|
||||
Manufacturer = "Nissan",
|
||||
ClassType = "C",
|
||||
BasePerformanceRating = 45,
|
||||
CashPrice = 25000,
|
||||
GoldPrice = 0,
|
||||
Available = true
|
||||
},
|
||||
new Car
|
||||
{
|
||||
Id = 2,
|
||||
CarId = "ford_focus_rs",
|
||||
Name = "Ford Focus RS",
|
||||
Manufacturer = "Ford",
|
||||
ClassType = "B",
|
||||
BasePerformanceRating = 58,
|
||||
CashPrice = 85000,
|
||||
GoldPrice = 150,
|
||||
Available = true
|
||||
},
|
||||
new Car
|
||||
{
|
||||
Id = 3,
|
||||
CarId = "porsche_911_gt3",
|
||||
Name = "Porsche 911 GT3 RS",
|
||||
Manufacturer = "Porsche",
|
||||
ClassType = "A",
|
||||
BasePerformanceRating = 72,
|
||||
CashPrice = 0,
|
||||
GoldPrice = 350,
|
||||
Available = true
|
||||
},
|
||||
new Car
|
||||
{
|
||||
Id = 4,
|
||||
CarId = "ferrari_488_gtb",
|
||||
Name = "Ferrari 488 GTB",
|
||||
Manufacturer = "Ferrari",
|
||||
ClassType = "S",
|
||||
BasePerformanceRating = 88,
|
||||
CashPrice = 0,
|
||||
GoldPrice = 750,
|
||||
Available = true
|
||||
},
|
||||
new Car
|
||||
{
|
||||
Id = 5,
|
||||
CarId = "mclaren_p1_gtr",
|
||||
Name = "McLaren P1 GTR",
|
||||
Manufacturer = "McLaren",
|
||||
ClassType = "R",
|
||||
BasePerformanceRating = 105,
|
||||
CashPrice = 0,
|
||||
GoldPrice = 1500,
|
||||
Available = true
|
||||
}
|
||||
);
|
||||
|
||||
// Seed some upgrade options
|
||||
modelBuilder.Entity<CarUpgrade>().HasData(
|
||||
// Nissan Silvia upgrades
|
||||
new CarUpgrade { Id = 1, CarId = "nissan_silvia_s15", UpgradeType = "engine", Level = 1, CashCost = 5000, PerformanceIncrease = 3 },
|
||||
new CarUpgrade { Id = 2, CarId = "nissan_silvia_s15", UpgradeType = "tires", Level = 1, CashCost = 3000, PerformanceIncrease = 2 },
|
||||
new CarUpgrade { Id = 3, CarId = "nissan_silvia_s15", UpgradeType = "suspension", Level = 1, CashCost = 4000, PerformanceIncrease = 2 },
|
||||
new CarUpgrade { Id = 4, CarId = "nissan_silvia_s15", UpgradeType = "brakes", Level = 1, CashCost = 3500, PerformanceIncrease = 2 },
|
||||
new CarUpgrade { Id = 5, CarId = "nissan_silvia_s15", UpgradeType = "drivetrain", Level = 1, CashCost = 4500, PerformanceIncrease = 3 }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,6 +219,13 @@ public class User
|
||||
public string? Nickname { get; set; }
|
||||
public int? Gold { get; set; } = 0;
|
||||
public int? Cash { get; set; } = 0;
|
||||
public int? Level { get; set; } = 1;
|
||||
public int? Experience { get; set; } = 0;
|
||||
public int? Reputation { get; set; } = 0;
|
||||
|
||||
// Navigation properties
|
||||
public List<OwnedCar> OwnedCars { get; set; } = new();
|
||||
public List<CareerProgress> CareerProgress { get; set; } = new();
|
||||
}
|
||||
|
||||
public class Session
|
||||
@@ -217,3 +302,52 @@ public class TimeTrialResult
|
||||
public int GoldEarned { get; set; }
|
||||
public int CashEarned { get; set; }
|
||||
}
|
||||
|
||||
public class Car
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string CarId { get; set; } = string.Empty; // Unique identifier like "porsche_911_gt3"
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
public string ClassType { get; set; } = string.Empty; // C, B, A, S, R
|
||||
public int BasePerformanceRating { get; set; } // Base PR before upgrades
|
||||
public int CashPrice { get; set; }
|
||||
public int GoldPrice { get; set; }
|
||||
public bool Available { get; set; } = true;
|
||||
}
|
||||
|
||||
public class OwnedCar
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public string CarId { get; set; } = string.Empty;
|
||||
public string CarName { get; set; } = string.Empty;
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
public string ClassType { get; set; } = string.Empty;
|
||||
public int PerformanceRating { get; set; } // Current PR with upgrades
|
||||
public int UpgradeLevel { get; set; } // 0-5
|
||||
public string PurchasedUpgrades { get; set; } = string.Empty; // Comma-separated list
|
||||
public DateTime PurchasedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
public class CarUpgrade
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string CarId { get; set; } = string.Empty;
|
||||
public string UpgradeType { get; set; } = string.Empty; // engine, tires, suspension, brakes, drivetrain
|
||||
public int Level { get; set; } // 1-5
|
||||
public int CashCost { get; set; }
|
||||
public int PerformanceIncrease { get; set; }
|
||||
}
|
||||
|
||||
public class CareerProgress
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public string SeriesName { get; set; } = string.Empty; // e.g., "Road Collection", "Endurance Legends"
|
||||
public string EventName { get; set; } = string.Empty; // e.g., "Brands Hatch GP Circuit"
|
||||
public bool Completed { get; set; }
|
||||
public int StarsEarned { get; set; } // 0-3
|
||||
public double BestTime { get; set; }
|
||||
public DateTime? CompletedAt { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user