bug fixes

This commit is contained in:
landgreen
2021-09-13 05:27:52 -07:00
parent f719c8edb9
commit a1b062e2a4
5 changed files with 13 additions and 75 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1173,7 +1173,7 @@ const b = {
returnToPlayer() { returnToPlayer() {
if (Vector.magnitude(Vector.sub(this.position, m.pos)) < 100) { //near player if (Vector.magnitude(Vector.sub(this.position, m.pos)) < 100) { //near player
this.endCycle = 0; this.endCycle = 0;
if (m.cycle + 25 * b.fireCDscale < m.fireCDcycle) m.fireCDcycle = m.cycle + 25 * b.fireCDscale if (m.cycle + 25 * b.fireCDscale < m.fireCDcycle) m.fireCDcycle = m.cycle + 25 * 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 * (m.crouch ? 0.0001 : 0.0002)) const momentum = Vector.mult(Vector.sub(this.velocity, player.velocity), this.mass * (m.crouch ? 0.0001 : 0.0002))
player.force.x += momentum.x player.force.x += momentum.x
@@ -4644,11 +4644,8 @@ const b = {
if (tech.missileCount > 1) { if (tech.missileCount > 1) {
for (let i = 0; i < tech.missileCount; i++) { for (let i = 0; i < tech.missileCount; i++) {
setTimeout(() => { setTimeout(() => {
const where = { const where = { x: m.pos.x, y: m.pos.y - 40 }
x: m.pos.x, b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5) * Math.sqrt(tech.missileCount), -2, Math.sqrt(countReduction))
y: m.pos.y - 40
}
b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5) * Math.sqrt(tech.missileCount), -2, Math.sqrt(countReduction) * (tech.missileSize ? 1.5 : 1))
bullet[bullet.length - 1].force.x += 0.025 * countReduction * (i - (tech.missileCount - 1) / 2); bullet[bullet.length - 1].force.x += 0.025 * countReduction * (i - (tech.missileCount - 1) / 2);
}, 20 * tech.missileCount * Math.random()); }, 20 * tech.missileCount * Math.random());
} }
@@ -4693,51 +4690,6 @@ const b = {
// }, i * 50); // }, i * 50);
// } // }
} }
// if (tech.missileCount) {
// if (m.crouch) {
// for (let i = 0; i < 3; i++) {
// b.missile({
// x: m.pos.x,
// y: m.pos.y - 40
// }, -Math.PI / 2 + 0.08 * (1 - i) + 0.3 * (Math.random() - 0.5), 0, 0.6 * (tech.missileSize ? 1.5 : 1))
// bullet[bullet.length - 1].force.x -= 0.015 * (i - 1);
// }
// } else {
// m.fireCDcycle = m.cycle + 80 * b.fireCDscale; // cool down
// const direction = {
// x: Math.cos(m.angle),
// y: Math.sin(m.angle)
// }
// const push = Vector.mult(Vector.perp(direction), 0.02)
// for (let i = 0; i < 3; i++) {
// b.missile({
// x: m.pos.x + 40 * direction.x,
// y: m.pos.y + 40 * direction.y
// }, m.angle + 0.06 * (Math.random() - 0.5), 5, 0.7 * (tech.missileSize ? 1.5 : 1))
// bullet[bullet.length - 1].force.x += push.x * (i - 1);
// bullet[bullet.length - 1].force.y += push.y * (i - 1);
// }
// }
// } else {
// if (m.crouch) {
// m.fireCDcycle = m.cycle + 10 * b.fireCDscale; // cool down
// const off = Math.random() - 0.5
// b.missile({
// x: m.pos.x,
// y: m.pos.y - 40
// },
// -Math.PI / 2 + 0.15 * off, 0, 0.83 * (tech.missileSize ? 1.5 : 1))
// bullet[bullet.length - 1].force.x += off * 0.03;
// // bullet[bullet.length - 1].force.y += push.y * (i - 1);
// } else {
// m.fireCDcycle = m.cycle + 55 * b.fireCDscale; // cool down
// // bullet[bullet.length - 1].force.y += 0.01; //a small push down at first to make it seem like the missile is briefly falling
// }
// }
} }
}, { }, {
name: "grenades", name: "grenades",
@@ -5068,7 +5020,7 @@ const b = {
this.ammo++ //make up for the ammo used up in fire() this.ammo++ //make up for the ammo used up in fire()
simulation.updateGunHUD(); simulation.updateGunHUD();
} }
m.fireCDcycle = m.cycle + 180 //Infinity; // cool down m.fireCDcycle = m.cycle + 90 //Infinity; // cool down
} else { } else {
for (let i = 0, len = mob.length; i < len; ++i) { for (let i = 0, len = mob.length; i < len; ++i) {
if (mob[i].alive && !mob[i].isBadTarget && Matter.Query.ray(map, m.pos, mob[i].position).length === 0) { if (mob[i].alive && !mob[i].isBadTarget && Matter.Query.ray(map, m.pos, mob[i].position).length === 0) {
@@ -5081,7 +5033,7 @@ const b = {
} }
} }
b.harpoon(where, closest.target, m.angle, length, true, totalCycles) b.harpoon(where, closest.target, m.angle, length, true, totalCycles)
m.fireCDcycle = m.cycle + 180 //Infinity; // cool down m.fireCDcycle = m.cycle + 120 //Infinity; // cool down
} }
const recoil = Vector.mult(Vector.normalise(Vector.sub(where, m.pos)), m.crouch ? 0.015 : 0.035) const recoil = Vector.mult(Vector.normalise(Vector.sub(where, m.pos)), m.crouch ? 0.015 : 0.035)
player.force.x -= recoil.x player.force.x -= recoil.x

View File

@@ -735,7 +735,7 @@ const spawn = {
const me = mob[mob.length - 1]; const me = mob[mob.length - 1];
me.isBoss = true; me.isBoss = true;
Matter.Body.setDensity(me, 0.002); //normal density even though its a boss Matter.Body.setDensity(me, 0.002); //normal density even though its a boss
me.damageReduction = 0.05; //extra reduction for a boss, because normal density me.damageReduction = 0.04; //extra reduction for a boss, because normal density
me.frictionAir = 0.01; me.frictionAir = 0.01;
me.accelMag = 0.0002; me.accelMag = 0.0002;
me.onDeath = function() { me.onDeath = function() {

View File

@@ -5117,7 +5117,7 @@
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return (tech.haveGunCheck("laser") || tech.laserBotCount > 1 || tech.isLaserMine) && tech.laserDamage === 0.15 return (tech.haveGunCheck("laser") || tech.laserBotCount > 1 || tech.isLaserMine) && tech.laserDamage === 0.16
}, },
requires: "laser, not free-electron", requires: "laser, not free-electron",
effect() { effect() {
@@ -5151,7 +5151,7 @@
}, },
remove() { remove() {
tech.laserFieldDrain = 0.002; tech.laserFieldDrain = 0.002;
tech.laserDamage = 0.16; //used in check on pulse: tech.laserDamage === 0.16 tech.laserDamage = 0.16; //used in check on pulse and diode: tech.laserDamage === 0.16
tech.laserColor = "#f00" tech.laserColor = "#f00"
tech.laserColorAlpha = "rgba(255, 0, 0, 0.5)" tech.laserColorAlpha = "rgba(255, 0, 0, 0.5)"
} }

View File

@@ -1,35 +1,21 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
harpoon gun harpoon cd on miss fire lowered to 1.5s (was 3s)
shaped more like a harpoon
grabs power ups slower, and from the tip of the harpoon
only uses energy on returning
doesn't have thrust if there is no mob target
tech: reticulum - make one more harpoon if there are mobs nearby that you are facing
I'm letting this stack to 9 even though it's silly cause that is n-gon's style
tech: ceramics now lets both harpoons and needles ignore shields
this was coded poorly so if shield bugs show up it might be from this
tech: fragmentation makes ~15% fewer nails for everything it affects
tech: filament gives 3% length per ammo (was 1%)
also length is capped at 75 ammo because after that it's just annoying
tech: unaaq is longer at low ammo but scales slower at high ammo
bugs
fixed laser collisions on player head when crouching
returned experiment gun and field circles
bugs fixes
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
Separate actually crouching and forced crouching for gun altfires?
"Interstellar Disturbance": Cosmic String applies to mobs who cross the wormhole's path, even after initial wormholing, but at reduced damage and stun time. "Interstellar Disturbance": Cosmic String applies to mobs who cross the wormhole's path, even after initial wormholing, but at reduced damage and stun time.
disable zoom progress when paused disable zoom progress when paused
gun: harpoon gun: harpoon
delay for a not returning harpoon is too long
the return system should just be simple, with no or a very predictable way to lose the harpoon
return to player is slower for heavier harpoons return to player is slower for heavier harpoons
harpoons despawn before they have time to return with filament and lots o ammo
harpoon tech harpoon tech
holding down fire lets the string extend farther, holding down fire lets the string extend farther,
this can overwrite crouch mode this can overwrite crouch mode