feat: Implement peasant pack generation algorithm in PackGeneratorService including slot logic for commons, uncommons, lands, and wildcards, and add related documentation.
This commit is contained in:
@@ -29,3 +29,5 @@
|
||||
- [Bulk Parse Feedback](./devlog/2025-12-16-231500_bulk_parse_feedback.md): Completed. Updated `CubeManager` to handle metadata generation properly and provide feedback on missing cards.
|
||||
- [Full Metadata Passthrough](./devlog/2025-12-16-234500_full_metadata_passthrough.md): Completed. `DraftCard` now includes a `definition` property containing the complete, raw Scryfall object for future-proofing and advanced algorithm usage.
|
||||
- [Server-Side Caching](./devlog/2025-12-16-235900_server_side_caching.md): Completed. Implemented logic to cache images and metadata on the server upon bulk parsing, and updated client to use local assets.
|
||||
- [Peasant Algorithm Implementation](./devlog/2025-12-16-225700_peasant_algorithm.md): Completed. Implemented Peasant-specific pack generation rules including slot logic for commons, uncommons, lands, and wildcards.
|
||||
- [Multi-Expansion Selection](./devlog/2025-12-16-230500_multi_expansion_selection.md): Completed. Implemented searchable multi-select interface for "From Expansion" pack generation, allowing mixed-set drafts.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Peasant Algorithm Implementation
|
||||
|
||||
## Overview
|
||||
Implemented the detailed "Peasant" pack generation algorithm in `PackGeneratorService.ts`.
|
||||
|
||||
## Changes
|
||||
- Updated `buildSinglePack` in `PackGeneratorService.ts` to include specific logic for Peasant rarity mode.
|
||||
- Implemented slot-based generation:
|
||||
- Slots 1-6: Commons (Color Balanced)
|
||||
- Slot 7: Common or "The List" (Simulated)
|
||||
- Slots 8-11: Uncommons
|
||||
- Slot 12: Land (20% Foil)
|
||||
- Slot 13: Non-Foil Wildcard (Weighted by rarity)
|
||||
- Slot 14: Foil Wildcard (Weighted by rarity)
|
||||
- Slot 15: Marketing Token
|
||||
|
||||
## Notes
|
||||
- Used existing helper methods `drawColorBalanced` and `drawUniqueCards`.
|
||||
- Simulated "The List" logic using available Common/Uncommon pools as exact "The List" metadata might not be available in standard pools provided to the generator.
|
||||
- Wildcard weights follow the specification (~49% C, ~24% U, ~13% R, ~13% M).
|
||||
@@ -0,0 +1,14 @@
|
||||
# Multi-Expansion Selection
|
||||
|
||||
## Objective
|
||||
Enhanced the "From Expansion" pack generation feature in the Cube Manager to allow users to select multiple expansions and use a searchable interface.
|
||||
|
||||
## Implementation Details
|
||||
1. **Searchable Interface**: Replaced the simple set dropdown with a dedicated set selection UI featuring a search input for fuzzy filtering by set name or code.
|
||||
2. **Multi-Select Capability**: Users can now check multiple sets from the filtered list.
|
||||
3. **Frontend State Refactor**: Migrated `selectedSet` (string) to `selectedSets` (string array) in `CubeManager.tsx`.
|
||||
4. **Fetch Logic Update**: Updated `fetchAndParse` to iterate through all selected sets, fetching card data for each sequentially and combining the results into the parse pool.
|
||||
5. **Generation Logic**: The existing `generateBoosterBox` logic now naturally consumes the combined pool of cards from multiple sets, effectively allowing for "Chaos Drafts" or custom mixed-set environments based on the user's selection.
|
||||
|
||||
## Status
|
||||
Completed. The Cube Manager UI now supports advanced set selection scenarios.
|
||||
Reference in New Issue
Block a user