Fix bestiary XP bonus and BP tier controls
This commit is contained in:
@@ -148,10 +148,14 @@
|
||||
}
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
function xpBonusMultiplier() {
|
||||
return Number(qs("#bestiary-xp-bonus")?.value || 1);
|
||||
}
|
||||
|
||||
function displayValue(row, key) {
|
||||
const value = row[key];
|
||||
|
||||
@@ -170,7 +174,7 @@
|
||||
}
|
||||
|
||||
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 ?? "";
|
||||
@@ -332,7 +336,7 @@
|
||||
renderTable();
|
||||
});
|
||||
|
||||
qs("#bestiary-bp-tier")?.addEventListener("change", () => {
|
||||
qs("#bestiary-tier")?.addEventListener("change", () => {
|
||||
state.page = 1;
|
||||
renderTable();
|
||||
});
|
||||
|
||||
+6
-15
@@ -51,22 +51,13 @@
|
||||
<option value="">All difficulties</option>
|
||||
</select>
|
||||
|
||||
<label for="bestiary-bp-tier">BP Tier</label>
|
||||
<select id="bestiary-bp-tier">
|
||||
<option value="0">No modifier</option>
|
||||
<option value="1">Brutal Peeps +1</option>
|
||||
<option value="2">Brutal Peeps +2</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>
|
||||
<label for="bestiary-xp-bonus">XP Bonus</label>
|
||||
<select id="bestiary-xp-bonus">
|
||||
<option value="1">No modifier</option>
|
||||
<option value="1.05">+5%</option>
|
||||
<option value="1.10">+10%</option>
|
||||
</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>
|
||||
<select id="bestiary-view">
|
||||
|
||||
Reference in New Issue
Block a user