vacuum permittivity
snake boss is updated -fear the snake mod neutron bomb: vacuum permittivity - gets a larger radius and a slow effect bosses are only stunned for 1/5 of the normal stun time
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
.jsbeautifyrc
|
.jsbeautifyrc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.DS_Store
|
||||||
|
|||||||
55
js/bullet.js
55
js/bullet.js
@@ -852,7 +852,7 @@ const b = {
|
|||||||
if (mod.iceEnergy && !who.shield && !who.isShielded && who.dropPowerUp && who.alive) {
|
if (mod.iceEnergy && !who.shield && !who.isShielded && who.dropPowerUp && who.alive) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (!who.alive) {
|
if (!who.alive) {
|
||||||
mech.energy += mod.iceEnergy * 0.66 * mech.maxEnergy
|
mech.energy += mod.iceEnergy * 0.5 * mech.maxEnergy
|
||||||
mech.addHealth(mod.iceEnergy * 0.04)
|
mech.addHealth(mod.iceEnergy * 0.04)
|
||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
@@ -2066,7 +2066,7 @@ const b = {
|
|||||||
y: SPEED * Math.sin(dir)
|
y: SPEED * Math.sin(dir)
|
||||||
});
|
});
|
||||||
// Matter.Body.setDensity(bullet[me], 0.0001);
|
// Matter.Body.setDensity(bullet[me], 0.0001);
|
||||||
bullet[me].endCycle = game.cycle + Math.floor((300 + 60 * Math.random()) * mod.isBulletsLastLonger);
|
bullet[me].endCycle = game.cycle + Math.floor(300 + 60 * Math.random());
|
||||||
bullet[me].minDmgSpeed = 0;
|
bullet[me].minDmgSpeed = 0;
|
||||||
bullet[me].restitution = 1;
|
bullet[me].restitution = 1;
|
||||||
bullet[me].friction = 0;
|
bullet[me].friction = 0;
|
||||||
@@ -2363,12 +2363,13 @@ const b = {
|
|||||||
//missile(where, dir, speed, size = 1, spawn = 0) {
|
//missile(where, dir, speed, size = 1, spawn = 0) {
|
||||||
if (mod.is3Missiles) {
|
if (mod.is3Missiles) {
|
||||||
if (mech.crouch) {
|
if (mech.crouch) {
|
||||||
mech.fireCDcycle = mech.cycle + 18 * b.fireCD; // cool down
|
mech.fireCDcycle = mech.cycle + 17 * b.fireCD; // cool down
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
b.missile({
|
b.missile({
|
||||||
x: mech.pos.x,
|
x: mech.pos.x,
|
||||||
y: mech.pos.y - 40
|
y: mech.pos.y - 40
|
||||||
}, -Math.PI / 2 + 0.08 * (1 - i), 0, 0.7, mod.recursiveMissiles)
|
}, -Math.PI / 2 + 0.08 * (1 - i) + 0.3 * (Math.random() - 0.5), 0, 0.7, mod.recursiveMissiles)
|
||||||
|
bullet[bullet.length - 1].force.x -= 0.015 * (i - 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mech.fireCDcycle = mech.cycle + 55 * b.fireCD; // cool down
|
mech.fireCDcycle = mech.cycle + 55 * b.fireCD; // cool down
|
||||||
@@ -2381,19 +2382,22 @@ const b = {
|
|||||||
b.missile({
|
b.missile({
|
||||||
x: mech.pos.x + 40 * direction.x,
|
x: mech.pos.x + 40 * direction.x,
|
||||||
y: mech.pos.y + 40 * direction.y
|
y: mech.pos.y + 40 * direction.y
|
||||||
}, mech.angle + 0.1 * (Math.random() - 0.5), 5, 0.7, mod.recursiveMissiles)
|
}, mech.angle + 0.06 * (Math.random() - 0.5), 5, 0.7, mod.recursiveMissiles)
|
||||||
bullet[bullet.length - 1].force.x += push.x * (i - 1);
|
bullet[bullet.length - 1].force.x += push.x * (i - 1);
|
||||||
bullet[bullet.length - 1].force.y += push.y * (i - 1);
|
bullet[bullet.length - 1].force.y += push.y * (i - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mech.crouch) {
|
if (mech.crouch) {
|
||||||
mech.fireCDcycle = mech.cycle + 18 * b.fireCD; // cool down
|
mech.fireCDcycle = mech.cycle + 17 * b.fireCD; // cool down
|
||||||
|
const off = Math.random() - 0.5
|
||||||
b.missile({
|
b.missile({
|
||||||
x: mech.pos.x,
|
x: mech.pos.x,
|
||||||
y: mech.pos.y - 40
|
y: mech.pos.y - 40
|
||||||
},
|
},
|
||||||
-Math.PI / 2, 0, 1, mod.recursiveMissiles)
|
-Math.PI / 2 + 0.15 * off, 0, 1, mod.recursiveMissiles)
|
||||||
|
bullet[bullet.length - 1].force.x += off * 0.03;
|
||||||
|
// bullet[bullet.length - 1].force.y += push.y * (i - 1);
|
||||||
} else {
|
} else {
|
||||||
mech.fireCDcycle = mech.cycle + 55 * b.fireCD; // cool down
|
mech.fireCDcycle = mech.cycle + 55 * b.fireCD; // cool down
|
||||||
b.missile({
|
b.missile({
|
||||||
@@ -2501,7 +2505,7 @@ const b = {
|
|||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
const dir = mech.angle;
|
const dir = mech.angle;
|
||||||
bullet[me] = Bodies.polygon(mech.pos.x + 30 * Math.cos(mech.angle), mech.pos.y + 30 * Math.sin(mech.angle), 10, 4, b.fireAttributes(dir, false));
|
bullet[me] = Bodies.polygon(mech.pos.x + 30 * Math.cos(mech.angle), mech.pos.y + 30 * Math.sin(mech.angle), 10, 4, b.fireAttributes(dir, false));
|
||||||
b.fireProps(mech.crouch ? 45 : 25, mech.crouch ? 30 : 20, dir, me); //cd , speed
|
b.fireProps(mech.crouch ? 45 : 25, mech.crouch ? 35 : 20, dir, me); //cd , speed
|
||||||
Matter.Body.setDensity(bullet[me], 0.000001);
|
Matter.Body.setDensity(bullet[me], 0.000001);
|
||||||
bullet[me].endCycle = Infinity;
|
bullet[me].endCycle = Infinity;
|
||||||
bullet[me].frictionAir = 0;
|
bullet[me].frictionAir = 0;
|
||||||
@@ -2510,9 +2514,11 @@ const b = {
|
|||||||
bullet[me].restitution = 0;
|
bullet[me].restitution = 0;
|
||||||
bullet[me].minDmgSpeed = 0;
|
bullet[me].minDmgSpeed = 0;
|
||||||
bullet[me].damageRadius = 100;
|
bullet[me].damageRadius = 100;
|
||||||
bullet[me].maxDamageRadius = (435 + 150 * Math.random()) * (mod.isNeutronImmune ? 1.2 : 1)
|
bullet[me].maxDamageRadius = 450 + 130 * mod.isNeutronSlow + 130 * mod.isNeutronImmune //+ 150 * Math.random()
|
||||||
|
bullet[me].radiusDecay = (0.81 + 0.15 * mod.isNeutronSlow + 0.15 * mod.isNeutronImmune) / mod.isBulletsLastLonger
|
||||||
bullet[me].stuckTo = null;
|
bullet[me].stuckTo = null;
|
||||||
bullet[me].stuckToRelativePosition = null;
|
bullet[me].stuckToRelativePosition = null;
|
||||||
|
bullet[me].vacuumSlow = 0.97;
|
||||||
bullet[me].beforeDmg = function() {};
|
bullet[me].beforeDmg = function() {};
|
||||||
bullet[me].stuck = function() {};
|
bullet[me].stuck = function() {};
|
||||||
bullet[me].do = function() {
|
bullet[me].do = function() {
|
||||||
@@ -2581,12 +2587,11 @@ const b = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bullet[me].radiationMode = function() {
|
bullet[me].radiationMode = function() { //the do code after the bullet is stuck on something, projects a damaging radiation field
|
||||||
this.stuck(); //runs different code based on what the bullet is stuck to
|
this.stuck(); //runs different code based on what the bullet is stuck to
|
||||||
if (!mech.isBodiesAsleep) {
|
if (!mech.isBodiesAsleep) {
|
||||||
this.damageRadius = this.damageRadius * 0.85 + 0.15 * this.maxDamageRadius //smooth radius towards max
|
this.damageRadius = this.damageRadius * 0.85 + 0.15 * this.maxDamageRadius //smooth radius towards max
|
||||||
this.maxDamageRadius -= 0.8 / mod.isBulletsLastLonger //+ 0.5 * Math.sin(game.cycle * 0.1) //slowly shrink max radius
|
this.maxDamageRadius -= this.radiusDecay
|
||||||
|
|
||||||
if (this.damageRadius < 15) {
|
if (this.damageRadius < 15) {
|
||||||
this.endCycle = 0;
|
this.endCycle = 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -2603,11 +2608,17 @@ const b = {
|
|||||||
//aoe damage to mobs
|
//aoe damage to mobs
|
||||||
for (let i = 0, len = mob.length; i < len; i++) {
|
for (let i = 0, len = mob.length; i < len; i++) {
|
||||||
if (Vector.magnitude(Vector.sub(mob[i].position, this.position)) < this.damageRadius) {
|
if (Vector.magnitude(Vector.sub(mob[i].position, this.position)) < this.damageRadius) {
|
||||||
let dmg = b.dmgScale * 0.08
|
let dmg = b.dmgScale * 0.082
|
||||||
if (Matter.Query.ray(map, mob[i].position, this.position).length > 0) dmg *= 0.25 //reduce damage if a wall is in the way
|
if (Matter.Query.ray(map, mob[i].position, this.position).length > 0) dmg *= 0.25 //reduce damage if a wall is in the way
|
||||||
if (mob[i].shield) dmg *= 4 //x5 to make up for the /5 that shields normally take
|
if (mob[i].shield) dmg *= 4 //x5 to make up for the /5 that shields normally take
|
||||||
mob[i].damage(dmg);
|
mob[i].damage(dmg);
|
||||||
mob[i].locatePlayer();
|
mob[i].locatePlayer();
|
||||||
|
if (mod.isNeutronSlow) {
|
||||||
|
Matter.Body.setVelocity(mob[i], {
|
||||||
|
x: mob[i].velocity.x * this.vacuumSlow,
|
||||||
|
y: mob[i].velocity.y * this.vacuumSlow
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
@@ -2616,6 +2627,24 @@ const b = {
|
|||||||
ctx.fillStyle = `rgba(25,139,170,${0.2+0.06*Math.random()})`;
|
ctx.fillStyle = `rgba(25,139,170,${0.2+0.06*Math.random()})`;
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
ctx.globalCompositeOperation = "source-over"
|
ctx.globalCompositeOperation = "source-over"
|
||||||
|
if (mod.isNeutronSlow) {
|
||||||
|
const that = this
|
||||||
|
|
||||||
|
function slow(who, radius = that.explodeRad * 3.2) {
|
||||||
|
for (i = 0, len = who.length; i < len; i++) {
|
||||||
|
const sub = Vector.sub(that.position, who[i].position);
|
||||||
|
const dist = Vector.magnitude(sub);
|
||||||
|
if (dist < radius) {
|
||||||
|
Matter.Body.setVelocity(who[i], {
|
||||||
|
x: who[i].velocity.x * that.vacuumSlow,
|
||||||
|
y: who[i].velocity.y * that.vacuumSlow
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
slow(body, this.damageRadius)
|
||||||
|
slow([player], this.damageRadius)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -459,13 +459,9 @@ const game = {
|
|||||||
addGravity(body, game.g);
|
addGravity(body, game.g);
|
||||||
player.force.y += player.mass * game.g;
|
player.force.y += player.mass * game.g;
|
||||||
},
|
},
|
||||||
// reset() { //run on first run, and each later run after you die
|
|
||||||
|
|
||||||
// },
|
|
||||||
firstRun: true,
|
firstRun: true,
|
||||||
splashReturn() {
|
splashReturn() {
|
||||||
game.onTitlePage = true;
|
game.onTitlePage = true;
|
||||||
// document.getElementById('splash').onclick = 'run(this)';
|
|
||||||
document.getElementById("splash").onclick = function() {
|
document.getElementById("splash").onclick = function() {
|
||||||
game.startGame();
|
game.startGame();
|
||||||
};
|
};
|
||||||
|
|||||||
13
js/level.js
13
js/level.js
@@ -13,16 +13,15 @@ const level = {
|
|||||||
start() {
|
start() {
|
||||||
if (level.levelsCleared === 0) { //this code only runs on the first level
|
if (level.levelsCleared === 0) { //this code only runs on the first level
|
||||||
// game.enableConstructMode() //used to build maps in testing mode
|
// game.enableConstructMode() //used to build maps in testing mode
|
||||||
// level.difficultyIncrease(8)
|
// level.difficultyIncrease(26)
|
||||||
// game.zoomScale = 1000;
|
// game.zoomScale = 1000;
|
||||||
// game.setZoom();
|
// game.setZoom();
|
||||||
// mech.setField("wormhole")
|
// mech.setField("wormhole")
|
||||||
// b.giveGuns("missiles")
|
// b.giveGuns("missiles")
|
||||||
// mod.is3Missiles = true
|
// mod.is3Missiles = true
|
||||||
// mod.giveMod("incendiary ammunition")
|
// mod.giveMod("neutron bomb")
|
||||||
// mod.giveMod("super ball")
|
// mod.giveMod("super ball")
|
||||||
|
|
||||||
|
|
||||||
level.intro(); //starting level
|
level.intro(); //starting level
|
||||||
// level.testing(); //not in rotation
|
// level.testing(); //not in rotation
|
||||||
// level.finalBoss() //final boss level
|
// level.finalBoss() //final boss level
|
||||||
@@ -147,16 +146,16 @@ const level = {
|
|||||||
// spawn.launcherBoss(1200, -500)
|
// spawn.launcherBoss(1200, -500)
|
||||||
// spawn.laserTargetingBoss(1600, -400)
|
// spawn.laserTargetingBoss(1600, -400)
|
||||||
// spawn.spawner(1600, -500)
|
// spawn.spawner(1600, -500)
|
||||||
spawn.shooter(1700, -120)
|
// spawn.shooter(1700, -120)
|
||||||
// spawn.bomberBoss(1400, -500)
|
// spawn.bomberBoss(1400, -500)
|
||||||
spawn.sniper(1800, -120)
|
// spawn.sniper(1800, -120)
|
||||||
// spawn.cellBossCulture(1600, -500)
|
// spawn.cellBossCulture(1600, -500)
|
||||||
// spawn.spiderBoss(1600, -500)
|
// spawn.spiderBoss(1600, -500)
|
||||||
spawn.launcher(1200, -500)
|
// spawn.launcher(1200, -500)
|
||||||
// spawn.shield(mob[mob.length - 1], 1800, -120, 1);
|
// spawn.shield(mob[mob.length - 1], 1800, -120, 1);
|
||||||
|
|
||||||
// spawn.nodeBoss(1200, -500, "launcher")
|
// spawn.nodeBoss(1200, -500, "launcher")
|
||||||
// spawn.snakeBoss(1200, -500)
|
spawn.snakeBoss(1200, -500)
|
||||||
// spawn.timeSkipBoss(2900, -500)
|
// spawn.timeSkipBoss(2900, -500)
|
||||||
// spawn.randomMob(1600, -500)
|
// spawn.randomMob(1600, -500)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ const mobs = {
|
|||||||
who.isStunned = false
|
who.isStunned = false
|
||||||
},
|
},
|
||||||
type: "stun",
|
type: "stun",
|
||||||
endCycle: game.cycle + cycles,
|
endCycle: game.cycle + cycles * (who.isBoss ? 0.2 : 1),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
43
js/mods.js
43
js/mods.js
@@ -1596,7 +1596,7 @@ const mod = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" && !(mod.isSporeField || mod.isMissileField || mod.isIceField)) || mod.haveGunCheck("drones") || mod.haveGunCheck("super balls") || (mod.haveGunCheck("nail gun") && !mod.isIceCrystals && !mod.isNailCrit) || (mod.haveGunCheck("shotgun") && !mod.isNailShot)
|
return (mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" && !(mod.isSporeField || mod.isMissileField || mod.isIceField)) || mod.haveGunCheck("drones") || mod.haveGunCheck("super balls") || (mod.haveGunCheck("nail gun")) || (mod.haveGunCheck("shotgun")) && !mod.isIceCrystals && !mod.isNailCrit && !mod.isNailShot && !mod.isNailPoison
|
||||||
},
|
},
|
||||||
requires: "drones, super balls, nail gun, shotgun",
|
requires: "drones, super balls, nail gun, shotgun",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1608,15 +1608,15 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Lorentzian topology",
|
name: "Lorentzian topology",
|
||||||
description: "<strong>bullets</strong> last <strong>33% longer</strong><br><span style = 'font-size: 85%'>drones, spores, super balls, foam, wave, ice IX, neutron</span>",
|
description: "<strong>bullets</strong> last <strong>30% longer</strong><br><span style = 'font-size: 83%'>drones, spores, missiles, foam, wave, ice IX, neutron</span>",
|
||||||
maxCount: 3,
|
maxCount: 3,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || mod.haveGunCheck("spores") || mod.haveGunCheck("drones") || mod.haveGunCheck("super balls") || mod.haveGunCheck("foam") || mod.haveGunCheck("wave beam") || mod.haveGunCheck("ice IX") || mod.haveGunCheck("neutron bomb")
|
return mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || mod.haveGunCheck("spores") || mod.haveGunCheck("drones") || mod.haveGunCheck("missiles") || mod.haveGunCheck("foam") || mod.haveGunCheck("wave beam") || mod.haveGunCheck("ice IX") || mod.isNeutronBomb
|
||||||
},
|
},
|
||||||
requires: "drones, spores, super balls, foam<br>wave beam, ice IX, neutron bomb",
|
requires: "drones, spores, missiles, foam<br>wave beam, ice IX, neutron bomb",
|
||||||
effect() {
|
effect() {
|
||||||
mod.isBulletsLastLonger += 0.33
|
mod.isBulletsLastLonger += 0.3
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.isBulletsLastLonger = 1;
|
mod.isBulletsLastLonger = 1;
|
||||||
@@ -2071,7 +2071,7 @@ const mod = {
|
|||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("grenades") && !mod.isRPG && !mod.isNeutronBomb
|
return mod.haveGunCheck("grenades") && !mod.isRPG && !mod.isNeutronBomb
|
||||||
},
|
},
|
||||||
requires: "grenades, not rocket-propelled or neutron bomb",
|
requires: "grenades, not rocket-propelled",
|
||||||
effect() {
|
effect() {
|
||||||
mod.isVacuumBomb = true;
|
mod.isVacuumBomb = true;
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
@@ -2080,8 +2080,10 @@ const mod = {
|
|||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.isVacuumBomb = false;
|
mod.isVacuumBomb = false;
|
||||||
|
if (!mod.isNeutronBomb) {
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
if (b.guns[i].name === "grenades") b.guns[i].fire = b.guns[i].fireNormal
|
if (b.guns[i].name === "grenades") b.guns[i].fire = (mod.isNeutronBomb) ? b.guns[i].fireNeutron : b.guns[i].fireNormal
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2091,9 +2093,9 @@ const mod = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("grenades") && !mod.isRPG && !mod.isVacuumBomb && !mod.grenadeFragments
|
return mod.haveGunCheck("grenades") && !mod.isRPG && !mod.grenadeFragments && !mod.isVacuumBomb
|
||||||
},
|
},
|
||||||
requires: "grenades, not rocket-propelled, vacuum bomb, or fragmentation",
|
requires: "grenades, not rocket-propelled or fragmentation",
|
||||||
effect() {
|
effect() {
|
||||||
mod.isNeutronBomb = true;
|
mod.isNeutronBomb = true;
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
@@ -2103,7 +2105,7 @@ const mod = {
|
|||||||
remove() {
|
remove() {
|
||||||
mod.isNeutronBomb = false;
|
mod.isNeutronBomb = false;
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
if (b.guns[i].name === "grenades") b.guns[i].fire = b.guns[i].fireNormal
|
if (b.guns[i].name === "grenades") b.guns[i].fire = (mod.isVacuumBomb) ? b.guns[i].fireVacuum : b.guns[i].fireNormal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2123,6 +2125,22 @@ const mod = {
|
|||||||
mod.isNeutronImmune = false
|
mod.isNeutronImmune = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "vacuum permittivity",
|
||||||
|
description: "increase <strong>neutron bomb's</strong> range by <strong>20%</strong><br>objects in range of the bomb are <strong>slowed</strong>",
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return mod.isNeutronBomb
|
||||||
|
},
|
||||||
|
requires: "neutron bomb",
|
||||||
|
effect() {
|
||||||
|
mod.isNeutronSlow = true
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
mod.isNeutronSlow = false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "mine reclamation",
|
name: "mine reclamation",
|
||||||
description: "retrieve <strong class='color-g'>ammo</strong> from all undetonated <strong>mines</strong><br>and <strong>20%</strong> of <strong>mines</strong> after detonation",
|
description: "retrieve <strong class='color-g'>ammo</strong> from all undetonated <strong>mines</strong><br>and <strong>20%</strong> of <strong>mines</strong> after detonation",
|
||||||
@@ -2334,7 +2352,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "thermoelectric effect",
|
name: "thermoelectric effect",
|
||||||
description: "<strong>killing</strong> mobs with <strong>ice IX</strong> gives <strong>4%</strong> <strong class='color-h'>health</strong><br>and overloads <strong class='color-f'>energy</strong> by <strong>166%</strong> of your max",
|
description: "<strong>killing</strong> mobs with <strong>ice IX</strong> gives <strong>4%</strong> <strong class='color-h'>health</strong><br>and overloads <strong class='color-f'>energy</strong> by <strong>50%</strong> of your max",
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -3279,5 +3297,6 @@ const mod = {
|
|||||||
isRailEnergyGain: null,
|
isRailEnergyGain: null,
|
||||||
isMineSentry: null,
|
isMineSentry: null,
|
||||||
isIncendiary: null,
|
isIncendiary: null,
|
||||||
overfillDrain: null
|
overfillDrain: null,
|
||||||
|
isNeutronSlow: null
|
||||||
}
|
}
|
||||||
@@ -390,6 +390,8 @@ const mech = {
|
|||||||
document.getElementById("text-log").style.opacity = 0; //fade out any active text logs
|
document.getElementById("text-log").style.opacity = 0; //fade out any active text logs
|
||||||
document.getElementById("fade-out").style.opacity = 1; //slowly fades out
|
document.getElementById("fade-out").style.opacity = 1; //slowly fades out
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
World.clear(engine.world);
|
||||||
|
Engine.clear(engine);
|
||||||
game.splashReturn();
|
game.splashReturn();
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
@@ -462,6 +464,7 @@ const mech = {
|
|||||||
if (Math.random() < 0.5) b.drone() //spawn drone
|
if (Math.random() < 0.5) b.drone() //spawn drone
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.isEnergyHealth) {
|
if (mod.isEnergyHealth) {
|
||||||
mech.energy -= dmg;
|
mech.energy -= dmg;
|
||||||
if (mech.energy < 0 || isNaN(mech.energy)) { //taking deadly damage
|
if (mech.energy < 0 || isNaN(mech.energy)) { //taking deadly damage
|
||||||
@@ -1339,7 +1342,7 @@ const mech = {
|
|||||||
description: "use <strong class='color-f'>energy</strong> to <strong>block</strong> mobs<br>excess <strong class='color-f'>energy</strong> used to build <strong>drones</strong><br><strong>double</strong> your default <strong class='color-f'>energy</strong> regeneration",
|
description: "use <strong class='color-f'>energy</strong> to <strong>block</strong> mobs<br>excess <strong class='color-f'>energy</strong> used to build <strong>drones</strong><br><strong>double</strong> your default <strong class='color-f'>energy</strong> regeneration",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
mech.hold = function() {
|
mech.hold = function() {
|
||||||
if (mech.energy > mech.maxEnergy - 0.02 && mech.fieldCDcycle < mech.cycle) {
|
if (mech.energy > mech.maxEnergy - 0.02 && mech.fieldCDcycle < mech.cycle && input.field) {
|
||||||
if (mod.isSporeField) {
|
if (mod.isSporeField) {
|
||||||
// mech.fieldCDcycle = mech.cycle + 10; // set cool down to prevent +energy from making huge numbers of drones
|
// mech.fieldCDcycle = mech.cycle + 10; // set cool down to prevent +energy from making huge numbers of drones
|
||||||
const len = Math.floor(6 + 5 * Math.random())
|
const len = Math.floor(6 + 5 * Math.random())
|
||||||
|
|||||||
31
js/spawn.js
31
js/spawn.js
@@ -2192,16 +2192,23 @@ const spawn = {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
snakeBoss(x, y, radius = 75) { //snake boss with a laser head
|
snakeBoss(x, y, radius = 75) { //snake boss with a laser head
|
||||||
mobs.spawn(x, y, 8, radius, "rgb(255,50,130)");
|
mobs.spawn(x, y, 8, radius, "rgb(55,170,170)");
|
||||||
let me = mob[mob.length - 1];
|
let me = mob[mob.length - 1];
|
||||||
me.isBoss = true;
|
me.isBoss = true;
|
||||||
me.accelMag = 0.0011 * game.accelScale;
|
me.accelMag = 0.0008 * game.accelScale;
|
||||||
me.memory = 250;
|
me.memory = 250;
|
||||||
me.laserRange = 500;
|
me.laserRange = 500;
|
||||||
Matter.Body.setDensity(me, 0.0013 + 0.0005 * Math.sqrt(game.difficulty)); //extra dense //normal is 0.001 //makes effective life much larger
|
Matter.Body.setDensity(me, 0.0015 + 0.0005 * Math.sqrt(game.difficulty)); //extra dense //normal is 0.001 //makes effective life much larger
|
||||||
spawn.shield(me, x, y, 1);
|
spawn.shield(me, x, y, 1);
|
||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
|
//wake up tail mobs
|
||||||
|
for (let i = 0; i < mob.length; i++) {
|
||||||
|
if (mob[i].isSnakeTail && mob[i].alive) {
|
||||||
|
mob[i].do = mob[i].doActive
|
||||||
|
mob[i].removeConsBB();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
this.seePlayerCheck();
|
this.seePlayerCheck();
|
||||||
@@ -2211,7 +2218,7 @@ const spawn = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//snake tail
|
//snake tail
|
||||||
const nodes = 2 + Math.min(3 + Math.ceil(Math.random() * game.difficulty + 2), 8)
|
const nodes = Math.min(8 + Math.ceil(0.5 * game.difficulty), 40)
|
||||||
spawn.lineBoss(x + 105, y, "snakeBody", nodes);
|
spawn.lineBoss(x + 105, y, "snakeBody", nodes);
|
||||||
//constraint boss with first 3 mobs in lineboss
|
//constraint boss with first 3 mobs in lineboss
|
||||||
consBB[consBB.length] = Constraint.create({
|
consBB[consBB.length] = Constraint.create({
|
||||||
@@ -2235,7 +2242,7 @@ const spawn = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
snakeBody(x, y, radius = 20) {
|
snakeBody(x, y, radius = 20) {
|
||||||
mobs.spawn(x, y, 4, radius, "rgb(255,0,0)");
|
mobs.spawn(x, y, 4, radius, "rgb(55,170,170)");
|
||||||
let me = mob[mob.length - 1];
|
let me = mob[mob.length - 1];
|
||||||
me.onHit = function() {
|
me.onHit = function() {
|
||||||
//run this function on hitting player
|
//run this function on hitting player
|
||||||
@@ -2243,16 +2250,18 @@ const spawn = {
|
|||||||
};
|
};
|
||||||
me.collisionFilter.mask = cat.bullet | cat.player
|
me.collisionFilter.mask = cat.bullet | cat.player
|
||||||
// me.g = 0.0002; //required if using 'gravity'
|
// me.g = 0.0002; //required if using 'gravity'
|
||||||
// me.accelMag = 0 //0.001 * game.accelScale;
|
me.accelMag = 0.001 * game.accelScale;
|
||||||
// me.memory = 0;
|
|
||||||
me.leaveBody = false;
|
me.leaveBody = false;
|
||||||
// me.seePlayerFreq = Math.round((80 + 50 * Math.random()) * game.lookFreqScale);
|
me.seePlayerFreq = Math.round((80 + 50 * Math.random()) * game.lookFreqScale);
|
||||||
me.frictionAir = 0.02;
|
me.frictionAir = 0.02;
|
||||||
|
me.isSnakeTail = true;
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
// this.gravity();
|
|
||||||
// this.seePlayerCheck();
|
|
||||||
this.checkStatus();
|
this.checkStatus();
|
||||||
// this.attraction();
|
};
|
||||||
|
me.doActive = function() {
|
||||||
|
this.seePlayerCheck();
|
||||||
|
this.checkStatus();
|
||||||
|
this.attraction();
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
tetherBoss(x, y, radius = 90) {
|
tetherBoss(x, y, radius = 90) {
|
||||||
|
|||||||
72
todo.txt
72
todo.txt
@@ -1,8 +1,11 @@
|
|||||||
*********** NEXT PATCH ***********
|
*********** NEXT PATCH ***********
|
||||||
some changes to snake boss
|
|
||||||
|
|
||||||
supercapacitor - overfill energy decays 66% slower
|
snake boss is updated
|
||||||
(thanks to NoHaxJustPi for coding this)
|
-fear the snake
|
||||||
|
|
||||||
|
mod neutron bomb: vacuum permittivity - gets a larger radius and a slow effect
|
||||||
|
|
||||||
|
bosses are only stunned for 1/5 of the normal stun time
|
||||||
|
|
||||||
************** BUGS **************
|
************** BUGS **************
|
||||||
|
|
||||||
@@ -25,7 +28,10 @@ supercapacitor - overfill energy decays 66% slower
|
|||||||
|
|
||||||
************** TODO **************
|
************** TODO **************
|
||||||
|
|
||||||
vacuum and neutron bomb could merge
|
mod - railgun's push effect is increased, and it does some damage to nearby mobs
|
||||||
|
maybe only triggers at max energy
|
||||||
|
|
||||||
|
Laser mod: For each reflection of laser, damage increases by 10%
|
||||||
|
|
||||||
new power up - increase damage and fire speed, for 15 seconds
|
new power up - increase damage and fire speed, for 15 seconds
|
||||||
named boost?
|
named boost?
|
||||||
@@ -34,43 +40,27 @@ new power up - increase damage and fire speed, for 15 seconds
|
|||||||
how to indicate effect duration
|
how to indicate effect duration
|
||||||
or just give the effect after picking up a reroll
|
or just give the effect after picking up a reroll
|
||||||
|
|
||||||
mod - overfilled energy decays slower
|
mod - bot very slowly follows you and gives you a bonus when it's in range
|
||||||
|
it moves through walls
|
||||||
|
effect: damage bonus?, damage reduction?, push away mobs, limit top speed of mobs/blocks/player?
|
||||||
|
|
||||||
mod - remove max health, but you take 60% more harm
|
add an ending to the game
|
||||||
|
maybe the game ending should ask you to open the console and type in some commands like in the end of doki doki
|
||||||
mod - taking damage fires your current weapon at the nearest mob
|
mirror ending (if no cheats)
|
||||||
requires? some harm reduction
|
level after final boss battle is the intro level, but flipped left right, with a fake player
|
||||||
|
damage the fake player to end the game
|
||||||
mod - a 4th mod selection option that is always a bot
|
message about go outside
|
||||||
|
no ending (if cheats)
|
||||||
mod - railgun's push effect is increased, and it does some damage to nearby mobs
|
game goes on forever
|
||||||
maybe only triggers at max energy
|
also game goes on if player attacks, the fake player
|
||||||
|
game never ends if you have used cheats
|
||||||
mod - nano scale field could be a mod
|
|
||||||
excess energy is converted to bullets
|
|
||||||
run this code in the energy overfill code check
|
|
||||||
possible issues
|
|
||||||
worm hole, Penrose process - nerf a bit
|
|
||||||
pair production - nerf and give it to anyone
|
|
||||||
cloaking field - maybe just don't spawn bullets when cloaked
|
|
||||||
|
|
||||||
Mod: "Solar Power": Energy regeneration is doubled while standing still
|
Mod: "Solar Power": Energy regeneration is doubled while standing still
|
||||||
run in the 1 second check
|
run in the 1 second check
|
||||||
|
|
||||||
mod - a bot that eats up health and ammo, but poops out a mod (10 power ups = 1 mod?)
|
|
||||||
or it poops a reroll after picking up 2 heal/ammo
|
|
||||||
requires the reroll -> bot mod
|
|
||||||
4 rerolls can convert to a bot, also 1 rerolls can convert to 5% damage
|
|
||||||
the mods that do those effects could be required before you see this bot
|
|
||||||
it passes through walls
|
|
||||||
moves slower then the player so you can get to it before the bot if you hurry
|
|
||||||
disable crystalized armor?
|
|
||||||
|
|
||||||
mod: take less harm if you are in the air
|
mod: take less harm if you are in the air
|
||||||
require squirrel cage rotor
|
require squirrel cage rotor
|
||||||
|
|
||||||
Laser mod: For each reflection of laser, damage increases by 10%
|
|
||||||
|
|
||||||
mechanic - remove a random mod as a condition for picking up a really good mod
|
mechanic - remove a random mod as a condition for picking up a really good mod
|
||||||
|
|
||||||
mechanic - do something for 2 seconds after firing
|
mechanic - do something for 2 seconds after firing
|
||||||
@@ -80,10 +70,6 @@ mod - do 50% more damage in close, but 50% less at a distance
|
|||||||
code it like mod.isFarAwayDmg
|
code it like mod.isFarAwayDmg
|
||||||
have these mods disable each other
|
have these mods disable each other
|
||||||
|
|
||||||
mod - bot very slowly follows you and gives you a bonus when it's in range
|
|
||||||
it moves through walls
|
|
||||||
effect: damage bonus?, damage reduction?, push away mobs, limit top speed of mobs/blocks/player?
|
|
||||||
|
|
||||||
mod - foam is attracted to mobs
|
mod - foam is attracted to mobs
|
||||||
use a gravitational attraction model?
|
use a gravitational attraction model?
|
||||||
could foam be attracted to other foam bullets too?
|
could foam be attracted to other foam bullets too?
|
||||||
@@ -105,21 +91,11 @@ repeat map in vertical and horizontal space
|
|||||||
or at least vertical space
|
or at least vertical space
|
||||||
camera looks strange when you teleport player with a high velocity
|
camera looks strange when you teleport player with a high velocity
|
||||||
|
|
||||||
add an ending to the game
|
|
||||||
maybe the game ending should ask you to open the console and type in some commands like in the end of doki doki
|
|
||||||
mirror ending (if no cheats)
|
|
||||||
level after final boss battle is the intro level, but flipped left right, with a fake player
|
|
||||||
damage the fake player to end the game
|
|
||||||
message about go outside
|
|
||||||
no ending (if cheats)
|
|
||||||
game goes on forever
|
|
||||||
also game goes on if player attacks, the fake player
|
|
||||||
game never ends if you have used cheats
|
|
||||||
|
|
||||||
new status effect: fear - push mob away from player for a time
|
new status effect: fear - push mob away from player for a time
|
||||||
|
|
||||||
new status effect - apply status effect to mobs that makes blocks attracted to them
|
new status effect - apply status effect to mobs that makes blocks attracted to them
|
||||||
only lasts a few cycles
|
only lasts a few cycles
|
||||||
|
or zero cycles and it doesn't need to be a status
|
||||||
|
|
||||||
have some mobs spawn in later in the level (in hard and why modes)
|
have some mobs spawn in later in the level (in hard and why modes)
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user