f49cda7cdc
Implements the core game loop for Yacht dice: 5-dice rolling with lock/unlock, 3 rolls per turn, 13 standard scoring categories, and an extensible ScriptableObject-based modifier system that applies additive then multiplicative bonuses (chips+mult pattern). Includes two test modifiers: BonusForOnes (+10 per 1) and MultiplierForSixes (x6 per 6). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
629 B
C#
27 lines
629 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
[Serializable]
|
|
public struct ScoreResult
|
|
{
|
|
public int BaseScore;
|
|
public int FlatBonus;
|
|
public float Multiplier;
|
|
public int[] DiceValues;
|
|
public YachtCategory Category;
|
|
|
|
public int FinalScore => Mathf.FloorToInt((BaseScore + FlatBonus) * Multiplier);
|
|
|
|
public static ScoreResult Create(int baseScore, int[] diceValues, YachtCategory category)
|
|
{
|
|
return new ScoreResult
|
|
{
|
|
BaseScore = baseScore,
|
|
FlatBonus = 0,
|
|
Multiplier = 1f,
|
|
DiceValues = diceValues,
|
|
Category = category
|
|
};
|
|
}
|
|
}
|