invulnerable

tech: anyon - 2x energy after duplicating a power up, +6% duplication chance
tech: Abelian group - 4x damage while invulnerable
tech: fermion - become invulnerable for 5 seconds after a mob dies
tech: entropic gravity - crouching pulls MACHO towards the player, and 1.5x to all MACHO effects (damage, damage reduction, AoE damage)
tech: modified Newtonian dynamics - +20 speed for all Newtonian law tech

choice, MACHO, invulnerable, speed - have text keyword CSS style
removed chance to find a random tech in early levels from mobs
  this reduces tech per full game by about 2
tower level has a few changes
options exchange only works once per level, but it gives 3x choices after randomizing
dark star has a 1.2->1.3x MACHO radius
autocannon fires 1->2 extra super balls, but balls have higher gravity
grappling hook field starts with 0.6x damage reduction
super balls + uncertainty principle makes all balls start in the same spot and only separate after teleporting
ablative drones spawns 50% more drones on collision
von Neumann probe gives 40% more drones per block mass
  also added text clarification that it uses 5 energy
tech lens rotates 50% faster
ghoster mobs are more aggressive once they have lost 20% health
sneakBoss doesn't start accelerating until it is partly uncloaked, but it spawns sneaker mobs after cloaking

fixed bug with 2 different boost power up sizes
paradigm shift doesn't do damage while player is invulnerable
random internet JUNK images disabled because some of the images are bad
entanglement bug fix, maybe
This commit is contained in:
landgreen
2024-05-11 09:52:56 -07:00
parent a1164eddae
commit 507b0605d6
15 changed files with 652 additions and 760 deletions

View File

@@ -3331,7 +3331,7 @@ const b = {
//remove the body and spawn a new drone
Composite.remove(engine.world, found)
body.splice(body.indexOf(found), 1)
b.delayDrones(found.position, 0.7 * Math.sqrt(found.mass))
b.delayDrones(found.position, Math.sqrt(found.mass))
//draw a line from the drone to the body on the canvas
ctx.beginPath();
ctx.moveTo(this.position.x, this.position.y);
@@ -3350,9 +3350,7 @@ const b = {
ctx.beginPath();
let vertices = found.vertices;
ctx.moveTo(vertices[0].x, vertices[0].y);
for (let j = 1; j < vertices.length; j++) {
ctx.lineTo(vertices[j].x, vertices[j].y);
}
for (let j = 1; j < vertices.length; j++) ctx.lineTo(vertices[j].x, vertices[j].y);
ctx.lineTo(vertices[0].x, vertices[0].y);
ctx.lineWidth = 2;
ctx.strokeStyle = `rgba(0,0,0,${this.count / 60})`
@@ -3573,7 +3571,7 @@ const b = {
//remove the body and spawn a new drone
Composite.remove(engine.world, found)
body.splice(body.indexOf(found), 1)
b.delayDrones(found.position, 0.35 * Math.sqrt(found.mass))
b.delayDrones(found.position, 0.5 * Math.sqrt(found.mass))
//draw a line from the drone to the body on the canvas
ctx.beginPath();
ctx.moveTo(this.position.x, this.position.y);
@@ -3772,6 +3770,11 @@ const b = {
});
},
superBall(where, velocity, radius) {
let gravity = 0.001
if (tech.superBallDelay) {
velocity = Vector.mult(velocity, 1.4)
gravity *= 6
}
let dir = m.angle
const me = bullet.length;
bullet[me] = Bodies.polygon(where.x, where.y, 12, radius, b.fireAttributes(dir, false));
@@ -3787,7 +3790,7 @@ const b = {
bullet[me].frictionStatic = 0;
if (tech.isSuperHarm) {
bullet[me].collidePlayerDo = function () {
this.force.y += this.mass * 0.001;
this.force.y += this.mass * gravity;;
if (Matter.Query.collides(this, [player]).length) {
this.endCycle = 0
m.energy -= 0.04
@@ -3811,7 +3814,7 @@ const b = {
bullet[me].portFrequency = 25 + Math.floor(10 * Math.random())
bullet[me].nextPortCycle = simulation.cycle + bullet[me].portFrequency
bullet[me].do = function () {
this.force.y += this.mass * 0.001;
this.force.y += this.mass * gravity;
if (this.nextPortCycle < simulation.cycle) { //teleport around if you have tech.isBulletTeleport
this.nextPortCycle = simulation.cycle + this.portFrequency
const range = 33 * Math.sqrt(radius) * Math.random()
@@ -3821,7 +3824,7 @@ const b = {
};
} else {
bullet[me].do = function () {
this.force.y += this.mass * 0.001;
this.force.y += this.mass * gravity;
};
}
bullet[me].beforeDmg = function (who) {
@@ -3843,7 +3846,6 @@ const b = {
Matter.Body.setDensity(bullet[me], bullet[me].calcDensity() * 1.33);//33% more density and damage
this.endCycle = simulation.cycle + Math.floor(300 + 90 * Math.random()); //reset to full duration of time
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(this.velocity), 60)); //reset to high velocity
let count = 5
const wait = () => {
count--
@@ -3857,7 +3859,6 @@ const b = {
});
}
requestAnimationFrame(wait);
simulation.drawList.push({ //add dmg to draw queue
x: this.position.x,
y: this.position.y,
@@ -6426,10 +6427,7 @@ const b = {
have: false,
// num: 5,
do() { },
foamBall() {
},
foamBall() { },
fireOne() {
m.fireCDcycle = m.cycle + Math.floor((m.crouch ? 27 : 19) * b.fireCDscale); // cool down
const speed = m.crouch ? 43 : 36
@@ -6446,21 +6444,33 @@ const b = {
const SPREAD = m.crouch ? 0.08 : 0.13
const num = 3 + Math.floor(tech.extraSuperBalls * Math.random())
const speed = m.crouch ? 43 : 36
let dir = m.angle - SPREAD * (num - 1) / 2;
for (let i = 0; i < num; i++) {
b.superBall({
x: m.pos.x + 30 * Math.cos(dir),
y: m.pos.y + 30 * Math.sin(dir)
}, {
x: speed * Math.cos(dir),
y: speed * Math.sin(dir)
}, 11 * tech.bulletSize)
dir += SPREAD;
if (tech.isBulletTeleport) {
for (let i = 0; i < num; i++) {
b.superBall({
x: m.pos.x + 30 * Math.cos(m.angle),
y: m.pos.y + 30 * Math.sin(m.angle)
}, {
x: speed * Math.cos(m.angle),
y: speed * Math.sin(m.angle)
}, 11 * tech.bulletSize)
}
} else {
let dir = m.angle - SPREAD * (num - 1) / 2;
for (let i = 0; i < num; i++) {
b.superBall({
x: m.pos.x + 30 * Math.cos(dir),
y: m.pos.y + 30 * Math.sin(dir)
}, {
x: speed * Math.cos(dir),
y: speed * Math.sin(dir)
}, 11 * tech.bulletSize)
dir += SPREAD;
}
}
},
fireQueue() {
m.fireCDcycle = m.cycle + Math.floor((m.crouch ? 23 : 15) * b.fireCDscale); // cool down
const num = 1 + 3 + Math.floor(tech.extraSuperBalls * Math.random()) //1 extra
const num = 2 + 3 + Math.floor(tech.extraSuperBalls * Math.random()) //2 extra
const speed = m.crouch ? 43 : 36
const delay = Math.floor((m.crouch ? 18 : 12) * b.fireCDscale)
@@ -6479,8 +6489,6 @@ const b = {
}
let count = 0
requestAnimationFrame(cycle);
},
chooseFireMethod() { //set in simulation.startGame
if (tech.oneSuperBall) {
@@ -7789,7 +7797,7 @@ const b = {
lensDamageOn: 0, //set in tech
lens() {
this.stuckOn();
this.angle += 0.02
this.angle += 0.03
if (this.isInsideArc(m.angle)) {
this.lensDamage = this.lensDamageOn
ctx.lineWidth = 6 + this.lensDamageOn