Hide bcats
This commit is contained in:
parent
83e1af7c5e
commit
229a337d03
3 changed files with 25 additions and 6 deletions
12
builder.js
12
builder.js
|
@ -91,6 +91,10 @@ let powderInputs = [
|
||||||
function populateItemList(type) {
|
function populateItemList(type) {
|
||||||
let item_list = document.getElementById(type+"-items");
|
let item_list = document.getElementById(type+"-items");
|
||||||
for (const item of itemLists.get(type)) {
|
for (const item of itemLists.get(type)) {
|
||||||
|
let item_obj = itemMap.get(item);
|
||||||
|
if (item_obj["restrict"] && item_obj["restrict"] === "DEPRECATED") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let el = document.createElement("option");
|
let el = document.createElement("option");
|
||||||
el.value = item;
|
el.value = item;
|
||||||
item_list.appendChild(el);
|
item_list.appendChild(el);
|
||||||
|
@ -132,6 +136,10 @@ function init() {
|
||||||
let ring1_list = document.getElementById("ring1-items");
|
let ring1_list = document.getElementById("ring1-items");
|
||||||
let ring2_list = document.getElementById("ring2-items");
|
let ring2_list = document.getElementById("ring2-items");
|
||||||
for (const ring of itemLists.get("ring")) {
|
for (const ring of itemLists.get("ring")) {
|
||||||
|
let item_obj = itemMap.get(ring);
|
||||||
|
if (item_obj["restrict"] && item_obj["restrict"] === "DEPRECATED") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let el1 = document.createElement("option");
|
let el1 = document.createElement("option");
|
||||||
let el2 = document.createElement("option");
|
let el2 = document.createElement("option");
|
||||||
el1.value = ring;
|
el1.value = ring;
|
||||||
|
@ -146,6 +154,10 @@ function init() {
|
||||||
let weapon_list = document.getElementById("weapon-items");
|
let weapon_list = document.getElementById("weapon-items");
|
||||||
for (const weaponType of weaponTypes) {
|
for (const weaponType of weaponTypes) {
|
||||||
for (const weapon of itemLists.get(weaponType)) {
|
for (const weapon of itemLists.get(weaponType)) {
|
||||||
|
let item_obj = itemMap.get(weapon);
|
||||||
|
if (item_obj["restrict"] && item_obj["restrict"] === "DEPRECATED") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let el = document.createElement("option");
|
let el = document.createElement("option");
|
||||||
el.value = weapon;
|
el.value = weapon;
|
||||||
weapon_list.appendChild(el);
|
weapon_list.appendChild(el);
|
||||||
|
|
3
query.js
3
query.js
|
@ -4,6 +4,9 @@ class NameQuery {
|
||||||
constructor(string) { this.queryString = string.toLowerCase(); }
|
constructor(string) { this.queryString = string.toLowerCase(); }
|
||||||
|
|
||||||
filter(item) {
|
filter(item) {
|
||||||
|
if (item.get("restrict") && item.get("restrict") === "DEPRECATED") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return (item.get("displayName").toLowerCase().includes(this.queryString));
|
return (item.get("displayName").toLowerCase().includes(this.queryString));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ function calculate_skillpoints(equipment, weapon) {
|
||||||
let total = 0;
|
let total = 0;
|
||||||
for (let i = 0; i < 5; i++) {
|
for (let i = 0; i < 5; i++) {
|
||||||
if (item.get("skillpoints")[i] < 0 && skillpoint_min[i]) {
|
if (item.get("skillpoints")[i] < 0 && skillpoint_min[i]) {
|
||||||
unadjusted = skillpoints[i] + item.get("skillpoints")[i];
|
const unadjusted = skillpoints[i] + item.get("skillpoints")[i];
|
||||||
delta = skillpoint_min[i] - unadjusted;
|
const delta = skillpoint_min[i] - unadjusted;
|
||||||
if (delta > 0) {
|
if (delta > 0) {
|
||||||
applied[i] += delta;
|
applied[i] += delta;
|
||||||
total += delta;
|
total += delta;
|
||||||
|
@ -78,10 +78,14 @@ function calculate_skillpoints(equipment, weapon) {
|
||||||
const new_bonus = sets[setName].bonuses[setCount];
|
const new_bonus = sets[setName].bonuses[setCount];
|
||||||
//let skp_order = ["str","dex","int","def","agi"];
|
//let skp_order = ["str","dex","int","def","agi"];
|
||||||
for (const i in skp_order) {
|
for (const i in skp_order) {
|
||||||
const delta = (new_bonus[skp_order[i]] || 0) - (old_bonus[skp_order[i]] || 0);
|
const set_delta = (new_bonus[skp_order[i]] || 0) - (old_bonus[skp_order[i]] || 0);
|
||||||
if (delta < 0 && skillpoint_min[i]) {
|
if (set_delta < 0 && skillpoint_min[i]) {
|
||||||
applied[i] -= delta;
|
const unadjusted = skillpoints[i] + set_delta;
|
||||||
total -= delta;
|
const delta = skillpoint_min[i] - unadjusted;
|
||||||
|
if (delta > 0) {
|
||||||
|
applied[i] += delta;
|
||||||
|
total += delta;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue