pulse is a mod
This commit is contained in:
148
js/bullet.js
148
js/bullet.js
@@ -1545,6 +1545,7 @@ const b = {
|
|||||||
//find closest
|
//find closest
|
||||||
if (!(game.cycle % this.lookFrequency)) {
|
if (!(game.cycle % this.lookFrequency)) {
|
||||||
this.lockedOn = null;
|
this.lockedOn = null;
|
||||||
|
if (!mech.isCloak) {
|
||||||
let closeDist = mod.isPlasmaRange * 1000;
|
let closeDist = mod.isPlasmaRange * 1000;
|
||||||
for (let i = 0, len = mob.length; i < len; ++i) {
|
for (let i = 0, len = mob.length; i < len; ++i) {
|
||||||
const DIST = Vector.magnitude(Vector.sub(this.position, mob[i].position)) - mob[i].radius;
|
const DIST = Vector.magnitude(Vector.sub(this.position, mob[i].position)) - mob[i].radius;
|
||||||
@@ -1556,6 +1557,7 @@ const b = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//fire plasma at target
|
//fire plasma at target
|
||||||
if (this.lockedOn && this.lockedOn.alive && mech.fieldCDcycle < mech.cycle) {
|
if (this.lockedOn && this.lockedOn.alive && mech.fieldCDcycle < mech.cycle) {
|
||||||
const sub = Vector.sub(this.lockedOn.position, this.position)
|
const sub = Vector.sub(this.lockedOn.position, this.position)
|
||||||
@@ -3154,6 +3156,9 @@ const b = {
|
|||||||
have: false,
|
have: false,
|
||||||
nextFireCycle: 0, //use to remember how longs its been since last fire, used to reset count
|
nextFireCycle: 0, //use to remember how longs its been since last fire, used to reset count
|
||||||
fire() {
|
fire() {
|
||||||
|
|
||||||
|
},
|
||||||
|
fireLaser() {
|
||||||
if (mech.energy < mod.laserFieldDrain) {
|
if (mech.energy < mod.laserFieldDrain) {
|
||||||
mech.fireCDcycle = mech.cycle + 100; // cool down if out of energy
|
mech.fireCDcycle = mech.cycle + 100; // cool down if out of energy
|
||||||
} else {
|
} else {
|
||||||
@@ -3220,16 +3225,8 @@ const b = {
|
|||||||
b.laser()
|
b.laser()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
firePulse() {
|
||||||
{
|
|
||||||
name: "pulse",
|
|
||||||
description: "convert <strong>25%</strong> of your <strong class='color-f'>energy</strong> into a pulsed laser<br>instantly initiates a fusion <strong class='color-e'>explosion</strong>",
|
|
||||||
ammo: 0,
|
|
||||||
ammoPack: Infinity,
|
|
||||||
have: false,
|
|
||||||
fire() {
|
|
||||||
//calculate laser collision
|
//calculate laser collision
|
||||||
let best, energy, explosionRange;
|
let best, energy, explosionRange;
|
||||||
let range = 3000
|
let range = 3000
|
||||||
@@ -3282,7 +3279,6 @@ const b = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//check for collisions
|
//check for collisions
|
||||||
best = {
|
best = {
|
||||||
x: null,
|
x: null,
|
||||||
@@ -3295,7 +3291,7 @@ const b = {
|
|||||||
if (mod.isPulseAim) { //find mobs in line of sight
|
if (mod.isPulseAim) { //find mobs in line of sight
|
||||||
let dist = 2200
|
let dist = 2200
|
||||||
energy = 0.23 * Math.min(mech.energy, 1.5)
|
energy = 0.23 * Math.min(mech.energy, 1.5)
|
||||||
explosionRange = 1400 * energy
|
explosionRange = 1680 * energy
|
||||||
for (let i = 0, len = mob.length; i < len; i++) {
|
for (let i = 0, len = mob.length; i < len; i++) {
|
||||||
const newDist = Vector.magnitude(Vector.sub(path[0], mob[i].position))
|
const newDist = Vector.magnitude(Vector.sub(path[0], mob[i].position))
|
||||||
if (explosionRange < newDist &&
|
if (explosionRange < newDist &&
|
||||||
@@ -3319,7 +3315,6 @@ const b = {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mod.isPulseAim) {
|
if (mod.isPulseAim) {
|
||||||
mech.energy -= energy * mod.isLaserDiode
|
mech.energy -= energy * mod.isLaserDiode
|
||||||
if (best.who) b.explosion(path[1], explosionRange, true)
|
if (best.who) b.explosion(path[1], explosionRange, true)
|
||||||
@@ -3327,7 +3322,7 @@ const b = {
|
|||||||
} else {
|
} else {
|
||||||
energy = 0.27 * Math.min(mech.energy, 1.5)
|
energy = 0.27 * Math.min(mech.energy, 1.5)
|
||||||
mech.energy -= energy * mod.isLaserDiode
|
mech.energy -= energy * mod.isLaserDiode
|
||||||
explosionRange = 1300 * energy
|
explosionRange = 1560 * energy
|
||||||
if (best.who) b.explosion(path[1], explosionRange, true)
|
if (best.who) b.explosion(path[1], explosionRange, true)
|
||||||
mech.fireCDcycle = mech.cycle + Math.floor(50 * b.fireCD); // cool down
|
mech.fireCDcycle = mech.cycle + Math.floor(50 * b.fireCD); // cool down
|
||||||
}
|
}
|
||||||
@@ -3340,7 +3335,6 @@ const b = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//draw laser beam
|
//draw laser beam
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(path[0].x, path[0].y);
|
ctx.moveTo(path[0].x, path[0].y);
|
||||||
@@ -3368,136 +3362,18 @@ const b = {
|
|||||||
time: Math.floor(2 + 33 * Math.random() * Math.random())
|
time: Math.floor(2 + 33 * Math.random() * Math.random())
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// {
|
// {
|
||||||
// name: "maser",
|
// name: "pulse",
|
||||||
// description: "emit a <strong>beam</strong> of collimated coherent <strong>light</strong><br>drains <strong class='color-f'>energy</strong> instead of ammunition",
|
// description: "convert <strong>25%</strong> of your <strong class='color-f'>energy</strong> into a pulsed laser<br>instantly initiates a fusion <strong class='color-e'>explosion</strong>",
|
||||||
// ammo: 0,
|
// ammo: 0,
|
||||||
// ammoPack: Infinity,
|
// ammoPack: Infinity,
|
||||||
// have: false,
|
// have: false,
|
||||||
// fire() {
|
// fire() {
|
||||||
// if (mech.energy < 0.002) {
|
|
||||||
// mech.fireCDcycle = mech.cycle + 100; // cool down if out of energy
|
|
||||||
// } else {
|
|
||||||
// // mech.energy -= mech.fieldRegen + 0.002 * mod.isLaserDiode
|
|
||||||
|
|
||||||
// let range = 2000
|
|
||||||
// const looking = Vector.mult(Vector.rotate({
|
|
||||||
// x: 1,
|
|
||||||
// y: 0
|
|
||||||
// }, mech.angle), range)
|
|
||||||
// const endpoint = Matter.Vector.add(mech.pos, looking)
|
|
||||||
// const hits = Matter.Query.ray(body, mech.pos, endpoint, 100)
|
|
||||||
// for (let i = 0; i < hits.length; i++) {
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
// }
|
||||||
// // console.log(hits, target, range)
|
|
||||||
|
|
||||||
|
|
||||||
// //draw beam
|
|
||||||
// ctx.beginPath();
|
|
||||||
// ctx.moveTo(mech.pos.x, mech.pos.y);
|
|
||||||
// ctx.lineTo(endpoint.x, endpoint.y);
|
|
||||||
// ctx.stroke();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "dwarf star", //14
|
|
||||||
// description: "drop a mine that gravitational pulls in matter",
|
|
||||||
// ammo: 0,
|
|
||||||
// ammoPack: 1000,
|
|
||||||
// have: false,
|
|
||||||
// isStarterGun: false,
|
|
||||||
// fire() {
|
|
||||||
// const me = bullet.length;
|
|
||||||
// const dir = mech.angle
|
|
||||||
// const TOTAL_CYCLES = 1020
|
|
||||||
// bullet[me] = Bodies.circle(mech.pos.x + 30 * Math.cos(dir), mech.pos.y + 30 * Math.sin(dir), 3 , {
|
|
||||||
// density: 0.05,
|
|
||||||
// //frictionAir: 0.01,
|
|
||||||
// restitution: 0,
|
|
||||||
// angle: 0,
|
|
||||||
// friction: 1,
|
|
||||||
// // frictionAir: 1,
|
|
||||||
// endCycle: game.cycle + TOTAL_CYCLES,
|
|
||||||
// dmg: 0, //damage done in addition to the damage from momentum
|
|
||||||
// classType: "bullet",
|
|
||||||
// collisionFilter: {
|
|
||||||
// category: 0x000100,
|
|
||||||
// mask: 0x010011 //mask: 0x000101, //for self collision
|
|
||||||
// },
|
|
||||||
// minDmgSpeed: 5,
|
|
||||||
// range: 0,
|
|
||||||
// beforeDmg() {
|
|
||||||
// this.endCycle = 0;
|
|
||||||
// }, //this.endCycle = 0 //triggers despawn
|
|
||||||
// onEnd() {},
|
|
||||||
// do() {
|
|
||||||
// this.force.y += this.mass * 0.005;
|
|
||||||
// this.range += 0.5
|
|
||||||
|
|
||||||
// //damage nearby mobs
|
|
||||||
// const dmg = b.dmgScale * 0.02
|
|
||||||
// for (let i = 0, len = mob.length; i < len; ++i) {
|
|
||||||
// if (mob[i].alive) {
|
|
||||||
// sub = Vector.sub(this.position, mob[i].position);
|
|
||||||
// dist = Vector.magnitude(sub) - mob[i].radius;
|
|
||||||
// if (dist < this.range) {
|
|
||||||
// mob[i].damage(dmg);
|
|
||||||
// mob[i].locatePlayer();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //pull in body, and power ups?, and bullets?
|
|
||||||
// for (let i = 0, len = body.length; i < len; ++i) {
|
|
||||||
// sub = Vector.sub(this.position, body[i].position);
|
|
||||||
// dist = Vector.magnitude(sub)
|
|
||||||
// if (dist < this.range) {
|
|
||||||
// this.range += body[i].mass * 2
|
|
||||||
// Matter.World.remove(engine.world, body[i]);
|
|
||||||
// body.splice(i, 1);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// //draw
|
|
||||||
// const opacity = (this.endCycle - game.cycle) / TOTAL_CYCLES
|
|
||||||
// ctx.fillStyle = `rgba(170,220,255,${opacity})`;
|
|
||||||
// ctx.beginPath();
|
|
||||||
// ctx.arc(this.position.x, this.position.y, this.range, 0, 2 * Math.PI);
|
|
||||||
// ctx.fill();
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// b.fireProps(60, 0, dir, me); //cd , speed
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "kinetic slugs", //1
|
|
||||||
// description: "fire a large <strong>rod</strong> that does excessive physical <strong class='color-d'>damage</strong><br><em>high recoil</em>",
|
|
||||||
// ammo: 0,
|
|
||||||
// ammoPack: 5,
|
|
||||||
// have: false,
|
|
||||||
//
|
|
||||||
// fire() {
|
|
||||||
// b.muzzleFlash(45);
|
|
||||||
// // mobs.alert(800);
|
|
||||||
// const me = bullet.length;
|
|
||||||
// const dir = mech.angle;
|
|
||||||
// bullet[me] = Bodies.rectangle(mech.pos.x + 50 * Math.cos(mech.angle), mech.pos.y + 50 * Math.sin(mech.angle), 70 , 30 , b.fireAttributes(dir));
|
|
||||||
// b.fireProps(mech.crouch ? 55 : 40, 50, dir, me); //cd , speed
|
|
||||||
// bullet[me].endCycle = game.cycle + Math.floor(180 * mod.isBulletsLastLonger);
|
|
||||||
// bullet[me].do = function () {
|
|
||||||
// this.force.y += this.mass * 0.0005;
|
|
||||||
// };
|
|
||||||
|
|
||||||
// //knock back
|
|
||||||
// const KNOCK = ((mech.crouch) ? 0.025 : 0.25)
|
|
||||||
// player.force.x -= KNOCK * Math.cos(dir)
|
|
||||||
// player.force.y -= KNOCK * Math.sin(dir) * 0.3 //reduce knock back in vertical direction to stop super jumps
|
|
||||||
// },
|
// },
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@@ -407,6 +407,7 @@ const build = {
|
|||||||
const levelsCleared = Math.abs(Number(document.getElementById("starting-level").value))
|
const levelsCleared = Math.abs(Number(document.getElementById("starting-level").value))
|
||||||
level.difficultyIncrease(Math.min(99, levelsCleared * game.difficultyMode)) //increase difficulty based on modes
|
level.difficultyIncrease(Math.min(99, levelsCleared * game.difficultyMode)) //increase difficulty based on modes
|
||||||
level.levelsCleared += levelsCleared;
|
level.levelsCleared += levelsCleared;
|
||||||
|
game.isCheating = true;
|
||||||
document.body.style.cursor = "none";
|
document.body.style.cursor = "none";
|
||||||
document.body.style.overflow = "hidden"
|
document.body.style.overflow = "hidden"
|
||||||
document.getElementById("build-grid").style.display = "none"
|
document.getElementById("build-grid").style.display = "none"
|
||||||
@@ -416,7 +417,6 @@ const build = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openCustomBuildMenu() {
|
function openCustomBuildMenu() {
|
||||||
game.isCheating = true;
|
|
||||||
document.getElementById("build-button").style.display = "none";
|
document.getElementById("build-button").style.display = "none";
|
||||||
const el = document.getElementById("build-grid")
|
const el = document.getElementById("build-grid")
|
||||||
el.style.display = "grid"
|
el.style.display = "grid"
|
||||||
|
|||||||
@@ -704,21 +704,15 @@ const level = {
|
|||||||
});
|
});
|
||||||
xLetter += 10 + width
|
xLetter += 10 + width
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
level.setPosToSpawn(460, -100); //normal spawn
|
level.setPosToSpawn(460, -100); //normal spawn
|
||||||
level.enter.x = -1000000; //hide enter graphic for first level by moving to the far left
|
level.enter.x = -1000000; //hide enter graphic for first level by moving to the far left
|
||||||
level.exit.x = 2800;
|
level.exit.x = 2800;
|
||||||
level.exit.y = -335;
|
level.exit.y = -335;
|
||||||
spawn.mapRect(level.exit.x, level.exit.y + 25, 100, 100); //exit bump
|
spawn.mapRect(level.exit.x, level.exit.y + 25, 100, 100); //exit bump
|
||||||
|
|
||||||
game.zoomScale = 1000 //1400 is normal
|
game.zoomScale = 1000 //1400 is normal
|
||||||
level.defaultZoom = 1600
|
level.defaultZoom = 1600
|
||||||
game.zoomTransition(level.defaultZoom, 1)
|
game.zoomTransition(level.defaultZoom, 1)
|
||||||
|
|
||||||
|
|
||||||
document.body.style.backgroundColor = "#ddd";
|
document.body.style.backgroundColor = "#ddd";
|
||||||
|
|
||||||
level.fill.push({
|
level.fill.push({
|
||||||
x: 2600,
|
x: 2600,
|
||||||
y: -600,
|
y: -600,
|
||||||
@@ -733,7 +727,6 @@ const level = {
|
|||||||
height: 500,
|
height: 500,
|
||||||
color: "#fff"
|
color: "#fff"
|
||||||
});
|
});
|
||||||
|
|
||||||
const lineColor = "#ccc"
|
const lineColor = "#ccc"
|
||||||
level.fillBG.push({
|
level.fillBG.push({
|
||||||
x: 1600,
|
x: 1600,
|
||||||
@@ -742,7 +735,6 @@ const level = {
|
|||||||
height: 100,
|
height: 100,
|
||||||
color: lineColor
|
color: lineColor
|
||||||
});
|
});
|
||||||
|
|
||||||
level.fillBG.push({
|
level.fillBG.push({
|
||||||
x: -55,
|
x: -55,
|
||||||
y: -283,
|
y: -283,
|
||||||
|
|||||||
@@ -1045,7 +1045,7 @@ const mobs = {
|
|||||||
}
|
}
|
||||||
if (Math.random() < mod.isBotSpawner) {
|
if (Math.random() < mod.isBotSpawner) {
|
||||||
b.randomBot(this.position, false)
|
b.randomBot(this.position, false)
|
||||||
bullet[bullet.length - 1].endCycle = game.cycle + 1500 + Math.floor(600 * Math.random())
|
bullet[bullet.length - 1].endCycle = game.cycle + 1000 + Math.floor(400 * Math.random())
|
||||||
}
|
}
|
||||||
if (mod.isExplodeMob) b.explosion(this.position, Math.min(550, Math.sqrt(this.mass + 2.5) * 50))
|
if (mod.isExplodeMob) b.explosion(this.position, Math.min(550, Math.sqrt(this.mass + 2.5) * 50))
|
||||||
if (mod.nailsDeathMob) b.targetedNail(this.position, mod.nailsDeathMob, 40 + 7 * Math.random())
|
if (mod.nailsDeathMob) b.targetedNail(this.position, mod.nailsDeathMob, 40 + 7 * Math.random())
|
||||||
|
|||||||
96
js/mods.js
96
js/mods.js
@@ -137,7 +137,7 @@ const mod = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (mod.haveGunCheck("nail gun") && mod.isIceCrystals) || mod.haveGunCheck("laser") || mod.haveGunCheck("pulse") || mech.fieldUpgrades[mech.fieldMode].name === "plasma torch" || mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave"
|
return (mod.haveGunCheck("nail gun") && mod.isIceCrystals) || mod.haveGunCheck("laser") || mech.fieldUpgrades[mech.fieldMode].name === "plasma torch" || mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave"
|
||||||
},
|
},
|
||||||
requires: "energy based damage",
|
requires: "energy based damage",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -408,7 +408,7 @@ const mod = {
|
|||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.haveGunCheck("pulse") || mod.isMissileField || mod.boomBotCount > 1 || mod.isFlechetteExplode
|
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.isPulseLaser || mod.isMissileField || mod.boomBotCount > 1 || mod.isFlechetteExplode
|
||||||
},
|
},
|
||||||
requires: "an explosive damage source",
|
requires: "an explosive damage source",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -424,7 +424,7 @@ const mod = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.haveGunCheck("pulse") || mod.isMissileField || mod.boomBotCount > 1 || mod.isFlechetteExplode
|
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.isPulseLaser || mod.isMissileField || mod.boomBotCount > 1 || mod.isFlechetteExplode
|
||||||
},
|
},
|
||||||
requires: "an explosive damage source",
|
requires: "an explosive damage source",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -440,7 +440,7 @@ const mod = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.haveGunCheck("pulse") || mod.isMissileField || mod.isFlechetteExplode
|
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.isPulseLaser || mod.isMissileField || mod.isFlechetteExplode
|
||||||
},
|
},
|
||||||
requires: "an explosive damage source",
|
requires: "an explosive damage source",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -457,7 +457,7 @@ const mod = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.isMissileField || mod.isExplodeMob || mod.isFlechetteExplode
|
return mod.haveGunCheck("missiles") || mod.haveGunCheck("flak") || mod.haveGunCheck("grenades") || mod.haveGunCheck("vacuum bomb") || mod.isMissileField || mod.isExplodeMob || mod.isFlechetteExplode || mod.isPulseLaser
|
||||||
},
|
},
|
||||||
requires: "an explosive damage source",
|
requires: "an explosive damage source",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -469,7 +469,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "scrap bots",
|
name: "scrap bots",
|
||||||
description: "<strong>19%</strong> chance to build a <strong>bot</strong> after killing a mob<br>the bot last for about <strong>30</strong> seconds",
|
description: "<strong>20%</strong> chance to build a <strong>bot</strong> after killing a mob<br>the bot last for about <strong>20</strong> seconds",
|
||||||
maxCount: 3,
|
maxCount: 3,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -477,7 +477,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
requires: "a bot",
|
requires: "a bot",
|
||||||
effect() {
|
effect() {
|
||||||
mod.isBotSpawner += 0.19;
|
mod.isBotSpawner += 0.20;
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.isBotSpawner = 0;
|
mod.isBotSpawner = 0;
|
||||||
@@ -2047,22 +2047,6 @@ const mod = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// name: "electromagnetic pulse",
|
|
||||||
// description: "<strong>vacuum bomb's </strong> <strong class='color-e'>explosion</strong> removes<br><strong>80%</strong> of <strong>shields</strong> and <strong>100%</strong> of <strong class='color-f'>energy</strong>",
|
|
||||||
// maxCount: 1,
|
|
||||||
// count: 0,
|
|
||||||
// allowed() {
|
|
||||||
// return mod.haveGunCheck("vacuum bomb")
|
|
||||||
// },
|
|
||||||
// requires: "vacuum bomb",
|
|
||||||
// effect() {
|
|
||||||
// mod.isVacuumShield = true;
|
|
||||||
// },
|
|
||||||
// remove() {
|
|
||||||
// mod.isVacuumShield = false;
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
name: "water shielding",
|
name: "water shielding",
|
||||||
description: "increase <strong>neutron bomb's</strong> range by <strong>20%</strong><br>player is <strong>immune</strong> to its harmful effects",
|
description: "increase <strong>neutron bomb's</strong> range by <strong>20%</strong><br>player is <strong>immune</strong> to its harmful effects",
|
||||||
@@ -2404,11 +2388,11 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "laser diodes",
|
name: "laser diodes",
|
||||||
description: "<strong>lasers</strong> drain <strong>37%</strong> less <strong class='color-f'>energy</strong><br><em>effects laser gun, pulse gun, and laser-bot</em>",
|
description: "<strong>lasers</strong> drain <strong>37%</strong> less <strong class='color-f'>energy</strong><br><em>effects laser-gun and laser-bot</em>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("pulse") || mod.haveGunCheck("laser") || mod.laserBotCount > 1
|
return mod.haveGunCheck("laser") || mod.laserBotCount > 1
|
||||||
},
|
},
|
||||||
requires: "laser",
|
requires: "laser",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2424,7 +2408,7 @@ const mod = {
|
|||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("laser") && !mod.isWideLaser
|
return mod.haveGunCheck("laser") && !mod.isWideLaser && !mod.isPulseLaser
|
||||||
},
|
},
|
||||||
requires: "laser, not wide beam",
|
requires: "laser, not wide beam",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2444,7 +2428,7 @@ const mod = {
|
|||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("laser") && !mod.isWideLaser
|
return mod.haveGunCheck("laser") && !mod.isWideLaser && !mod.isPulseLaser
|
||||||
},
|
},
|
||||||
requires: "laser, not specular reflection",
|
requires: "laser, not specular reflection",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2456,13 +2440,13 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "diffuse beam",
|
name: "diffuse beam",
|
||||||
description: "<strong>laser</strong> beam is <strong>wider</strong> and doesn't <strong>reflect</strong><br>increase laser <strong class='color-d'>damage</strong> by <strong>100%</strong>",
|
description: "<strong>laser</strong> beam is <strong>wider</strong> and doesn't <strong>reflect</strong><br>increase full beam <strong class='color-d'>damage</strong> by <strong>175%</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("laser") && mod.laserReflections < 3 && !mod.beamSplitter
|
return mod.haveGunCheck("laser") && mod.laserReflections < 3 && !mod.beamSplitter && !mod.isPulseLaser
|
||||||
},
|
},
|
||||||
requires: "laser, not specular reflection",
|
requires: "laser, not specular reflection<br>not beam splitter",
|
||||||
effect() {
|
effect() {
|
||||||
if (mod.wideLaser === 0) mod.wideLaser = 3
|
if (mod.wideLaser === 0) mod.wideLaser = 3
|
||||||
mod.isWideLaser = true;
|
mod.isWideLaser = true;
|
||||||
@@ -2474,13 +2458,13 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "output coupler",
|
name: "output coupler",
|
||||||
description: "diffuse <strong>laser</strong> beam is <strong>30%</strong> <strong>wider</strong><br> and the full beam does <strong>30%</strong> more <strong class='color-d'>damage</strong>",
|
description: "<strong>widen</strong> diffuse <strong>laser</strong> beam by <strong>40%</strong><br>increase full beam <strong class='color-d'>damage</strong> by <strong>40%</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("laser") && mod.isWideLaser
|
return mod.haveGunCheck("laser") && mod.isWideLaser
|
||||||
},
|
},
|
||||||
requires: "laser, not specular reflection",
|
requires: "laser, not specular reflection<br>not beam splitter",
|
||||||
effect() {
|
effect() {
|
||||||
mod.wideLaser = 4
|
mod.wideLaser = 4
|
||||||
},
|
},
|
||||||
@@ -2492,29 +2476,35 @@ const mod = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// name: "waste heat recovery",
|
name: "pulse",
|
||||||
// description: "<strong>laser</strong> <strong class='color-d'>damage</strong> grows by <strong>400%</strong> as you fire<br>but you periodically <strong>eject</strong> your <strong class='color-h'>health</strong>",
|
description: "convert <strong>25%</strong> of your <strong class='color-f'>energy</strong> into a pulsed laser<br>instantly initiates a fusion <strong class='color-e'>explosion</strong>",
|
||||||
// maxCount: 1,
|
maxCount: 1,
|
||||||
// count: 0,
|
count: 0,
|
||||||
// allowed() {
|
allowed() {
|
||||||
// return mod.haveGunCheck("laser") && !mod.isEnergyHealth
|
return mod.haveGunCheck("laser") && mod.laserReflections < 3 && !mod.beamSplitter && !mod.isWideLaser
|
||||||
// },
|
},
|
||||||
// requires: "laser<br>not mass-energy equivalence",
|
requires: "laser, not specular reflection<br>not beam splitter, not diffuse",
|
||||||
// effect() {
|
effect() {
|
||||||
// mod.isLaserHealth = true;
|
mod.isPulseLaser = true;
|
||||||
// },
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
// remove() {
|
if (b.guns[i].name === "laser") b.guns[i].fire = b.guns[i].firePulse
|
||||||
// mod.isLaserHealth = false
|
}
|
||||||
// }
|
},
|
||||||
// },
|
remove() {
|
||||||
|
mod.isPulseLaser = false;
|
||||||
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
|
if (b.guns[i].name === "laser") b.guns[i].fire = b.guns[i].fireLaser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "shock wave",
|
name: "shock wave",
|
||||||
description: "mobs caught in <strong>pulse's</strong> explosion are <strong>stunned</strong><br>for up to <strong>2 seconds</strong>",
|
description: "mobs caught in <strong>pulse's</strong> explosion are <strong>stunned</strong><br>for up to <strong>2 seconds</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("pulse")
|
return mod.isPulseLaser
|
||||||
},
|
},
|
||||||
requires: "pulse",
|
requires: "pulse",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2524,14 +2514,13 @@ const mod = {
|
|||||||
mod.isPulseStun = false;
|
mod.isPulseStun = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "neocognitron",
|
name: "neocognitron",
|
||||||
description: "<strong>pulse</strong> automatically <strong>aims</strong> at a nearby mob<br><strong>50%</strong> decreased <strong>delay</strong> after firing",
|
description: "<strong>pulse</strong> automatically <strong>aims</strong> at a nearby mob<br><strong>50%</strong> decreased <strong>delay</strong> after firing",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mod.haveGunCheck("pulse")
|
return mod.isPulseLaser
|
||||||
},
|
},
|
||||||
requires: "pulse",
|
requires: "pulse",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2725,7 +2714,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
requires: "standing wave harmonics",
|
requires: "standing wave harmonics",
|
||||||
effect() {
|
effect() {
|
||||||
mod.blockDmg += 0.66 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
|
mod.blockDmg += 0.7 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.blockDmg = 0;
|
mod.blockDmg = 0;
|
||||||
@@ -3188,5 +3177,6 @@ const mod = {
|
|||||||
isWormSpores: null,
|
isWormSpores: null,
|
||||||
isWormBullets: null,
|
isWormBullets: null,
|
||||||
isWideLaser: null,
|
isWideLaser: null,
|
||||||
wideLaser: null
|
wideLaser: null,
|
||||||
|
isPulseLaser: null
|
||||||
}
|
}
|
||||||
11
js/player.js
11
js/player.js
@@ -1273,9 +1273,9 @@ const mech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "standing wave harmonics",
|
name: "standing wave harmonics",
|
||||||
description: "three oscillating <strong>shields</strong> are permanently active<br><strong>blocking</strong> has no <strong>cool down</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>20%</strong>",
|
description: "<strong>3</strong> oscillating <strong>shields</strong> are permanently active<br><strong>blocking</strong> drains <strong class='color-f'>energy</strong><br><strong>blocking</strong> has no <strong>cool down</strong>",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
mech.fieldHarmReduction = 0.80;
|
// mech.fieldHarmReduction = 0.80;
|
||||||
mech.fieldBlockCD = 0;
|
mech.fieldBlockCD = 0;
|
||||||
mech.hold = function () {
|
mech.hold = function () {
|
||||||
if (mech.isHolding) {
|
if (mech.isHolding) {
|
||||||
@@ -1390,7 +1390,7 @@ const mech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "nano-scale manufacturing",
|
name: "nano-scale manufacturing",
|
||||||
description: "excess <strong class='color-f'>energy</strong> used to build <strong>drones</strong><br>increase <strong class='color-f'>energy</strong> regeneration by <strong>100%</strong>",
|
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>increase <strong class='color-f'>energy</strong> regeneration by <strong>100%</strong>",
|
||||||
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) {
|
||||||
@@ -1420,7 +1420,6 @@ const mech = {
|
|||||||
mech.energy -= 0.33;
|
mech.energy -= 0.33;
|
||||||
b.drone(1)
|
b.drone(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (mech.isHolding) {
|
if (mech.isHolding) {
|
||||||
mech.drawHold(mech.holdingTarget);
|
mech.drawHold(mech.holdingTarget);
|
||||||
@@ -1445,13 +1444,13 @@ const mech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "negative mass field",
|
name: "negative mass field",
|
||||||
description: "use <strong class='color-f'>energy</strong> to nullify <strong style='letter-spacing: 7px;'>gravity</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>45%</strong><br><strong>blocks</strong> held by the field have a lower <strong>mass</strong>",
|
description: "use <strong class='color-f'>energy</strong> to nullify <strong style='letter-spacing: 7px;'>gravity</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>40%</strong><br><strong>blocks</strong> held by the field have a lower <strong>mass</strong>",
|
||||||
fieldDrawRadius: 0,
|
fieldDrawRadius: 0,
|
||||||
effect: () => {
|
effect: () => {
|
||||||
mech.fieldFire = true;
|
mech.fieldFire = true;
|
||||||
mech.holdingMassScale = 0.03; //can hold heavier blocks with lower cost to jumping
|
mech.holdingMassScale = 0.03; //can hold heavier blocks with lower cost to jumping
|
||||||
mech.fieldMeterColor = "#000"
|
mech.fieldMeterColor = "#000"
|
||||||
mech.fieldHarmReduction = 0.55;
|
mech.fieldHarmReduction = 0.6;
|
||||||
mech.fieldDrawRadius = 0;
|
mech.fieldDrawRadius = 0;
|
||||||
|
|
||||||
mech.hold = function () {
|
mech.hold = function () {
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ const spawn = {
|
|||||||
me.frictionAir = 0.01
|
me.frictionAir = 0.01
|
||||||
me.seeAtDistance2 = 9000000;
|
me.seeAtDistance2 = 9000000;
|
||||||
me.accelMag = 0.00062 * game.accelScale;
|
me.accelMag = 0.00062 * game.accelScale;
|
||||||
Matter.Body.setDensity(me, 0.001); //normal is 0.001
|
Matter.Body.setDensity(me, 0.0006); //normal is 0.001
|
||||||
me.collisionFilter.mask = cat.bullet | cat.player
|
me.collisionFilter.mask = cat.bullet | cat.player
|
||||||
me.memory = Infinity;
|
me.memory = Infinity;
|
||||||
me.seePlayerFreq = 60
|
me.seePlayerFreq = 60
|
||||||
|
|||||||
36
todo.txt
36
todo.txt
@@ -1,15 +1,33 @@
|
|||||||
|
|
||||||
gun: vacuum bomb is removed
|
gun: pulse is now a mod for laser
|
||||||
mod: vacuum bomb - grenades fire slower, explode bigger and, suck everything towards them
|
|
||||||
|
|
||||||
laser and diffuse laser graphics are better
|
|
||||||
mod: output coupler - diffuse laser beam is 30% wider and does 30% more damage
|
|
||||||
requires diffuse beam
|
|
||||||
|
|
||||||
level number doesn't increase if you skip the boss (in the late game)
|
|
||||||
|
|
||||||
************** TODO - n-gon **************
|
************** TODO - n-gon **************
|
||||||
|
|
||||||
|
optional setting for people with desktops that want double mobs
|
||||||
|
|
||||||
|
hard mode should match the pace of why, but with less difficulty
|
||||||
|
2x power up chances, same as why for all difficulties
|
||||||
|
adjust difficulty levels
|
||||||
|
easy: 1
|
||||||
|
normal: 2
|
||||||
|
hard: 3
|
||||||
|
why: 4
|
||||||
|
|
||||||
|
combine more stuff?
|
||||||
|
____ mod for ____
|
||||||
|
flak -> missiles
|
||||||
|
neutron bomb -> mines
|
||||||
|
iceIX -> foam
|
||||||
|
flechettes -> nail gun
|
||||||
|
|
||||||
|
|
||||||
|
let beam splitter work with pulse
|
||||||
|
|
||||||
|
neutron bomb as a mod for mines
|
||||||
|
|
||||||
|
mod: stealth field - mark a mob, it you next kill is that mob get a bonus power up
|
||||||
|
run only at the start of a new level
|
||||||
|
|
||||||
add an ending to the game
|
add an ending to the game
|
||||||
revamp the boss level, or add a new final level
|
revamp the boss level, or add a new final level
|
||||||
final level requires you to kill something
|
final level requires you to kill something
|
||||||
@@ -29,7 +47,7 @@ time dilation mod rework / buff (time dilation is cool, but it can feel like a c
|
|||||||
take no damage
|
take no damage
|
||||||
can fire
|
can fire
|
||||||
2x move jump fire while field is active
|
2x move jump fire while field is active
|
||||||
33% move jump fire always
|
40% move jump fire always
|
||||||
|
|
||||||
mod - after a mob or shield dies, remaining dots look for a new nearby host
|
mod - after a mob or shield dies, remaining dots look for a new nearby host
|
||||||
or mod: radiation effects can spread to nearby mobs
|
or mod: radiation effects can spread to nearby mobs
|
||||||
|
|||||||
Reference in New Issue
Block a user