mod superposition stuns mobs in phase field, stun bug fixes

This commit is contained in:
landgreen
2020-04-05 10:35:09 -07:00
parent e66538820e
commit 51cf02f6d5
8 changed files with 79 additions and 87 deletions

View File

@@ -926,7 +926,7 @@ const b = {
}, },
{ {
name: "super ball", name: "super ball",
description: "fire one <strong>large</strong> super <strong>ball</strong><br>that <strong>stuns</strong> mobs for <strong>2</strong> second", description: "fire one <strong>large</strong> super <strong>ball</strong><br>that <strong>stuns</strong> mobs for <strong>3</strong> second",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
allowed() { allowed() {
@@ -1338,7 +1338,7 @@ const b = {
}, },
{ {
name: "renormalization", name: "renormalization",
description: "<strong>phase decoherence field</strong> has <strong>3x visibility</strong><br>and <strong>1/3</strong> <strong class='color-f'>energy</strong> drain when <strong>firing</strong>", description: "<strong>phase decoherence field</strong> has <strong>3x visibility</strong><br>and <strong>3x</strong> less <strong class='color-f'>energy</strong> drain when <strong>firing</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
allowed() { allowed() {
@@ -1353,8 +1353,9 @@ const b = {
} }
}, },
{ {
name: "quantum dissipation", name: "superposition",
description: "<strong>phase decoherence field</strong> uses <strong class='color-f'>energy</strong> to <br><strong class='color-d'>damage</strong> unshielded <strong>mobs</strong> that you <strong>overlap</strong>", // description: "<strong>phase decoherence field</strong> applies a <strong>stun</strong><br> to unshielded <strong>mobs</strong> for <strong>2</strong> seconds",
description: "apply a <strong>4</strong> second <strong>stun</strong> to unshielded <strong>mobs</strong><br>that <strong>overlap</strong> with <strong>phase decoherence field</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
allowed() { allowed() {
@@ -1362,10 +1363,10 @@ const b = {
}, },
requires: "phase decoherence field", requires: "phase decoherence field",
effect() { effect() {
b.isModPhaseFieldDamage = true; b.superposition = true;
}, },
remove() { remove() {
b.isModPhaseFieldDamage = false; b.superposition = false;
} }
}, },
], ],
@@ -2478,7 +2479,7 @@ const b = {
this.force.y += this.mass * 0.001; this.force.y += this.mass * 0.001;
}; };
bullet[me].onDmg = function (who) { bullet[me].onDmg = function (who) {
mobs.statusStun(who, 120) // (2.3) * 2 / 14 ticks (2x damage over 7 seconds) mobs.statusStun(who, 180) // (2.3) * 2 / 14 ticks (2x damage over 7 seconds)
}; };
} else { } else {
b.muzzleFlash(20); b.muzzleFlash(20);

View File

@@ -601,7 +601,7 @@ const game = {
if (game.isCommunityMaps) level.levels.push("stronghold"); if (game.isCommunityMaps) level.levels.push("stronghold");
level.levels = shuffle(level.levels); //shuffles order of maps level.levels = shuffle(level.levels); //shuffles order of maps
level.levels.unshift("bosses"); //add bosses level to the end of the randomized levels list level.levels.unshift("bosses"); //add bosses level to the end of the randomized levels list
console.log(level.levels) // console.log(level.levels)
} }
game.reset(); game.reset();
game.firstRun = false; game.firstRun = false;

View File

@@ -1,6 +1,6 @@
"use strict"; "use strict";
//collision groups //collision groups
// cat.player | cat.map | cat.body | cat.bullet | cat.powerUp | cat.mob | cat.mobBullet | cat.mobShield // cat.player | cat.map | cat.body | cat.bullet | cat.powerUp | cat.mob | cat.mobBullet | cat.mobShield | cat.phased
const cat = { const cat = {
player: 0x1, player: 0x1,
map: 0x10, map: 0x10,
@@ -10,6 +10,7 @@ const cat = {
mob: 0x100000, mob: 0x100000,
mobBullet: 0x1000000, mobBullet: 0x1000000,
mobShield: 0x10000000, mobShield: 0x10000000,
phased: 0x100000000,
} }
//example https://landgreen.github.io/sidescroller/index.html? //example https://landgreen.github.io/sidescroller/index.html?

View File

@@ -147,8 +147,8 @@ const level = {
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump
// spawn.laserBoss(2900, -500) // spawn.laserBoss(2900, -500)
// spawn.exploder(3200, -500) spawn.springer(3200, -500)
spawn.timeSkipBoss(2900, -500) // spawn.timeSkipBoss(2900, -500)
// spawn.randomMob(3200, -500) // spawn.randomMob(3200, -500)
}, },

View File

@@ -485,10 +485,10 @@ const mobs = {
} }
}, },
searchSpring() { searchSpring() {
//draw the two dots on the end of the springs
ctx.beginPath(); ctx.beginPath();
ctx.arc(this.cons.pointA.x, this.cons.pointA.y, 6, 0, 2 * Math.PI); ctx.arc(this.cons.pointA.x, this.cons.pointA.y, 6, 0, 2 * Math.PI);
ctx.arc(this.cons2.pointA.x, this.cons2.pointA.y, 6, 0, 2 * Math.PI); ctx.arc(this.cons2.pointA.x, this.cons2.pointA.y, 6, 0, 2 * Math.PI);
// ctx.arc(this.cons.bodyB.position.x, this.cons.bodyB.position.y,6,0,2*Math.PI);
ctx.fillStyle = "#222"; ctx.fillStyle = "#222";
ctx.fill(); ctx.fill();
@@ -501,25 +501,28 @@ const mobs = {
!mech.isStealth !mech.isStealth
) { ) {
this.foundPlayer(); this.foundPlayer();
if (!(game.cycle % (this.seePlayerFreq * 2))) {
this.springTarget.x = this.seePlayer.position.x;
this.springTarget.y = this.seePlayer.position.y;
this.cons.length = -200;
this.cons2.length = 100 + 1.5 * this.radius;
} else {
this.springTarget2.x = this.seePlayer.position.x;
this.springTarget2.y = this.seePlayer.position.y;
this.cons.length = 100 + 1.5 * this.radius;
this.cons2.length = -200;
}
} else if (this.seePlayer.recall) { } else if (this.seePlayer.recall) {
this.lostPlayer(); this.lostPlayer();
} }
} }
//if you don't recall player location rotate and draw to show where you are looking },
if (!this.seePlayer.recall) { springAttack() {
// set new values of the ends of the spring constraints
if (this.seePlayer.recall) {
if (!(game.cycle % (this.seePlayerFreq * 2))) {
this.springTarget.x = this.seePlayer.position.x;
this.springTarget.y = this.seePlayer.position.y;
this.cons.length = -200;
this.cons2.length = 100 + 1.5 * this.radius;
} else {
this.springTarget2.x = this.seePlayer.position.x;
this.springTarget2.y = this.seePlayer.position.y;
this.cons.length = 100 + 1.5 * this.radius;
this.cons2.length = -200;
}
} else {
this.torque = this.lookTorque * this.inertia; this.torque = this.lookTorque * this.inertia;
//draw //draw looking around arcs
const range = Math.PI * this.lookRange; const range = Math.PI * this.lookRange;
ctx.beginPath(); ctx.beginPath();
ctx.arc(this.position.x, this.position.y, this.radius * 2.5, this.angle - range, this.angle + range); ctx.arc(this.position.x, this.position.y, this.radius * 2.5, this.angle - range, this.angle + range);
@@ -567,8 +570,8 @@ const mobs = {
} }
} }
}; };
const seeRange = 3000; //move to a random location
if (!(game.cycle % (this.seePlayerFreq * 10))) { if (!(game.cycle % (this.seePlayerFreq * 5))) {
best = { best = {
x: null, x: null,
y: null, y: null,
@@ -577,6 +580,7 @@ const mobs = {
v1: null, v1: null,
v2: null v2: null
}; };
const seeRange = 3000;
const look = { const look = {
x: this.position.x + seeRange * Math.cos(this.angle), x: this.position.x + seeRange * Math.cos(this.angle),
y: this.position.y + seeRange * Math.sin(this.angle) y: this.position.y + seeRange * Math.sin(this.angle)
@@ -589,27 +593,6 @@ const mobs = {
this.cons2.length = 100 + 1.5 * this.radius; this.cons2.length = 100 + 1.5 * this.radius;
} }
} }
if (!((game.cycle + this.seePlayerFreq * 5) % (this.seePlayerFreq * 10))) {
best = {
x: null,
y: null,
dist2: Infinity,
who: null,
v1: null,
v2: null
};
const look = {
x: this.position.x + seeRange * Math.cos(this.angle),
y: this.position.y + seeRange * Math.sin(this.angle)
};
vertexCollision(this.position, look, map);
if (best.dist2 != Infinity) {
this.springTarget2.x = best.x;
this.springTarget2.y = best.y;
this.cons.length = 100 + 1.5 * this.radius;
this.cons2.length = 100 + 1.5 * this.radius;
}
}
} }
}, },
alertNearByMobs() { alertNearByMobs() {
@@ -805,6 +788,7 @@ const mobs = {
if (this.seePlayer.recall && this.cd < game.cycle) { if (this.seePlayer.recall && this.cd < game.cycle) {
const dist = Vector.sub(this.seePlayer.position, this.position); const dist = Vector.sub(this.seePlayer.position, this.position);
const distMag = Vector.magnitude(dist); const distMag = Vector.magnitude(dist);
console.log(this.seePlayer.recall)
if (distMag < 400) { if (distMag < 400) {
this.cd = game.cycle + this.delay; this.cd = game.cycle + this.delay;
ctx.beginPath(); ctx.beginPath();

View File

@@ -1787,7 +1787,7 @@ const mech = {
mech.grabPowerUp(); mech.grabPowerUp();
mech.lookForPickUp(); mech.lookForPickUp();
const DRAIN = (0.0005 + 0.0001 * player.speed) * (mech.fireCDcycle > mech.cycle ? 10 / b.modRenormalization : 1) //game.mouseDown const DRAIN = (0.0005 + 0.0001 * player.speed) * (mech.fireCDcycle > mech.cycle ? 9 / b.modRenormalization : 1) //game.mouseDown
if (mech.energy > DRAIN) { if (mech.energy > DRAIN) {
mech.energy -= DRAIN; mech.energy -= DRAIN;
if (mech.energy < 0.001) { if (mech.energy < 0.001) {
@@ -1805,14 +1805,15 @@ const mech = {
if (inPlayer.length > 0) { if (inPlayer.length > 0) {
for (let i = 0; i < inPlayer.length; i++) { for (let i = 0; i < inPlayer.length; i++) {
if (inPlayer[i].shield) { if (inPlayer[i].shield) {
mech.energy -= 0.005; //shields drain player energy mech.energy -= 0.01; //shields drain player energy
//draw outline of shield //draw outline of shield
ctx.fillStyle = `rgba(0, 204, 255,0.6)` ctx.fillStyle = `rgba(0, 204, 255,0.6)`
ctx.fill() ctx.fill()
} else if (b.isModPhaseFieldDamage && mech.energy > 0.006 && inPlayer[i].dropPowerUp && !inPlayer[i].isShielded) { } else if (b.superposition && inPlayer[i].dropPowerUp) {
inPlayer[i].damage(0.4 * b.dmgScale); //damage mobs inside the player // inPlayer[i].damage(0.4 * b.dmgScale); //damage mobs inside the player
mech.energy -= 0.002; // mech.energy += 0.005;
mobs.statusStun(inPlayer[i], 240)
//draw outline of mob in a few random locations to show blurriness //draw outline of mob in a few random locations to show blurriness
const vertices = inPlayer[i].vertices; const vertices = inPlayer[i].vertices;
const off = 30 const off = 30
@@ -1825,11 +1826,8 @@ const mech = {
ctx.lineTo(xOff + vertices[j].x, yOff + vertices[j].y); ctx.lineTo(xOff + vertices[j].x, yOff + vertices[j].y);
} }
ctx.lineTo(xOff + vertices[0].x, yOff + vertices[0].y); ctx.lineTo(xOff + vertices[0].x, yOff + vertices[0].y);
ctx.fillStyle = "rgba(0,0,0,0.3)" ctx.fillStyle = "rgba(0,0,0,0.1)"
ctx.fill() ctx.fill()
// ctx.strokeStyle = "#000"
// ctx.lineWidth = 1
// ctx.stroke()
} }
break; break;
} }

View File

@@ -182,6 +182,7 @@ const spawn = {
me.do = function () { me.do = function () {
if (!mech.isBodiesAsleep) { if (!mech.isBodiesAsleep) {
this.seePlayerByDistOrLOS(); this.seePlayerByDistOrLOS();
this.checkStatus();
this.attraction(); this.attraction();
if (this.seePlayer.recall && this.mass < this.cellMassMax) { //grow cell radius if (this.seePlayer.recall && this.mass < this.cellMassMax) { //grow cell radius
@@ -205,7 +206,6 @@ const spawn = {
} }
} }
} }
this.checkStatus()
}; };
me.onDeath = function () { me.onDeath = function () {
let count = 0 //count other cells let count = 0 //count other cells
@@ -318,8 +318,8 @@ const spawn = {
me.do = function () { me.do = function () {
this.gravity(); this.gravity();
this.seePlayerCheck(); this.seePlayerCheck();
this.attraction();
this.checkStatus(); this.checkStatus();
this.attraction();
}; };
}, },
grower(x, y, radius = 15) { grower(x, y, radius = 15) {
@@ -329,9 +329,9 @@ const spawn = {
me.accelMag = 0.00045 * game.accelScale; me.accelMag = 0.00045 * game.accelScale;
me.do = function () { me.do = function () {
this.seePlayerByLookingAt(); this.seePlayerByLookingAt();
this.checkStatus();
this.attraction(); this.attraction();
this.grow(); this.grow();
this.checkStatus();
}; };
}, },
springer(x, y, radius = 20 + Math.ceil(Math.random() * 35)) { springer(x, y, radius = 20 + Math.ceil(Math.random() * 35)) {
@@ -381,6 +381,8 @@ const spawn = {
this.gravity(); this.gravity();
this.searchSpring(); this.searchSpring();
this.checkStatus(); this.checkStatus();
this.springAttack();
//not properly effected by stun, if looking at player while stun will still attack...
}; };
}, },
hopper(x, y, radius = 30 + Math.ceil(Math.random() * 30)) { hopper(x, y, radius = 30 + Math.ceil(Math.random() * 30)) {
@@ -397,6 +399,7 @@ const spawn = {
me.do = function () { me.do = function () {
this.gravity(); this.gravity();
this.seePlayerCheck(); this.seePlayerCheck();
this.checkStatus();
this.hop(); this.hop();
//randomly hob if not aware of player //randomly hob if not aware of player
if (this.randomHopCD < game.cycle && this.speed < 1 && !this.seePlayer.recall) { if (this.randomHopCD < game.cycle && this.speed < 1 && !this.seePlayer.recall) {
@@ -408,7 +411,6 @@ const spawn = {
this.force.x += forceMag * Math.cos(angle); this.force.x += forceMag * Math.cos(angle);
this.force.y += forceMag * Math.sin(angle) - 0.04 * this.mass; //antigravity this.force.y += forceMag * Math.sin(angle) - 0.04 * this.mass; //antigravity
} }
this.checkStatus();
}; };
}, },
spinner(x, y, radius = 30 + Math.ceil(Math.random() * 35)) { spinner(x, y, radius = 30 + Math.ceil(Math.random() * 35)) {
@@ -430,6 +432,7 @@ const spawn = {
spawn.shield(me, x, y); spawn.shield(me, x, y);
me.do = function () { me.do = function () {
this.seePlayerByLookingAt(); this.seePlayerByLookingAt();
this.checkStatus();
//accelerate towards the player after a delay //accelerate towards the player after a delay
if (this.seePlayer.recall) { if (this.seePlayer.recall) {
if (this.cdBurst2 < game.cycle && this.angularSpeed < 0.01) { if (this.cdBurst2 < game.cycle && this.angularSpeed < 0.01) {
@@ -463,7 +466,6 @@ const spawn = {
} else { } else {
this.cdBurst2 = 0; this.cdBurst2 = 0;
} }
this.checkStatus();
}; };
}, },
sucker(x, y, radius = 30 + Math.ceil(Math.random() * 70)) { sucker(x, y, radius = 30 + Math.ceil(Math.random() * 70)) {
@@ -486,6 +488,7 @@ const spawn = {
}); });
} }
this.seePlayerByDistOrLOS(); this.seePlayerByDistOrLOS();
this.checkStatus();
if (this.seePlayer.recall) { if (this.seePlayer.recall) {
//eventHorizon waves in and out //eventHorizon waves in and out
eventHorizon = this.eventHorizon * (0.93 + 0.17 * Math.sin(game.cycle * 0.011)) eventHorizon = this.eventHorizon * (0.93 + 0.17 * Math.sin(game.cycle * 0.011))
@@ -533,7 +536,6 @@ const spawn = {
ctx.fill(); ctx.fill();
} }
} }
this.checkStatus();
} }
}, },
suckerBoss(x, y, radius = 25) { suckerBoss(x, y, radius = 25) {
@@ -575,6 +577,7 @@ const spawn = {
}); });
} }
this.seePlayerByDistOrLOS(); this.seePlayerByDistOrLOS();
this.checkStatus();
if (this.seePlayer.recall) { if (this.seePlayer.recall) {
//accelerate towards the player //accelerate towards the player
const forceMag = this.accelMag * this.mass; const forceMag = this.accelMag * this.mass;
@@ -633,7 +636,6 @@ const spawn = {
} }
this.curl(eventHorizon); this.curl(eventHorizon);
} }
this.checkStatus();
} }
}, },
timeSkipBoss(x, y, radius = 80) { timeSkipBoss(x, y, radius = 80) {
@@ -654,6 +656,7 @@ const spawn = {
me.do = function () { me.do = function () {
//keep it slow, to stop issues from explosion knock backs //keep it slow, to stop issues from explosion knock backs
this.seePlayerCheck(); this.seePlayerCheck();
this.checkStatus();
this.attraction() this.attraction()
if (!game.isTimeSkipping) { if (!game.isTimeSkipping) {
const compress = 3 const compress = 3
@@ -704,8 +707,6 @@ const spawn = {
ctx.fill(); ctx.fill();
} }
} }
this.checkStatus();
} }
}, },
beamer(x, y, radius = 15 + Math.ceil(Math.random() * 15)) { beamer(x, y, radius = 15 + Math.ceil(Math.random() * 15)) {
@@ -719,11 +720,11 @@ const spawn = {
spawn.shield(me, x, y); spawn.shield(me, x, y);
me.do = function () { me.do = function () {
this.seePlayerByLookingAt(); this.seePlayerByLookingAt();
this.checkStatus();
this.attraction(); this.attraction();
this.repulsion(); this.repulsion();
//laser beam //laser beam
this.laserBeam(); this.laserBeam();
this.checkStatus();
}; };
}, },
focuser(x, y, radius = 30 + Math.ceil(Math.random() * 10)) { focuser(x, y, radius = 30 + Math.ceil(Math.random() * 10)) {
@@ -744,6 +745,7 @@ const spawn = {
me.do = function () { me.do = function () {
if (!mech.isBodiesAsleep) { if (!mech.isBodiesAsleep) {
this.seePlayerByLookingAt(); this.seePlayerByLookingAt();
this.checkStatus();
const dist2 = this.distanceToPlayer2(); const dist2 = this.distanceToPlayer2();
//laser Tracking //laser Tracking
if (this.seePlayer.yes && dist2 < 4000000 && !mech.isStealth) { if (this.seePlayer.yes && dist2 < 4000000 && !mech.isStealth) {
@@ -787,7 +789,6 @@ const spawn = {
this.laserPos = this.position; this.laserPos = this.position;
} }
}; };
this.checkStatus();
} }
}, },
laser(x, y, radius = 30) { laser(x, y, radius = 30) {
@@ -802,9 +803,9 @@ const spawn = {
}; };
me.do = function () { me.do = function () {
this.seePlayerByLookingAt(); this.seePlayerByLookingAt();
this.checkStatus();
this.attraction(); this.attraction();
this.laser(); this.laser();
this.checkStatus();
}; };
}, },
laserBoss(x, y, radius = 30) { laserBoss(x, y, radius = 30) {
@@ -937,11 +938,11 @@ const spawn = {
this.cd = game.cycle + this.delay; this.cd = game.cycle + this.delay;
}; };
me.do = function () { me.do = function () {
this.seePlayerCheck();
this.attraction();
this.gravity(); this.gravity();
this.strike(); this.seePlayerCheck();
this.checkStatus(); this.checkStatus();
this.attraction();
this.strike();
}; };
}, },
sneaker(x, y, radius = 15 + Math.ceil(Math.random() * 25)) { sneaker(x, y, radius = 15 + Math.ceil(Math.random() * 25)) {
@@ -958,9 +959,10 @@ const spawn = {
me.showHealthBar = false; me.showHealthBar = false;
// me.memory = 420; // me.memory = 420;
me.do = function () { me.do = function () {
this.seePlayerCheck();
this.attraction();
this.gravity(); this.gravity();
this.seePlayerCheck();
this.checkStatus();
this.attraction();
//draw //draw
if (!mech.isBodiesAsleep) { if (!mech.isBodiesAsleep) {
if (this.seePlayer.yes) { if (this.seePlayer.yes) {
@@ -991,7 +993,6 @@ const spawn = {
this.canTouchPlayer = false; this.canTouchPlayer = false;
this.collisionFilter.mask = cat.map | cat.body | cat.bullet | cat.mob //can't touch player this.collisionFilter.mask = cat.map | cat.body | cat.bullet | cat.mob //can't touch player
} }
this.checkStatus();
}; };
}, },
ghoster(x, y, radius = 40 + Math.ceil(Math.random() * 100)) { ghoster(x, y, radius = 40 + Math.ceil(Math.random() * 100)) {
@@ -1018,6 +1019,7 @@ const spawn = {
}); });
} }
this.seePlayerCheckByDistance(); this.seePlayerCheckByDistance();
this.checkStatus();
this.attraction(); this.attraction();
this.search(); this.search();
//draw //draw
@@ -1049,7 +1051,6 @@ const spawn = {
this.canTouchPlayer = false; this.canTouchPlayer = false;
this.collisionFilter.mask = cat.bullet; //can't touch player or walls this.collisionFilter.mask = cat.bullet; //can't touch player or walls
} }
this.checkStatus();
}; };
}, },
// blinker(x, y, radius = 45 + Math.ceil(Math.random() * 70)) { // blinker(x, y, radius = 45 + Math.ceil(Math.random() * 70)) {
@@ -1122,10 +1123,12 @@ const spawn = {
}; };
me.do = function () { me.do = function () {
this.seePlayerCheckByDistance(); this.seePlayerCheckByDistance();
this.hoverOverPlayer();
this.bomb();
this.search();
this.checkStatus(); this.checkStatus();
if (this.seePlayer.recall) {
this.hoverOverPlayer();
this.bomb();
this.search();
}
}; };
}, },
shooter(x, y, radius = 25 + Math.ceil(Math.random() * 50)) { shooter(x, y, radius = 25 + Math.ceil(Math.random() * 50)) {
@@ -1146,8 +1149,8 @@ const spawn = {
// spawn.shield(me, x, y); // spawn.shield(me, x, y);
me.do = function () { me.do = function () {
this.seePlayerByLookingAt(); this.seePlayerByLookingAt();
this.fire();
this.checkStatus(); this.checkStatus();
this.fire();
}; };
}, },
shooterBoss(x, y, radius = 130) { shooterBoss(x, y, radius = 130) {
@@ -1176,12 +1179,12 @@ const spawn = {
}; };
me.do = function () { me.do = function () {
this.seePlayerByLookingAt(); this.seePlayerByLookingAt();
this.checkStatus();
this.fire(); this.fire();
//gently return to starting location //gently return to starting location
const sub = Vector.sub(this.homePosition, this.position) const sub = Vector.sub(this.homePosition, this.position)
const dist = Vector.magnitude(sub) const dist = Vector.magnitude(sub)
if (dist > 50) this.force = Vector.mult(Vector.normalise(sub), this.mass * 0.0002) if (dist > 50) this.force = Vector.mult(Vector.normalise(sub), this.mass * 0.0002)
this.checkStatus();
}; };
}, },
bullet(x, y, radius = 6, sides = 0) { bullet(x, y, radius = 6, sides = 0) {
@@ -1226,8 +1229,8 @@ const spawn = {
me.do = function () { me.do = function () {
this.gravity(); this.gravity();
this.seePlayerCheck(); this.seePlayerCheck();
this.attraction();
this.checkStatus(); this.checkStatus();
this.attraction();
}; };
}, },
spawns(x, y, radius = 15 + Math.ceil(Math.random() * 5)) { spawns(x, y, radius = 15 + Math.ceil(Math.random() * 5)) {
@@ -1246,8 +1249,8 @@ const spawn = {
me.do = function () { me.do = function () {
this.gravity(); this.gravity();
this.seePlayerCheck(); this.seePlayerCheck();
this.attraction();
this.checkStatus(); this.checkStatus();
this.attraction();
}; };
}, },
exploder(x, y, radius = 25 + Math.ceil(Math.random() * 50)) { exploder(x, y, radius = 25 + Math.ceil(Math.random() * 50)) {
@@ -1261,8 +1264,8 @@ const spawn = {
me.do = function () { me.do = function () {
this.gravity(); this.gravity();
this.seePlayerCheck(); this.seePlayerCheck();
this.attraction();
this.checkStatus(); this.checkStatus();
this.attraction();
}; };
}, },
snakeBoss(x, y, radius = 80) { snakeBoss(x, y, radius = 80) {
@@ -1279,9 +1282,9 @@ const spawn = {
}; };
me.do = function () { me.do = function () {
this.seePlayerCheck(); this.seePlayerCheck();
this.checkStatus();
this.attraction(); this.attraction();
this.laserBeam(); this.laserBeam();
this.checkStatus();
}; };
//snake tail //snake tail
@@ -1322,8 +1325,8 @@ const spawn = {
me.do = function () { me.do = function () {
this.gravity(); this.gravity();
this.seePlayerCheck(); this.seePlayerCheck();
this.attraction();
this.checkStatus(); this.checkStatus();
this.attraction();
}; };
}, },
shield(target, x, y, chance = Math.min(0.02 + game.difficulty * 0.005, 0.2)) { shield(target, x, y, chance = Math.min(0.02 + game.difficulty * 0.005, 0.2)) {

View File

@@ -1,5 +1,10 @@
************** TODO - n-gon ************** ************** TODO - n-gon **************
boss mob - just a faster and larger version of a springer mob
could have a more frequent random walk
always shielded
consider combining with time skipper field?
pulse and time dilation only ones left with no dedicated mod pulse and time dilation only ones left with no dedicated mod
lore - a robot (the player) gains self awareness lore - a robot (the player) gains self awareness