working on healer mob type

This commit is contained in:
landgreen
2019-09-11 06:44:22 -07:00
parent 7b744e4985
commit 37ce11905a
3 changed files with 69 additions and 6 deletions

View File

@@ -721,7 +721,7 @@ const b = {
{
name: "spores",
ammo: 0,
ammoPack: 6,
ammoPack: 7,
have: false,
fire() {
const me = bullet.length;
@@ -818,7 +818,7 @@ const b = {
{
name: "drones",
ammo: 0,
ammoPack: 22,
ammoPack: 25,
have: false,
fire() {
const MAX_SPEED = 6
@@ -851,7 +851,7 @@ const b = {
//find mob targets
if (!(game.cycle % this.lookFrequency)) {
this.close = null;
// this.close = null;
this.lockedOn = null;
this.isFollowMouse = true; //if no target is found default to follow mouse
let closeDist = Infinity;
@@ -865,7 +865,7 @@ const b = {
const TARGET_VECTOR = Matter.Vector.sub(this.position, mob[i].position)
const DIST = Matter.Vector.magnitude(TARGET_VECTOR);
if (DIST < closeDist) {
this.close = mob[i].position;
// this.close = mob[i].position;
closeDist = DIST;
this.lockedOn = mob[i]
this.isFollowMouse = false;
@@ -900,7 +900,7 @@ const b = {
{
name: "wave beam",
ammo: 0,
ammoPack: 110,
ammoPack: 120,
have: false,
fire() {
const me = bullet.length;