frequency doubling

some tech is now only 50% likely to show up
  I choose about 25 tech that don't effect game play as much, and dropped them down to 50% frequency

reset on experiment menu should now clear power ups and bullets

fixed bug with no heals
This commit is contained in:
landgreen
2021-03-20 16:42:36 -07:00
parent 69b416b203
commit 603d5c466c
8 changed files with 281 additions and 246 deletions

View File

@@ -428,7 +428,10 @@ const build = {
}
},
reset() {
simulation.startGame(true); //starts game, but pauses it
build.isExperimentSelection = true;
simulation.paused = true;
m.setField(0)
b.inventory = []; //removes guns and ammo
@@ -522,9 +525,6 @@ function openExperimentMenu() {
document.body.style.overflowY = "scroll";
document.body.style.overflowX = "hidden";
document.getElementById("info").style.display = 'none'
simulation.startGame(true); //starts game, but pauses it
build.isExperimentSelection = true;
simulation.paused = true;
build.reset();
}

View File

@@ -1102,8 +1102,8 @@ const level = {
// simulation.difficulty = 30
// spawn.starter(1900, -500, 200) //big boy
spawn.exploder(1900, -500)
// spawn.pulsarBoss(1900, -500)
spawn.pulsar(1900, -500)
spawn.pulsarBoss(1900, -500)
// spawn.historyBoss(1900, -500)
// spawn.ghoster(2900, -500)
// spawn.launcherBoss(1200, -500)

View File

@@ -680,7 +680,6 @@ const powerUps = {
if (
(!tech.isSuperDeterminism || (target === 'tech' || target === 'heal' || target === 'ammo')) &&
!(tech.isEnergyNoAmmo && target === 'ammo') &&
!(tech.isNoHeals || target === 'heal') &&
(!simulation.isNoPowerUps || (target === 'research' || target === 'heal' || target === 'ammo'))
) {
powerUps.directSpawn(x, y, target, moving, mode, size)

View File

@@ -496,6 +496,7 @@ const simulation = {
fpsInterval: 0, //set in startGame
then: null,
startGame(isBuildRun = false) {
simulation.clearMap()
if (!isBuildRun) { //if a build run logic flow returns to "experiment-button").addEventListener
document.body.style.cursor = "none";
document.body.style.overflow = "hidden"

View File

@@ -1486,6 +1486,7 @@ const spawn = {
me.radius *= 1.5
me.vertices[1].x = me.position.x + Math.cos(me.angle) * me.radius; //make one end of the triangle longer
me.vertices[1].y = me.position.y + Math.sin(me.angle) * me.radius;
me.homePosition = { x: x, y: y };
me.fireCycle = 0
me.fireTarget = { x: 0, y: 0 }
me.pulseRadius = Math.min(500, 230 + simulation.difficulty * 3)
@@ -1575,6 +1576,10 @@ const spawn = {
}
}
}
//gently return to starting location
const sub = Vector.sub(this.homePosition, this.position)
const dist = Vector.magnitude(sub)
if (dist > 250) this.force = Vector.mult(Vector.normalise(sub), this.mass * 0.0002)
}
};
},
@@ -1586,6 +1591,7 @@ const spawn = {
me.radius *= 2
me.vertices[1].x = me.position.x + Math.cos(me.angle) * me.radius; //make one end of the triangle longer
me.vertices[1].y = me.position.y + Math.sin(me.angle) * me.radius;
me.homePosition = { x: x, y: y };
Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger
me.fireCycle = Infinity
me.fireTarget = { x: 0, y: 0 }
@@ -1691,6 +1697,10 @@ const spawn = {
this.fireCycle = 0
}
}
//gently return to starting location
const sub = Vector.sub(this.homePosition, this.position)
const dist = Vector.magnitude(sub)
if (dist > 350) this.force = Vector.mult(Vector.normalise(sub), this.mass * 0.0002)
}
};
},

File diff suppressed because it is too large Load Diff