frequency
some tech now has 2x,3x,4x frequency of showing up (most tech is at 1x, a few are at 2x if they have a rare requirement to unlock) reworked junk and lore tech systems (might be some new bugs) tech that used to just summon a power up now also increases tech frequency removed the 4 perpetual techs maybe fixed immune boss bug on detours level
This commit is contained in:
@@ -288,18 +288,14 @@ const powerUps = {
|
||||
let options = [];
|
||||
for (let i = 0; i < tech.tech.length; i++) {
|
||||
if (tech.tech[i].count < tech.tech[i].maxCount && i !== skip1 && i !== skip2 && i !== skip3 && i !== skip4 && tech.tech[i].allowed()) {
|
||||
options.push(i);
|
||||
for (let j = 0, len = tech.tech[i].frequency; j < len; j++) options.push(i);
|
||||
}
|
||||
}
|
||||
powerUps.tech.lastTotalChoices = options.length //this is recorded so that banish can know how many tech were available
|
||||
|
||||
if (tech.isBanish) { //remove banished tech from last selection
|
||||
for (let i = 0; i < powerUps.tech.banishLog.length; i++) {
|
||||
for (let j = 0; j < options.length; j++) {
|
||||
if (powerUps.tech.banishLog[i] === options[j]) {
|
||||
options.splice(j, 1)
|
||||
break
|
||||
}
|
||||
if (powerUps.tech.banishLog[i] === options[j]) options.splice(j, 1)
|
||||
}
|
||||
}
|
||||
} else { //remove repeats from last selection
|
||||
@@ -308,10 +304,7 @@ const powerUps = {
|
||||
for (let i = 0; i < totalChoices; i++) { //repeat for each choice from the last selection
|
||||
if (options.length > totalChoices) {
|
||||
for (let j = 0, len = options.length; j < len; j++) {
|
||||
if (powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - 1 - i] === options[j]) {
|
||||
options.splice(j, 1) //remove previous choice from option pool
|
||||
break
|
||||
}
|
||||
if (powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - 1 - i] === options[j]) options.splice(j, 1) //remove previous choice from option pool
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user