unified field theory
duplication bug fix renaming custom mode -> experimental mode experimental mode is available again even without completing lore mob: sneaker is a bit faster and stronger (the invisible one that attacks from stealth) tech: unified field theory - switching guns uses a reroll to cycle your field
This commit is contained in:
@@ -325,7 +325,7 @@ const simulation = {
|
||||
// SVGleftMouse: '<svg viewBox="750 0 200 765" class="mouse-icon" width="40px" height = "60px" stroke-linecap="round" stroke-linejoin="round" stroke-width="25px" stroke="#000" fill="none"> <path fill="#fff" stroke="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M832.41,106.64 V323.55 H651.57 V256.64 c0-82.5,67.5-150,150-150 Z" fill="#149" stroke="none" /> <path fill="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M657 317 h 340 h-170 v-207" /> <ellipse fill="#fff" cx="827.57" cy="218.64" rx="29" ry="68" /> </svg>',
|
||||
// SVGrightMouse: '<svg viewBox="750 0 200 765" class="mouse-icon" width="40px" height = "60px" stroke-linecap="round" stroke-linejoin="round" stroke-width="25px" stroke="#000" fill="none"> <path fill="#fff" stroke="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M827,112 h30 a140,140,0,0,1,140,140 v68 h-167 z" fill="#0cf" stroke="none" /> <path fill="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M657 317 h 340 h-170 v-207" /> <ellipse fill="#fff" cx="827.57" cy="218.64" rx="29" ry="68" /> </svg>',
|
||||
makeTextLog(text, time = 120) {
|
||||
if (simulation.isTextLogOpen && !build.isCustomSelection) {
|
||||
if (simulation.isTextLogOpen && !build.isExperimentSelection) {
|
||||
if (simulation.lastLogTime > mech.cycle) { //if there is an older message
|
||||
document.getElementById("text-log").innerHTML = document.getElementById("text-log").innerHTML + '<br>' + text;
|
||||
simulation.lastLogTime = mech.cycle + time;
|
||||
@@ -363,6 +363,24 @@ const simulation = {
|
||||
simulation.updateGunHUD();
|
||||
simulation.boldActiveGunHUD();
|
||||
// mech.drop();
|
||||
if (true && powerUps.research.count > 0) {
|
||||
powerUps.research.changeRerolls(-1)
|
||||
const energy = mech.energy
|
||||
mech.setField((mech.fieldMode === mech.fieldUpgrades.length - 1) ? 1 : mech.fieldMode + 1) //cycle to next field
|
||||
mech.energy = energy //field swap sets energy to max, this undoes that
|
||||
|
||||
//update text to show next field
|
||||
for (let i = tech.tech.length - 1; i > 0; i--) {
|
||||
if (tech.tech[i].name === "unified field theory") {
|
||||
const index = (mech.fieldMode === mech.fieldUpgrades.length - 1) ? 1 : mech.fieldMode + 1
|
||||
tech.tech[i].description = `after switching <strong>guns</strong><br>use a <strong class='color-r'>research</strong> to cycle your <strong class='color-f'>field</strong>
|
||||
<br>(next <strong class='color-f'>field</strong>: ${mech.fieldUpgrades[index].name})`
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
zoom: null,
|
||||
zoomScale: 1000,
|
||||
@@ -467,8 +485,8 @@ const simulation = {
|
||||
};
|
||||
document.getElementById("choose-grid").style.display = "none"
|
||||
document.getElementById("info").style.display = "inline";
|
||||
document.getElementById("build-button").style.display = "inline"
|
||||
document.getElementById("build-grid").style.display = "none"
|
||||
document.getElementById("experiment-button").style.display = "inline"
|
||||
document.getElementById("experiment-grid").style.display = "none"
|
||||
document.getElementById("pause-grid-left").style.display = "none"
|
||||
document.getElementById("pause-grid-right").style.display = "none"
|
||||
document.getElementById("splash").style.display = "inline";
|
||||
@@ -479,15 +497,15 @@ const simulation = {
|
||||
fpsInterval: 0, //set in startGame
|
||||
then: null,
|
||||
startGame(isBuildRun = false) {
|
||||
if (!isBuildRun) { //if a build run logic flow returns to "build-button").addEventListener
|
||||
if (!isBuildRun) { //if a build run logic flow returns to "experiment-button").addEventListener
|
||||
document.body.style.cursor = "none";
|
||||
document.body.style.overflow = "hidden"
|
||||
}
|
||||
simulation.onTitlePage = false;
|
||||
document.getElementById("choose-grid").style.display = "none"
|
||||
document.getElementById("build-grid").style.display = "none"
|
||||
document.getElementById("experiment-grid").style.display = "none"
|
||||
document.getElementById("info").style.display = "none";
|
||||
document.getElementById("build-button").style.display = "none";
|
||||
document.getElementById("experiment-button").style.display = "none";
|
||||
document.getElementById("splash").onclick = null; //removes the onclick effect so the function only runs once
|
||||
document.getElementById("splash").style.display = "none"; //hides the element that spawned the function
|
||||
document.getElementById("dmg").style.display = "inline";
|
||||
@@ -510,6 +528,7 @@ const simulation = {
|
||||
b.removeAllGuns();
|
||||
simulation.isNoPowerUps = false;
|
||||
tech.setupAllTech(); //sets tech to default values
|
||||
tech.cancelCount = 0;
|
||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||
if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod()
|
||||
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
|
||||
@@ -553,7 +572,7 @@ const simulation = {
|
||||
simulation.CDScale = 1;
|
||||
simulation.difficulty = 0;
|
||||
simulation.difficultyMode = Number(document.getElementById("difficulty-select").value)
|
||||
build.isCustomSelection = false;
|
||||
build.isExperimentSelection = false;
|
||||
|
||||
simulation.clearNow = true;
|
||||
document.getElementById("text-log").style.opacity = 0;
|
||||
|
||||
Reference in New Issue
Block a user