tech: repeater - shotgun gets another shot, and a longer fire delay
  shotgun cross hairs show when fire is on cooldown

keys 1,2,3,4,5,6,7,8,9,0,-,= switch to a gun in your inventory
Nerfed blinkBoss health and speed
sneaker mobs are immune to harm for one cycles after vanishing
experiment button new style
new images for energy, bots

bug fixes
This commit is contained in:
landgreen
2023-01-08 09:14:58 -08:00
parent 802cd90220
commit 9206d47f40
29 changed files with 577 additions and 380 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 47 KiB

BIN
img/repeater.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

View File

@@ -140,8 +140,7 @@
<summary>controls</summary> <summary>controls</summary>
<div class="details-div"> <div class="details-div">
To change controls click a box To change controls click a box
<br> <br>and press an unused key.
and press an unused key.
<br><br> <br><br>
<table id="control-table"> <table id="control-table">
<tr> <tr>
@@ -185,6 +184,10 @@
<td id='key-previous-gun' class='key-input'>E</td> <td id='key-previous-gun' class='key-input'>E</td>
<td class='key-used'>MouseWheel</td> <td class='key-used'>MouseWheel</td>
</tr> </tr>
<tr style="opacity:0.5;">
<th>GUN #</th>
<td id="key-num" class='key-input'>Num</td>
</tr>
<tr> <tr>
<th>PAUSE</th> <th>PAUSE</th>
<td id='key-pause' class='key-input'>P</td> <td id='key-pause' class='key-input'>P</td>
@@ -197,7 +200,8 @@
<td></td> <td></td>
</tr> </tr>
</table> </table>
<button id="control-reset" type="button">reset</button><span style="font-size: 60%;"> to default keys</span>
<br><button id="control-reset" type="button">reset</button><span style="font-size: 60%;"> to default keys</span>
</div> </div>
</details> </details>
</div> </div>

View File

@@ -23,7 +23,7 @@ const b = {
}, },
fire() {}, fire() {},
fireNormal() { fireNormal() {
if (b.inventory.length) { if (b.inventory.length && b.activeGun !== null) {
if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire)) { if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire)) {
if (b.guns[b.activeGun].ammo > 0) { if (b.guns[b.activeGun].ammo > 0) {
b.fireWithAmmo() b.fireWithAmmo()
@@ -36,7 +36,7 @@ const b = {
} }
}, },
fireNotMove() { //added && player.speed < 0.5 && m.onGround fireNotMove() { //added && player.speed < 0.5 && m.onGround
if (b.inventory.length) { if (b.inventory.length && b.activeGun !== null) {
if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire) && player.speed < 2.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) { if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire) && player.speed < 2.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) {
if (b.guns[b.activeGun].ammo > 0) { if (b.guns[b.activeGun].ammo > 0) {
b.fireWithAmmo() b.fireWithAmmo()
@@ -49,7 +49,7 @@ const b = {
} }
}, },
fireAlwaysFire() { //added && player.speed < 0.5 && m.onGround //removed input.fire && (!input.field || m.fieldFire) fireAlwaysFire() { //added && player.speed < 0.5 && m.onGround //removed input.fire && (!input.field || m.fieldFire)
if (b.inventory.length) { if (b.inventory.length && b.activeGun !== null) {
if (m.fireCDcycle < m.cycle && player.speed < 0.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) { if (m.fireCDcycle < m.cycle && player.speed < 0.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) {
if (b.guns[b.activeGun].ammo > 0) { if (b.guns[b.activeGun].ammo > 0) {
b.fireWithAmmo() b.fireWithAmmo()
@@ -60,7 +60,7 @@ const b = {
} }
}, },
fireFloat() { //added && player.speed < 0.5 && m.onGround fireFloat() { //added && player.speed < 0.5 && m.onGround
if (b.inventory.length) { if (b.inventory.length && b.activeGun !== null) {
if (input.fire && (!input.field || m.fieldFire)) { if (input.fire && (!input.field || m.fieldFire)) {
if (m.fireCDcycle < m.cycle) { if (m.fireCDcycle < m.cycle) {
if (b.guns[b.activeGun].ammo > 0) { if (b.guns[b.activeGun].ammo > 0) {
@@ -125,11 +125,11 @@ const b = {
simulation.updateGunHUD(); simulation.updateGunHUD();
} }
}, },
returnGunAmmo(name) { // returnGunAmmo(name) {
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun // for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === name) return b.guns[i].ammo // if (b.guns[i].name === name) return b.guns[i].ammo
} // }
}, // },
giveGuns(gun = "random", ammoPacks = 10) { giveGuns(gun = "random", ammoPacks = 10) {
if (tech.ammoCap) ammoPacks = 0.45 * tech.ammoCap if (tech.ammoCap) ammoPacks = 0.45 * tech.ammoCap
if (tech.isOneGun) b.removeAllGuns(); if (tech.isOneGun) b.removeAllGuns();
@@ -173,6 +173,7 @@ const b = {
// if (tech.infiniteWaveAmmo === 2) b.guns[3].ammo = Infinity // if (tech.infiniteWaveAmmo === 2) b.guns[3].ammo = Infinity
} }
simulation.makeGunHUD(); simulation.makeGunHUD();
simulation.switchGun();
b.setFireCD(); b.setFireCD();
if (tech.isOneGun && b.inventory > 0) { if (tech.isOneGun && b.inventory > 0) {
//count how many gun tech you have and remove them //count how many gun tech you have and remove them
@@ -323,11 +324,19 @@ const b = {
}; };
} }
}, },
muzzleFlash(radius = 10) { muzzleFlash(radius = 30) {
ctx.fillStyle = "#fb0"; // ctx.fillStyle = "#fb0";
ctx.beginPath(); // ctx.beginPath();
ctx.arc(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), radius, 0, 2 * Math.PI); // ctx.arc(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), radius, 0, 2 * Math.PI);
ctx.fill(); // ctx.fill();
simulation.drawList.push({ //add dmg to draw queue
x: m.pos.x + 35 * Math.cos(m.angle),
y: m.pos.y + 35 * Math.sin(m.angle),
radius: radius,
color: "#fb0",
time: 1
});
}, },
removeConsBB(me) { removeConsBB(me) {
for (let i = 0, len = consBB.length; i < len; ++i) { for (let i = 0, len = consBB.length; i < len; ++i) {
@@ -1618,13 +1627,16 @@ const b = {
player.force.x += momentum.x player.force.x += momentum.x
player.force.y += momentum.y player.force.y += momentum.y
// refund ammo // refund ammo
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun b.guns[9].ammo++;
if (b.guns[i].name === "harpoon") { simulation.updateGunHUD();
b.guns[i].ammo++;
simulation.updateGunHUD(); // for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
break; // if (b.guns[i].name === "harpoon") {
} // b.guns[i].ammo++;
} // simulation.updateGunHUD();
// break;
// }
// }
} else { } else {
if (m.energy > this.drain) m.energy -= this.drain if (m.energy > this.drain) m.energy -= this.drain
const sub = Vector.sub(this.position, m.pos) const sub = Vector.sub(this.position, m.pos)
@@ -1743,13 +1755,13 @@ const b = {
this.endCycle = 0; this.endCycle = 0;
if (m.cycle + 50 < m.fireCDcycle) m.fireCDcycle = m.cycle + 50 if (m.cycle + 50 < m.fireCDcycle) m.fireCDcycle = m.cycle + 50
// refund ammo // refund ammo
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun b.guns[9].ammo++;
if (b.guns[i].name === "harpoon") { simulation.updateGunHUD();
b.guns[i].ammo++; // for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
simulation.updateGunHUD(); // if (b.guns[i].name === "harpoon") {
break; // break;
} // }
} // }
} }
} }
} }
@@ -1941,13 +1953,13 @@ const b = {
player.force.y += momentum.y player.force.y += momentum.y
// refund ammo // refund ammo
if (isReturnAmmo) { if (isReturnAmmo) {
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun b.guns[9].ammo++;
if (b.guns[i].name === "harpoon") { simulation.updateGunHUD();
b.guns[i].ammo++; // for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
simulation.updateGunHUD(); // if (b.guns[i].name === "harpoon") {
break; // break;
} // }
} // }
} }
} else { } else {
const sub = Vector.sub(this.position, m.pos) const sub = Vector.sub(this.position, m.pos)
@@ -2818,7 +2830,7 @@ const b = {
) { ) {
if (tech.isStun) b.AoEStunEffect(this.position, this.range + mob[i].radius + random); //AoEStunEffect(where, range, cycles = 90 + 60 * Math.random()) { if (tech.isStun) b.AoEStunEffect(this.position, this.range + mob[i].radius + random); //AoEStunEffect(where, range, cycles = 90 + 60 * Math.random()) {
if (tech.isMineSentry) { if (tech.isMineSentry) {
this.lookFrequency = 15 + 10 * (tech.oneSuperBall && tech.isSuperMine) + Math.floor(3 * Math.random()) this.lookFrequency = Math.floor(7 + 7 * b.fireCDscale + 10 * (tech.oneSuperBall && tech.isSuperMine) + Math.floor(3 * Math.random()))
// this.endCycle = Infinity // this.endCycle = Infinity
this.shots = tech.sentryAmmo this.shots = tech.sentryAmmo
this.do = function() { //overwrite the do method for this bullet this.do = function() { //overwrite the do method for this bullet
@@ -3376,17 +3388,14 @@ const b = {
} }
}, },
onEnd() { onEnd() {
if (tech.isDroneRespawn && b.inventory.length) { if (tech.isDroneRespawn && b.inventory.length && b.activeGun === 7 && b.guns[b.activeGun].ammo > 0 && mob.length) {
const who = b.guns[b.activeGun] b.drone({
if (who.name === "drones" && who.ammo > 0 && mob.length) { x: this.position.x,
b.drone({ y: this.position.y
x: this.position.x, }, 0)
y: this.position.y if (Math.random() < 0.2) {
}, 0) b.guns[b.activeGun].ammo--;
if (Math.random() < 0.2) { simulation.updateGunHUD();
b.guns[b.activeGun].ammo--;
simulation.updateGunHUD();
}
} }
} }
}, },
@@ -3565,17 +3574,14 @@ const b = {
maxRadioRadius: 270 + Math.floor(90 * Math.random()), maxRadioRadius: 270 + Math.floor(90 * Math.random()),
beforeDmg() {}, beforeDmg() {},
onEnd() { onEnd() {
if (tech.isDroneRespawn && b.inventory.length) { if (tech.isDroneRespawn && b.inventory.length && b.activeGun === 7 && b.guns[b.activeGun].ammo > 0 && mob.length) {
const who = b.guns[b.activeGun] b.droneRadioactive({
if (who.name === "drones" && who.ammo > 0 && mob.length) { x: this.position.x,
b.droneRadioactive({ y: this.position.y
x: this.position.x, }, 0)
y: this.position.y if (Math.random() < 0.2) {
}, 0) b.guns[b.activeGun].ammo--;
if (Math.random() < 0.2) { simulation.updateGunHUD();
b.guns[b.activeGun].ammo--;
simulation.updateGunHUD();
}
} }
} }
}, },
@@ -3756,15 +3762,7 @@ const b = {
bullet[me].minDmgSpeed = 0; bullet[me].minDmgSpeed = 0;
bullet[me].restitution = 1; bullet[me].restitution = 1;
bullet[me].friction = 0; bullet[me].friction = 0;
if (tech.isIncendiary) { if (tech.superHarm) {
bullet[me].do = function() {
this.force.y += this.mass * 0.0012;
if (Matter.Query.collides(this, map).length) {
b.explosion(this.position, this.mass * 280); //makes bullet do explosive damage at end
this.endCycle = 0
}
};
} else if (tech.superHarm) {
bullet[me].collidePlayerDo = function() { bullet[me].collidePlayerDo = function() {
if (Matter.Query.collides(this, [player]).length) { if (Matter.Query.collides(this, [player]).length) {
this.endCycle = 0 this.endCycle = 0
@@ -3781,13 +3779,11 @@ const b = {
} }
bullet[me].cycle = 0 bullet[me].cycle = 0
bullet[me].do = function() { bullet[me].do = function() {
this.cycle++
if (this.cycle > 6) this.do = this.collidePlayerDo if (this.cycle > 6) this.do = this.collidePlayerDo
this.force.y += this.mass * 0.0012; this.force.y += this.mass * 0.0012;
}; };
} else { } else {
bullet[me].do = function() { bullet[me].do = function() {
this.cycle++
this.force.y += this.mass * 0.0012; this.force.y += this.mass * 0.0012;
}; };
} }
@@ -3801,6 +3797,10 @@ const b = {
} }
this.endCycle = 0 this.endCycle = 0
} }
if (tech.isIncendiary) {
b.explosion(this.position, this.mass * 280); //makes bullet do explosive damage at end
this.endCycle = 0
}
}; };
}, },
targetedBall(position, num = 1, speed = 42 + 12 * Math.random(), range = 1200, isRandomAim = true) { targetedBall(position, num = 1, speed = 42 + 12 * Math.random(), range = 1200, isRandomAim = true) {
@@ -5818,7 +5818,7 @@ const b = {
this.rotateToVelocity() this.rotateToVelocity()
}; };
} }
b.muzzleFlash(30); b.muzzleFlash();
//very complex recoil system //very complex recoil system
if (m.onGround) { if (m.onGround) {
if (input.down) { if (input.down) {
@@ -5905,7 +5905,7 @@ const b = {
}; };
} }
b.muzzleFlash(30); b.muzzleFlash();
//very complex recoil system //very complex recoil system
if (m.onGround) { if (m.onGround) {
if (input.down) { if (input.down) {
@@ -5970,33 +5970,58 @@ const b = {
ammoPack: 3.5, ammoPack: 3.5,
defaultAmmoPack: 3.5, defaultAmmoPack: 3.5,
have: false, have: false,
do() {}, do() {
//fade cross hairs
// draw loop around player head
// const left = m.fireCDcycle !== Infinity ? 0.05 * Math.max(m.fireCDcycle - m.cycle, 0) : 0
// if (left > 0) {
// ctx.beginPath();
// // ctx.arc(simulation.mouseInGame.x, simulation.mouseInGame.y, 30, 0, left);
// ctx.arc(m.pos.x, m.pos.y, 28, m.angle - left, m.angle);
// // ctx.fillStyle = "rgba(0,0,0,0.3)" //"#333"
// // ctx.fill();
// ctx.strokeStyle = "#333";
// ctx.lineWidth = 2;
// ctx.stroke();
// }
//draw hip circle
// ctx.beginPath();
// ctx.arc(m.pos.x + m.hip.x, m.pos.y + m.hip.y, 11, 0, 2 * Math.PI);
// ctx.fillStyle = "rgba(0,0,0,0.3)" //"#333"
// ctx.fill();
},
fire() { fire() {
let knock, spread let knock, spread
if (input.down) { const coolDown = function() {
spread = 0.65 if (input.down) {
m.fireCDcycle = m.cycle + Math.floor(73 * b.fireCDscale) // cool down spread = 0.65
if (tech.isShotgunImmune && m.immuneCycle < m.cycle + Math.floor(60 * b.fireCDscale)) m.immuneCycle = m.cycle + Math.floor(60 * b.fireCDscale); //player is immune to damage for 30 cycles m.fireCDcycle = m.cycle + Math.floor((73 + 36 * tech.shotgunExtraShots) * b.fireCDscale) // cool down
knock = 0.01 if (tech.isShotgunImmune && m.immuneCycle < m.cycle + Math.floor(60 * b.fireCDscale)) m.immuneCycle = m.cycle + Math.floor(60 * b.fireCDscale); //player is immune to damage for 30 cycles
} else { knock = 0.01
m.fireCDcycle = m.cycle + Math.floor(56 * b.fireCDscale) // cool down } else {
if (tech.isShotgunImmune && m.immuneCycle < m.cycle + Math.floor(47 * b.fireCDscale)) m.immuneCycle = m.cycle + Math.floor(47 * b.fireCDscale); //player is immune to damage for 30 cycles m.fireCDcycle = m.cycle + Math.floor((56 + 28 * tech.shotgunExtraShots) * b.fireCDscale) // cool down
spread = 1.3 if (tech.isShotgunImmune && m.immuneCycle < m.cycle + Math.floor(47 * b.fireCDscale)) m.immuneCycle = m.cycle + Math.floor(47 * b.fireCDscale); //player is immune to damage for 30 cycles
knock = 0.1 spread = 1.3
} knock = 0.1
}
if (tech.isShotgunReversed) { if (tech.isShotgunReversed) {
player.force.x += 1.6 * knock * Math.cos(m.angle) player.force.x += 1.5 * knock * Math.cos(m.angle)
player.force.y += 1.6 * knock * Math.sin(m.angle) - 3 * player.mass * simulation.g player.force.y += 1.5 * knock * Math.sin(m.angle) - 3 * player.mass * simulation.g
} else if (tech.isShotgunRecoil) { } else if (tech.isShotgunRecoil) {
m.fireCDcycle -= 0.66 * (56 * b.fireCDscale) m.fireCDcycle -= 0.66 * (56 * b.fireCDscale)
player.force.x -= 2 * knock * Math.cos(m.angle) player.force.x -= 2 * knock * Math.cos(m.angle)
player.force.y -= 2 * knock * Math.sin(m.angle) player.force.y -= 2 * knock * Math.sin(m.angle)
} else { } else {
player.force.x -= knock * Math.cos(m.angle) player.force.x -= knock * Math.cos(m.angle)
player.force.y -= knock * Math.sin(m.angle) * 0.5 //reduce knock back in vertical direction to stop super jumps player.force.y -= knock * Math.sin(m.angle) * 0.5 //reduce knock back in vertical direction to stop super jumps
}
} }
const spray = (num) => { const spray = (num) => {
const side = 22 const side = 22
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
@@ -6020,188 +6045,210 @@ const b = {
}; };
} }
} }
const chooseBulletType = function() {
b.muzzleFlash(35); if (tech.isRivets) {
if (tech.isRivets) {
const me = bullet.length;
// const dir = m.angle + 0.02 * (Math.random() - 0.5)
bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 56 * tech.bulletSize, 25 * tech.bulletSize, b.fireAttributes(m.angle));
Matter.Body.setDensity(bullet[me], 0.005 * (tech.isShotgunReversed ? 1.5 : 1));
Composite.add(engine.world, bullet[me]); //add bullet to world
const SPEED = (input.down ? 50 : 43)
Matter.Body.setVelocity(bullet[me], {
x: SPEED * Math.cos(m.angle),
y: SPEED * Math.sin(m.angle)
});
if (tech.isIncendiary) {
bullet[me].endCycle = simulation.cycle + 60
bullet[me].onEnd = function() {
b.explosion(this.position, 360 + (Math.random() - 0.5) * 60); //makes bullet do explosive damage at end
}
bullet[me].beforeDmg = function() {
this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
};
} else {
bullet[me].endCycle = simulation.cycle + 180
}
bullet[me].minDmgSpeed = 7
// bullet[me].restitution = 0.4
bullet[me].frictionAir = 0.004;
bullet[me].turnMag = 0.04 * Math.pow(tech.bulletSize, 3.75)
bullet[me].do = function() {
this.force.y += this.mass * 0.002
if (this.speed > 6) { //rotates bullet to face current velocity?
const facing = {
x: Math.cos(this.angle),
y: Math.sin(this.angle)
}
if (Vector.cross(Vector.normalise(this.velocity), facing) < 0) {
this.torque += this.turnMag
} else {
this.torque -= this.turnMag
}
}
if (tech.isIncendiary && Matter.Query.collides(this, map).length) {
this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
}
};
bullet[me].beforeDmg = function(who) {
if (this.speed > 4) {
if (tech.fragments) {
b.targetedNail(this.position, 6 * tech.fragments * tech.bulletSize)
this.endCycle = 0 //triggers despawn
}
if (tech.isIncendiary) this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
if (tech.isCritKill) b.crit(who, this)
}
}
spray(12); //fires normal shotgun bullets
} else if (tech.isIncendiary) {
spread *= 0.15
const END = Math.floor(input.down ? 8 : 5);
const totalBullets = 9
const angleStep = (input.down ? 0.3 : 0.8) / totalBullets
let dir = m.angle - angleStep * totalBullets / 2;
for (let i = 0; i < totalBullets; i++) { //5 -> 7
dir += angleStep
const me = bullet.length; const me = bullet.length;
bullet[me] = Bodies.rectangle(m.pos.x + 50 * Math.cos(m.angle), m.pos.y + 50 * Math.sin(m.angle), 17, 4, b.fireAttributes(dir)); // const dir = m.angle + 0.02 * (Math.random() - 0.5)
const end = END + Math.random() * 4 bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 56 * tech.bulletSize, 25 * tech.bulletSize, b.fireAttributes(m.angle));
bullet[me].endCycle = 2 * end * tech.isBulletsLastLonger + simulation.cycle
const speed = 25 * end / END Matter.Body.setDensity(bullet[me], 0.005 * (tech.isShotgunReversed ? 1.5 : 1));
const dirOff = dir + (Math.random() - 0.5) * spread
Matter.Body.setVelocity(bullet[me], {
x: speed * Math.cos(dirOff),
y: speed * Math.sin(dirOff)
});
bullet[me].onEnd = function() {
b.explosion(this.position, 150 * (tech.isShotgunReversed ? 1.4 : 1) + (Math.random() - 0.5) * 30); //makes bullet do explosive damage at end
}
bullet[me].beforeDmg = function() {
this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
};
bullet[me].do = function() {
if (Matter.Query.collides(this, map).length) this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
}
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
} const SPEED = (input.down ? 50 : 43)
} else if (tech.isNailShot) { Matter.Body.setVelocity(bullet[me], {
spread *= 0.65 x: SPEED * Math.cos(m.angle),
const dmg = 2 * (tech.isShotgunReversed ? 1.5 : 1) y: SPEED * Math.sin(m.angle)
if (input.down) { });
for (let i = 0; i < 17; i++) { if (tech.isIncendiary) {
speed = 38 + 15 * Math.random() bullet[me].endCycle = simulation.cycle + 60
const dir = m.angle + (Math.random() - 0.5) * spread bullet[me].onEnd = function() {
const pos = { b.explosion(this.position, 360 + (Math.random() - 0.5) * 60); //makes bullet do explosive damage at end
x: m.pos.x + 35 * Math.cos(m.angle) + 15 * (Math.random() - 0.5),
y: m.pos.y + 35 * Math.sin(m.angle) + 15 * (Math.random() - 0.5)
} }
b.nail(pos, { bullet[me].beforeDmg = function() {
x: speed * Math.cos(dir), this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
y: speed * Math.sin(dir) };
}, dmg) } else {
bullet[me].endCycle = simulation.cycle + 180
}
bullet[me].minDmgSpeed = 7
// bullet[me].restitution = 0.4
bullet[me].frictionAir = 0.004;
bullet[me].turnMag = 0.04 * Math.pow(tech.bulletSize, 3.75)
bullet[me].do = function() {
this.force.y += this.mass * 0.002
if (this.speed > 6) { //rotates bullet to face current velocity?
const facing = {
x: Math.cos(this.angle),
y: Math.sin(this.angle)
}
if (Vector.cross(Vector.normalise(this.velocity), facing) < 0) {
this.torque += this.turnMag
} else {
this.torque -= this.turnMag
}
}
if (tech.isIncendiary && Matter.Query.collides(this, map).length) {
this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
}
};
bullet[me].beforeDmg = function(who) {
if (this.speed > 4) {
if (tech.fragments) {
b.targetedNail(this.position, 6 * tech.fragments * tech.bulletSize)
this.endCycle = 0 //triggers despawn
}
if (tech.isIncendiary) this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
if (tech.isCritKill) b.crit(who, this)
}
}
spray(12); //fires normal shotgun bullets
} else if (tech.isIncendiary) {
spread *= 0.15
const END = Math.floor(input.down ? 8 : 5);
const totalBullets = 9
const angleStep = (input.down ? 0.3 : 0.8) / totalBullets
let dir = m.angle - angleStep * totalBullets / 2;
for (let i = 0; i < totalBullets; i++) { //5 -> 7
dir += angleStep
const me = bullet.length;
bullet[me] = Bodies.rectangle(m.pos.x + 50 * Math.cos(m.angle), m.pos.y + 50 * Math.sin(m.angle), 17, 4, b.fireAttributes(dir));
const end = END + Math.random() * 4
bullet[me].endCycle = 2 * end * tech.isBulletsLastLonger + simulation.cycle
const speed = 25 * end / END
const dirOff = dir + (Math.random() - 0.5) * spread
Matter.Body.setVelocity(bullet[me], {
x: speed * Math.cos(dirOff),
y: speed * Math.sin(dirOff)
});
bullet[me].onEnd = function() {
b.explosion(this.position, 150 * (tech.isShotgunReversed ? 1.4 : 1) + (Math.random() - 0.5) * 30); //makes bullet do explosive damage at end
}
bullet[me].beforeDmg = function() {
this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
};
bullet[me].do = function() {
if (Matter.Query.collides(this, map).length) this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
}
Composite.add(engine.world, bullet[me]); //add bullet to world
}
} else if (tech.isNailShot) {
spread *= 0.65
const dmg = 2 * (tech.isShotgunReversed ? 1.5 : 1)
if (input.down) {
for (let i = 0; i < 17; i++) {
speed = 38 + 15 * Math.random()
const dir = m.angle + (Math.random() - 0.5) * spread
const pos = {
x: m.pos.x + 35 * Math.cos(m.angle) + 15 * (Math.random() - 0.5),
y: m.pos.y + 35 * Math.sin(m.angle) + 15 * (Math.random() - 0.5)
}
b.nail(pos, {
x: speed * Math.cos(dir),
y: speed * Math.sin(dir)
}, dmg)
}
} else {
for (let i = 0; i < 17; i++) {
speed = 38 + 15 * Math.random()
const dir = m.angle + (Math.random() - 0.5) * spread
const pos = {
x: m.pos.x + 35 * Math.cos(m.angle) + 15 * (Math.random() - 0.5),
y: m.pos.y + 35 * Math.sin(m.angle) + 15 * (Math.random() - 0.5)
}
b.nail(pos, {
x: speed * Math.cos(dir),
y: speed * Math.sin(dir)
}, dmg)
}
}
} else if (tech.isSporeFlea) {
const where = {
x: m.pos.x + 35 * Math.cos(m.angle),
y: m.pos.y + 35 * Math.sin(m.angle)
}
const number = 2 * (tech.isShotgunReversed ? 1.5 : 1)
for (let i = 0; i < number; i++) {
const angle = m.angle + 0.2 * (Math.random() - 0.5)
const speed = (input.down ? 35 * (1 + 0.05 * Math.random()) : 30 * (1 + 0.15 * Math.random()))
b.flea(where, {
x: speed * Math.cos(angle),
y: speed * Math.sin(angle)
})
bullet[bullet.length - 1].setDamage()
}
spray(10); //fires normal shotgun bullets
} else if (tech.isSporeWorm) {
const where = {
x: m.pos.x + 35 * Math.cos(m.angle),
y: m.pos.y + 35 * Math.sin(m.angle)
}
const spread = (input.down ? 0.02 : 0.07)
const number = 3 * (tech.isShotgunReversed ? 1.5 : 1)
let angle = m.angle - (number - 1) * spread * 0.5
for (let i = 0; i < number; i++) {
b.worm(where)
const SPEED = (30 + 10 * input.down) * (1 + 0.2 * Math.random())
Matter.Body.setVelocity(bullet[bullet.length - 1], {
x: player.velocity.x * 0.5 + SPEED * Math.cos(angle),
y: player.velocity.y * 0.5 + SPEED * Math.sin(angle)
});
angle += spread
}
spray(7); //fires normal shotgun bullets
} else if (tech.isIceShot) {
const spread = (input.down ? 0.7 : 1.2)
for (let i = 0, len = 10 * (tech.isShotgunReversed ? 1.5 : 1); i < len; i++) {
b.iceIX(23 + 10 * Math.random(), m.angle + spread * (Math.random() - 0.5))
}
spray(10); //fires normal shotgun bullets
} else if (tech.isFoamShot) {
const spread = (input.down ? 0.15 : 0.4)
const where = {
x: m.pos.x + 25 * Math.cos(m.angle),
y: m.pos.y + 25 * Math.sin(m.angle)
}
const number = 16 * (tech.isShotgunReversed ? 1.5 : 1)
for (let i = 0; i < number; i++) {
const SPEED = 13 + 4 * Math.random();
const angle = m.angle + spread * (Math.random() - 0.5)
b.foam(where, {
x: SPEED * Math.cos(angle),
y: SPEED * Math.sin(angle)
}, 8 + 7 * Math.random())
}
} else if (tech.isNeedles) {
const number = 9 * (tech.isShotgunReversed ? 1.5 : 1)
const spread = (input.down ? 0.03 : 0.05)
let angle = m.angle - (number - 1) * spread * 0.5
for (let i = 0; i < number; i++) {
b.needle(angle)
angle += spread
} }
} else { } else {
for (let i = 0; i < 17; i++) { spray(16); //fires normal shotgun bullets
speed = 38 + 15 * Math.random() }
const dir = m.angle + (Math.random() - 0.5) * spread }
const pos = {
x: m.pos.x + 35 * Math.cos(m.angle) + 15 * (Math.random() - 0.5),
y: m.pos.y + 35 * Math.sin(m.angle) + 15 * (Math.random() - 0.5) coolDown();
} b.muzzleFlash(35);
b.nail(pos, { chooseBulletType();
x: speed * Math.cos(dir),
y: speed * Math.sin(dir) if (tech.shotgunExtraShots) {
}, dmg) const delay = 7
let count = tech.shotgunExtraShots * delay
function cycle() {
count--
if (!(count % delay)) {
coolDown();
b.muzzleFlash(35);
chooseBulletType();
}
if (count > 0) {
requestAnimationFrame(cycle);
} }
} }
} else if (tech.isSporeFlea) { requestAnimationFrame(cycle);
const where = {
x: m.pos.x + 35 * Math.cos(m.angle),
y: m.pos.y + 35 * Math.sin(m.angle)
}
const number = 2 * (tech.isShotgunReversed ? 1.5 : 1)
for (let i = 0; i < number; i++) {
const angle = m.angle + 0.2 * (Math.random() - 0.5)
const speed = (input.down ? 35 * (1 + 0.05 * Math.random()) : 30 * (1 + 0.15 * Math.random()))
b.flea(where, {
x: speed * Math.cos(angle),
y: speed * Math.sin(angle)
})
bullet[bullet.length - 1].setDamage()
}
spray(10); //fires normal shotgun bullets
} else if (tech.isSporeWorm) {
const where = {
x: m.pos.x + 35 * Math.cos(m.angle),
y: m.pos.y + 35 * Math.sin(m.angle)
}
const spread = (input.down ? 0.02 : 0.07)
const number = 3 * (tech.isShotgunReversed ? 1.5 : 1)
let angle = m.angle - (number - 1) * spread * 0.5
for (let i = 0; i < number; i++) {
b.worm(where)
const SPEED = (30 + 10 * input.down) * (1 + 0.2 * Math.random())
Matter.Body.setVelocity(bullet[bullet.length - 1], {
x: player.velocity.x * 0.5 + SPEED * Math.cos(angle),
y: player.velocity.y * 0.5 + SPEED * Math.sin(angle)
});
angle += spread
}
spray(7); //fires normal shotgun bullets
} else if (tech.isIceShot) {
const spread = (input.down ? 0.7 : 1.2)
for (let i = 0, len = 10 * (tech.isShotgunReversed ? 1.5 : 1); i < len; i++) {
b.iceIX(23 + 10 * Math.random(), m.angle + spread * (Math.random() - 0.5))
}
spray(10); //fires normal shotgun bullets
} else if (tech.isFoamShot) {
const spread = (input.down ? 0.15 : 0.4)
const where = {
x: m.pos.x + 25 * Math.cos(m.angle),
y: m.pos.y + 25 * Math.sin(m.angle)
}
const number = 16 * (tech.isShotgunReversed ? 1.5 : 1)
for (let i = 0; i < number; i++) {
const SPEED = 13 + 4 * Math.random();
const angle = m.angle + spread * (Math.random() - 0.5)
b.foam(where, {
x: SPEED * Math.cos(angle),
y: SPEED * Math.sin(angle)
}, 8 + 7 * Math.random())
}
} else if (tech.isNeedles) {
const number = 9 * (tech.isShotgunReversed ? 1.5 : 1)
const spread = (input.down ? 0.03 : 0.05)
let angle = m.angle - (number - 1) * spread * 0.5
for (let i = 0; i < number; i++) {
b.needle(angle)
angle += spread
}
} else {
spray(16); //fires normal shotgun bullets
} }
} }
}, { }, {

View File

@@ -415,7 +415,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>": ""}
const style = (localSettings.isHideImages || tech.tech[i].isJunk) ? `style="height:auto;"` : `style = "background-image: url('img/${tech.tech[i].name}.webp');"` const style = (localSettings.isHideImages || tech.tech[i].isJunk) ? `style="height:auto;"` : `style = "background-image: url('img/${tech.tech[i].name}.webp');"`
const techCountText = tech.tech[i].count > 1 ? `(${tech.tech[i].count}x)` : ""; const techCountText = tech.tech[i].count > 1 ? `(${tech.tech[i].count}x)` : "";
if (tech.tech[i].isNonRefundable) { if (tech.tech[i].isNonRefundable) {
text += `<div class="pause-grid-module" id ="${i}-pause-tech" style = "border: 0px; opacity:0.5; font-size: 60%; line-height: 130%; margin: 1px; padding-top: 6px; padding-bottom: 6px;"><div class="grid-title">${tech.tech[i].link} ${techCountText}</div>${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() :tech.tech[i].description}</div></div>` text += `<div class="pause-grid-module" id ="${i}-pause-tech" style = "border: 0px; opacity:0.5; font-size: 60%; line-height: 130%; margin: 1px; padding: 6px;"><div class="grid-title">${tech.tech[i].link} ${techCountText}</div>${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() :tech.tech[i].description}</div></div>`
// } else if (tech.tech[i].isLore) { // } else if (tech.tech[i].isLore) {
// text += `<div class="pause-grid-module"><div class="grid-title lore-text"><div class="circle-grid lore"></div> &nbsp; ${tech.tech[i].name} ${techCountText}</div>${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() :tech.tech[i].description}</div></div>` // text += `<div class="pause-grid-module"><div class="grid-title lore-text"><div class="circle-grid lore"></div> &nbsp; ${tech.tech[i].name} ${techCountText}</div>${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() :tech.tech[i].description}</div></div>`
} else if (tech.tech[i].isFieldTech) { } else if (tech.tech[i].isFieldTech) {
@@ -588,13 +588,19 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>": ""}
}, },
populateGrid() { //background-color:var(--build-bg-color); populateGrid() { //background-color:var(--build-bg-color);
let text = ` let text = `
<div class="experiment-grid-module" style="position: sticky; top:0; z-index: 10; align-self: start; width: 165px; font-size: 1.00em; line-height: 170%; background-color: #fafcfd;display: flex; flex-direction: column; justify-content: center; align-items: center;border: 1.5px #333 solid;border-radius:10px; padding:7px; height: 190px;"> <div class="experiment-start-box">
<div>
<label for="difficulty-select" title="effects: number of mobs, damage done by mobs, damage done to mobs, mob speed, heal effects">difficulty:</label>
<select name="difficulty-select" id="difficulty-select-experiment">
<option value="1">easy</option>
<option value="2" selected>normal</option>
<option value="4">hard</option>
<option value="6">why?</option>
</select>
</div>
<div> <div>
<svg class="SVG-button" onclick="build.startExperiment()" width="150" height="68" > <label for="hide-images-experiment" title="reload experiment with no images for fields, guns, and tech">hide images:</label>
<g stroke='none' fill='#333' stroke-width="2" font-size="60px" font-family="Ariel, sans-serif"> <input onclick="build.showImages('experiment')" type="checkbox" id="hide-images-experiment" name="hide-images-experiment" style="width:17px; height:17px; margin-bottom: 15px;" ${localSettings.isHideImages? "checked": ""}>
<text x="14" y="54">start</text>
</g>
</svg>
</div> </div>
<div> <div>
<svg class="SVG-button" onclick="build.reset()" width="50" height="25"> <svg class="SVG-button" onclick="build.reset()" width="50" height="25">
@@ -610,17 +616,11 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>": ""}
</svg> </svg>
</div> </div>
<div> <div>
<label for="difficulty-select" title="effects: number of mobs, damage done by mobs, damage done to mobs, mob speed, heal effects">difficulty:</label> <svg class="SVG-button" onclick="build.startExperiment()" width="165" height="70" >
<select name="difficulty-select" id="difficulty-select-experiment"> <g stroke='none' fill='#333' stroke-width="2" font-size="65px" font-family="Ariel, sans-serif">
<option value="1">easy</option> <text x="17" y="57">start</text>
<option value="2" selected>normal</option> </g>
<option value="4">hard</option> </svg>
<option value="6">why?</option>
</select>
</div>
<div>
<label for="hide-images-experiment" title="reload experiment with no images for fields, guns, and tech">hide images:</label>
<input onclick="build.showImages('experiment')" type="checkbox" id="hide-images-experiment" name="hide-images-experiment" style="width:17px; height:17px;" ${localSettings.isHideImages? "checked": ""}>
</div> </div>
</div>` </div>`
const hideStyle = `style="height:auto; border: none; background-color: transparent;"` const hideStyle = `style="height:auto; border: none; background-color: transparent;"`
@@ -905,6 +905,7 @@ const input = {
document.getElementById("key-previous-gun").style.background = backgroundColor document.getElementById("key-previous-gun").style.background = backgroundColor
document.getElementById("key-testing").style.background = backgroundColor document.getElementById("key-testing").style.background = backgroundColor
if (input.focus) input.focus.style.background = 'rgb(0, 200, 255)'; if (input.focus) input.focus.style.background = 'rgb(0, 200, 255)';
document.getElementById("key-num").style.background = backgroundColor //always not highlighted
}, },
setKeys(event) { setKeys(event) {
//check for duplicate keys //check for duplicate keys
@@ -923,7 +924,8 @@ const input = {
// event.code === "Escape" || // event.code === "Escape" ||
event.code === input.key.nextGun || event.code === input.key.nextGun ||
event.code === input.key.previousGun || event.code === input.key.previousGun ||
event.code === input.key.testing event.code === input.key.testing ||
event.code === "Digit1" || event.code === "Digit2" || event.code === "Digit3" || event.code === "Digit4" || event.code === "Digit5" || event.code === "Digit6" || event.code === "Digit7" || event.code === "Digit8" || event.code === "Digit9" || event.code === "Digit0" || event.code === "Minus" || event.code === "Equal"
)) { )) {
switch (input.focus.id) { switch (input.focus.id) {
case "key-fire": case "key-fire":
@@ -1029,11 +1031,9 @@ window.addEventListener("keydown", function(event) {
input.down = true input.down = true
break; break;
case input.key.fire: case input.key.fire:
// event.preventDefault();
input.fire = true input.fire = true
break break
case input.key.field: case input.key.field:
// event.preventDefault();
input.field = true input.field = true
break break
case input.key.nextGun: case input.key.nextGun:
@@ -1042,7 +1042,6 @@ window.addEventListener("keydown", function(event) {
case input.key.previousGun: case input.key.previousGun:
simulation.previousGun(); simulation.previousGun();
break break
// case "Escape":
case input.key.pause: case input.key.pause:
if (!simulation.isChoosing && input.isPauseKeyReady && m.alive) { if (!simulation.isChoosing && input.isPauseKeyReady && m.alive) {
input.isPauseKeyReady = false input.isPauseKeyReady = false
@@ -1160,6 +1159,47 @@ window.addEventListener("keydown", function(event) {
} }
break break
} }
if (b.inventory.length > 1 && !simulation.testing) {
switch (event.code) {
case "Digit1":
simulation.switchToGunInInventory(0);
break
case "Digit2":
simulation.switchToGunInInventory(1);
break
case "Digit3":
simulation.switchToGunInInventory(2);
break
case "Digit4":
simulation.switchToGunInInventory(3);
break
case "Digit5":
simulation.switchToGunInInventory(4);
break
case "Digit6":
simulation.switchToGunInInventory(5);
break
case "Digit7":
simulation.switchToGunInInventory(6);
break
case "Digit8":
simulation.switchToGunInInventory(7);
break
case "Digit9":
simulation.switchToGunInInventory(8);
break
case "Digit0":
simulation.switchToGunInInventory(9);
break
case "Minus":
simulation.switchToGunInInventory(10);
break
case "Equal":
simulation.switchToGunInInventory(11);
break
}
}
if (simulation.testing) { if (simulation.testing) {
if (event.key === "X") m.death(); //only uppercase if (event.key === "X") m.death(); //only uppercase
switch (event.key.toLowerCase()) { switch (event.key.toLowerCase()) {

View File

@@ -28,24 +28,24 @@ const level = {
// m.setField("perfect diamagnetism") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass pilot wave plasma torch // m.setField("perfect diamagnetism") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass pilot wave plasma torch
// simulation.molecularMode = 2 // simulation.molecularMode = 2
// m.damage(0.1); // m.damage(0.1);
// b.giveGuns("mine") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser // b.giveGuns("shotgun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// b.giveGuns("spores") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser // b.giveGuns("wave") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// b.guns[0].ammo = 10000 // b.guns[0].ammo = 10000
// tech.giveTech("blast ball") // tech.giveTech("needle gun")
// tech.giveTech("elephants toothpaste") // tech.giveTech("repeater")
// tech.giveTech("sentry gun") // tech.giveTech("ice-shot")
// for (let i = 0; i < 1; ++i) tech.giveTech("super ball") // for (let i = 0; i < 1; ++i) tech.giveTech("super ball")
// tech.isFoamBall = true // tech.isFoamBall = true
// for (let i = 0; i < 1; ++i) tech.giveTech("super ball") // for (let i = 0; i < 3; ++i) tech.giveTech("repeater")
// for (let i = 0; i < 1; i++) tech.giveTech("irradiated nails") // for (let i = 0; i < 1; i++) tech.giveTech("irradiated nails")
// for (let i = 0; i < 1; i++) tech.giveTech("colony") // for (let i = 0; i < 1; i++) tech.giveTech("colony")
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "boost"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "boost");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling");
// level.testing(); // level.testing();
// spawn.shooter(1900, -500, 200) // spawn.blinkBoss(1900, -500)
// spawn.sneakBoss(1900, -500) // spawn.sneakBoss(1900, -500)
// spawn.starter(1900, -500, 25) // spawn.starter(1900, -500, 200)
// spawn.sneaker(1900, -500, 25) // spawn.sneaker(1900, -500, 25)
// spawn.hopper(2538, -950) // spawn.hopper(2538, -950)
// spawn.zombie(1000 + 1000 * Math.random(), -500 + 300 * Math.random(), 30, 5, "white") // zombie(x, y, radius, sides, color) // spawn.zombie(1000 + 1000 * Math.random(), -500 + 300 * Math.random(), 30, 5, "white") // zombie(x, y, radius, sides, color)

View File

@@ -697,7 +697,7 @@ const m = {
} }
m.lastHarmCycle = m.cycle m.lastHarmCycle = m.cycle
if (tech.isDroneOnDamage && bullet.length < 150) { //chance to build a drone on damage from tech if (tech.isDroneOnDamage && bullet.length < 150) { //chance to build a drone on damage from tech
const len = Math.min((dmg - 0.06 * Math.random()) * 40, 40) / tech.droneEnergyReduction const len = Math.min((dmg - 0.06 * Math.random()) * 40, 40) / tech.droneEnergyReduction * (tech.isEnergyHealth ? 0.5 : 1)
for (let i = 0; i < len; i++) { for (let i = 0; i < len; i++) {
if (Math.random() < 0.5) b.drone({ if (Math.random() < 0.5) b.drone({
x: m.pos.x + 30 * Math.cos(m.angle) + 100 * (Math.random() - 0.5), x: m.pos.x + 30 * Math.cos(m.angle) + 100 * (Math.random() - 0.5),

View File

@@ -769,6 +769,9 @@ const powerUps = {
} else if (parseInt(JSON.parse(elements[index + 1].getAttribute("data")).s.slice(0, -2)) < 500) { //try a different images and see if it is smaller } else if (parseInt(JSON.parse(elements[index + 1].getAttribute("data")).s.slice(0, -2)) < 500) { //try a different images and see if it is smaller
tech.tech[choose].url = JSON.parse(elements[index + 1].getAttribute("data")).iurl tech.tech[choose].url = JSON.parse(elements[index + 1].getAttribute("data")).iurl
document.getElementById(`junk-${choose}`).style.backgroundImage = `url('${tech.tech[choose].url}')` document.getElementById(`junk-${choose}`).style.backgroundImage = `url('${tech.tech[choose].url}')`
} else if (parseInt(JSON.parse(elements[index + 2].getAttribute("data")).s.slice(0, -2)) < 500) { //try a different images and see if it is smaller
tech.tech[choose].url = JSON.parse(elements[index + 2].getAttribute("data")).iurl
document.getElementById(`junk-${choose}`).style.backgroundImage = `url('${tech.tech[choose].url}')`
} }
}); });
} else { } else {

View File

@@ -297,6 +297,34 @@ const simulation = {
ctx.strokeStyle = "#000"; //'rgba(0,0,0,0.4)' ctx.strokeStyle = "#000"; //'rgba(0,0,0,0.4)'
ctx.stroke(); // Draw it ctx.stroke(); // Draw it
}, },
drawCursorBasic() {
const size = 10;
ctx.beginPath();
ctx.moveTo(simulation.mouse.x - size, simulation.mouse.y);
ctx.lineTo(simulation.mouse.x + size, simulation.mouse.y);
ctx.moveTo(simulation.mouse.x, simulation.mouse.y - size);
ctx.lineTo(simulation.mouse.x, simulation.mouse.y + size);
ctx.lineWidth = 2;
ctx.strokeStyle = "#000"; //'rgba(0,0,0,0.4)'
ctx.stroke(); // Draw it
},
drawCursorCoolDown() {
const size = 10;
ctx.lineWidth = 2;
ctx.strokeStyle = "#000"; //'rgba(0,0,0,0.4)'
ctx.beginPath();
if (m.fireCDcycle > m.cycle) {
ctx.strokeStyle = "#777"; //'rgba(0,0,0,0.4)'
ctx.arc(simulation.mouse.x, simulation.mouse.y, size + 1, 0, 2 * Math.PI);
} else {
ctx.strokeStyle = "#000"; //'rgba(0,0,0,0.4)'
}
ctx.moveTo(simulation.mouse.x - size, simulation.mouse.y);
ctx.lineTo(simulation.mouse.x + size, simulation.mouse.y);
ctx.moveTo(simulation.mouse.x, simulation.mouse.y - size);
ctx.lineTo(simulation.mouse.x, simulation.mouse.y + size);
ctx.stroke(); // Draw it
},
drawList: [], //so you can draw a first frame of explosions.. I know this is bad drawList: [], //so you can draw a first frame of explosions.. I know this is bad
drawTime: 8, //how long circles are drawn. use to push into drawlist.time drawTime: 8, //how long circles are drawn. use to push into drawlist.time
mobDmgColor: "rgba(255,0,0,0.7)", //color when a mob damages the player // set by mass-energy tech mobDmgColor: "rgba(255,0,0,0.7)", //color when a mob damages the player // set by mass-energy tech
@@ -437,15 +465,14 @@ const simulation = {
simulation.switchGun(); simulation.switchGun();
} }
}, },
switchGun() { switchToGunInInventory(num) {
if (tech.isLongitudinal && b.guns[b.activeGun].name === "wave") { if (b.inventory[num] !== undefined && b.inventoryGun !== num) {
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun b.inventoryGun = num
if (b.guns[i].name === "wave") { simulation.switchGun();
b.guns[i].waves = []; //empty array of wave bullets
break;
}
}
} }
},
switchGun() {
if (tech.isLongitudinal && b.activeGun === 3) b.guns[3].waves = []; //empty array of wave bullets
if (tech.crouchAmmoCount) tech.crouchAmmoCount = 1 //this prevents hacking the tech by switching guns if (tech.crouchAmmoCount) tech.crouchAmmoCount = 1 //this prevents hacking the tech by switching guns
if (b.inventory.length > 0) { if (b.inventory.length > 0) {
b.activeGun = b.inventory[b.inventoryGun]; b.activeGun = b.inventory[b.inventoryGun];
@@ -453,6 +480,12 @@ const simulation = {
} }
simulation.updateGunHUD(); simulation.updateGunHUD();
simulation.boldActiveGunHUD(); simulation.boldActiveGunHUD();
//set crosshairs
if (b.activeGun === 1) {
simulation.drawCursor = simulation.drawCursorCoolDown
} else {
simulation.drawCursor = simulation.drawCursorBasic
}
}, },
zoom: null, zoom: null,
zoomScale: 1000, zoomScale: 1000,
@@ -741,6 +774,7 @@ const simulation = {
input.endKeySensing(); input.endKeySensing();
b.removeAllGuns(); b.removeAllGuns();
simulation.switchGun();
tech.setupAllTech(); //sets tech to default values tech.setupAllTech(); //sets tech to default values
tech.cancelCount = 0; tech.cancelCount = 0;
@@ -881,7 +915,7 @@ const simulation = {
let count = 0; let count = 0;
for (i = 0, len = bullet.length; i < len; i++) { //count mines left on map for (i = 0, len = bullet.length; i < len; i++) { //count mines left on map
if (bullet[i].bulletType === "mine" || bullet[i].bulletType === "laser mine") count++ if ((bullet[i].bulletType === "mine" || bullet[i].bulletType === "laser mine") && !bullet[i].isArmed) count++
} }
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun is mine for (i = 0, len = b.guns.length; i < len; i++) { //find which gun is mine
if (b.guns[i].name === "mine") { if (b.guns[i].name === "mine") {

View File

@@ -623,7 +623,7 @@ const spawn = {
{ {
name: "black hole", name: "black hole",
eventHorizon: 0, eventHorizon: 0,
eventHorizonRadius: 2100, eventHorizonRadius: 1900,
eventHorizonCycle: 0, eventHorizonCycle: 0,
do() { do() {
this.eventHorizonCycle++ this.eventHorizonCycle++
@@ -4146,7 +4146,7 @@ const spawn = {
Matter.Body.rotate(me, Math.PI * 0.1); Matter.Body.rotate(me, Math.PI * 0.1);
Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger
me.isBoss = true; me.isBoss = true;
me.damageReduction = 0.03 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) me.damageReduction = 0.035 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
me.frictionStatic = 0; me.frictionStatic = 0;
me.friction = 0; me.friction = 0;
@@ -4160,7 +4160,7 @@ const spawn = {
me.grenadeDelay = 100 me.grenadeDelay = 100
} }
me.pulseRadius = 1.5 * Math.min(550, 200 + simulation.difficulty * 2) me.pulseRadius = 1.5 * Math.min(550, 200 + simulation.difficulty * 2)
me.delay = 35 + 35 * simulation.CDScale; me.delay = 55 + 35 * simulation.CDScale;
me.nextBlinkCycle = me.delay; me.nextBlinkCycle = me.delay;
spawn.shield(me, x, y, 1); spawn.shield(me, x, y, 1);
me.onDamage = function() { me.onDamage = function() {
@@ -5058,7 +5058,7 @@ const spawn = {
if (this.phaseCycle > -1) { if (this.phaseCycle > -1) {
Matter.Body.rotate(this, 0.02) Matter.Body.rotate(this, 0.02)
for (let i = 0, len = this.vertices.length; i < len; i++) { //fire a bullet from each vertex for (let i = 0, len = this.vertices.length; i < len; i++) { //fire a bullet from each vertex
spawn.sniperBullet(this.vertices[i].x, this.vertices[i].y, 5, 4); spawn.sniperBullet(this.vertices[i].x, this.vertices[i].y, 3, 4);
const velocity = Vector.mult(Vector.normalise(Vector.sub(this.position, this.vertices[i])), -15) const velocity = Vector.mult(Vector.normalise(Vector.sub(this.position, this.vertices[i])), -15)
Matter.Body.setVelocity(mob[mob.length - 1], { Matter.Body.setVelocity(mob[mob.length - 1], {
x: velocity.x, x: velocity.x,
@@ -5724,7 +5724,7 @@ const spawn = {
let me = mob[mob.length - 1]; let me = mob[mob.length - 1];
Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger
me.isBoss = true; me.isBoss = true;
me.damageReduction = 0.4 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) me.damageReduction = 0.2 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
me.accelMag = 0.0017 * Math.sqrt(simulation.accelScale); me.accelMag = 0.0017 * Math.sqrt(simulation.accelScale);
me.frictionAir = 0.01; me.frictionAir = 0.01;
@@ -5736,17 +5736,15 @@ const spawn = {
me.collisionFilter.mask = cat.map | cat.body | cat.bullet | cat.mob //can't touch player me.collisionFilter.mask = cat.map | cat.body | cat.bullet | cat.mob //can't touch player
me.showHealthBar = false; me.showHealthBar = false;
me.memory = 30; me.memory = 30;
me.vanishesLeft = 2 + simulation.difficultyMode me.vanishesLeft = Math.ceil(1 + simulation.difficultyMode * 0.5)
me.onDeath = function() {
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
};
me.onDamage = function() { me.onDamage = function() {
if (this.vanishesLeft > 0 && this.health < 0.1) { //if health is below 10% teleport to a random spot on player history, heal, and cloak if (this.vanishesLeft > 0 && this.health < 0.1) { //if health is below 10% teleport to a random spot on player history, heal, and cloak
this.vanishesLeft-- this.vanishesLeft--
// const scale = 0.95; for (let i = 0; i < 8; i++) { //flash screen to hide vanish
// Matter.Body.scale(this, scale, scale);
// this.radius *= scale;
//flash screen to hide vanish
for (let i = 0; i < 8; i++) {
simulation.drawList.push({ simulation.drawList.push({
x: this.position.x, x: this.position.x,
y: this.position.y, y: this.position.y,
@@ -5761,6 +5759,7 @@ const spawn = {
Matter.Body.setPosition(this, history.position) Matter.Body.setPosition(this, history.position)
Matter.Body.setVelocity(this, { x: 0, y: 0 }); Matter.Body.setVelocity(this, { x: 0, y: 0 });
this.damageReduction = 0 //immune to harm for the rest of this game cycle
this.seePlayer.recall = 0 this.seePlayer.recall = 0
this.cloak(); this.cloak();
this.health = 1; this.health = 1;
@@ -5784,6 +5783,14 @@ const spawn = {
} }
} }
me.do = function() { me.do = function() {
if (this.damageReduction === 0) {
this.damageReduction = 0.04 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
let i = this.status.length //clear bad status effects
while (i--) {
if (this.status[i].type === "stun" || this.status[i].type === "dot") this.status.splice(i, 1);
}
this.isStunned = false;
}
this.gravity(); this.gravity();
this.seePlayerByHistory(55); this.seePlayerByHistory(55);
this.checkStatus(); this.checkStatus();
@@ -5835,6 +5842,7 @@ const spawn = {
//teleport to near the end of player history //teleport to near the end of player history
Matter.Body.setPosition(this, m.history[Math.floor((m.history.length - 1) * (0.66 + 0.33 * Math.random()))].position) Matter.Body.setPosition(this, m.history[Math.floor((m.history.length - 1) * (0.66 + 0.33 * Math.random()))].position)
Matter.Body.setVelocity(this, { x: 0, y: 0 }); Matter.Body.setVelocity(this, { x: 0, y: 0 });
this.damageReduction = 0 //immune to harm for the rest of this game cycle
} }
}; };
me.cloak = function() { me.cloak = function() {
@@ -5846,6 +5854,14 @@ const spawn = {
} }
} }
me.do = function() { me.do = function() {
if (this.damageReduction === 0) {
this.damageReduction = 1 //stop being immune to harm immediately
let i = this.status.length //clear bad status effects
while (i--) {
if (this.status[i].type === "stun" || this.status[i].type === "dot") this.status.splice(i, 1);
}
this.isStunned = false;
}
this.gravity(); this.gravity();
this.seePlayerByHistory(25); this.seePlayerByHistory(25);
this.checkStatus(); this.checkStatus();

View File

@@ -2382,7 +2382,7 @@ const tech = {
// description: `after you collect ${powerUps.orb.heal()}<br><strong>+${0.1 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`, // description: `after you collect ${powerUps.orb.heal()}<br><strong>+${0.1 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
// descriptionFunction: `convert current and future ${powerUps.orb.heal()} into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${10 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`, // descriptionFunction: `convert current and future ${powerUps.orb.heal()} into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${10 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
descriptionFunction() { descriptionFunction() {
return `convert current and future <div class="heal-circle"></div> into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${8 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>` return `convert current and future <div class="heal-circle"></div> into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${8 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)}</strong> maximum <strong class='color-f'>energy</strong>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -2585,7 +2585,7 @@ const tech = {
}, },
{ {
name: "energy conservation", name: "energy conservation",
description: "<strong>5%</strong> of <strong class='color-d'>damage</strong> done recovered as <strong class='color-f'>energy</strong>", description: "<strong>4%</strong> of <strong class='color-d'>damage</strong> done recovered as <strong class='color-f'>energy</strong>",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -2595,7 +2595,7 @@ const tech = {
}, },
requires: "", requires: "",
effect() { effect() {
tech.energySiphon += 0.05; tech.energySiphon += 0.04;
}, },
remove() { remove() {
tech.energySiphon = 0; tech.energySiphon = 0;
@@ -4151,6 +4151,25 @@ const tech = {
tech.needleTunnel = false tech.needleTunnel = false
} }
}, },
{
name: "ceramics",
description: `<strong>needles</strong> and <strong>harpoons</strong> pierce <strong>shields</strong><br>directly <strong class='color-d'>damaging</strong> shielded mobs`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (!tech.isLargeHarpoon && tech.haveGunCheck("harpoon")) || tech.isNeedles
},
requires: "needle gun, harpoon, not Bessemer process",
effect() {
tech.isShieldPierce = true
},
remove() {
tech.isShieldPierce = false
}
},
{ {
name: "needle gun", name: "needle gun",
description: "<strong>nail gun</strong> and <strong>shotgun</strong> fire mob piercing <strong>needles</strong>", description: "<strong>nail gun</strong> and <strong>shotgun</strong> fire mob piercing <strong>needles</strong>",
@@ -4505,6 +4524,25 @@ const tech = {
tech.isShotgunReversed = false; tech.isShotgunReversed = false;
} }
}, },
{
name: "repeater",
description: "<strong>shotgun</strong> immediately fires again for no <strong class='color-ammo'>ammo</strong><br><strong>-50%</strong> <strong>shotgun</strong> <strong><em>fire rate</em></strong>",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("shotgun"))
},
requires: "shotgun, not Newtons 3rd law",
effect() {
tech.shotgunExtraShots++;
},
remove() {
tech.shotgunExtraShots = 0
}
},
{ {
name: "nail-shot", name: "nail-shot",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Nail_(fastener)' class="link">nail-shot</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Nail_(fastener)' class="link">nail-shot</a>`,
@@ -5569,7 +5607,7 @@ const tech = {
{ {
name: "blast ball", name: "blast ball",
descriptionFunction() { descriptionFunction() {
return `instead of nails <strong>mines</strong> fire bouncy ${b.guns[10].nameString('s')}` return `instead of nails <strong>mines</strong> fire <strong>bouncy balls</strong>`
}, },
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
@@ -6386,7 +6424,7 @@ const tech = {
}, },
{ {
name: "railgun", name: "railgun",
description: `<strong>harpoons</strong> can't <strong>retract</strong>, hold fire to charge<br><strong>+50%</strong> <strong>harpoon</strong> density and <strong class='color-d'>damage</strong>`, description: `hold fire to charge <strong>harpoon</strong> and release to launch<br><strong>harpoons</strong> can't <strong>retract</strong>`,
// description: `<strong>+900%</strong> <strong>harpoon</strong> <strong class='color-ammo'>ammo</strong>, but it can't <strong>retract</strong><br><strong>+50%</strong> <strong>harpoon</strong> density and <strong class='color-d'>damage</strong>`, // description: `<strong>+900%</strong> <strong>harpoon</strong> <strong class='color-ammo'>ammo</strong>, but it can't <strong>retract</strong><br><strong>+50%</strong> <strong>harpoon</strong> density and <strong class='color-d'>damage</strong>`,
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
@@ -6480,25 +6518,6 @@ const tech = {
tech.isRailEnergy = false; tech.isRailEnergy = false;
} }
}, },
{
name: "ceramics",
description: `<strong>needles</strong> and <strong>harpoons</strong> pierce <strong>shields</strong><br>directly <strong class='color-d'>damaging</strong> shielded mobs`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (!tech.isLargeHarpoon && tech.haveGunCheck("harpoon")) || tech.isNeedles
},
requires: "needle gun, harpoon, not Bessemer process",
effect() {
tech.isShieldPierce = true
},
remove() {
tech.isShieldPierce = false
}
},
{ {
name: "Bessemer process", name: "Bessemer process",
descriptionFunction() { descriptionFunction() {
@@ -6535,7 +6554,7 @@ const tech = {
return (tech.isRailGun ? 5 : 1) * (2 + 2 * this.count) return (tech.isRailGun ? 5 : 1) * (2 + 2 * this.count)
}, },
allowed() { allowed() {
return tech.haveGunCheck("harpoon") && b.returnGunAmmo('harpoon') >= this.removeAmmo() return tech.haveGunCheck("harpoon") && b.guns[9].ammo >= this.removeAmmo()
}, },
requires: "harpoon", requires: "harpoon",
effect() { effect() {
@@ -10095,7 +10114,7 @@ const tech = {
m.drawLeg("#4a4a4a"); m.drawLeg("#4a4a4a");
m.calcLeg(0, 0); m.calcLeg(0, 0);
m.drawLeg("#333"); m.drawLeg("#333");
ctx.rotate(m.angle - (m.fireCDcycle != Infinity ? m.flipLegs * 0.25 * Math.pow(Math.max(m.fireCDcycle - m.cycle, 0), 0.5) : 0)); ctx.rotate(m.angle - (m.fireCDcycle !== Infinity ? m.flipLegs * 0.25 * Math.pow(Math.max(m.fireCDcycle - m.cycle, 0), 0.5) : 0));
ctx.beginPath(); ctx.beginPath();
ctx.arc(0, 0, 30, 0, 2 * Math.PI); ctx.arc(0, 0, 30, 0, 2 * Math.PI);
@@ -10510,7 +10529,7 @@ const tech = {
}, },
{ {
name: "translucent", name: "translucent",
description: "remove your <strong class='color-g'>guns</strong> and <strong>spawn</strong> new ones<br>your <strong class='color-g'>bullets</strong> and bots are transparent", description: "spawn <strong>3</strong> <strong class='color-g'>gun</strong> power ups<br>your <strong class='color-g'>bullets</strong> and bots are transparent",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 0, frequency: 0,
@@ -10521,18 +10540,18 @@ const tech = {
}, },
requires: "", requires: "",
effect() { effect() {
for (let i = 0; i < b.inventory.length; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun"); for (let i = 0; i < 3; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
//removes guns and ammo // //removes guns and ammo
b.inventory = []; // b.inventory = [];
b.activeGun = null; // b.activeGun = null;
b.inventoryGun = 0; // b.inventoryGun = 0;
for (let i = 0, len = b.guns.length; i < len; ++i) { // for (let i = 0, len = b.guns.length; i < len; ++i) {
b.guns[i].have = false; // b.guns[i].have = false;
if (b.guns[i].ammo !== Infinity) b.guns[i].ammo = 0; // if (b.guns[i].ammo !== Infinity) b.guns[i].ammo = 0;
} // }
simulation.makeGunHUD(); //update gun HUD // simulation.makeGunHUD(); //update gun HUD
b.bulletDraw = () => {}; b.bulletDraw = () => {}; //make bullets invisible
}, },
remove() {} remove() {}
}, },

View File

@@ -255,16 +255,16 @@ summary {
#experiment-grid { #experiment-grid {
display: flex; display: flex;
justify-content: center; justify-content: center;
padding: 10px 1px; padding: 0px;
margin: 0px; margin: 0px;
border: 0px; border: 0px;
background-color: var(--build-bg-color); background-color: var(--build-bg-color);
display: none; display: none;
grid-template-columns: repeat(auto-fit, 384px); grid-template-columns: repeat(auto-fit, 384px);
grid-auto-flow: row; grid-auto-flow: row;
grid-auto-rows: minmax(auto, auto); /* grid-auto-rows: minmax(auto, auto); */
position: relative; position: relative;
bottom: 0px; /* bottom: 0px; */
z-index: 10; z-index: 10;
font-size: 1.3em; font-size: 1.3em;
-ms-overflow-style: none; /* IE and Edge */ -ms-overflow-style: none; /* IE and Edge */
@@ -295,6 +295,30 @@ summary {
background-color: #efeff5; background-color: #efeff5;
} }
.experiment-start-box{
background-color: #fafcfd;
/* font-size: 1em; */
position: sticky;
top:0;
z-index: 10;
align-self: start;
width: 195px;
line-height: 170%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border: 2px #333 solid;
border-top: 0px;
border-radius: 10px;
border-top-left-radius: 0px;
/* border-bottom-left-radius: 0px; */
border-top-right-radius: 0px;
padding:0.2em 0px;
height: 190px;
box-shadow: 8px 8px 7px rgba(0,0,50,0.15);
}
.card-background { .card-background {
height:340px; height:340px;
background-size: contain; background-size: contain;
@@ -325,6 +349,9 @@ summary {
line-height: 160%; line-height: 160%;
background-color: #fafcfd; background-color: #fafcfd;
} }
.cancel-card:hover {
background-color: #efeff5;
}
.research-card { .research-card {
font-size: 1.1em; font-size: 1.1em;
font-weight: 100; font-weight: 100;
@@ -335,6 +362,9 @@ summary {
line-height: 160%; line-height: 160%;
background-color: #fafcfd; background-color: #fafcfd;
} }
.research-card:hover {
background-color: #efeff5;
}
/* keeps 5 columns at 1440px */ /* keeps 5 columns at 1440px */

View File

@@ -1,26 +1,34 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
tech: cordyceps - sporangium infect mobs, making them fight for you as zombies
tech: blast ball - mines fire super balls tech: repeater - shotgun gets another shot, and a longer fire delay
tech: extended magazine - sentry fires 50% more shots shotgun cross hairs show when fire is on cooldown
sentry works with foam, nails, or super balls
dark patterns - stacks to 9 keys 1,2,3,4,5,6,7,8,9,0,-,= switch to a gun in your inventory
38->15% damage, 53->15% JUNK Nerfed blinkBoss health and speed
electronegativity - stacks to 9 sneaker mobs are immune to harm for one cycles after vanishing
0.12->0.1% damage per energy experiment button new style
new images for energy, bots
bug fixes bug fixes
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
super-bot tech - only allow 1,2 turrets at time?
turrets drain energy?
turrets never run out of ammo
turrets automatically use one of your mine ammos when they run out?
good with multi gun builds
conflict with booby trap
tech - shotgun triple shot, but a bit longer of a delay tech: Bose Einstein condensate - freezes enemies in pilot wave, and drains some energy?
super-bot
tech - after standing wave runs out of energy from blocking, gain a buff tech - after standing wave runs out of energy from blocking, gain a buff
buff: defense, damage? buff: defense, damage?
aoe damage like railgun
push mobs away
make super balls with Zectron deflectable with field make super balls with Zectron deflectable with field
but is there a simple way to do this? but is there a simple way to do this?
@@ -1157,12 +1165,8 @@ if pause is pressed while selecting power ups, display pause menu on top of sele
***major themes missing*** ***major themes missing***
***maybe redo*** ***maybe redo***
dynamical systems dynamical systems
nail-bot
homeostasis
heuristics heuristics
thermal runaway - infrared maybe? negative feedback - too dark
redo the energy tech images with by Laurie Greasley
now that you can use --ar 3:2 --stylize 1000 and photo repair
***past style themes*** ***past style themes***
field emitter - isometric, clean white robot spherical gun turret on bird legs, blender 3d, style of artstation and behance, Disney Pixar, cute field emitter - isometric, clean white robot spherical gun turret on bird legs, blender 3d, style of artstation and behance, Disney Pixar, cute
standing wave - concentric transparent blue geometric circles science standing wave - concentric transparent blue geometric circles science