exit animation

exit door has a 1 second delay and animation

reservoir map now has a flipped horizontal chance
map ruins renamed -> pavilion

all the individual !m.isBodiesAsleep are replaced with ones in the main game loop
  this needs extensive bug testing?
    should behave similarly to testing mode, which doesn't have issues
  todo remove the checks from bullets and mobs, do this after update so it can be easy to revert

bug fixes
This commit is contained in:
landgreen
2022-01-18 18:12:04 -08:00
parent 694ff23f61
commit 4b8ecfce40
7 changed files with 473 additions and 339 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -843,7 +843,7 @@ const b = {
}
bullet[me].do = function() {
const suckCycles = 40
if (!m.isBodiesAsleep && simulation.cycle > this.endCycle - suckCycles || Matter.Query.collides(this, map).length || Matter.Query.collides(this, body).length) { //suck
if (simulation.cycle > this.endCycle - suckCycles || Matter.Query.collides(this, map).length || Matter.Query.collides(this, body).length) { //suck
const that = this
function suck(who, radius = that.explodeRad * 3.2) {
@@ -907,7 +907,7 @@ const b = {
this.force.y += this.mass * 0.0025; //extra gravity for harder arcs
const suckCycles = 40
if (!m.isBodiesAsleep && simulation.cycle > this.endCycle - suckCycles) { //suck
if (simulation.cycle > this.endCycle - suckCycles) { //suck
const that = this
function suck(who, radius = that.explodeRad * 3.2) {
@@ -1071,7 +1071,6 @@ const b = {
}
bullet[me].radiationMode = function() { //the do code after the bullet is stuck on something, projects a damaging radiation field
this.stuck(); //runs different code based on what the bullet is stuck to
if (!m.isBodiesAsleep) {
this.damageRadius = this.damageRadius * 0.85 + 0.15 * this.maxDamageRadius //smooth radius towards max
this.maxDamageRadius -= this.radiusDecay
if (this.damageRadius < 15) {
@@ -1129,7 +1128,6 @@ const b = {
}
}
}
}
let gunIndex = null
for (let i = 0, len = b.guns.length; i < len; i++) {
if (b.guns[i].name === "grenades") {

File diff suppressed because it is too large Load Diff

View File

@@ -21,7 +21,7 @@ const simulation = {
mobs.draw();
simulation.draw.cons();
simulation.draw.body();
mobs.loop();
if (!m.isBodiesAsleep) mobs.loop();
mobs.healthBar();
m.draw();
m.hold();
@@ -31,7 +31,7 @@ const simulation = {
b.fire();
b.bulletRemove();
b.bulletDraw();
b.bulletDo();
if (!m.isBodiesAsleep) b.bulletDo();
simulation.drawCircle();
// simulation.clip();
ctx.restore();

View File

@@ -926,7 +926,7 @@ const spawn = {
}
},
cellBoss(x, y, radius = 20, cellID) {
mobs.spawn(x + Math.random(), y + Math.random(), 20, radius * (1 + 1.2 * Math.random()), "rgba(0,100,105,0.4)");
mobs.spawn(x + Math.random(), y + Math.random(), 20, radius * (1 + 1.2 * Math.random()), "rgba(0,80,125,0.3)");
let me = mob[mob.length - 1];
me.stroke = "transparent"
me.isBoss = true;
@@ -3378,7 +3378,7 @@ const spawn = {
// spawn.shield(me, x, y, 1);
Matter.Body.setDensity(me, 0.005); //extra dense //normal is 0.001 //makes effective life much larger
me.damageReduction = 0.1 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
me.damageReduction = 0.12 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
me.isBoss = true;
me.onDamage = function() {};
me.onDeath = function() {

View File

@@ -2005,24 +2005,24 @@ const tech = {
tech.isHarmArmor = false;
}
},
{
name: "radiative equilibrium",
description: "for <strong>10 seconds</strong> after receiving <strong class='color-harm'>harm</strong><br>increase <strong class='color-d'>damage</strong> by <strong>200%</strong>",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isHarmDamage = true;
},
remove() {
tech.isHarmDamage = false;
}
},
// {
// name: "radiative equilibrium",
// description: "for <strong>10 seconds</strong> after receiving <strong class='color-harm'>harm</strong><br>increase <strong class='color-d'>damage</strong> by <strong>200%</strong>",
// maxCount: 1,
// count: 0,
// frequency: 1,
// frequencyDefault: 1,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// tech.isHarmDamage = true;
// },
// remove() {
// tech.isHarmDamage = false;
// }
// },
{
name: "CPT symmetry",
description: "<strong>charge</strong>, <strong>parity</strong>, and <strong>time</strong> invert to undo <strong class='color-harm'>harm</strong><br><strong class='color-rewind'>rewind</strong> <strong>(1.5—5)</strong> seconds for <strong>(66—220)</strong> <strong class='color-f'>energy</strong>",
@@ -3414,7 +3414,7 @@ const tech = {
effect: () => {
const have = [] //find which tech you have
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].count > 0) have.push(i)
if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(i)
}
const choose = have[Math.floor(Math.random() * have.length)]
simulation.makeTextLog(`<span class='color-var'>tech</span>.removeTech("<span class='color-text'>${tech.tech[choose].name}</span>")`)

View File

@@ -1,36 +1,41 @@
******************************************************** NEXT PATCH **************************************************
new boss: slashBoss - same as slash mob, but it's get invulnerability of course
exit door has a 1 second delay and animation
if you have upgraded bots then random bot will that type
being inside slime reduces gravity by 50% through buoyancy
difficulty increase for mobs harm is 2% lower per level
boson composite no longer lets you pass through elevators and rotors
reservoir map now has a flipped horizontal chance
map ruins renamed -> pavilion
NAND gate damage 50 -> 55.5%
all the individual !m.isBodiesAsleep are replaced with ones in the main game loop
this needs extensive bug testing?
should behave similarly to testing mode, which doesn't have issues
todo remove the checks from bullets and mobs, do this after update so it can be easy to revert
bug fixes
******************************************************** TODO ********************************************************
if you have upgraded bots then random bot will that type
might have to nerf upgraded bots in the future, but let's try it out
mobs that are given the players location at the start can get confused if the map is reversed
suckers
can mob bullets damage other mob?
maybe if they switch collisions and classType === "body" or obj.classType === "bullet"
grenade gun seems weak
path finding system
figure out how to get friction effects on map/body to apply to player
vertical reversed version of reservoir level, start at top and press buttons to lower slime
growBoss and cellBoss are too similar
might have to nerf upgraded bots
variant of Occam's razor - remove 50% of your tech for each removed get:
2 bots?
50 energy max
animate going to next level?
door fills in with color that climbs up vertically through the door graphic the longer you stand on door
hold crouch on door? or automatically
make ship mode more playable and a fun option for people with trackpads
joystick support?
make a new boss with similar movement to powerUpBossBaby
bossBaby power up boss has really smart movement
like slasher mob since it's kinda the best mob
reversed version of reservoir level, start at top and press buttons to lower slime
tech immune to harm after mob kill
require no other mob kill tech?
cloaking field tech?
@@ -40,7 +45,7 @@ final boss invulnerability
in between phases
for all of one phase
JUNK tech - do something to the mob display health method
JUNK tech - do something fun to the mob display health method
new platform element, spring
toggle to on when player touches platform