From 593e99894f4d13847fbb4495c90b75e6e63b3aef Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 25 Jun 2026 20:35:20 +0200 Subject: [PATCH] feat(suitbuilder): add allowed_crit_damage constraint field Co-Authored-By: Claude Opus 4.8 --- go-services/inventory-go/suit_model.go | 49 +++++++++++++------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/go-services/inventory-go/suit_model.go b/go-services/inventory-go/suit_model.go index 21b7e4c6..d42b1960 100644 --- a/go-services/inventory-go/suit_model.go +++ b/go-services/inventory-go/suit_model.go @@ -401,32 +401,31 @@ type LockedSlotInfo struct { } type SearchConstraints struct { - Characters []string `json:"characters"` - PrimarySet int `json:"primary_set"` - SecondarySet int `json:"secondary_set"` - RequiredSpells []string `json:"required_spells"` - LockedSlots map[string]LockedSlotInfo `json:"locked_slots"` - IncludeEquipped bool `json:"include_equipped"` - IncludeInventory bool `json:"include_inventory"` - MinArmor *int `json:"min_armor"` - MaxArmor *int `json:"max_armor"` - MinCritDamage *int `json:"min_crit_damage"` - MaxCritDamage *int `json:"max_crit_damage"` - MinDamageRating *int `json:"min_damage_rating"` - MaxDamageRating *int `json:"max_damage_rating"` - ScoringWeights *ScoringWeights `json:"scoring_weights"` - MaxResults int `json:"max_results"` - SearchTimeout int `json:"search_timeout"` + Characters []string `json:"characters"` + PrimarySet int `json:"primary_set"` + SecondarySet int `json:"secondary_set"` + RequiredSpells []string `json:"required_spells"` + LockedSlots map[string]LockedSlotInfo `json:"locked_slots"` + IncludeEquipped bool `json:"include_equipped"` + IncludeInventory bool `json:"include_inventory"` + MinArmor *int `json:"min_armor"` + MaxArmor *int `json:"max_armor"` + AllowedCritDamage []int `json:"allowed_crit_damage"` + MinDamageRating *int `json:"min_damage_rating"` + MaxDamageRating *int `json:"max_damage_rating"` + ScoringWeights *ScoringWeights `json:"scoring_weights"` + MaxResults int `json:"max_results"` + SearchTimeout int `json:"search_timeout"` } // --- CompletedSuit (suitbuilder.py:446) --- type CompletedSuit struct { - Items map[string]*SuitItem - Score int - TotalArmor int - TotalRatings map[string]int - SetCounts map[int]int + Items map[string]*SuitItem + Score int + TotalArmor int + TotalRatings map[string]int + SetCounts map[int]int FulfilledSpells []string MissingSpells []string } @@ -500,11 +499,11 @@ func (c *CompletedSuit) toDict() map[string]any { "secondary_set_count": 0, "spell_coverage": len(c.FulfilledSpells), }, - "missing": c.MissingSpells, - "notes": []any{}, + "missing": c.MissingSpells, + "notes": []any{}, "transfer_summary": map[string]any{ - "total_items": totalItems, - "from_characters": transferByChar, + "total_items": totalItems, + "from_characters": transferByChar, }, "instructions": instructions, }