Fix bestiary XP bonus and BP tier controls
This commit is contained in:
@@ -148,10 +148,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function bpTier() {
|
function bpTier() {
|
||||||
const tier = Number(qs("#bestiary-bp-tier")?.value || 0);
|
const tier = Number(qs("#bestiary-tier")?.value || 0);
|
||||||
return BP_TIERS[tier] || BP_TIERS[0];
|
return BP_TIERS[tier] || BP_TIERS[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function xpBonusMultiplier() {
|
||||||
|
return Number(qs("#bestiary-xp-bonus")?.value || 1);
|
||||||
|
}
|
||||||
|
|
||||||
function displayValue(row, key) {
|
function displayValue(row, key) {
|
||||||
const value = row[key];
|
const value = row[key];
|
||||||
|
|
||||||
@@ -170,7 +174,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (key === "exp" && tier.exp !== null) {
|
if (key === "exp" && tier.exp !== null) {
|
||||||
return Math.round(Number(value || 0) * tier.exp);
|
return Math.round(Number(value || 0) * tier.exp * xpBonusMultiplier());
|
||||||
}
|
}
|
||||||
|
|
||||||
return value ?? "";
|
return value ?? "";
|
||||||
@@ -332,7 +336,7 @@
|
|||||||
renderTable();
|
renderTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
qs("#bestiary-bp-tier")?.addEventListener("change", () => {
|
qs("#bestiary-tier")?.addEventListener("change", () => {
|
||||||
state.page = 1;
|
state.page = 1;
|
||||||
renderTable();
|
renderTable();
|
||||||
});
|
});
|
||||||
|
|||||||
+6
-15
@@ -51,22 +51,13 @@
|
|||||||
<option value="">All difficulties</option>
|
<option value="">All difficulties</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<label for="bestiary-bp-tier">BP Tier</label>
|
<label for="bestiary-xp-bonus">XP Bonus</label>
|
||||||
<select id="bestiary-bp-tier">
|
<select id="bestiary-xp-bonus">
|
||||||
<option value="0">No modifier</option>
|
<option value="1">No modifier</option>
|
||||||
<option value="1">Brutal Peeps +1</option>
|
<option value="1.05">+5%</option>
|
||||||
<option value="2">Brutal Peeps +2</option>
|
<option value="1.10">+10%</option>
|
||||||
<option value="3">Brutal Peeps +3</option>
|
|
||||||
<option value="4">Brutal Peeps +4</option>
|
|
||||||
<option value="5">Brutal Peeps +5</option>
|
|
||||||
<option value="6">Brutal Peeps +6</option>
|
|
||||||
<option value="7">Brutal Peeps +7</option>
|
|
||||||
<option value="8">Brutal Peeps +8</option>
|
|
||||||
<option value="9">Brutal Peeps +9</option>
|
|
||||||
<option value="10">Brutal Peeps +10</option>
|
|
||||||
<option value="11">Brutal Peeps +11</option>
|
|
||||||
</select>
|
</select>
|
||||||
<p class="drops-field-note">Applies HP, ATP, and EXP modifiers to Ultimate rows only.</p>
|
<p class="drops-field-note">Applies to EXP only.</p>
|
||||||
|
|
||||||
<label for="bestiary-view">View</label>
|
<label for="bestiary-view">View</label>
|
||||||
<select id="bestiary-view">
|
<select id="bestiary-view">
|
||||||
|
|||||||
Reference in New Issue
Block a user