duplicated boss health
perimeter defense and network effect each give 1% more bonus per bot (around an 18% increase for each tech) extra bosses spawned from parthenogenesis and apomixis have health increased by your duplication chance (if you have 50% duplication the extra boss have 50% more health) apomixis no longer costs 8 research
This commit is contained in:
@@ -506,7 +506,7 @@ const m = {
|
|||||||
if (tech.isSlowFPS) dmg *= 0.8
|
if (tech.isSlowFPS) dmg *= 0.8
|
||||||
// if (tech.isPiezo) dmg *= 0.85
|
// if (tech.isPiezo) dmg *= 0.85
|
||||||
if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.4
|
if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.4
|
||||||
if (tech.isBotArmor) dmg *= 0.93 ** b.totalBots()
|
if (tech.isBotArmor) dmg *= 0.92 ** b.totalBots()
|
||||||
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33;
|
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33;
|
||||||
if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.3
|
if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.3
|
||||||
if (tech.energyRegen === 0) dmg *= 0.34
|
if (tech.energyRegen === 0) dmg *= 0.34
|
||||||
|
|||||||
@@ -872,7 +872,7 @@ const powerUps = {
|
|||||||
randomPowerUpCounter: 0,
|
randomPowerUpCounter: 0,
|
||||||
spawnBossPowerUp(x, y) { //boss spawns field and gun tech upgrades
|
spawnBossPowerUp(x, y) { //boss spawns field and gun tech upgrades
|
||||||
if (level.levels[level.onLevel] !== "final") {
|
if (level.levels[level.onLevel] !== "final") {
|
||||||
if (m.fieldMode === 0) {
|
if (m.fieldMode === 0 && !tech.isSuperDeterminism) {
|
||||||
powerUps.spawn(x, y, "field")
|
powerUps.spawn(x, y, "field")
|
||||||
} else {
|
} else {
|
||||||
powerUps.randomPowerUpCounter++;
|
powerUps.randomPowerUpCounter++;
|
||||||
|
|||||||
67
js/spawn.js
67
js/spawn.js
@@ -91,7 +91,9 @@ const spawn = {
|
|||||||
},
|
},
|
||||||
secondaryBossChance(x, y) {
|
secondaryBossChance(x, y) {
|
||||||
if (tech.isDuplicateBoss && Math.random() < 2 * tech.duplicationChance()) {
|
if (tech.isDuplicateBoss && Math.random() < 2 * tech.duplicationChance()) {
|
||||||
|
tech.isScaleMobsWithDuplication = true
|
||||||
spawn.randomLevelBoss(x, y);
|
spawn.randomLevelBoss(x, y);
|
||||||
|
tech.isScaleMobsWithDuplication = false
|
||||||
return true
|
return true
|
||||||
} else if (tech.isResearchBoss) {
|
} else if (tech.isResearchBoss) {
|
||||||
if (powerUps.research.count > 3) {
|
if (powerUps.research.count > 3) {
|
||||||
@@ -736,7 +738,7 @@ const spawn = {
|
|||||||
const me = mob[mob.length - 1];
|
const me = mob[mob.length - 1];
|
||||||
me.isBoss = true;
|
me.isBoss = true;
|
||||||
Matter.Body.setDensity(me, 0.002); //normal density even though its a boss
|
Matter.Body.setDensity(me, 0.002); //normal density even though its a boss
|
||||||
me.damageReduction = 0.04; //extra reduction for a boss, because normal density
|
me.damageReduction = 0.04 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1); //extra reduction for a boss, because normal density
|
||||||
me.frictionAir = 0.01;
|
me.frictionAir = 0.01;
|
||||||
me.accelMag = 0.0002;
|
me.accelMag = 0.0002;
|
||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
@@ -918,7 +920,7 @@ const spawn = {
|
|||||||
me.onDamage = function(dmg) {
|
me.onDamage = function(dmg) {
|
||||||
if (Math.random() < 0.33 * dmg * Math.sqrt(this.mass) && this.health > dmg) this.split();
|
if (Math.random() < 0.33 * dmg * Math.sqrt(this.mass) && this.health > dmg) this.split();
|
||||||
}
|
}
|
||||||
me.damageReduction = 0.18 //me.damageReductionGoal
|
me.damageReduction = 0.18 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1); //me.damageReductionGoal
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// // this.armor();
|
// // this.armor();
|
||||||
if (!m.isBodiesAsleep) {
|
if (!m.isBodiesAsleep) {
|
||||||
@@ -991,7 +993,7 @@ const spawn = {
|
|||||||
me.onHit = function() { //run this function on hitting player
|
me.onHit = function() { //run this function on hitting player
|
||||||
this.explode();
|
this.explode();
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.22
|
me.damageReduction = 0.22 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1);
|
||||||
me.doAwake = function() {
|
me.doAwake = function() {
|
||||||
if (!m.isBodiesAsleep) {
|
if (!m.isBodiesAsleep) {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
@@ -1109,7 +1111,7 @@ const spawn = {
|
|||||||
powerUps.spawnRandomPowerUp(this.position.x, this.position.y) // manual power up spawn to avoid spawning too many tech with "symbiosis"
|
powerUps.spawnRandomPowerUp(this.position.x, this.position.y) // manual power up spawn to avoid spawning too many tech with "symbiosis"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
me.damageReduction = 0.18
|
me.damageReduction = 0.18 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.alwaysSeePlayer();
|
this.alwaysSeePlayer();
|
||||||
@@ -1137,7 +1139,6 @@ const spawn = {
|
|||||||
mobs.spawn(x, y, vertices, radius, "transparent");
|
mobs.spawn(x, y, vertices, radius, "transparent");
|
||||||
let me = mob[mob.length - 1];
|
let me = mob[mob.length - 1];
|
||||||
me.isBoss = true;
|
me.isBoss = true;
|
||||||
|
|
||||||
me.frictionAir = 0.01
|
me.frictionAir = 0.01
|
||||||
me.seeAtDistance2 = 1000000;
|
me.seeAtDistance2 = 1000000;
|
||||||
me.accelMag = 0.0005 * simulation.accelScale;
|
me.accelMag = 0.0005 * simulation.accelScale;
|
||||||
@@ -1171,7 +1172,7 @@ const spawn = {
|
|||||||
}
|
}
|
||||||
for (let i = 0; i < powerUp.length; i++) powerUp[i].collisionFilter.mask = cat.map | cat.powerUp
|
for (let i = 0; i < powerUp.length; i++) powerUp[i].collisionFilter.mask = cat.map | cat.powerUp
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.stroke = `hsl(0,0%,${80+25*Math.sin(simulation.cycle*0.01)}%)`
|
this.stroke = `hsl(0,0%,${80+25*Math.sin(simulation.cycle*0.01)}%)`
|
||||||
@@ -1340,7 +1341,7 @@ const spawn = {
|
|||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
};
|
};
|
||||||
me.lastSpeed = me.speed
|
me.lastSpeed = me.speed
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.gravity();
|
this.gravity();
|
||||||
@@ -1571,7 +1572,7 @@ const spawn = {
|
|||||||
// toMe(bullet, this.position, this.eventHorizon)
|
// toMe(bullet, this.position, this.eventHorizon)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
//keep it slow, to stop issues from explosion knock backs
|
//keep it slow, to stop issues from explosion knock backs
|
||||||
@@ -1695,7 +1696,7 @@ const spawn = {
|
|||||||
Composite.add(engine.world, cons[cons.length - 1]);
|
Composite.add(engine.world, cons[cons.length - 1]);
|
||||||
cons[len2].length = 100 + 1.5 * radius;
|
cons[len2].length = 100 + 1.5 * radius;
|
||||||
me.cons2 = cons[len2];
|
me.cons2 = cons[len2];
|
||||||
me.damageReduction = 0.25 //normal is 1, most bosses have 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) //normal is 1, most bosses have 0.25
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.gravity();
|
this.gravity();
|
||||||
@@ -1858,7 +1859,7 @@ const spawn = {
|
|||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.35 // me.damageReductionGoal
|
me.damageReduction = 0.35 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) // me.damageReductionGoal
|
||||||
me.awake = function() {
|
me.awake = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.checkStatus();
|
this.checkStatus();
|
||||||
@@ -2038,7 +2039,7 @@ const spawn = {
|
|||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerByLookingAt();
|
this.seePlayerByLookingAt();
|
||||||
@@ -2174,7 +2175,7 @@ const spawn = {
|
|||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.targetingCount = 0;
|
me.targetingCount = 0;
|
||||||
me.targetingTime = 60 - Math.min(58, 3 * simulation.difficulty)
|
me.targetingTime = 60 - Math.min(58, 3 * simulation.difficulty)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
@@ -2334,7 +2335,7 @@ const spawn = {
|
|||||||
}
|
}
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
}
|
}
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerByHistory()
|
this.seePlayerByHistory()
|
||||||
@@ -2400,7 +2401,7 @@ const spawn = {
|
|||||||
me.do = function() {
|
me.do = function() {
|
||||||
if (player.speed > 5) this.do = this.fire //don't attack until player moves
|
if (player.speed > 5) this.do = this.fire //don't attack until player moves
|
||||||
}
|
}
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.fire = function() {
|
me.fire = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.checkStatus();
|
this.checkStatus();
|
||||||
@@ -2655,7 +2656,7 @@ const spawn = {
|
|||||||
// me.torque -= me.inertia * 0.002
|
// me.torque -= me.inertia * 0.002
|
||||||
spawn.spawnOrbitals(me, radius + 50 + 200 * Math.random())
|
spawn.spawnOrbitals(me, radius + 50 + 200 * Math.random())
|
||||||
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
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.isBoss = true;
|
me.isBoss = true;
|
||||||
|
|
||||||
// spawn.shield(me, x, y, 1); //not working, not sure why
|
// spawn.shield(me, x, y, 1); //not working, not sure why
|
||||||
@@ -2921,7 +2922,7 @@ const spawn = {
|
|||||||
mobs.spawn(x, y, sides, radius, "rgb(201,202,225)");
|
mobs.spawn(x, y, sides, radius, "rgb(201,202,225)");
|
||||||
let me = mob[mob.length - 1];
|
let me = mob[mob.length - 1];
|
||||||
Matter.Body.rotate(me, 2 * Math.PI * Math.random());
|
Matter.Body.rotate(me, 2 * Math.PI * Math.random());
|
||||||
me.accelMag = 0.00037 * Math.sqrt(simulation.accelScale);
|
me.accelMag = 0.00038 * Math.sqrt(simulation.accelScale);
|
||||||
me.frictionAir = 0.01;
|
me.frictionAir = 0.01;
|
||||||
me.swordRadiusMax = 450 + 7 * simulation.difficulty;
|
me.swordRadiusMax = 450 + 7 * simulation.difficulty;
|
||||||
me.laserAngle = 0;
|
me.laserAngle = 0;
|
||||||
@@ -2929,7 +2930,7 @@ const spawn = {
|
|||||||
|
|
||||||
spawn.shield(me, x, y, 1);
|
spawn.shield(me, x, y, 1);
|
||||||
Matter.Body.setDensity(me, 0.005); //extra dense //normal is 0.001 //makes effective life much larger
|
Matter.Body.setDensity(me, 0.005); //extra dense //normal is 0.001 //makes effective life much larger
|
||||||
me.damageReduction = 0.12
|
me.damageReduction = 0.11 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.isBoss = true;
|
me.isBoss = true;
|
||||||
me.onDamage = function() {};
|
me.onDamage = function() {};
|
||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
@@ -3206,13 +3207,13 @@ const spawn = {
|
|||||||
//draw
|
//draw
|
||||||
if (!m.isBodiesAsleep) {
|
if (!m.isBodiesAsleep) {
|
||||||
if (this.distanceToPlayer2() < this.seeAtDistance2) {
|
if (this.distanceToPlayer2() < this.seeAtDistance2) {
|
||||||
if (this.alpha < 1) this.alpha += 0.003 * simulation.CDScale; //near player go solid
|
if (this.alpha < 1) this.alpha += 0.005 * simulation.CDScale; //near player go solid
|
||||||
} else {
|
} else {
|
||||||
if (this.alpha > 0) this.alpha -= 0.03; ///away from player, hide
|
if (this.alpha > 0) this.alpha -= 0.05; ///away from player, hide
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.alpha > 0) {
|
if (this.alpha > 0) {
|
||||||
if (this.alpha > 0.9 && this.seePlayer.recall) {
|
if (this.alpha > 0.8 && this.seePlayer.recall) {
|
||||||
this.healthBar();
|
this.healthBar();
|
||||||
if (!this.canTouchPlayer) {
|
if (!this.canTouchPlayer) {
|
||||||
this.canTouchPlayer = true;
|
this.canTouchPlayer = true;
|
||||||
@@ -3313,7 +3314,7 @@ const spawn = {
|
|||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.2
|
me.damageReduction = 0.2 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerCheckByDistance();
|
this.seePlayerCheckByDistance();
|
||||||
@@ -3401,7 +3402,7 @@ const spawn = {
|
|||||||
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
||||||
};
|
};
|
||||||
|
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerByLookingAt();
|
this.seePlayerByLookingAt();
|
||||||
@@ -3684,7 +3685,7 @@ const spawn = {
|
|||||||
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
||||||
};
|
};
|
||||||
me.onDamage = function() {};
|
me.onDamage = function() {};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerCheck();
|
this.seePlayerCheck();
|
||||||
@@ -3749,7 +3750,7 @@ const spawn = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
if (this.grenadeLimiter > 1) this.grenadeLimiter--
|
if (this.grenadeLimiter > 1) this.grenadeLimiter--
|
||||||
@@ -3916,7 +3917,7 @@ const spawn = {
|
|||||||
me.onDamage = function() {
|
me.onDamage = function() {
|
||||||
this.cycle = 0
|
this.cycle = 0
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.checkStatus();
|
this.checkStatus();
|
||||||
@@ -3976,7 +3977,7 @@ const spawn = {
|
|||||||
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
// this.vertices = Matter.Vertices.hull(Matter.Vertices.clockwiseSort(this.vertices)) //helps collisions functions work better after vertex have been changed
|
||||||
};
|
};
|
||||||
me.onDamage = function() {};
|
me.onDamage = function() {};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerCheck();
|
this.seePlayerCheck();
|
||||||
@@ -4195,7 +4196,7 @@ const spawn = {
|
|||||||
me.closestVertex1 = 0;
|
me.closestVertex1 = 0;
|
||||||
// me.closestVertex2 = 1;
|
// me.closestVertex2 = 1;
|
||||||
me.cycle = 0
|
me.cycle = 0
|
||||||
me.damageReduction = 0.2
|
me.damageReduction = 0.2 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerByHistory()
|
this.seePlayerByHistory()
|
||||||
@@ -4309,7 +4310,7 @@ const spawn = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerByHistory()
|
this.seePlayerByHistory()
|
||||||
@@ -4415,7 +4416,7 @@ const spawn = {
|
|||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
this.removeCons(); //remove constraint
|
this.removeCons(); //remove constraint
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.gravity();
|
this.gravity();
|
||||||
@@ -4424,14 +4425,14 @@ const spawn = {
|
|||||||
this.attraction();
|
this.attraction();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
shield(target, x, y, chance = Math.min(0.02 + simulation.difficulty * 0.005, 0.2), isExtraShield = false) {
|
shield(target, x, y, chance = Math.min(0.02 + simulation.difficulty * 0.005, 0.2) + tech.duplicationChance(), isExtraShield = false) {
|
||||||
if (this.allowShields && Math.random() < chance) {
|
if (this.allowShields && Math.random() < chance) {
|
||||||
mobs.spawn(x, y, 9, target.radius + 30, "rgba(220,220,255,0.9)");
|
mobs.spawn(x, y, 9, target.radius + 30, "rgba(220,220,255,0.9)");
|
||||||
let me = mob[mob.length - 1];
|
let me = mob[mob.length - 1];
|
||||||
me.stroke = "rgb(220,220,255)";
|
me.stroke = "rgb(220,220,255)";
|
||||||
Matter.Body.setDensity(me, 0.00001) //very low density to not mess with the original mob's motion
|
Matter.Body.setDensity(me, 0.00001) //very low density to not mess with the original mob's motion
|
||||||
me.shield = true;
|
me.shield = true;
|
||||||
me.damageReduction = 0.075
|
me.damageReduction = 0.075 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.isUnblockable = true
|
me.isUnblockable = true
|
||||||
me.isExtraShield = isExtraShield //this prevents spamming with tech.isShieldAmmo
|
me.isExtraShield = isExtraShield //this prevents spamming with tech.isShieldAmmo
|
||||||
me.collisionFilter.category = cat.mobShield
|
me.collisionFilter.category = cat.mobShield
|
||||||
@@ -4480,7 +4481,7 @@ const spawn = {
|
|||||||
Matter.Body.setDensity(me, 0.00001) //very low density to not mess with the original mob's motion
|
Matter.Body.setDensity(me, 0.00001) //very low density to not mess with the original mob's motion
|
||||||
me.frictionAir = 0;
|
me.frictionAir = 0;
|
||||||
me.shield = true;
|
me.shield = true;
|
||||||
me.damageReduction = 0.075
|
me.damageReduction = 0.075 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.collisionFilter.category = cat.mobShield
|
me.collisionFilter.category = cat.mobShield
|
||||||
me.collisionFilter.mask = cat.bullet;
|
me.collisionFilter.mask = cat.bullet;
|
||||||
for (let i = 0; i < nodes; ++i) {
|
for (let i = 0; i < nodes; ++i) {
|
||||||
@@ -4600,7 +4601,7 @@ const spawn = {
|
|||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
};
|
};
|
||||||
me.damageReduction = 0.25
|
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.armor();
|
// this.armor();
|
||||||
this.seePlayerCheckByDistance();
|
this.seePlayerCheckByDistance();
|
||||||
|
|||||||
55
js/tech.js
55
js/tech.js
@@ -171,7 +171,7 @@
|
|||||||
if (tech.isCloakingDamage) dmg *= 1.35
|
if (tech.isCloakingDamage) dmg *= 1.35
|
||||||
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.5
|
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.5
|
||||||
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
|
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
|
||||||
if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 2 : 0.66
|
if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 2 : 0.72
|
||||||
if (m.isSneakAttack && m.cycle > m.lastKillCycle + 240) dmg *= tech.sneakAttackDmg
|
if (m.isSneakAttack && m.cycle > m.lastKillCycle + 240) dmg *= tech.sneakAttackDmg
|
||||||
if (tech.isTechDamage) dmg *= 1.9
|
if (tech.isTechDamage) dmg *= 1.9
|
||||||
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
|
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
|
||||||
@@ -190,20 +190,23 @@
|
|||||||
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.1995
|
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.1995
|
||||||
if (tech.isNoFireDamage && m.cycle > m.fireCDcycle + 120) dmg *= 2
|
if (tech.isNoFireDamage && m.cycle > m.fireCDcycle + 120) dmg *= 2
|
||||||
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.66, player.speed * 0.0165)
|
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.66, player.speed * 0.0165)
|
||||||
if (tech.isBotDamage) dmg *= 1 + 0.06 * b.totalBots()
|
if (tech.isBotDamage) dmg *= 1 + 0.07 * b.totalBots()
|
||||||
return dmg * tech.slowFire * tech.aimDamage
|
return dmg * tech.slowFire * tech.aimDamage
|
||||||
},
|
},
|
||||||
duplicationChance() {
|
duplicationChance() {
|
||||||
return Math.max(0, (tech.isPowerUpsVanish ? 0.13 : 0) + (tech.isStimulatedEmission ? 0.17 : 0) + tech.cancelCount * 0.045 + tech.duplicateChance + m.duplicateChance + tech.wormDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0))
|
return Math.max(0, (tech.isPowerUpsVanish ? 0.13 : 0) + (tech.isStimulatedEmission ? 0.17 : 0) + tech.cancelCount * 0.045 + tech.duplicateChance + m.duplicateChance + tech.wormDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0))
|
||||||
},
|
},
|
||||||
|
isScaleMobsWithDuplication: false,
|
||||||
maxDuplicationEvent() {
|
maxDuplicationEvent() {
|
||||||
if (tech.is100Duplicate && tech.duplicationChance() > 0.99) {
|
if (tech.is100Duplicate && tech.duplicationChance() > 0.99) {
|
||||||
tech.is100Duplicate = false
|
tech.is100Duplicate = false
|
||||||
const range = 500
|
const range = 500
|
||||||
|
tech.isScaleMobsWithDuplication = true
|
||||||
for (let i = 0, len = 8; i < len; i++) {
|
for (let i = 0, len = 8; i < len; i++) {
|
||||||
const angle = 2 * Math.PI * i / len
|
const angle = 2 * Math.PI * i / len
|
||||||
spawn.randomLevelBoss(m.pos.x + range * Math.cos(angle), m.pos.y + range * Math.sin(angle), spawn.nonCollideBossList);
|
spawn.randomLevelBoss(m.pos.x + range * Math.cos(angle), m.pos.y + range * Math.sin(angle), spawn.nonCollideBossList);
|
||||||
}
|
}
|
||||||
|
tech.isScaleMobsWithDuplication = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setTechFrequency(name, frequency) {
|
setTechFrequency(name, frequency) {
|
||||||
@@ -748,7 +751,7 @@
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("matter wave") || tech.isNeutronBomb || tech.isIceField || tech.isIceShot || tech.relayIce || tech.blockingIce > 1 || tech.isWormShot || tech.foamBotCount > 1
|
return m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("matter wave") || tech.isNeutronBomb || tech.isIceField || tech.isIceShot || tech.relayIce || tech.isNeedleIce || tech.blockingIce > 1 || tech.isWormShot || tech.foamBotCount > 1
|
||||||
},
|
},
|
||||||
requires: "drones, spores, missiles, foam, matter wave, neutron bomb, ice IX",
|
requires: "drones, spores, missiles, foam, matter wave, neutron bomb, ice IX",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1535,7 +1538,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "perimeter defense",
|
name: "perimeter defense",
|
||||||
description: "reduce <strong class='color-harm'>harm</strong> by <strong>7%</strong><br>for each of your permanent <strong class='color-bot'>bots</strong>",
|
description: "reduce <strong class='color-harm'>harm</strong> by <strong>8%</strong><br>for each of your permanent <strong class='color-bot'>bots</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -1554,7 +1557,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "network effect",
|
name: "network effect",
|
||||||
description: "increase <strong class='color-d'>damage</strong> by <strong>6%</strong><br>for each of your permanent <strong class='color-bot'>bots</strong>",
|
description: "increase <strong class='color-d'>damage</strong> by <strong>7%</strong><br>for each of your permanent <strong class='color-bot'>bots</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -1574,7 +1577,7 @@
|
|||||||
{
|
{
|
||||||
name: "ersatz bots",
|
name: "ersatz bots",
|
||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Ersatz_good' class="link">ersatz bots</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Ersatz_good' class="link">ersatz bots</a>`,
|
||||||
description: "<strong>double</strong> your current permanent <strong class='color-bot'>bots</strong><br>remove <strong>all</strong> of your current <strong class='color-g'>guns</strong>",
|
description: "<strong>double</strong> your current permanent <strong class='color-bot'>bots</strong><br>remove <strong>all</strong> <strong class='color-g'>guns</strong> in your inventory",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -1968,7 +1971,7 @@
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField || tech.isIceShot || tech.relayIce || tech.blockingIce > 1) && !tech.sporesOnDeath && !tech.isExplodeMob && !tech.botSpawner && !tech.isMobBlockFling && !tech.nailsDeathMob
|
return (tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField || tech.isIceShot || tech.relayIce || tech.isNeedleIce || tech.blockingIce > 1) && !tech.sporesOnDeath && !tech.isExplodeMob && !tech.botSpawner && !tech.isMobBlockFling && !tech.nailsDeathMob
|
||||||
},
|
},
|
||||||
requires: "a localized freeze effect, no other mob death tech",
|
requires: "a localized freeze effect, no other mob death tech",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1986,7 +1989,7 @@
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isIceField || tech.relayIce || tech.blockingIce || tech.iceIXOnDeath || tech.isIceShot
|
return tech.isIceField || tech.relayIce || tech.isNeedleIce || tech.blockingIce || tech.iceIXOnDeath || tech.isIceShot
|
||||||
},
|
},
|
||||||
requires: "ice IX",
|
requires: "ice IX",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2004,7 +2007,7 @@
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField || tech.relayIce || tech.blockingIce > 1 || tech.iceIXOnDeath || tech.isIceShot
|
return tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField || tech.relayIce || tech.isNeedleIce || tech.blockingIce > 1 || tech.iceIXOnDeath || tech.isIceShot
|
||||||
},
|
},
|
||||||
requires: "a localized freeze effect",
|
requires: "a localized freeze effect",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2022,7 +2025,7 @@
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isStunField || tech.isExplosionStun || tech.isMineStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.relayIce || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage || tech.blockingIce > 1 || tech.iceIXOnDeath || tech.isIceShot
|
return tech.isStunField || tech.isExplosionStun || tech.isMineStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.relayIce || tech.isNeedleIce || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage || tech.blockingIce > 1 || tech.iceIXOnDeath || tech.isIceShot
|
||||||
},
|
},
|
||||||
requires: "a freezing or stunning effect",
|
requires: "a freezing or stunning effect",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2549,7 +2552,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dormancy",
|
name: "dormancy",
|
||||||
description: "if a mob has <strong>died</strong> in the last <strong>5 seconds</strong><br><span style = 'font-size:90%;'>increase <strong class='color-d'>damage</strong> by <strong>99%</strong> else decrease it by <strong>33%</strong></span>",
|
description: "if a mob has <strong>died</strong> in the last <strong>5 seconds</strong><br><span style = 'font-size:90%;'>increase <strong class='color-d'>damage</strong> by <strong>100%</strong> else decrease it by <strong>28%</strong></span>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -3229,7 +3232,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "parthenogenesis",
|
name: "parthenogenesis",
|
||||||
description: "levels have a chance to spawn a 2nd <strong>boss</strong><br>equal to <strong>double</strong> your <strong class='color-dup'>duplication</strong> chance",
|
description: "<span style = 'font-size:90%;'> <strong>bosses</strong> have a <strong>2x</strong> chance to be <strong class='color-dup'>duplicated</strong>, but their<br><strong>health</strong> is increased by your <strong class='color-dup'>duplication</strong> chance</span>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -3247,27 +3250,21 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "apomixis",
|
name: "apomixis",
|
||||||
description: `immediately use ${powerUps.orb.research(11)} and if you<br>reach <strong>100%</strong> <strong class='color-dup'>duplication</strong> spawn <strong>8 bosses</strong>`,
|
description: `when you reach <strong>100%</strong> <strong class='color-dup'>duplication</strong><br>spawn <strong>8 bosses</strong> with <strong>100%</strong> more <strong>health</strong>`,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 3,
|
frequency: 3,
|
||||||
frequencyDefault: 3,
|
frequencyDefault: 3,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.duplicationChance() > 0.6 && powerUps.research.count > 10
|
return tech.duplicationChance() > 0.33
|
||||||
},
|
},
|
||||||
requires: "duplication chance above 60%",
|
requires: "duplication chance above 33%",
|
||||||
effect() {
|
effect() {
|
||||||
tech.is100Duplicate = true;
|
tech.is100Duplicate = true;
|
||||||
tech.maxDuplicationEvent()
|
tech.maxDuplicationEvent()
|
||||||
for (let i = 0; i < 11; i++) {
|
|
||||||
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
if (tech.is100Duplicate) {
|
tech.is100Duplicate = false;
|
||||||
tech.is100Duplicate = false;
|
|
||||||
if (this.count > 0) powerUps.research.changeRerolls(11)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -3518,6 +3515,7 @@
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isBadRandomOption: true,
|
isBadRandomOption: true,
|
||||||
|
// isNonRefundable: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return !tech.isExtraChoice && !tech.isCancelDuplication && !tech.isCancelRerolls
|
return !tech.isExtraChoice && !tech.isCancelDuplication && !tech.isCancelRerolls
|
||||||
},
|
},
|
||||||
@@ -3530,7 +3528,18 @@
|
|||||||
remove() {
|
remove() {
|
||||||
if (tech.isDeterminism) {
|
if (tech.isDeterminism) {
|
||||||
tech.isDeterminism = false;
|
tech.isDeterminism = false;
|
||||||
for (let i = 0; i < 5; i++) powerUps.removeRandomTech()
|
for (let i = 0; i < 5; i++) {
|
||||||
|
const numberRemoved = powerUps.removeRandomTech()
|
||||||
|
if (numberRemoved === 0) { //if the player didn't remove a power up then remove 1 tech for the map
|
||||||
|
for (let i = 0; i < powerUp.length; i++) {
|
||||||
|
if (powerUp[i].name === "tech") {
|
||||||
|
Matter.Composite.remove(engine.world, powerUp[i]);
|
||||||
|
powerUp.splice(i, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
15
todo.txt
15
todo.txt
@@ -1,17 +1,16 @@
|
|||||||
******************************************************** NEXT PATCH **************************************************
|
******************************************************** NEXT PATCH **************************************************
|
||||||
tech: needle ice - needles make 1-2 ice 9 after they impact a wall
|
|
||||||
needle shot gun fires 1 less needle
|
|
||||||
|
|
||||||
most harpoon tech are about 5% better
|
perimeter defense and network effect each give 1% more bonus per bot (around an 18% increase for each tech)
|
||||||
JUNK tech: negative friction - you speed up when you touch walls
|
|
||||||
|
|
||||||
no-cloning theorem: 42% -> 38% dup chance
|
|
||||||
symbiosis: 2 tech -> 1-2 tech after a boss dies
|
|
||||||
quenching gives 10% less max health for over heal
|
|
||||||
|
|
||||||
|
extra bosses spawned from parthenogenesis and apomixis have health increased by your duplication chance
|
||||||
|
(if you have 50% duplication the extra boss have 50% more health)
|
||||||
|
apomixis no longer costs 8 research
|
||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
|
Plasma Burner: upgrade for plasma torch, basically just a jet engine. does high damage, but short range, mostly for player movement.
|
||||||
|
maybe reduce gravity to really low then apply a vector away from mouse direction
|
||||||
|
|
||||||
no passive energy regen, but regen energy after doing damage
|
no passive energy regen, but regen energy after doing damage
|
||||||
tech or just default?
|
tech or just default?
|
||||||
modify conservation of energy tech
|
modify conservation of energy tech
|
||||||
|
|||||||
Reference in New Issue
Block a user