yochaigal / cairn

Home Page:https://yochaigal.github.io/cairn/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Helmet and Shield counted as 1 slot instead of 2

ptaranat opened this issue · comments

In the character generator, helmet and shields are counted as 1 slot instead of 2. This results in 1 less used slots as shown below:
brave_WSi4NkybWf

Perhaps we can add additional logic alongside checking for "bulky":

for (let i = 0; i < allItems.length; i++) {
let item = allItems[i];
if (item.includes("bulky")) {
total += 2;
} else if (total > 10){
total = 10;
} else if (!item.includes("protection") && (!item.includes("nor") && (!item.includes("stacks")))) {
total++;
}

should be:

if (item.includes("bulky") || item.includes("and a") { 
     total += 2; 
}