blockBoss

blockBoss: new boss based on work by TheShwarma
  (3x chance to randomly see blockBoss until next patch)
  it's over powered, I'll probably nerf it next patch, but I want to get some feedback first on how to nerf it
  hint: if you kill the boss all the mobBlocks turn back into blocks

very very small blocks are slightly limited in how fast they can be thrown
  they were moving so fast they would miss their target sometimes

tech: energy conservation gives 5% energy back (was 6%)
tech: arsenal requires at least 3 guns in your inventory
tech: active cooling requires at least 2 guns in your inventory

several bug fixes
This commit is contained in:
landgreen
2021-08-31 05:54:37 -07:00
parent 1f471cf941
commit 13cc190211
11 changed files with 271 additions and 132 deletions

View File

@@ -268,7 +268,7 @@ const mobs = {
gravity() {
this.force.y += this.mass * this.g;
},
seePlayerFreq: Math.floor((30 + 30 * Math.random()) * simulation.lookFreqScale), //how often NPC checks to see where player is, lower numbers have better vision
seePlayerFreq: Math.floor(30 + 30 * Math.random()), //how often NPC checks to see where player is, lower numbers have better vision
foundPlayer() {
this.locatePlayer();
if (!this.seePlayer.yes) {
@@ -759,11 +759,6 @@ const mobs = {
attraction() {
//accelerate towards the player
if (this.seePlayer.recall) {
// && dx * dx + dy * dy < 2000000) {
// const forceMag = this.accelMag * this.mass;
// const angle = Math.atan2(this.seePlayer.position.y - this.position.y, this.seePlayer.position.x - this.position.x);
// this.force.x += forceMag * Math.cos(angle);
// this.force.y += forceMag * Math.sin(angle);
const force = Vector.mult(Vector.normalise(Vector.sub(this.seePlayer.position, this.position)), this.accelMag * this.mass)
this.force.x += force.x;
this.force.y += force.y;