fixed shooting aiming and url broken

This commit is contained in:
landgreen
2021-04-16 05:13:21 -07:00
parent a5aea4ccc5
commit 058b1f94f5
6 changed files with 19 additions and 21 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -58,7 +58,7 @@ function getUrlVars() {
}); });
return vars; return vars;
} }
window.addEventListener('load', (event) => { window.addEventListener('load', () => {
const set = getUrlVars() const set = getUrlVars()
if (Object.keys(set).length !== 0) { if (Object.keys(set).length !== 0) {
openExperimentMenu(); openExperimentMenu();
@@ -332,7 +332,8 @@ const build = {
techID.innerHTML = `<div class="grid-title"><div class="circle-grid junk"></div> &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>` techID.innerHTML = `<div class="grid-title"><div class="circle-grid junk"></div> &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>`
} else if (tech.tech[i].isExperimentalMode) { } else if (tech.tech[i].isExperimentalMode) {
// techID.innerHTML = `${tech.tech[i].description}</div>` // techID.innerHTML = `${tech.tech[i].description}</div>`
text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')"><div class="grid-title">${tech.tech[i].name}</div> ${tech.tech[i].description}</div>` techID.innerHTML = `<div class="grid-title">${tech.tech[i].name}</div>${tech.tech[i].description}</div>`
// text += `<div class="grid-title">${tech.tech[i].name}</div> ${tech.tech[i].description}</div>`
} else { } else {
techID.innerHTML = `<div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>` techID.innerHTML = `<div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>`
} }

View File

@@ -1109,8 +1109,8 @@ const level = {
// spawn.starter(1900, -500, 200) //big boy // spawn.starter(1900, -500, 200) //big boy
// spawn.grower(1900, -500) // spawn.grower(1900, -500)
// spawn.pulsarBoss(1900, -500) // spawn.pulsarBoss(1900, -500)
// spawn.historyBoss(1900, -500) // spawn.shooterBoss(1900, -500)
// spawn.ghoster(2900, -500) spawn.shooter(2900, -500)
// spawn.launcherBoss(1200, -500) // spawn.launcherBoss(1200, -500)
// spawn.laserTargetingBoss(1600, -400) // spawn.laserTargetingBoss(1600, -400)
// spawn.striker(4600, -500) // spawn.striker(4600, -500)
@@ -1119,7 +1119,7 @@ const level = {
// spawn.sniper(1800, -120) // spawn.sniper(1800, -120)
// spawn.streamBoss(1600, -500) // spawn.streamBoss(1600, -500)
// spawn.orbitalBoss(1600, -500) // spawn.orbitalBoss(1600, -500)
spawn.spawnerBossCulture(1600, -500) // spawn.spawnerBossCulture(1600, -500)
// spawn.shieldingBoss(1600, -500) // spawn.shieldingBoss(1600, -500)
// spawn.beamer(1200, -500) // spawn.beamer(1200, -500)
// spawn.shield(mob[mob.length - 1], 1800, -120, 1); // spawn.shield(mob[mob.length - 1], 1800, -120, 1);

View File

@@ -921,7 +921,7 @@ const mobs = {
this.torque += 0.000004 * this.inertia; this.torque += 0.000004 * this.inertia;
} else if (dot < -threshold) { } else if (dot < -threshold) {
this.torque -= 0.000004 * this.inertia; this.torque -= 0.000004 * this.inertia;
} else if (this.noseLength > 1.5 && dot > 0 && dot < 0.03) { } else if (this.noseLength > 1.5 && dot > -0.2 && dot < 0.2) {
//fire //fire
spawn.bullet(this.vertices[1].x, this.vertices[1].y, 9 + Math.ceil(this.radius / 15)); spawn.bullet(this.vertices[1].x, this.vertices[1].y, 9 + Math.ceil(this.radius / 15));
const v = 15; const v = 15;

View File

@@ -919,7 +919,7 @@ const spawn = {
me.seeAtDistance2 = (me.eventHorizon + 400) * (me.eventHorizon + 400); //vision limit is event horizon me.seeAtDistance2 = (me.eventHorizon + 400) * (me.eventHorizon + 400); //vision limit is event horizon
me.accelMag = 0.0001 * simulation.accelScale; me.accelMag = 0.0001 * simulation.accelScale;
me.frictionAir = 0.025; me.frictionAir = 0.025;
me.collisionFilter.mask = cat.player | cat.bullet | cat.body me.collisionFilter.mask = cat.player | cat.bullet //| cat.body
me.memory = Infinity; me.memory = Infinity;
Matter.Body.setDensity(me, 0.008); //extra dense //normal is 0.001 //makes effective life much larger Matter.Body.setDensity(me, 0.008); //extra dense //normal is 0.001 //makes effective life much larger
me.do = function() { me.do = function() {
@@ -996,7 +996,7 @@ const spawn = {
me.eventHorizon = 1100; //required for black hole me.eventHorizon = 1100; //required for black hole
me.seeAtDistance2 = (me.eventHorizon + 1200) * (me.eventHorizon + 1200); //vision limit is event horizon me.seeAtDistance2 = (me.eventHorizon + 1200) * (me.eventHorizon + 1200); //vision limit is event horizon
me.accelMag = 0.00003 * simulation.accelScale; me.accelMag = 0.00003 * simulation.accelScale;
me.collisionFilter.mask = cat.player | cat.bullet | cat.body me.collisionFilter.mask = cat.player | cat.bullet //| cat.body
// me.frictionAir = 0.005; // me.frictionAir = 0.005;
me.memory = 1600; me.memory = 1600;
Matter.Body.setDensity(me, 0.03); //extra dense //normal is 0.001 //makes effective life much larger Matter.Body.setDensity(me, 0.03); //extra dense //normal is 0.001 //makes effective life much larger
@@ -2148,7 +2148,7 @@ const spawn = {
me.alpha = 1; //used in drawGhost me.alpha = 1; //used in drawGhost
me.canTouchPlayer = false; //used in drawGhost me.canTouchPlayer = false; //used in drawGhost
// me.leaveBody = false; // me.leaveBody = false;
me.collisionFilter.mask = cat.bullet | cat.body me.collisionFilter.mask = cat.bullet //| cat.body
me.showHealthBar = false; me.showHealthBar = false;
me.memory = 480; me.memory = 480;
me.do = function() { me.do = function() {
@@ -2259,7 +2259,7 @@ const spawn = {
me.memory = Infinity; me.memory = Infinity;
// me.memory = 300; // me.memory = 300;
// Matter.Body.setDensity(me, 0.0015); //extra dense //normal is 0.001 // Matter.Body.setDensity(me, 0.0015); //extra dense //normal is 0.001
me.collisionFilter.mask = cat.player | cat.bullet | cat.body me.collisionFilter.mask = cat.player | cat.bullet //| cat.body
spawn.shield(me, x, y, 1); spawn.shield(me, x, y, 1);
@@ -2485,7 +2485,7 @@ const spawn = {
this.torque += 0.000004 * this.inertia; this.torque += 0.000004 * this.inertia;
} else if (dot < -threshold) { } else if (dot < -threshold) {
this.torque -= 0.000004 * this.inertia; this.torque -= 0.000004 * this.inertia;
} else if (this.noseLength > 1.5 && dot > 0 && dot < 0.05) { } else if (this.noseLength > 1.5 && dot > -0.2 && dot < 0.2) {
//fire //fire
spawn.sniperBullet(this.vertices[1].x, this.vertices[1].y, 7 + Math.ceil(this.radius / 15), 4); spawn.sniperBullet(this.vertices[1].x, this.vertices[1].y, 7 + Math.ceil(this.radius / 15), 4);
const v = 20 * simulation.accelScale; const v = 20 * simulation.accelScale;
@@ -2965,7 +2965,7 @@ const spawn = {
// //run this function on hitting player // //run this function on hitting player
// this.explode(); // this.explode();
// }; // };
me.collisionFilter.mask = cat.bullet | cat.player | cat.mob | cat.body me.collisionFilter.mask = cat.bullet | cat.player | cat.mob //| cat.body
me.accelMag = 0.0004 * simulation.accelScale; me.accelMag = 0.0004 * simulation.accelScale;
me.leaveBody = false; me.leaveBody = false;
me.frictionAir = 0.02; me.frictionAir = 0.02;

View File

@@ -1,17 +1,10 @@
******************************************************** NEXT PATCH ******************************************************** ******************************************************** NEXT PATCH ********************************************************
experiment and junk tech: decomposers - mobs leave behind spawns when they die fixed: sniper/shooter issues with aiming
fixed: Copied build urls
new levelBoss - a cluster of larger spawns
while it's alive all mobs other leave behind spawns
added block collisions to most no collide mobs
(this should buff block throwing and pilot wave)
******************************************************** BUGS ******************************************************** ******************************************************** BUGS ********************************************************
Copied build urls broke. You get the guns but none of the tech
spawns are forming node groups, but why?? spawns are forming node groups, but why??
you have to press z once to get copy to work for simulation.enableConstructMode() sometimes you have to press z once to get copy to work for simulation.enableConstructMode() sometimes
@@ -42,6 +35,10 @@ fix door.isOpen actually meaning isClosed?
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
Tech: "Spacial Continuity": 12% chance for the block resulting from a slain enemy to be thrown at the nearst mob.
Mobs that travel through walls but get stuck on blocks are annoying
tech plasma field - plasma field becomes an aoe damage field with the same radius tech plasma field - plasma field becomes an aoe damage field with the same radius
200% more energy drain, 100% more damage 200% more energy drain, 100% more damage
draw a square (or two) that rapidly spins draw a square (or two) that rapidly spins