feat(suitbuilder): CD0/CD1/CD2 allowed-tier checkboxes (replace dead crit min/max)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
75a735d589
commit
09bde83325
3 changed files with 22 additions and 10 deletions
|
|
@ -1529,4 +1529,14 @@ body {
|
|||
color: #95a5a6;
|
||||
font-size: 10px;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.cd-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-right: 10px;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
}
|
||||
.cd-toggle input { margin: 0; }
|
||||
|
|
@ -51,10 +51,10 @@
|
|||
<input type="number" id="maxArmor" placeholder="Max" min="0" max="9999">
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<label>Crit Damage:</label>
|
||||
<input type="number" id="minCritDmg" placeholder="Min" min="0" max="999">
|
||||
<span>-</span>
|
||||
<input type="number" id="maxCritDmg" placeholder="Max" min="0" max="999">
|
||||
<label>Allowed Crit Damage:</label>
|
||||
<label class="cd-toggle"><input type="checkbox" id="allowCD0" checked> CD0</label>
|
||||
<label class="cd-toggle"><input type="checkbox" id="allowCD1" checked> CD1</label>
|
||||
<label class="cd-toggle"><input type="checkbox" id="allowCD2" checked> CD2</label>
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<label>Damage Rating:</label>
|
||||
|
|
|
|||
|
|
@ -307,8 +307,11 @@ function gatherConstraints() {
|
|||
characters: selectedCharacters,
|
||||
min_armor: document.getElementById('minArmor').value || null,
|
||||
max_armor: document.getElementById('maxArmor').value || null,
|
||||
min_crit_damage: document.getElementById('minCritDmg').value || null,
|
||||
max_crit_damage: document.getElementById('maxCritDmg').value || null,
|
||||
allowed_crit_damage: [
|
||||
document.getElementById('allowCD0').checked ? 0 : null,
|
||||
document.getElementById('allowCD1').checked ? 1 : null,
|
||||
document.getElementById('allowCD2').checked ? 2 : null,
|
||||
].filter(v => v !== null),
|
||||
min_damage_rating: document.getElementById('minDmgRating').value || null,
|
||||
max_damage_rating: document.getElementById('maxDmgRating').value || null,
|
||||
|
||||
|
|
@ -357,7 +360,7 @@ function validateConstraints(constraints) {
|
|||
if (!constraints.primary_set && !constraints.secondary_set &&
|
||||
constraints.legendary_cantrips.length === 0 &&
|
||||
constraints.protection_spells.length === 0 &&
|
||||
!constraints.min_armor && !constraints.min_crit_damage && !constraints.min_damage_rating) {
|
||||
!constraints.min_armor && !constraints.min_damage_rating) {
|
||||
alert('Please specify at least one constraint (equipment sets, cantrips, legendary wards, or rating minimums).');
|
||||
return false;
|
||||
}
|
||||
|
|
@ -383,8 +386,7 @@ async function streamOptimalSuits(constraints) {
|
|||
include_inventory: constraints.include_inventory,
|
||||
min_armor: constraints.min_armor ? parseInt(constraints.min_armor) : null,
|
||||
max_armor: constraints.max_armor ? parseInt(constraints.max_armor) : null,
|
||||
min_crit_damage: constraints.min_crit_damage ? parseInt(constraints.min_crit_damage) : null,
|
||||
max_crit_damage: constraints.max_crit_damage ? parseInt(constraints.max_crit_damage) : null,
|
||||
allowed_crit_damage: constraints.allowed_crit_damage,
|
||||
min_damage_rating: constraints.min_damage_rating ? parseInt(constraints.min_damage_rating) : null,
|
||||
max_damage_rating: constraints.max_damage_rating ? parseInt(constraints.max_damage_rating) : null,
|
||||
max_results: 10,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue