13 Commits

Author SHA1 Message Date
horooko 05c2619de4 [Fix] Limited Use Modifier 2026-03-05 09:52:26 +07:00
horooko 72bbdc76af [Fix] ScoringSystem 2026-03-05 09:41:23 +07:00
horooko f52131f755 [Fix] Refactor project 2026-03-02 12:49:12 +07:00
horooko f65976796d [Add] Dice & Refactor private names 2026-03-02 11:22:01 +07:00
horooko 29ee43807e [Add] Data 2026-03-02 05:25:05 +07:00
horooko 6c10a35bf9 [Fix] Naming 2026-03-01 11:52:15 +07:00
horooko 0f9b162061 [Refactor] Replace hardcoded categories with data-driven SO system and abstract dice
- Add abstract dice system (IDie interface, DieDefinitionSO, StandardDieSO, DieInstance)
  to support future custom dice types while keeping backward compat via int[] DiceValues
- Replace YachtCategory enum and CategoryScorer switch with CategoryDefinitionSO hierarchy:
  SumOfValueCategorySO, NOfAKindCategorySO, FullHouseCategorySO, StraightCategorySO, SumAllCategorySO
- Add CategoryCatalogSO for ordered category collections and DiceCheckUtility for shared logic
- Refactor ScoringSystem, Views, GameManager, GameController to use SO references
- Update CategoryCondition modifier to use SO reference instead of enum
- Update all editor tests to use SO-based categories and DieInstance

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 11:46:50 +07:00
horooko 68c4abace3 [Refactor] Replace enum-driven modifier system with data-driven SO composition
Replace the entire static, enum-based modifier pipeline with a
composition-based, data-driven architecture using ScriptableObject
polymorphism. New modifiers can now be created by assembling SO building
blocks (Conditions + Effects + Behaviors) — no core code edits needed.

New architecture:
- Core/: TriggerType, ModifierPhase, ModifierContext, ICondition, IEffect
- Definition/: ModifierDefinitionSO, ModifierBehaviorSO, ConditionSO, EffectSO, ModifierCatalogSO
- Conditions/: DieValueCondition, CategoryCondition, MinScoreCondition, DiceCountCondition
- Effects/: AddFlat, AddPerDie, Multiply, MultiplyPerDie, PostMultiply, AddCurrency, ConsumeCharge
- Runtime/: ModifierInstance, ModifierRegistry (non-static service)
- Pipeline/: async ModifierPipeline with phase ordering, tracing, anti-recursion
- Editor/: ModifierDefinitionValidator with menu items
- Events/: GameEventBus (non-static typed dispatcher)
- DI/: GameLifetimeScope (VContainer composition root)

Deleted old system: ModifierData, ModifierEffect, ModifierEnums,
ModifierPipeline (static), ModifierRuntime, ModifierTarget, ShopCatalog,
ModifierAssetCreator.

Updated: ScoringSystem (VContainer + async), InventoryModel (delegates to
ModifierRegistry), ShopModel (uses ModifierDefinitionSO), GameController
(VContainer injection), SaveData (uses Runtime.ModifierSaveEntry), all
views/controllers, and all test files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 06:20:23 +07:00
horooko e24b30743b [Fix] Code visual 2026-02-28 19:25:26 +07:00
horooko bee20fd1f8 [Refactor] Add folder-based namespaces to all C# scripts
Wrap all 39 scripts and 6 test files in namespaces matching their folder
structure (e.g. Assets/Scripts/Dice/ → YachtDice.Dice). Add cross-namespace
using directives where types are referenced across modules. Set rootNamespace
in both .asmdef files (YachtDice, YachtDice.Tests).

Namespace mapping:
- YachtDice.Dice — Dice, DiceRoller
- YachtDice.Economy — CurrencyBank
- YachtDice.Game — GameManager, DiceManager, DebugGameInput
- YachtDice.Inventory — InventoryController/Model/SlotView/View
- YachtDice.Modifiers — ModifierData/Effect/Enums/Pipeline/Runtime/Target
- YachtDice.Persistence — SaveData, SaveSystem
- YachtDice.Scoring — CategoryScorer, ScoreResult, ScoringSystem, YachtCategory
- YachtDice.Shop — ShopCatalog/Controller/ItemView/Model/View
- YachtDice.UI — CategoryRowView, DicePanelView, GameController, GameInfoView, ScoreCardView
- YachtDice.Editor — ModifierAssetCreator
- YachtDice.Tests — all test files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:06:57 +07:00
horooko ba626acb9b [Add] Universal modifier system, shop, inventory & persistence
Replace hardcoded BonusForOnes/MultiplierForSixes with data-driven
modifier system supporting 2 scopes (SelectedCategory, AnyCategoryClosed),
4 effect types, durability modes (Permanent, LimitedUses), and
configurable targets via ScriptableObject (ModifierData).

- Modifier domain: ModifierEnums, ModifierTarget, ModifierData,
  ModifierRuntime, ModifierEffect (dict-based strategy), ModifierPipeline
  (4-pass: cat-additive → cat-multiplicative → final-additive → final-multiplicative)
- ScoringSystem: replaced old modifier list with ModifierPipeline integration,
  added OnCategoryConfirmed event
- Shop MVC: ShopCatalog (SO), ShopModel, ShopView, ShopItemView, ShopController
- Inventory MVC: InventoryModel (activate/deactivate/sell/durability),
  InventoryView, InventorySlotView, InventoryController
- CurrencyBank: editor-adjustable balance with events
- Persistence: SaveData + SaveSystem (Newtonsoft JSON + PlayerPrefs)
- Editor: ModifierAssetCreator menu item to generate 6 example modifiers + catalog
- Tests: 6 test classes covering effects, pipeline, scoring, shop, inventory, save
- GameController: wired shop/inventory/save lifecycle
- GameInfoView: added currency display, shop/inventory toggle buttons

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 06:40:33 +07:00
horooko 5067cb51a1 [Add] System to Scene 2026-02-27 03:06:55 +07:00
horooko f49cda7cdc [Add] Yacht scoring system with Balatro-like modifier pipeline
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>
2026-02-27 03:01:19 +07:00