feat(suitbuilder): add allowed_crit_damage constraint field

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-25 20:35:20 +02:00
parent dfdfd41882
commit 593e99894f

View file

@ -401,32 +401,31 @@ type LockedSlotInfo struct {
} }
type SearchConstraints struct { type SearchConstraints struct {
Characters []string `json:"characters"` Characters []string `json:"characters"`
PrimarySet int `json:"primary_set"` PrimarySet int `json:"primary_set"`
SecondarySet int `json:"secondary_set"` SecondarySet int `json:"secondary_set"`
RequiredSpells []string `json:"required_spells"` RequiredSpells []string `json:"required_spells"`
LockedSlots map[string]LockedSlotInfo `json:"locked_slots"` LockedSlots map[string]LockedSlotInfo `json:"locked_slots"`
IncludeEquipped bool `json:"include_equipped"` IncludeEquipped bool `json:"include_equipped"`
IncludeInventory bool `json:"include_inventory"` IncludeInventory bool `json:"include_inventory"`
MinArmor *int `json:"min_armor"` MinArmor *int `json:"min_armor"`
MaxArmor *int `json:"max_armor"` MaxArmor *int `json:"max_armor"`
MinCritDamage *int `json:"min_crit_damage"` AllowedCritDamage []int `json:"allowed_crit_damage"`
MaxCritDamage *int `json:"max_crit_damage"` MinDamageRating *int `json:"min_damage_rating"`
MinDamageRating *int `json:"min_damage_rating"` MaxDamageRating *int `json:"max_damage_rating"`
MaxDamageRating *int `json:"max_damage_rating"` ScoringWeights *ScoringWeights `json:"scoring_weights"`
ScoringWeights *ScoringWeights `json:"scoring_weights"` MaxResults int `json:"max_results"`
MaxResults int `json:"max_results"` SearchTimeout int `json:"search_timeout"`
SearchTimeout int `json:"search_timeout"`
} }
// --- CompletedSuit (suitbuilder.py:446) --- // --- CompletedSuit (suitbuilder.py:446) ---
type CompletedSuit struct { type CompletedSuit struct {
Items map[string]*SuitItem Items map[string]*SuitItem
Score int Score int
TotalArmor int TotalArmor int
TotalRatings map[string]int TotalRatings map[string]int
SetCounts map[int]int SetCounts map[int]int
FulfilledSpells []string FulfilledSpells []string
MissingSpells []string MissingSpells []string
} }
@ -500,11 +499,11 @@ func (c *CompletedSuit) toDict() map[string]any {
"secondary_set_count": 0, "secondary_set_count": 0,
"spell_coverage": len(c.FulfilledSpells), "spell_coverage": len(c.FulfilledSpells),
}, },
"missing": c.MissingSpells, "missing": c.MissingSpells,
"notes": []any{}, "notes": []any{},
"transfer_summary": map[string]any{ "transfer_summary": map[string]any{
"total_items": totalItems, "total_items": totalItems,
"from_characters": transferByChar, "from_characters": transferByChar,
}, },
"instructions": instructions, "instructions": instructions,
} }