laserBombingBoss

new laserBombingBoss
  I didn't do any difficulty testing, so maybe let me know if it's too easy

laser and plasma bots will target mobs bullets
non updating health bar bug fix
This commit is contained in:
landgreen
2021-08-12 19:25:03 -07:00
parent 2e406c5264
commit 714204bd62
7 changed files with 174 additions and 26 deletions

View File

@@ -3269,6 +3269,7 @@ const b = {
const DIST = Vector.magnitude(Vector.sub(this.vertices[0], mob[i].position));
if (DIST - mob[i].radius < closeDist &&
!mob[i].isShielded &&
(!mob[i].isBadTarget || mob[i].isMobBullet) &&
Matter.Query.ray(map, this.vertices[0], mob[i].position).length === 0 &&
Matter.Query.ray(body, this.vertices[0], mob[i].position).length === 0) {
closeDist = DIST;
@@ -3429,7 +3430,7 @@ const b = {
for (let i = 0, len = mob.length; i < len; ++i) {
const DIST = Vector.magnitude(Vector.sub(this.position, mob[i].position)) - mob[i].radius;
if (DIST < closeDist &&
!mob[i].isBadTarget &&
(!mob[i].isBadTarget || mob[i].isMobBullet) &&
Matter.Query.ray(map, this.position, mob[i].position).length === 0 &&
Matter.Query.ray(body, this.position, mob[i].position).length === 0) {
closeDist = DIST;