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:
landgreen
2021-10-17 19:21:25 -07:00
parent 19c008fec1
commit dfc0f9b574
7 changed files with 99 additions and 77 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -88,12 +88,12 @@
<div style="position: absolute; top:0;right:0;"> <div style="position: absolute; top:0;right:0;">
<div id="pause-grid-right" class="pause-grid"></div> <div id="pause-grid-right" class="pause-grid"></div>
</div> </div>
<svg class="SVG-button ui" id="experiment-button" width="155" height="40" style="border: 2px #333 solid;"> <svg class="SVG-button" id="experiment-button" width="155" height="40" style="border: 2px #333 solid;">
<g stroke='none' fill='#333' stroke-width="2" font-size="28px" font-family="Arial, sans-serif"> <g stroke='none' fill='#333' stroke-width="2" font-size="28px" font-family="Arial, sans-serif">
<text x="10" y="30">experiment</text> <text x="10" y="30">experiment</text>
</g> </g>
</svg> </svg>
<div id='info' class="ui"> <div id='info'>
<div id="settings"> <div id="settings">
<details> <details>
<summary>settings</summary> <summary>settings</summary>
@@ -253,12 +253,12 @@
<style> <style>
.fade-in { .fade-in {
opacity: 0; opacity: 0;
animation: 4s ease 3s normal forwards 1 fadein; animation: 2s ease 1.5s normal forwards 1 fadein;
} }
.fade-in-fast { .fade-in-fast {
opacity: 0; opacity: 0;
animation: 3s ease 2s normal forwards 1 fadein; animation: 1.5s ease 1s normal forwards 1 fadein;
} }
@keyframes fadein { @keyframes fadein {
@@ -280,58 +280,58 @@
.draw-lines { .draw-lines {
stroke-dasharray: 20; stroke-dasharray: 20;
stroke-dashoffset: 20; stroke-dashoffset: 20;
animation: dash 4.8s ease-in forwards; animation: dash 2.4s ease-in forwards;
} }
.draw-lines-dash { .draw-lines-dash {
stroke-dasharray: 4; stroke-dasharray: 4;
stroke-dashoffset: 4; stroke-dashoffset: 4;
animation: dash 4.8s ease-in forwards; animation: dash 2.4s ease-in forwards;
} }
.draw-lines-o { .draw-lines-o {
stroke-dasharray: 11; stroke-dasharray: 11;
stroke-dashoffset: 11; stroke-dashoffset: 11;
animation: dash 4.8s ease-in forwards; animation: dash 2.4s ease-in forwards;
} }
.draw-lines-g { .draw-lines-g {
stroke-dasharray: 17; stroke-dasharray: 17;
stroke-dashoffset: 17; stroke-dashoffset: 17;
animation: dash 4.8s ease-in forwards; animation: dash 2.4s ease-in forwards;
} }
.draw-lines-box-1 { .draw-lines-box-1 {
stroke-dasharray: 1000; stroke-dasharray: 1000;
stroke-dashoffset: 1000; stroke-dashoffset: 1000;
animation: dash 10s ease-in forwards; animation: dash 5s ease-in forwards;
animation-delay: 0s; animation-delay: 0s;
} }
.draw-lines-box-2 { .draw-lines-box-2 {
stroke-dasharray: 1000; stroke-dasharray: 1000;
stroke-dashoffset: 1000; stroke-dashoffset: 1000;
animation: dash 5.2s ease-in forwards; animation: dash 2.6s ease-in forwards;
animation-delay: 2s; animation-delay: 1s;
} }
.draw-lines-box-3 { .draw-lines-box-3 {
stroke-dasharray: 1000; stroke-dasharray: 1000;
stroke-dashoffset: 1000; stroke-dashoffset: 1000;
animation: dash 2.3s ease-in forwards; animation: dash 1.15s ease-in forwards;
animation-delay: 3.1s; animation-delay: 1.55s;
} }
.draw-lines3 { .draw-lines3 {
stroke-dasharray: 3000; stroke-dasharray: 3000;
stroke-dashoffset: 3000; stroke-dashoffset: 3000;
animation: dash 6.2s ease-in forwards; animation: dash 3.1s ease-in forwards;
} }
.draw-lines4 { .draw-lines4 {
stroke-dasharray: 300; stroke-dasharray: 300;
stroke-dashoffset: 300; stroke-dashoffset: 300;
animation: dash 5s ease-in forwards; animation: dash 2.5s ease-in forwards;
} }
</style> </style>
<svg id='splash' class="intro ui" viewBox="0 0 800 800" onclick="simulation.startGame()"> <svg id='splash' class="intro ui" viewBox="0 0 800 800" onclick="simulation.startGame()">

View File

@@ -1216,7 +1216,7 @@ const b = {
this.endCycle = 0; 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 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 //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.x += momentum.x
player.force.y += momentum.y player.force.y += momentum.y
// refund ammo // 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.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.fillStyle = "rgba(255,0,0,0.03)";
ctx.fill(); 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 //damage mobs in a circle based on this.semiMinor radius
if (this.auraRadius > 200) { if (this.auraRadius > 200) {
for (let i = 0, len = mob.length; i < len; ++i) { for (let i = 0, len = mob.length; i < len; ++i) {

View File

@@ -4315,13 +4315,13 @@ const level = {
isElevators = true 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 }) { 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) 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) { if (simulation.isHorizontalFlipped) {
spawn.mapVertex(-2900, 225, "0 0 0 -500 -500 -500") spawn.mapVertex(-2900, 225, "0 0 0 -500 -500 -500")
} else { } else {
spawn.mapVertex(-2900, 225, "0 0 0 -500 500 -500") 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(-2375, 1300, 100, 100);
spawn.bodyRect(-2325, 1250, 50, 50); spawn.bodyRect(-2325, 1250, 50, 50);
spawn.bodyRect(-2275, 1350, 125, 50); spawn.bodyRect(-2275, 1350, 125, 50);

View File

@@ -444,7 +444,7 @@ const m = {
Composite.clear(engine.world); Composite.clear(engine.world);
Engine.clear(engine); Engine.clear(engine);
simulation.splashReturn(); simulation.splashReturn();
}, 3000); }, 5000);
} }
}, },
health: 0, health: 0,

View File

@@ -141,7 +141,7 @@
sound.tone(375) sound.tone(375)
} }
}, },
haveGunCheck(name) { haveGunCheck(name, needActive = true) {
// if ( // if (
// !build.isExperimentSelection && // !build.isExperimentSelection &&
// b.inventory.length > 2 && // b.inventory.length > 2 &&
@@ -154,12 +154,12 @@
// if (b.guns[b.inventory[i]].name === name) return true // if (b.guns[b.inventory[i]].name === name) return true
// } // }
// return false // return false
if (build.isExperimentSelection) { if (build.isExperimentSelection || !needActive) {
for (i = 0, len = b.inventory.length; i < len; i++) { for (i = 0, len = b.inventory.length; i < len; i++) {
if (b.guns[b.inventory[i]].name === name) return true if (b.guns[b.inventory[i]].name === name) return true
} }
return false 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 return b.inventory.length > 0 && b.guns[b.activeGun].name === name
} }
}, },
@@ -4398,20 +4398,20 @@
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
allowed() { allowed() {
return tech.haveGunCheck("missiles") return tech.haveGunCheck("missiles", false)
}, },
requires: "missile gun", requires: "missile gun",
effect() { effect() {
tech.missileBotCount++; tech.missileBotCount++;
b.missileBot(); 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() { remove() {
if (this.count) { if (this.count) {
tech.missileBotCount = 0; tech.missileBotCount = 0;
b.clearPermanentBots(); b.clearPermanentBots();
b.respawnBots(); b.respawnBots();
if (!tech.haveGunCheck("missiles")) b.giveGuns("missiles") if (!tech.haveGunCheck("missiles", false)) b.giveGuns("missiles")
} }
} }
}, },
@@ -4754,20 +4754,20 @@
}, },
{ {
name: "fault tolerance", 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, isGunTech: true,
maxCount: 3, maxCount: 3,
count: 0, count: 0,
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return tech.haveGunCheck("drones") || tech.isForeverDrones return tech.haveGunCheck("drones", false) || tech.isForeverDrones
}, },
requires: "drone gun", requires: "drone gun",
effect() { effect() {
const num = 9 const num = 8
tech.isForeverDrones += num tech.isForeverDrones += num
if (tech.haveGunCheck("drones")) b.removeGun("drones") if (tech.haveGunCheck("drones", false)) b.removeGun("drones")
//spawn drones //spawn drones
if (tech.isDroneRadioactive) { if (tech.isDroneRadioactive) {
for (let i = 0; i < num * 0.25; i++) { for (let i = 0; i < num * 0.25; i++) {
@@ -4783,7 +4783,7 @@
}, },
remove() { remove() {
tech.isForeverDrones = 0 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, frequency: 3,
frequencyDefault: 3, frequencyDefault: 3,
allowed() { 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() { effect() {
tech.isDroneTeleport = true tech.isDroneTeleport = true
}, },
@@ -4887,7 +4887,7 @@
allowed() { allowed() {
return tech.isDroneTeleport return tech.isDroneTeleport
}, },
requires: "torque bursts", requires: "brushless motor",
effect() { effect() {
tech.isDroneFastLook = true tech.isDroneFastLook = true
}, },
@@ -5086,6 +5086,38 @@
tech.isAmmoFoamSize = false; 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", 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>", 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; tech.isRailAreaDamage = false;
} }
}, },
{ // {
name: "aerodynamic heating", // name: "aerodynamic heating",
description: "<strong>railgun</strong> rod <strong class='color-d'>damage</strong> nearby mobs", // description: "<strong>railgun</strong> rod <strong class='color-d'>damage</strong> nearby mobs",
isGunTech: true, // isGunTech: true,
maxCount: 1, // maxCount: 1,
count: 0, // count: 0,
frequency: 2, // frequency: 2,
frequencyDefault: 2, // frequencyDefault: 2,
allowed() { // allowed() {
return tech.haveGunCheck("railgun") // return tech.haveGunCheck("railgun")
}, // },
requires: "railgun", // requires: "railgun",
effect() { // effect() {
tech.isRodAreaDamage = true; // tech.isRodAreaDamage = true;
}, // },
remove() { // remove() {
tech.isRodAreaDamage = false; // tech.isRodAreaDamage = false;
} // }
}, // },
{ {
name: "capacitor bank", 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", description: "the <strong>railgun</strong> no longer takes time to <strong>charge</strong><br><strong>railgun</strong> rods are <strong>66%</strong> less massive",

View File

@@ -1,12 +1,25 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
tech: fault tolerance - spawn 9 drones that last forever, remove your drone gun 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
fade in after death is more gradual 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
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
junk tech negative air friction on player
remove foam gun get 2 foam bots and upgrade
need a new way of checking if have gun, that doesn't care if it's not active gun
apply to missile gun?
and 10 drone tech
tech rocket jump - jumping produces an explosion at your feet that lets you jump extra high, but does some damage tech rocket jump - jumping produces an explosion at your feet that lets you jump extra high, but does some damage
require electric reactive armor?
harpoon tech: dash - press down and fire to go immune to harm for 1 second and dash forward with your harpoon acting like a lance harpoon tech: dash - press down and fire to go immune to harm for 1 second and dash forward with your harpoon acting like a lance
after you fire harpoon replace it's this.do() with just being in front of player after you fire harpoon replace it's this.do() with just being in front of player