surfactant
tech: surfactant - remove foam gun, get 3 foam bots, upgrade all bots to foam you can now have a chance to see gun removing tech even when that gun isn't active n-gon title draws in 1/2 the time I'm getting flagged by google search that my loading page takes a long time to full render, so this might remove the flag the site is very fast to load, but I think google is getting confused by the title animation bug fixes
This commit is contained in:
25
js/bullet.js
25
js/bullet.js
@@ -1216,7 +1216,7 @@ const b = {
|
||||
this.endCycle = 0;
|
||||
if (m.cycle + 25 * b.fireCDscale < m.fireCDcycle) m.fireCDcycle = m.cycle + 35 * b.fireCDscale //lower cd to 25 if it is above 25
|
||||
//recoil on catching
|
||||
const momentum = Vector.mult(Vector.sub(this.velocity, player.velocity), this.mass * (input.down ? 0.0001 : 0.0002))
|
||||
const momentum = Vector.mult(Vector.sub(this.velocity, player.velocity), (input.down ? 0.00015 : 0.0003))
|
||||
player.force.x += momentum.x
|
||||
player.force.y += momentum.y
|
||||
// refund ammo
|
||||
@@ -5498,29 +5498,6 @@ const b = {
|
||||
ctx.ellipse(where.x, where.y, this.auraRadius, this.auraRadius * this.semiMinor, this.angleAura, 0, 2 * Math.PI)
|
||||
ctx.fillStyle = "rgba(255,0,0,0.03)";
|
||||
ctx.fill();
|
||||
// this.semiMinor = this.semiMinor * 0.95 + (1 - Math.min(0.5, this.speed * 0.02)) * 0.05
|
||||
// this.auraRadius = this.auraRadius * 0.95 + this.speed * 10 * 0.05
|
||||
// let where = Vector.add(Vector.mult(this.velocity, -1), this.position)
|
||||
// const angle = Math.atan2(this.velocity.y, this.velocity.x)
|
||||
// ctx.beginPath();
|
||||
// ctx.ellipse(where.x, where.y, this.auraRadius * 0.25, this.auraRadius * 0.15 * this.semiMinor, angle, 0, 2 * Math.PI)
|
||||
// ctx.fillStyle = "rgba(255,100,0,0.75)";
|
||||
// ctx.fill();
|
||||
// where = Vector.add(Vector.mult(this.velocity, -2), where)
|
||||
// ctx.beginPath();
|
||||
// ctx.ellipse(where.x, where.y, this.auraRadius * 0.5, this.auraRadius * 0.5 * this.semiMinor, angle, 0, 2 * Math.PI)
|
||||
// ctx.fillStyle = "rgba(255,50,0,0.35)";
|
||||
// ctx.fill();
|
||||
// where = Vector.add(Vector.mult(this.velocity, -2), where)
|
||||
// ctx.beginPath();
|
||||
// ctx.ellipse(where.x, where.y, this.auraRadius * 0.75, this.auraRadius * 0.7 * this.semiMinor, angle, 0, 2 * Math.PI)
|
||||
// ctx.fillStyle = "rgba(255,0,0,0.15)";
|
||||
// ctx.fill();
|
||||
// where = Vector.add(Vector.mult(this.velocity, -2), where)
|
||||
// ctx.beginPath();
|
||||
// ctx.ellipse(where.x, where.y, this.auraRadius, this.auraRadius * this.semiMinor, angle, 0, 2 * Math.PI)
|
||||
// ctx.fillStyle = "rgba(255,0,0,0.03)";
|
||||
// ctx.fill();
|
||||
//damage mobs in a circle based on this.semiMinor radius
|
||||
if (this.auraRadius > 200) {
|
||||
for (let i = 0, len = mob.length; i < len; ++i) {
|
||||
|
||||
@@ -4315,13 +4315,13 @@ const level = {
|
||||
isElevators = true
|
||||
elevator1 = level.elevator(-1780, 500, 260, 40, 7, 0.0003) // elevator(x, y, width, height, maxHeight, force = 0.003, friction = { up: 0.01, down: 0.2 }) {
|
||||
elevator2 = level.elevator(820, 1300, 260, 40, 607, 0.0003)
|
||||
elevator3 = level.elevator(-2850, 1300, 160, 40, 700, 0.007)
|
||||
elevator3 = level.elevator(-2850, 1250, 160, 40, 600, 0.007)
|
||||
if (simulation.isHorizontalFlipped) {
|
||||
spawn.mapVertex(-2900, 225, "0 0 0 -500 -500 -500")
|
||||
} else {
|
||||
spawn.mapVertex(-2900, 225, "0 0 0 -500 500 -500")
|
||||
}
|
||||
spawn.mapRect(-3050, 1275, 175, 200);
|
||||
spawn.mapRect(-3050, 1175, 175, 300);
|
||||
spawn.bodyRect(-2375, 1300, 100, 100);
|
||||
spawn.bodyRect(-2325, 1250, 50, 50);
|
||||
spawn.bodyRect(-2275, 1350, 125, 50);
|
||||
|
||||
@@ -444,7 +444,7 @@ const m = {
|
||||
Composite.clear(engine.world);
|
||||
Engine.clear(engine);
|
||||
simulation.splashReturn();
|
||||
}, 3000);
|
||||
}, 5000);
|
||||
}
|
||||
},
|
||||
health: 0,
|
||||
|
||||
98
js/tech.js
98
js/tech.js
@@ -141,7 +141,7 @@
|
||||
sound.tone(375)
|
||||
}
|
||||
},
|
||||
haveGunCheck(name) {
|
||||
haveGunCheck(name, needActive = true) {
|
||||
// if (
|
||||
// !build.isExperimentSelection &&
|
||||
// b.inventory.length > 2 &&
|
||||
@@ -154,12 +154,12 @@
|
||||
// if (b.guns[b.inventory[i]].name === name) return true
|
||||
// }
|
||||
// return false
|
||||
if (build.isExperimentSelection) {
|
||||
if (build.isExperimentSelection || !needActive) {
|
||||
for (i = 0, len = b.inventory.length; i < len; i++) {
|
||||
if (b.guns[b.inventory[i]].name === name) return true
|
||||
}
|
||||
return false
|
||||
} else {
|
||||
} else { //must be holding gun, this is the standard while playing
|
||||
return b.inventory.length > 0 && b.guns[b.activeGun].name === name
|
||||
}
|
||||
},
|
||||
@@ -4398,20 +4398,20 @@
|
||||
isBot: true,
|
||||
isBotTech: true,
|
||||
allowed() {
|
||||
return tech.haveGunCheck("missiles")
|
||||
return tech.haveGunCheck("missiles", false)
|
||||
},
|
||||
requires: "missile gun",
|
||||
effect() {
|
||||
tech.missileBotCount++;
|
||||
b.missileBot();
|
||||
if (tech.haveGunCheck("missiles")) b.removeGun("missiles") //remove your last gun
|
||||
if (tech.haveGunCheck("missiles", false)) b.removeGun("missiles") //remove your last gun
|
||||
},
|
||||
remove() {
|
||||
if (this.count) {
|
||||
tech.missileBotCount = 0;
|
||||
b.clearPermanentBots();
|
||||
b.respawnBots();
|
||||
if (!tech.haveGunCheck("missiles")) b.giveGuns("missiles")
|
||||
if (!tech.haveGunCheck("missiles", false)) b.giveGuns("missiles")
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4754,20 +4754,20 @@
|
||||
},
|
||||
{
|
||||
name: "fault tolerance",
|
||||
description: "spawn <strong>9</strong> <strong>drones</strong> that last <strong>forever</strong><br>remove your <strong>drone gun</strong>",
|
||||
description: "spawn <strong>8</strong> <strong>drones</strong> that last <strong>forever</strong><br>remove your <strong>drone gun</strong>",
|
||||
isGunTech: true,
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.haveGunCheck("drones") || tech.isForeverDrones
|
||||
return tech.haveGunCheck("drones", false) || tech.isForeverDrones
|
||||
},
|
||||
requires: "drone gun",
|
||||
effect() {
|
||||
const num = 9
|
||||
const num = 8
|
||||
tech.isForeverDrones += num
|
||||
if (tech.haveGunCheck("drones")) b.removeGun("drones")
|
||||
if (tech.haveGunCheck("drones", false)) b.removeGun("drones")
|
||||
//spawn drones
|
||||
if (tech.isDroneRadioactive) {
|
||||
for (let i = 0; i < num * 0.25; i++) {
|
||||
@@ -4783,7 +4783,7 @@
|
||||
},
|
||||
remove() {
|
||||
tech.isForeverDrones = 0
|
||||
if (this.count && !tech.haveGunCheck("drones")) b.giveGuns("drones")
|
||||
if (this.count && !tech.haveGunCheck("drones", false)) b.giveGuns("drones")
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -4866,9 +4866,9 @@
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return (tech.haveGunCheck("drones") || tech.isForeverDrones) && !tech.isDroneRadioactive && !tech.isIncendiary
|
||||
return (tech.haveGunCheck("drones") || tech.isForeverDrones || (m.fieldUpgrades[m.fieldMode].name === "molecular assembler" && !(tech.isSporeField || tech.isMissileField || tech.isIceField))) && !tech.isDroneRadioactive && !tech.isIncendiary
|
||||
},
|
||||
requires: "drone gun, not irradiated drones, incendiary",
|
||||
requires: "drone gun, molecular assembler, not irradiated drones, incendiary",
|
||||
effect() {
|
||||
tech.isDroneTeleport = true
|
||||
},
|
||||
@@ -4887,7 +4887,7 @@
|
||||
allowed() {
|
||||
return tech.isDroneTeleport
|
||||
},
|
||||
requires: "torque bursts",
|
||||
requires: "brushless motor",
|
||||
effect() {
|
||||
tech.isDroneFastLook = true
|
||||
},
|
||||
@@ -5086,6 +5086,38 @@
|
||||
tech.isAmmoFoamSize = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "surfactant",
|
||||
description: "gain <strong>3</strong> <strong class='color-bot'>foam-bots</strong> and <strong>upgrade</strong> bots to foam<br>remove your <strong>foam gun</strong>",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isBot: true,
|
||||
isBotTech: true,
|
||||
isNonRefundable: true,
|
||||
requires: "NOT EXPERIMENT MODE, foam gun",
|
||||
allowed() {
|
||||
return tech.haveGunCheck("foam", false) && !tech.isFoamBotUpgrade
|
||||
},
|
||||
effect() {
|
||||
tech.giveTech("foam-bot upgrade")
|
||||
for (let i = 0; i < 3; i++) {
|
||||
b.foamBot()
|
||||
tech.foamBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isFoamBotUpgrade = true`)
|
||||
if (tech.haveGunCheck("foam", false)) b.removeGun("foam")
|
||||
},
|
||||
remove() {
|
||||
// if (this.count) {
|
||||
// b.clearPermanentBots();
|
||||
// b.respawnBots();
|
||||
// if (!tech.haveGunCheck("foam")) b.giveGuns("foam")
|
||||
// }
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "filament",
|
||||
description: "increase the <strong>length</strong> of your <strong>harpoon</strong>'s <strong>rope</strong><br>by <strong>1%</strong> per harpoon <strong class='color-ammo'>ammo</strong>",
|
||||
@@ -5221,25 +5253,25 @@
|
||||
tech.isRailAreaDamage = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "aerodynamic heating",
|
||||
description: "<strong>railgun</strong> rod <strong class='color-d'>damage</strong> nearby mobs",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.haveGunCheck("railgun")
|
||||
},
|
||||
requires: "railgun",
|
||||
effect() {
|
||||
tech.isRodAreaDamage = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isRodAreaDamage = false;
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: "aerodynamic heating",
|
||||
// description: "<strong>railgun</strong> rod <strong class='color-d'>damage</strong> nearby mobs",
|
||||
// isGunTech: true,
|
||||
// maxCount: 1,
|
||||
// count: 0,
|
||||
// frequency: 2,
|
||||
// frequencyDefault: 2,
|
||||
// allowed() {
|
||||
// return tech.haveGunCheck("railgun")
|
||||
// },
|
||||
// requires: "railgun",
|
||||
// effect() {
|
||||
// tech.isRodAreaDamage = true;
|
||||
// },
|
||||
// remove() {
|
||||
// tech.isRodAreaDamage = false;
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: "capacitor bank",
|
||||
description: "the <strong>railgun</strong> no longer takes time to <strong>charge</strong><br><strong>railgun</strong> rods are <strong>66%</strong> less massive",
|
||||
|
||||
Reference in New Issue
Block a user