feat(suitbuilder): apply CD-tier filter in loadItems (before domination)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
7155055072
commit
75a735d589
1 changed files with 6 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ type Solver struct {
|
||||||
bestSuitItemCount int
|
bestSuitItemCount int
|
||||||
highestArmorCount int
|
highestArmorCount int
|
||||||
armorBucketsItems int
|
armorBucketsItems int
|
||||||
|
allowedCD map[int]bool // nil == no CD filter (default / all tiers)
|
||||||
|
|
||||||
lockedSetCounts map[int]int
|
lockedSetCounts map[int]int
|
||||||
lockedSpells map[string]bool
|
lockedSpells map[string]bool
|
||||||
|
|
@ -53,6 +54,7 @@ func newSolver(s *Server, c SearchConstraints, emit func(string, map[string]any)
|
||||||
}
|
}
|
||||||
// Required spells register first, so they always get the low bits.
|
// Required spells register first, so they always get the low bits.
|
||||||
sv.neededSpellBitmap = sv.spellIndex.getBitmap(c.RequiredSpells)
|
sv.neededSpellBitmap = sv.spellIndex.getBitmap(c.RequiredSpells)
|
||||||
|
sv.allowedCD = allowedCritSet(c.AllowedCritDamage)
|
||||||
return sv
|
return sv
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -259,6 +261,10 @@ func (sv *Solver) loadItems(ctx context.Context) ([]*SuitItem, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Drop armor whose CD tier is disallowed BEFORE domination, so a CD2 piece
|
||||||
|
// can't surpass-and-remove an allowed CD1 piece we'd then exclude.
|
||||||
|
items = filterArmorByCD(items, sv.allowedCD)
|
||||||
|
|
||||||
filtered := removeSurpassedItems(items)
|
filtered := removeSurpassedItems(items)
|
||||||
|
|
||||||
jewelryFallback := map[string]bool{"Ring": true, "Bracelet": true, "Jewelry": true, "Necklace": true, "Amulet": true}
|
jewelryFallback := map[string]bool{"Ring": true, "Bracelet": true, "Jewelry": true, "Necklace": true, "Amulet": true}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue