Add boosters to card sorting
This commit is contained in:
@@ -66,11 +66,12 @@ namespace Minigames.CardSorting.Controllers
|
||||
|
||||
/// <summary>
|
||||
/// Calculate booster pack reward based on performance.
|
||||
/// Formula: Number of correctly sorted cards divided by 10, rounded down.
|
||||
/// </summary>
|
||||
public int CalculateBoosterReward()
|
||||
{
|
||||
// Simple: 1 booster per correct sort (or use settings multiplier)
|
||||
return correctSorts * settings.BoosterPacksPerCorrectItem;
|
||||
// Award 1 booster pack per 10 correctly sorted cards
|
||||
return (correctSorts / 10) + 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -325,10 +325,11 @@ namespace Minigames.CardSorting.Core
|
||||
|
||||
private IEnumerator EndGameSequence()
|
||||
{
|
||||
// Calculate rewards
|
||||
// Calculate rewards based on correctly sorted cards
|
||||
int boosterReward = Score.CalculateBoosterReward();
|
||||
int sortedCards = Score.CorrectSorts;
|
||||
|
||||
Logging.Debug($"[SortingGameManager] Game ended! Score: {Score.TotalScore}, Boosters: {boosterReward}");
|
||||
Logging.Debug($"[SortingGameManager] Game ended! Score: {Score.TotalScore}, Cards sorted: {sortedCards}, Boosters: {boosterReward}");
|
||||
|
||||
// Show booster pack reward UI and wait for completion
|
||||
if (boosterReward > 0)
|
||||
|
||||
Reference in New Issue
Block a user