frequency

tech: robotics - 3x frequency of bot tech, spawn a random bot
tech: statistical ensemble - 10000% increased frequency of recursive tech you already have

non-refundable tech can no longer display as "off" in the experiment menu when you click it a second time
  these tech can't be removed with out resetting
  please don't submit bug reports about this...

added more junk tech
This commit is contained in:
landgreen
2021-03-04 04:47:51 -08:00
parent 9e98ceb4e1
commit abed965f7b
8 changed files with 417 additions and 462 deletions

View File

@@ -2241,12 +2241,11 @@ const b = {
//remove all bots techs and convert them to the new type so that tech refunds work correctly
let totalTechToConvert = 0 //count how many tech need to be converted
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].count && tech.tech[i].isBotTech) {
if (tech.tech[i].count && tech.tech[i].isBot) {
totalTechToConvert += tech.tech[i].count
tech.removeTech(i)
}
}
console.log(totalTechToConvert)
let name = ""
if (type === "nailBotCount") name = "nail-bot"

View File

@@ -289,9 +289,16 @@ const build = {
if (tech.tech[index].count < tech.tech[index].maxCount) {
if (!who.classList.contains("build-tech-selected")) who.classList.add("build-tech-selected");
tech.giveTech(index)
} else {
} else if (!tech.tech[index].isNonRefundable) {
tech.totalCount -= tech.tech[index].count
tech.removeTech(index);
who.classList.remove("build-tech-selected");
} else {
who.classList.remove("build-tech-selected")
setTimeout(() => { //return energy
who.classList.add("build-tech-selected")
}, 50);
}
}
//update tech text //disable not allowed tech
@@ -308,7 +315,6 @@ const build = {
<div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:0.65;"></div>
</span>
&nbsp; &nbsp; &nbsp; &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>`
// <div class="circle-grid gun" style="position:absolute; top:-3px; left:-3px; opacity:1; height: 33px; width:33px;"></div>
// <div class="circle-grid tech" style="position:absolute; top:5px; left:5px;opacity:1;height: 20px; width:20px;border: #fff solid 2px;"></div>
// border: #fff solid 0px;

View File

@@ -380,15 +380,15 @@ const m = {
//find what tech I could get
let options = [];
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].count < tech.tech[i].maxCount &&
if (
tech.tech[i].count < tech.tech[i].maxCount &&
tech.tech[i].allowed() &&
!tech.tech[i].isBadRandomOption &&
!tech.tech[i].isLore &&
tech.tech[i].allowed() &&
(!tech.tech[i].isJunk || Math.random() < 0.25)) options.push(i);
// !tech.tech[i].isNonRefundable &&
// tech.tech[i].name !== "quantum immortality" &&
// tech.tech[i].name !== "many-worlds" &&
// tech.tech[i].name !== "perturbation theory" &&
(!tech.tech[i].isJunk || Math.random() < 0.15)
) {
for (let j = 0; j < tech.tech[i].frequency; j++) options.push(i);
}
}
//add a new tech from options pool
if (options.length > 0) tech.giveTech(options[Math.floor(Math.random() * options.length)])
@@ -399,6 +399,7 @@ const m = {
simulation.updateTechHUD();
simulation.isTextLogOpen = true;
if (m.holdingTarget) m.drop();
if (simulation.paused) build.pauseGrid() //update the build when paused
},
death() {
if (tech.isImmortal) { //if player has the immortality buff, spawn on the same level with randomized damage

View File

@@ -125,6 +125,7 @@ const spawn = {
} else if (count === 900) {
simulation.makeTextLog(`World.clear(engine.world)`);
} else if (count === 1140) {
tech.isImmortal = false;
m.death()
return
}

File diff suppressed because it is too large Load Diff