mine buffs
20% damage for all mine modes laser mines spin super fast when it first finds a target, and a bit faster overall mine sentry lasts 17 seconds (2 more seconds) desublimated ammunition comes with 7 JUNK tech several foam tech do 5% less damage shotgun has 1/9 less ammo apomixis now requires 11 research historyBoss takes 25% longer to reach it's minimum follow distance bug fixes
This commit is contained in:
29
js/bullet.js
29
js/bullet.js
@@ -1607,12 +1607,12 @@ const b = {
|
||||
bulletType: "mine",
|
||||
angle: m.angle,
|
||||
friction: 0,
|
||||
frictionAir: 0.05,
|
||||
frictionAir: 0.025,
|
||||
restitution: 0.5,
|
||||
dmg: 0, // 0.14 //damage done in addition to the damage from momentum
|
||||
minDmgSpeed: 2,
|
||||
lookFrequency: 67 + Math.floor(7 * Math.random()),
|
||||
drain: 0.45 * tech.isLaserDiode * tech.laserFieldDrain,
|
||||
drain: 0.5 * tech.isLaserDiode * tech.laserFieldDrain,
|
||||
isArmed: false,
|
||||
torqueMagnitude: 0.000003 * (Math.round(Math.random()) ? 1 : -1),
|
||||
range: 1500,
|
||||
@@ -1645,6 +1645,7 @@ const b = {
|
||||
) {
|
||||
if (tech.isMineStun) b.AoEStunEffect(this.position, 1300);
|
||||
this.do = this.laserSpin
|
||||
if (this.angularSpeed < 0.5) this.torque += this.inertia * this.torqueMagnitude * 200 //spin
|
||||
this.endCycle = simulation.cycle + 360 + 120
|
||||
// if (this.angularSpeed < 0.01) this.torque += this.inertia * this.torqueMagnitude * 5 //spin
|
||||
this.isArmed = true
|
||||
@@ -1658,7 +1659,7 @@ const b = {
|
||||
//drain energy
|
||||
if (m.energy > this.drain) {
|
||||
m.energy -= this.drain
|
||||
if (this.angularSpeed < 0.02) this.torque += this.inertia * this.torqueMagnitude //spin
|
||||
if (this.angularSpeed < 0.05) this.torque += this.inertia * this.torqueMagnitude //spin
|
||||
|
||||
//fire lasers
|
||||
ctx.strokeStyle = tech.laserColor;
|
||||
@@ -1791,6 +1792,15 @@ const b = {
|
||||
// }
|
||||
// },
|
||||
arm() {
|
||||
//false alert
|
||||
// for (let i = 0, len = mob.length; i < len; i++) {
|
||||
// if (!mob[i].seePlayer.recall && Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position)) < 4000000) { //2000 range
|
||||
// mob[i].seePlayer.recall = 240; //cycles before mob falls a sleep
|
||||
// mob[i].seePlayer.position.x = this.position.x;
|
||||
// mob[i].seePlayer.position.y = this.position.y;
|
||||
// }
|
||||
// }
|
||||
|
||||
this.collisionFilter.mask = cat.map | cat.body | cat.mob | cat.mobBullet | cat.mobShield | cat.bullet //can now collide with other bullets
|
||||
this.lookFrequency = simulation.cycle + 60
|
||||
this.do = function() { //overwrite the do method for this bullet
|
||||
@@ -1819,7 +1829,7 @@ const b = {
|
||||
if (tech.isMineStun) b.AoEStunEffect(this.position, 700 + mob[i].radius + random);
|
||||
if (tech.isMineSentry) {
|
||||
this.lookFrequency = 8 + Math.floor(3 * Math.random())
|
||||
this.endCycle = simulation.cycle + 960
|
||||
this.endCycle = simulation.cycle + 1020
|
||||
this.do = function() { //overwrite the do method for this bullet
|
||||
this.force.y += this.mass * 0.002; //extra gravity
|
||||
if (!(simulation.cycle % this.lookFrequency) && !m.isBodiesAsleep) { //find mob targets
|
||||
@@ -2597,7 +2607,7 @@ const b = {
|
||||
inertia: Infinity,
|
||||
frictionAir: 0.003,
|
||||
dmg: 0, //damage on impact
|
||||
damage: (tech.isFastFoam ? 0.044 : 0.011) * (tech.isFoamTeleport ? 1.60 : 1), //damage done over time
|
||||
damage: (tech.isFastFoam ? 0.039 : 0.011) * (tech.isFoamTeleport ? 1.55 : 1), //damage done over time
|
||||
scale: 1 - 0.006 / tech.isBulletsLastLonger * (tech.isFastFoam ? 1.65 : 1),
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
@@ -3874,8 +3884,8 @@ const b = {
|
||||
name: "shotgun",
|
||||
description: "fire a wide <strong>burst</strong> of short range <strong> bullets</strong>",
|
||||
ammo: 0,
|
||||
ammoPack: 4.3,
|
||||
defaultAmmoPack: 4.3,
|
||||
ammoPack: 4,
|
||||
defaultAmmoPack: 4,
|
||||
have: false,
|
||||
do() {},
|
||||
fire() {
|
||||
@@ -4641,10 +4651,9 @@ const b = {
|
||||
have: false,
|
||||
do() {},
|
||||
fire() {
|
||||
|
||||
if (m.crouch) {
|
||||
if (tech.isLaserMine) {
|
||||
const speed = 40
|
||||
const speed = 30
|
||||
const velocity = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) }
|
||||
b.laserMine(m.pos, velocity)
|
||||
} else {
|
||||
@@ -4885,7 +4894,7 @@ const b = {
|
||||
if (!simulation.paused) {
|
||||
b.foam(position, Vector.rotate(velocity, spread), radius)
|
||||
// (tech.isFastFoam ? 0.044 : 0.011) * (tech.isFoamTeleport ? 1.60 : 1)
|
||||
bullet[bullet.length - 1].damage *= (1 + 0.75 * tech.foamFutureFire)
|
||||
bullet[bullet.length - 1].damage *= (1 + 0.7 * tech.foamFutureFire)
|
||||
}
|
||||
}, 250 * tech.foamFutureFire);
|
||||
} else {
|
||||
|
||||
@@ -1253,3 +1253,4 @@ function cycle() {
|
||||
// }
|
||||
}
|
||||
}
|
||||
// simulation.introPlayer()
|
||||
@@ -17,7 +17,7 @@ const level = {
|
||||
// b.giveGuns("mine")
|
||||
// b.giveGuns("nail gun")
|
||||
// m.setField("wormhole")
|
||||
// tech.giveTech("ice crystal nucleation")
|
||||
// tech.giveTech("laser-mines")
|
||||
// tech.giveTech("irradiated nails")
|
||||
// for (let i = 0; i < 9; i++) tech.giveTech("MIRV")
|
||||
|
||||
@@ -2271,8 +2271,8 @@ const level = {
|
||||
// spawn.laserBombingBoss(1900, -500)
|
||||
// for (let i = 0; i < 5; i++) spawn.focuser(1900, -500)
|
||||
|
||||
spawn.sniper(1900, -500)
|
||||
spawn.grenadier(1900, -500)
|
||||
// spawn.sniper(1900, -500)
|
||||
// spawn.grenadier(1900, -500)
|
||||
// spawn.sneaker(1900, -500)
|
||||
// spawn.shield(mob[mob.length - 1], 1900, -500, 1);
|
||||
// mob[mob.length - 1].isShielded = true
|
||||
|
||||
@@ -501,6 +501,52 @@ const simulation = {
|
||||
},
|
||||
fpsInterval: 0, //set in startGame
|
||||
then: null,
|
||||
introPlayer() { //not work, but trying to show player in the intro screen
|
||||
setTimeout(() => {
|
||||
document.getElementById("info").style.display = "none";
|
||||
document.getElementById("splash").style.display = "none"; //hides the element that spawned the function
|
||||
|
||||
simulation.clearMap()
|
||||
m.draw = m.drawDefault //set the play draw to normal, undoing some junk tech
|
||||
m.spawn(); //spawns the player
|
||||
m.look = m.lookDefault
|
||||
|
||||
|
||||
//level
|
||||
|
||||
level.testing(); //not in rotation, used for testing
|
||||
|
||||
|
||||
//load level
|
||||
simulation.setZoom();
|
||||
level.addToWorld(); //add bodies to game engine
|
||||
simulation.draw.setPaths();
|
||||
|
||||
function cycle() {
|
||||
simulation.gravity();
|
||||
Engine.update(engine, simulation.delta);
|
||||
simulation.wipe();
|
||||
if (m.onGround) {
|
||||
m.groundControl()
|
||||
} else {
|
||||
m.airControl()
|
||||
}
|
||||
m.move();
|
||||
// m.look();
|
||||
// simulation.camera();
|
||||
m.draw();
|
||||
m.hold();
|
||||
simulation.draw.drawMapPath();
|
||||
ctx.restore();
|
||||
if (simulation.onTitlePage) requestAnimationFrame(cycle);
|
||||
}
|
||||
requestAnimationFrame(cycle)
|
||||
|
||||
|
||||
|
||||
|
||||
}, 1000);
|
||||
},
|
||||
startGame(isBuildRun = false) {
|
||||
simulation.clearMap()
|
||||
if (!isBuildRun) { //if a build run logic flow returns to "experiment-button").addEventListener
|
||||
|
||||
@@ -1496,7 +1496,7 @@ const spawn = {
|
||||
let targets = [] //track who is in the node boss, for shields
|
||||
mobs.spawn(x, y, 6, radius, "#b386e8");
|
||||
let me = mob[mob.length - 1];
|
||||
Matter.Body.setDensity(me, 0.0032); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
Matter.Body.setDensity(me, 0.0032); //extra dense //normal is 0.001 //makes effective life much larger and damage on collision
|
||||
me.isBoss = true;
|
||||
|
||||
targets.push(me.id) //add to shield protection
|
||||
@@ -1538,7 +1538,7 @@ const spawn = {
|
||||
Composite.add(engine.world, cons[cons.length - 1]);
|
||||
cons[len2].length = 100 + 1.5 * radius;
|
||||
me.cons2 = cons[len2];
|
||||
me.damageReduction = 0.25
|
||||
me.damageReduction = 0.25 //normal is 1, most bosses have 0.25
|
||||
me.do = function() {
|
||||
// this.armor();
|
||||
this.gravity();
|
||||
@@ -1694,7 +1694,7 @@ const spawn = {
|
||||
|
||||
me.showHealthBar = false; //drawn in this.awake
|
||||
me.delayLimit = 60 + Math.floor(30 * Math.random());
|
||||
me.followDelay = 600 - Math.floor(60 * Math.random())
|
||||
me.followDelay = 600 - Math.floor(90 * Math.random())
|
||||
me.stroke = "transparent"; //used for drawGhost
|
||||
me.collisionFilter.mask = cat.bullet | cat.body
|
||||
me.memory = Infinity
|
||||
@@ -1772,7 +1772,7 @@ const spawn = {
|
||||
// ctx.fillStyle = "rgba(150,0,255,0.03)";
|
||||
// ctx.fill();
|
||||
if (!m.isBodiesAsleep && !this.isStunned && !this.isSlowed) {
|
||||
if (this.followDelay > this.delayLimit) this.followDelay -= 0.2;
|
||||
if (this.followDelay > this.delayLimit) this.followDelay -= 0.15;
|
||||
let history = m.history[(m.cycle - Math.floor(this.followDelay)) % 600]
|
||||
Matter.Body.setPosition(this, { x: history.position.x, y: history.position.y - history.yOff + 24.2859 }) //bullets move with player
|
||||
}
|
||||
|
||||
80
js/tech.js
80
js/tech.js
@@ -470,7 +470,7 @@
|
||||
},
|
||||
{
|
||||
name: "desublimated ammunition",
|
||||
description: "use <strong>50%</strong> less <strong class='color-g'>ammo</strong> when <strong>crouching</strong>",
|
||||
description: "use <strong>50%</strong> less <strong class='color-g'>ammo</strong> when <strong>crouching</strong><<br>strong>+6</strong> <strong class='color-j'>JUNK</strong> to the potential <strong class='color-m'>tech</strong> pool",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
@@ -481,11 +481,32 @@
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.isCrouchAmmo = true
|
||||
tech.addJunkTechToPool(6)
|
||||
},
|
||||
remove() {
|
||||
tech.isCrouchAmmo = false;
|
||||
if (this.count > 0) tech.removeJunkTechFromPool(6)
|
||||
}
|
||||
},
|
||||
// <strong class='color-j'>JUNK</strong> to the potential <strong class='color-m'>tech</strong> pool",
|
||||
// maxCount: 9,
|
||||
// count: 0,
|
||||
// frequency: 1,
|
||||
// frequencyDefault: 1,
|
||||
// allowed() {
|
||||
// return true
|
||||
// },
|
||||
// requires: "",
|
||||
// effect() {
|
||||
// tech.bonusEnergy += 0.6
|
||||
// m.setMaxEnergy()
|
||||
// tech.addJunkTechToPool(10)
|
||||
// },
|
||||
// remove() {
|
||||
// tech.bonusEnergy = 0;
|
||||
// m.setMaxEnergy()
|
||||
// if (this.count > 0) tech.removeJunkTechFromPool(10)
|
||||
// }
|
||||
{
|
||||
name: "gun turret",
|
||||
description: "reduce <strong class='color-harm'>harm</strong> by <strong>55%</strong> when <strong>crouching</strong>",
|
||||
@@ -3155,23 +3176,54 @@
|
||||
},
|
||||
{
|
||||
name: "apomixis",
|
||||
description: "after reaching <strong>100%</strong> <strong class='color-dup'>duplication</strong> chance<br>immediately spawn <strong>8 bosses</strong>",
|
||||
description: "use <strong>11</strong> <strong class='color-r'>research</strong> to spawn <strong>8 bosses</strong><br>immediately after reaching <strong>100%</strong> <strong class='color-dup'>duplication</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 4,
|
||||
frequencyDefault: 4,
|
||||
frequency: 3,
|
||||
frequencyDefault: 3,
|
||||
allowed() {
|
||||
return tech.duplicationChance() > 0.6
|
||||
return tech.duplicationChance() > 0.6 && powerUps.research.count > 10
|
||||
},
|
||||
requires: "duplication chance above 60%",
|
||||
effect() {
|
||||
tech.is100Duplicate = true;
|
||||
tech.maxDuplicationEvent()
|
||||
},
|
||||
remove() {
|
||||
tech.is100Duplicate = false;
|
||||
for (let i = 0; i < 11; i++) {
|
||||
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
if (tech.is100Duplicate) {
|
||||
tech.is100Duplicate = false;
|
||||
if (this.count > 0) powerUps.research.changeRerolls(11)
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// name: "zero point energy",
|
||||
// description: "use <strong>2</strong> <strong class='color-r'>research</strong> to<br>increase your <strong>maximum</strong> <strong class='color-f'>energy</strong> by <strong>74</strong>",
|
||||
// isFieldTech: true,
|
||||
// maxCount: 1,
|
||||
// count: 0,
|
||||
// frequency: 3,
|
||||
// frequencyDefault: 3,
|
||||
// allowed() {
|
||||
// return (m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && (build.isExperimentSelection || powerUps.research.count > 1)
|
||||
// },
|
||||
// requires: "standing wave harmonics or pilot wave",
|
||||
// effect() {
|
||||
// tech.harmonicEnergy = 0.74
|
||||
// m.setMaxEnergy()
|
||||
// for (let i = 0; i < 2; i++) {
|
||||
// if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
||||
// }
|
||||
// },
|
||||
// remove() {
|
||||
// tech.harmonicEnergy = 0;
|
||||
// m.setMaxEnergy()
|
||||
// if (this.count > 0) powerUps.research.changeRerolls(2)
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: "exchange symmetry",
|
||||
description: "convert <strong>1</strong> random <strong class='color-m'>tech</strong> into <strong>3</strong> new <strong class='color-g'>guns</strong><br><em>recursive tech lose all stacks</em>",
|
||||
@@ -3835,6 +3887,7 @@
|
||||
if (b.guns[i].name === "shotgun") {
|
||||
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 0.5);
|
||||
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * 0.5
|
||||
simulation.makeGunHUD();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3847,6 +3900,7 @@
|
||||
if (b.guns[i].name === "shotgun") {
|
||||
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack;
|
||||
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 2);
|
||||
simulation.makeGunHUD();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4455,7 +4509,7 @@
|
||||
},
|
||||
{
|
||||
name: "sentry",
|
||||
description: "instead of detonating, <strong>mines</strong> <strong>target</strong> mobs<br>with a stream of nails for about <strong>15</strong> seconds",
|
||||
description: "instead of detonating, <strong>mines</strong> <strong>target</strong> mobs<br>with a stream of nails for about <strong>17</strong> seconds",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4771,6 +4825,7 @@
|
||||
if (b.guns[i].name === "drones") {
|
||||
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * 0.25
|
||||
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 0.25)
|
||||
simulation.makeGunHUD();
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4781,6 +4836,7 @@
|
||||
if (b.guns[i].name === "drones") {
|
||||
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack
|
||||
b.guns[i].ammo = b.guns[i].ammo * 4
|
||||
simulation.makeGunHUD();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4845,7 +4901,7 @@
|
||||
},
|
||||
{
|
||||
name: "uncertainty principle",
|
||||
description: "<strong>foam</strong> bubbles randomly change <strong>position</strong><br>increase <strong>foam</strong> <strong class='color-d'>damage</strong> per second by <strong>60%</strong>",
|
||||
description: "<strong>foam</strong> bubbles randomly change <strong>position</strong><br>increase <strong>foam</strong> <strong class='color-d'>damage</strong> per second by <strong>55%</strong>",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4883,7 +4939,7 @@
|
||||
},
|
||||
{
|
||||
name: "aerogel",
|
||||
description: "<strong>foam</strong> bubbles <strong>float</strong> and dissipate <strong>50%</strong> faster<br>increase <strong>foam</strong> <strong class='color-d'>damage</strong> per second by <strong>300%</strong>",
|
||||
description: "<strong>foam</strong> bubbles <strong>float</strong> and dissipate <strong>50%</strong> faster<br>increase <strong>foam</strong> <strong class='color-d'>damage</strong> per second by <strong>260%</strong>",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4904,7 +4960,7 @@
|
||||
},
|
||||
{
|
||||
name: "quantum foam",
|
||||
description: "<strong>foam</strong> gun fires <strong>0.25</strong> seconds into the <strong>future</strong><br>increase <strong>foam</strong> gun <strong class='color-d'>damage</strong> by <strong>70%</strong>",
|
||||
description: "<strong>foam</strong> gun fires <strong>0.25</strong> seconds into the <strong>future</strong><br>increase <strong>foam</strong> gun <strong class='color-d'>damage</strong> by <strong>66%</strong>",
|
||||
isGunTech: true,
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
|
||||
27
todo.txt
27
todo.txt
@@ -1,9 +1,36 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
20% damage for all mine modes
|
||||
laser mines spin super fast when it first finds a target, and a bit faster overall
|
||||
mine sentry lasts 17 seconds (2 more seconds)
|
||||
|
||||
desublimated ammunition comes with 7 JUNK tech
|
||||
several foam tech do 5% less damage
|
||||
shotgun has 1/9 less ammo
|
||||
apomixis now requires 11 research
|
||||
historyBoss takes 25% longer to reach it's minimum follow distance
|
||||
|
||||
bug fixes
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
work on necroBoss from TheShwarma
|
||||
make spawned blocks in the direction of the player
|
||||
make it search the level for blocks, but also kinda avoid the player
|
||||
|
||||
falling particle rain
|
||||
what causes it?
|
||||
after taking damage
|
||||
mines
|
||||
grenades
|
||||
mines and grenades
|
||||
once a second you just eject rain upwards
|
||||
after collecting a power up
|
||||
basically spores with no guidance
|
||||
lag if too many particles?
|
||||
|
||||
wormhole show where you would go on mouse down
|
||||
trigger teleport on release
|
||||
|
||||
look into 360 wave beam lag
|
||||
|
||||
aoe effect pushes mobs away, then rapidly pulls them in
|
||||
|
||||
Reference in New Issue
Block a user