moving code to my other computer
This commit is contained in:
@@ -5112,7 +5112,7 @@ const b = {
|
|||||||
minDmgSpeed: 2,
|
minDmgSpeed: 2,
|
||||||
lookFrequency: 20 + Math.floor(7 * Math.random()) - 13 * tech.isLaserBotUpgrade,
|
lookFrequency: 20 + Math.floor(7 * Math.random()) - 13 * tech.isLaserBotUpgrade,
|
||||||
range: (700 + 500 * tech.isLaserBotUpgrade) * (1 + 0.1 * Math.random()),
|
range: (700 + 500 * tech.isLaserBotUpgrade) * (1 + 0.1 * Math.random()),
|
||||||
drainThreshold: tech.isEnergyHealth ? 0.6 : 0.4,// laser bot will not attack if the player is below this energy
|
drainThreshold: 0.15 + 0.5 * Math.random() + (tech.isEnergyHealth ? 0.3 : 0),// laser bot will not attack if the player is below this energy
|
||||||
drain: (0.57 - 0.45 * tech.isLaserBotUpgrade) * tech.laserDrain,
|
drain: (0.57 - 0.45 * tech.isLaserBotUpgrade) * tech.laserDrain,
|
||||||
laserDamage: 0.75 + 0.75 * tech.isLaserBotUpgrade,
|
laserDamage: 0.75 + 0.75 * tech.isLaserBotUpgrade,
|
||||||
endCycle: Infinity,
|
endCycle: Infinity,
|
||||||
|
|||||||
21
js/level.js
21
js/level.js
@@ -18,7 +18,7 @@ const level = {
|
|||||||
// simulation.enableConstructMode() //tech.giveTech('motion sickness') //used to build maps in testing mode
|
// simulation.enableConstructMode() //tech.giveTech('motion sickness') //used to build maps in testing mode
|
||||||
// simulation.isHorizontalFlipped = true
|
// simulation.isHorizontalFlipped = true
|
||||||
// tech.giveTech("performance")
|
// tech.giveTech("performance")
|
||||||
// level.difficultyIncrease(4 * 4) //30 is near max on hard //60 is near max on why
|
// level.difficultyIncrease(12 * 4) //30 is near max on hard //60 is near max on why
|
||||||
// spawn.setSpawnList();
|
// spawn.setSpawnList();
|
||||||
// spawn.setSpawnList();
|
// spawn.setSpawnList();
|
||||||
// m.maxHealth = m.health = 100
|
// m.maxHealth = m.health = 100
|
||||||
@@ -28,16 +28,17 @@ const level = {
|
|||||||
// tech.tech[297].frequency = 100
|
// tech.tech[297].frequency = 100
|
||||||
// m.couplingChange(5)
|
// m.couplingChange(5)
|
||||||
// m.setField("standing wave") //1 standing wave 2 perfect diamagnetism 3 negative mass 4 molecular assembler 5 plasma torch 6 time dilation 7 metamaterial cloaking 8 pilot wave 9 wormhole
|
// m.setField("standing wave") //1 standing wave 2 perfect diamagnetism 3 negative mass 4 molecular assembler 5 plasma torch 6 time dilation 7 metamaterial cloaking 8 pilot wave 9 wormhole
|
||||||
|
// m.energy = 0
|
||||||
// simulation.molecularMode = 2
|
// simulation.molecularMode = 2
|
||||||
// m.damage(0.1);
|
// m.damage(0.1);
|
||||||
// b.giveGuns("nail gun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
// b.giveGuns("nail gun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||||
// b.giveGuns("foam") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
// b.giveGuns("foam") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||||
// b.guns[3].ammo = 100000000
|
// b.guns[3].ammo = 100000000
|
||||||
// tech.giveTech("recycling")
|
// tech.giveTech("surface plasmons")
|
||||||
// tech.giveTech("fine-structure constant")
|
// tech.giveTech("relativistic momentum")
|
||||||
// for (let i = 0; i < 1; ++i) tech.giveTech("bot fabrication")
|
// for (let i = 0; i < 1; ++i) tech.giveTech("dye laser")
|
||||||
// for (let i = 0; i < 1; ++i) tech.giveTech("accretion")
|
// for (let i = 0; i < 1; ++i) tech.giveTech("free-electron laser")
|
||||||
// for (let i = 0; i < 1; ++i) tech.giveTech("superdeterminism")
|
// for (let i = 0; i < 1; ++i) tech.giveTech("causality bots")
|
||||||
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("foam-bot") });
|
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("foam-bot") });
|
||||||
// for (let i = 0; i < 1; i++) tech.giveTech("foam-bot upgrade")
|
// for (let i = 0; i < 1; i++) tech.giveTech("foam-bot upgrade")
|
||||||
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
|
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
|
||||||
@@ -48,8 +49,8 @@ const level = {
|
|||||||
// spawn.nodeGroup(2200, -300, "sniper")
|
// spawn.nodeGroup(2200, -300, "sniper")
|
||||||
// spawn.nodeGroup(2200, -300, "sniper")
|
// spawn.nodeGroup(2200, -300, "sniper")
|
||||||
// spawn.mantisBoss(1900, -500)
|
// spawn.mantisBoss(1900, -500)
|
||||||
// spawn.sneakBoss(1900, -500)
|
// spawn.cellBoss(1900, -500)
|
||||||
// spawn.starter(1900, -500, 250)
|
// for (let i = 0; i < 5; ++i) spawn.sneaker(1900, -500, 50)
|
||||||
// spawn.sneaker(1900, -500, 25)
|
// spawn.sneaker(1900, -500, 25)
|
||||||
// spawn.sniper(2000, -450)
|
// spawn.sniper(2000, -450)
|
||||||
// spawn.zombie(1000 + 1000 * Math.random(), -500 + 300 * Math.random(), 30, 5, "white") // zombie(x, y, radius, sides, color)
|
// spawn.zombie(1000 + 1000 * Math.random(), -500 + 300 * Math.random(), 30, 5, "white") // zombie(x, y, radius, sides, color)
|
||||||
@@ -16587,8 +16588,8 @@ const level = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
spawn.randomLevelBoss(17902, -1689, ["blinkBoss", "shooterBoss", "launcherBoss", "pulsarBoss", "blockBoss", "bladeBoss", "revolutionBoss", "spawnerBossCulture", "spiderBoss", "sneakBoss", "snakeSpitBoss"])
|
// spawn.randomLevelBoss(17902, -1689, ["blinkBoss", "shooterBoss", "launcherBoss", "pulsarBoss", "blockBoss", "bladeBoss", "revolutionBoss", "spawnerBossCulture", "spiderBoss", "sneakBoss", "snakeSpitBoss"])
|
||||||
|
spawn.randomLevelBoss(17902, -1689, ["launcherBoss", "laserTargetingBoss", "blinkBoss", "streamBoss", "historyBoss", "grenadierBoss", "blockBoss", "revolutionBoss", "slashBoss"]);
|
||||||
|
|
||||||
// powerUps.spawnStartingPowerUps(1475, -1175);
|
// powerUps.spawnStartingPowerUps(1475, -1175);
|
||||||
// spawn.debris(750, -2200, 3700, 16); //16 debris per level
|
// spawn.debris(750, -2200, 3700, 16); //16 debris per level
|
||||||
|
|||||||
123
js/player.js
123
js/player.js
@@ -455,6 +455,7 @@ const m = {
|
|||||||
m.alive = false;
|
m.alive = false;
|
||||||
simulation.paused = true;
|
simulation.paused = true;
|
||||||
m.health = 0;
|
m.health = 0;
|
||||||
|
simulation.ephemera = []
|
||||||
document.getElementById("defense-bar").style.display = "none"; //hide defense
|
document.getElementById("defense-bar").style.display = "none"; //hide defense
|
||||||
document.getElementById("damage-bar").style.display = "none"
|
document.getElementById("damage-bar").style.display = "none"
|
||||||
m.displayHealth();
|
m.displayHealth();
|
||||||
@@ -468,7 +469,7 @@ const m = {
|
|||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
storeTech() { //store a copy of your tech, it will show up at your location next run
|
storeTech() { //store a copy of your tech, it will show up at your location next run in the entanglement power up
|
||||||
if (localSettings.isAllowed && !simulation.isCheating) {
|
if (localSettings.isAllowed && !simulation.isCheating) {
|
||||||
const gunList = [] //store gun names
|
const gunList = [] //store gun names
|
||||||
for (i = 0, len = b.inventory.length; i < len; i++) gunList.push(b.inventory[i])
|
for (i = 0, len = b.inventory.length; i < len; i++) gunList.push(b.inventory[i])
|
||||||
@@ -1950,7 +1951,6 @@ const m = {
|
|||||||
m.fieldRegen = 0.001 //6 energy per second
|
m.fieldRegen = 0.001 //6 energy per second
|
||||||
}
|
}
|
||||||
if (m.fieldMode === 0 || m.fieldMode === 4) m.fieldRegen += 0.00133 * m.coupling //return `generate <strong>${(6*couple).toFixed(0)}</strong> <strong class='color-f'>energy</strong> per second`
|
if (m.fieldMode === 0 || m.fieldMode === 4) m.fieldRegen += 0.00133 * m.coupling //return `generate <strong>${(6*couple).toFixed(0)}</strong> <strong class='color-f'>energy</strong> per second`
|
||||||
|
|
||||||
if (tech.isTimeCrystals) {
|
if (tech.isTimeCrystals) {
|
||||||
m.fieldRegen *= 3
|
m.fieldRegen *= 3
|
||||||
} else if (tech.isGroundState) {
|
} else if (tech.isGroundState) {
|
||||||
@@ -1958,11 +1958,11 @@ const m = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
regenEnergy: function () { //used in drawRegenEnergy // rewritten by some tech
|
regenEnergy: function () { //used in drawRegenEnergy // rewritten by some tech
|
||||||
if (m.immuneCycle < m.cycle) m.energy += m.fieldRegen;
|
if (m.immuneCycle < m.cycle && m.fieldCDcycle < m.cycle) m.energy += m.fieldRegen;
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
},
|
},
|
||||||
regenEnergyDefault: function () {
|
regenEnergyDefault: function () {
|
||||||
if (m.immuneCycle < m.cycle) m.energy += m.fieldRegen;
|
if (m.immuneCycle < m.cycle && m.fieldCDcycle < m.cycle) m.energy += m.fieldRegen;
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
},
|
},
|
||||||
lookingAt(who) {
|
lookingAt(who) {
|
||||||
@@ -2271,8 +2271,27 @@ const m = {
|
|||||||
pushMass(who, fieldBlockCost = (0.025 + Math.sqrt(who.mass) * Vector.magnitude(Vector.sub(who.velocity, player.velocity)) * 0.002) * m.fieldShieldingScale) {
|
pushMass(who, fieldBlockCost = (0.025 + Math.sqrt(who.mass) * Vector.magnitude(Vector.sub(who.velocity, player.velocity)) * 0.002) * m.fieldShieldingScale) {
|
||||||
if (m.energy > fieldBlockCost * 0.2) { //shield needs at least some of the cost to block
|
if (m.energy > fieldBlockCost * 0.2) { //shield needs at least some of the cost to block
|
||||||
m.energy -= fieldBlockCost
|
m.energy -= fieldBlockCost
|
||||||
if (m.energy < 0) m.energy = 0;
|
if (m.energy < 0) {
|
||||||
m.fieldCDcycle = m.cycle + m.fieldBlockCD;
|
m.energy = 0;
|
||||||
|
m.fieldCDcycle = m.cycle + Math.max(m.fieldBlockCD, 60);
|
||||||
|
if (tech.isLaserField) {
|
||||||
|
simulation.ephemera.push({
|
||||||
|
name: "laser field", //used to find this array element in simulation.removeEphemera()
|
||||||
|
// tech.laserDrain = 0.0018;
|
||||||
|
count: Math.floor(m.maxEnergy * 30) * 0.0018 / tech.laserDrain, //how many cycles the ephemera lasts, scales with max energy
|
||||||
|
do() {
|
||||||
|
this.count--
|
||||||
|
if (this.count < 0) simulation.removeEphemera(this.name)
|
||||||
|
for (let i = 0, num = 12; i < num; i++) { //draw random lasers
|
||||||
|
const angle = 6.28 * i / num + m.cycle * 0.04
|
||||||
|
b.laser({ x: m.pos.x + 30 * Math.cos(angle), y: m.pos.y + 30 * Math.sin(angle) }, { x: m.pos.x + 3000 * Math.cos(angle), y: m.pos.y + 3000 * Math.sin(angle) })//dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false, push = 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
m.fieldCDcycle = m.cycle + m.fieldBlockCD;
|
||||||
|
}
|
||||||
if (!who.isInvulnerable && (m.coupling && m.fieldMode < 3) && bullet.length < 250) { //for standing wave mostly
|
if (!who.isInvulnerable && (m.coupling && m.fieldMode < 3) && bullet.length < 250) { //for standing wave mostly
|
||||||
for (let i = 0; i < m.coupling; i++) {
|
for (let i = 0; i < m.coupling; i++) {
|
||||||
if (m.coupling - i > Math.random()) {
|
if (m.coupling - i > Math.random()) {
|
||||||
@@ -2282,24 +2301,10 @@ const m = {
|
|||||||
b.iceIX(6 + 6 * Math.random(), angle + 3 * (Math.random() - 0.5), Vector.add(m.pos, rad))
|
b.iceIX(6 + 6 * Math.random(), angle + 3 * (Math.random() - 0.5), Vector.add(m.pos, rad))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// let count = 0
|
|
||||||
// for(let j=0; j<100;j++){
|
|
||||||
// const len = m.coupling + 0.5 * (Math.random() - 0.5)
|
|
||||||
// for (let i = 0; i < len; i++) {
|
|
||||||
// count++
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// console.log(count)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const unit = Vector.normalise(Vector.sub(player.position, who.position))
|
const unit = Vector.normalise(Vector.sub(player.position, who.position))
|
||||||
if (tech.blockDmg) {
|
if (tech.blockDmg) {
|
||||||
Matter.Body.setVelocity(who, {
|
Matter.Body.setVelocity(who, { x: 0.5 * who.velocity.x, y: 0.5 * who.velocity.y });
|
||||||
x: 0.5 * who.velocity.x,
|
|
||||||
y: 0.5 * who.velocity.y
|
|
||||||
});
|
|
||||||
|
|
||||||
if (who.isShielded) {
|
if (who.isShielded) {
|
||||||
for (let i = 0, len = mob.length; i < len; i++) {
|
for (let i = 0, len = mob.length; i < len; i++) {
|
||||||
if (mob[i].id === who.shieldID) mob[i].damage(tech.blockDmg * m.dmgScale * (tech.isBlockRadiation ? 6 : 2), true)
|
if (mob[i].id === who.shieldID) mob[i].damage(tech.blockDmg * m.dmgScale * (tech.isBlockRadiation ? 6 : 2), true)
|
||||||
@@ -2313,10 +2318,8 @@ const m = {
|
|||||||
} else {
|
} else {
|
||||||
who.damage(tech.blockDmg * m.dmgScale, true)
|
who.damage(tech.blockDmg * m.dmgScale, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
//draw electricity
|
|
||||||
const step = 40
|
const step = 40
|
||||||
ctx.beginPath();
|
ctx.beginPath(); //draw electricity
|
||||||
for (let i = 0, len = 0.8 * tech.blockDmg; i < len; i++) {
|
for (let i = 0, len = 0.8 * tech.blockDmg; i < len; i++) {
|
||||||
let x = m.pos.x - 20 * unit.x;
|
let x = m.pos.x - 20 * unit.x;
|
||||||
let y = m.pos.y - 20 * unit.y;
|
let y = m.pos.y - 20 * unit.y;
|
||||||
@@ -2333,30 +2336,18 @@ const m = {
|
|||||||
} else {
|
} else {
|
||||||
m.drawHold(who);
|
m.drawHold(who);
|
||||||
}
|
}
|
||||||
// if (tech.isFreezeMobs) mobs.statusSlow(who, 60) //this works but doesn't have a fun effect
|
|
||||||
if (tech.isStunField) mobs.statusStun(who, tech.isStunField)
|
if (tech.isStunField) mobs.statusStun(who, tech.isStunField)
|
||||||
// m.holdingTarget = null
|
|
||||||
//knock backs
|
//knock backs
|
||||||
const massRoot = Math.sqrt(Math.min(12, Math.max(0.15, who.mass))); // masses above 12 can start to overcome the push back
|
const massRoot = Math.sqrt(Math.min(12, Math.max(0.15, who.mass))); // masses above 12 can start to overcome the push back
|
||||||
Matter.Body.setVelocity(who, {
|
Matter.Body.setVelocity(who, { x: player.velocity.x - (15 * unit.x) / massRoot, y: player.velocity.y - (15 * unit.y) / massRoot });
|
||||||
x: player.velocity.x - (15 * unit.x) / massRoot,
|
|
||||||
y: player.velocity.y - (15 * unit.y) / massRoot
|
|
||||||
});
|
|
||||||
if (who.isUnstable) {
|
if (who.isUnstable) {
|
||||||
if (m.fieldCDcycle < m.cycle + 30) m.fieldCDcycle = m.cycle + 10
|
if (m.fieldCDcycle < m.cycle + 30) m.fieldCDcycle = m.cycle + 10
|
||||||
who.death();
|
who.death();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.crouch) {
|
if (m.crouch) {
|
||||||
Matter.Body.setVelocity(player, {
|
Matter.Body.setVelocity(player, { x: player.velocity.x + 0.1 * m.blockingRecoil * unit.x * massRoot, y: player.velocity.y + 0.1 * m.blockingRecoil * unit.y * massRoot });
|
||||||
x: player.velocity.x + 0.1 * m.blockingRecoil * unit.x * massRoot,
|
|
||||||
y: player.velocity.y + 0.1 * m.blockingRecoil * unit.y * massRoot
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
Matter.Body.setVelocity(player, {
|
Matter.Body.setVelocity(player, { x: player.velocity.x + m.blockingRecoil * unit.x * massRoot, y: player.velocity.y + m.blockingRecoil * unit.y * massRoot });
|
||||||
x: player.velocity.x + m.blockingRecoil * unit.x * massRoot,
|
|
||||||
y: player.velocity.y + m.blockingRecoil * unit.y * massRoot
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2371,7 +2362,7 @@ const m = {
|
|||||||
mob[i].locatePlayer();
|
mob[i].locatePlayer();
|
||||||
m.pushMass(mob[i]);
|
m.pushMass(mob[i]);
|
||||||
if (mob[i].isShielded) {
|
if (mob[i].isShielded) {
|
||||||
m.fieldCDcycle = m.cycle + 60
|
m.fieldCDcycle = m.cycle + 30
|
||||||
} else if (tech.deflectEnergy && !mob[i].isInvulnerable) {
|
} else if (tech.deflectEnergy && !mob[i].isInvulnerable) {
|
||||||
m.energy += tech.deflectEnergy
|
m.energy += tech.deflectEnergy
|
||||||
}
|
}
|
||||||
@@ -2577,7 +2568,7 @@ const m = {
|
|||||||
if (m.energy > m.fieldRegen) m.energy -= m.fieldRegen
|
if (m.energy > m.fieldRegen) m.energy -= m.fieldRegen
|
||||||
m.grabPowerUp();
|
m.grabPowerUp();
|
||||||
m.lookForPickUp();
|
m.lookForPickUp();
|
||||||
if (m.energy > 0.05) {
|
if (m.energy > 0) {
|
||||||
m.drawField();
|
m.drawField();
|
||||||
m.pushMobsFacing();
|
m.pushMobsFacing();
|
||||||
}
|
}
|
||||||
@@ -2601,7 +2592,7 @@ const m = {
|
|||||||
m.fieldBlockCD = 0;
|
m.fieldBlockCD = 0;
|
||||||
m.blockingRecoil = 2 //4 is normal
|
m.blockingRecoil = 2 //4 is normal
|
||||||
m.fieldRange = 185
|
m.fieldRange = 185
|
||||||
m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.6) * Math.pow(0.6, (tech.harmonics - 2))
|
m.fieldShieldingScale = 1.6 * Math.pow(0.6, (tech.harmonics - 2))
|
||||||
// m.fieldHarmReduction = 0.66; //33% reduction
|
// m.fieldHarmReduction = 0.66; //33% reduction
|
||||||
|
|
||||||
m.harmonic3Phase = () => { //normal standard 3 different 2-d circles
|
m.harmonic3Phase = () => { //normal standard 3 different 2-d circles
|
||||||
@@ -2629,7 +2620,7 @@ const m = {
|
|||||||
m.pushMass(mob[i]);
|
m.pushMass(mob[i]);
|
||||||
this.drainCD = m.cycle + 15
|
this.drainCD = m.cycle + 15
|
||||||
}
|
}
|
||||||
if (mob[i].isShielded || mob[i].shield) m.fieldCDcycle = m.cycle + 20
|
if (mob[i].isShielded || mob[i].shield) m.fieldCDcycle = m.cycle + 10
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2680,7 +2671,7 @@ const m = {
|
|||||||
} else {
|
} else {
|
||||||
m.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists)
|
m.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists)
|
||||||
}
|
}
|
||||||
if (m.energy > 0.1 && m.fieldCDcycle < m.cycle) {
|
if (m.energy > 0 && m.fieldCDcycle < m.cycle) {
|
||||||
if (tech.isStandingWaveExpand) {
|
if (tech.isStandingWaveExpand) {
|
||||||
if (input.field) {
|
if (input.field) {
|
||||||
// const oldHarmonicRadius = m.harmonicRadius
|
// const oldHarmonicRadius = m.harmonicRadius
|
||||||
@@ -2728,7 +2719,7 @@ const m = {
|
|||||||
) {
|
) {
|
||||||
mob[i].locatePlayer();
|
mob[i].locatePlayer();
|
||||||
const unit = Vector.normalise(Vector.sub(m.fieldPosition, mob[i].position))
|
const unit = Vector.normalise(Vector.sub(m.fieldPosition, mob[i].position))
|
||||||
m.fieldCDcycle = m.cycle + m.fieldBlockCD + (mob[i].isShielded ? 15 : 0);
|
m.fieldCDcycle = m.cycle + m.fieldBlockCD + (mob[i].isShielded ? 18 : 0);
|
||||||
if (!mob[i].isInvulnerable && bullet.length < 250) {
|
if (!mob[i].isInvulnerable && bullet.length < 250) {
|
||||||
for (let i = 0; i < m.coupling; i++) {
|
for (let i = 0; i < m.coupling; i++) {
|
||||||
if (m.coupling - i > Math.random()) {
|
if (m.coupling - i > Math.random()) {
|
||||||
@@ -3208,7 +3199,6 @@ const m = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
m.holding();
|
m.holding();
|
||||||
@@ -3217,7 +3207,7 @@ const m = {
|
|||||||
if (m.energy > m.fieldRegen) m.energy -= m.fieldRegen
|
if (m.energy > m.fieldRegen) m.energy -= m.fieldRegen
|
||||||
m.grabPowerUp();
|
m.grabPowerUp();
|
||||||
m.lookForPickUp();
|
m.lookForPickUp();
|
||||||
if (m.energy > 0.05) {
|
if (m.energy > 0) {
|
||||||
m.drawField();
|
m.drawField();
|
||||||
m.pushMobsFacing();
|
m.pushMobsFacing();
|
||||||
}
|
}
|
||||||
@@ -3736,13 +3726,24 @@ const m = {
|
|||||||
m.throwBlock();
|
m.throwBlock();
|
||||||
m.wakeCheck();
|
m.wakeCheck();
|
||||||
} else if (input.field && m.fieldCDcycle < m.cycle) { //not hold but field button is pressed
|
} else if (input.field && m.fieldCDcycle < m.cycle) { //not hold but field button is pressed
|
||||||
const drain = 0.002 / (1 + 0.5 * m.coupling)
|
const drain = 0.0014 / (1 + 0.5 * m.coupling)
|
||||||
if (m.energy > drain) m.energy -= drain
|
if (m.energy > drain) m.energy -= drain
|
||||||
|
|
||||||
m.grabPowerUp();
|
m.grabPowerUp();
|
||||||
if (this.rewindCount === 0) m.lookForPickUp();
|
if (this.rewindCount === 0) {
|
||||||
|
m.lookForPickUp();
|
||||||
|
}
|
||||||
|
|
||||||
if (!m.holdingTarget) {
|
if (!m.holdingTarget) {
|
||||||
|
if (this.rewindCount === 0) { //large upfront energy cost to enter rewind mode
|
||||||
|
if (m.energy > 0.3) {
|
||||||
|
m.energy -= 0.3
|
||||||
|
} else {
|
||||||
|
this.rewindCount = 0;
|
||||||
|
m.resetHistory();
|
||||||
|
if (m.fireCDcycle < m.cycle + 60) m.fieldCDcycle = m.cycle + 60
|
||||||
|
m.immuneCycle = m.cycle //if you reach the end of the history disable harm immunity
|
||||||
|
}
|
||||||
|
}
|
||||||
this.rewindCount += 6;
|
this.rewindCount += 6;
|
||||||
const DRAIN = 0.003
|
const DRAIN = 0.003
|
||||||
let history = m.history[(m.cycle - this.rewindCount) % 600]
|
let history = m.history[(m.cycle - this.rewindCount) % 600]
|
||||||
@@ -3759,7 +3760,7 @@ const m = {
|
|||||||
ctx.globalCompositeOperation = "source-over"
|
ctx.globalCompositeOperation = "source-over"
|
||||||
// m.grabPowerUp(); //a second grab power up to make the power ups easier to grab, and they more fast which matches the time theme
|
// m.grabPowerUp(); //a second grab power up to make the power ups easier to grab, and they more fast which matches the time theme
|
||||||
m.energy -= DRAIN
|
m.energy -= DRAIN
|
||||||
if (m.immuneCycle < m.cycle + 60) m.immuneCycle = m.cycle + 60; //player is immune to damage for __ cycles
|
if (m.immuneCycle < m.cycle + 5) m.immuneCycle = m.cycle + 5; //player is immune to damage for 5 cycles
|
||||||
Matter.Body.setPosition(player, history.position);
|
Matter.Body.setPosition(player, history.position);
|
||||||
Matter.Body.setVelocity(player, {
|
Matter.Body.setVelocity(player, {
|
||||||
x: history.velocity.x,
|
x: history.velocity.x,
|
||||||
@@ -3776,19 +3777,17 @@ const m = {
|
|||||||
} else {
|
} else {
|
||||||
m.undoCrouch()
|
m.undoCrouch()
|
||||||
}
|
}
|
||||||
if (!(this.rewindCount % 30)) {
|
if (tech.isRewindBot && !(this.rewindCount % 60)) {
|
||||||
if (tech.isRewindBot) {
|
for (let i = 0; i < tech.isRewindBot; i++) {
|
||||||
for (let i = 0; i < tech.isRewindBot; i++) {
|
b.randomBot(m.pos, false, false)
|
||||||
b.randomBot(m.pos, false, false)
|
bullet[bullet.length - 1].endCycle = simulation.cycle + 300 + Math.floor(180 * Math.random()) //8-9 seconds
|
||||||
bullet[bullet.length - 1].endCycle = simulation.cycle + 480 + Math.floor(120 * Math.random()) //8-9 seconds
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (tech.isRewindGrenade) {
|
|
||||||
b.grenade(m.pos, this.rewindCount) //Math.PI / 2
|
|
||||||
const who = bullet[bullet.length - 1]
|
|
||||||
who.endCycle = simulation.cycle + 60
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (tech.isRewindGrenade && !(this.rewindCount % 30)) {
|
||||||
|
b.grenade(m.pos, this.rewindCount) //Math.PI / 2
|
||||||
|
const who = bullet[bullet.length - 1]
|
||||||
|
who.endCycle = simulation.cycle + 120
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m.wakeCheck();
|
m.wakeCheck();
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ const powerUps = {
|
|||||||
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
||||||
if (tech.isOverHeal && overHeal > 0) { //tech quenching
|
if (tech.isOverHeal && overHeal > 0) { //tech quenching
|
||||||
const scaledOverHeal = overHeal * 0.7
|
const scaledOverHeal = overHeal * 0.7
|
||||||
m.damage(scaledOverHeal);
|
m.damage(scaledOverHeal*0.9);
|
||||||
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(scaledOverHeal).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(scaledOverHeal).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
||||||
simulation.drawList.push({ //add dmg to draw queue
|
simulation.drawList.push({ //add dmg to draw queue
|
||||||
x: m.pos.x,
|
x: m.pos.x,
|
||||||
@@ -563,7 +563,6 @@ const powerUps = {
|
|||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
powerUps.directSpawn(this.position.x, this.position.y, "heal", true, null, overHeal * 40 * (simulation.healScale ** 0.25))// directSpawn(x, y, target, moving = true, mode = null, size = powerUps[target].size()) {
|
powerUps.directSpawn(this.position.x, this.position.y, "heal", true, null, overHeal * 40 * (simulation.healScale ** 0.25))// directSpawn(x, y, target, moving = true, mode = null, size = powerUps[target].size()) {
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const simulation = {
|
|||||||
b.bulletDraw();
|
b.bulletDraw();
|
||||||
if (!m.isBodiesAsleep) b.bulletDo();
|
if (!m.isBodiesAsleep) b.bulletDo();
|
||||||
simulation.drawCircle();
|
simulation.drawCircle();
|
||||||
|
simulation.runEphemera();
|
||||||
// simulation.clip();
|
// simulation.clip();
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
simulation.drawCursor();
|
simulation.drawCursor();
|
||||||
@@ -68,6 +69,7 @@ const simulation = {
|
|||||||
simulation.draw.cons();
|
simulation.draw.cons();
|
||||||
simulation.draw.testing();
|
simulation.draw.testing();
|
||||||
simulation.drawCircle();
|
simulation.drawCircle();
|
||||||
|
simulation.runEphemera();
|
||||||
simulation.constructCycle()
|
simulation.constructCycle()
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
simulation.testingOutput();
|
simulation.testingOutput();
|
||||||
@@ -96,6 +98,7 @@ const simulation = {
|
|||||||
b.fire();
|
b.fire();
|
||||||
b.bulletRemove();
|
b.bulletRemove();
|
||||||
b.bulletDo();
|
b.bulletDo();
|
||||||
|
simulation.runEphemera();
|
||||||
}
|
}
|
||||||
simulation.isTimeSkipping = false;
|
simulation.isTimeSkipping = false;
|
||||||
},
|
},
|
||||||
@@ -113,9 +116,24 @@ const simulation = {
|
|||||||
if (m.fieldMode !== 7) m.hold();
|
if (m.fieldMode !== 7) m.hold();
|
||||||
b.bulletRemove();
|
b.bulletRemove();
|
||||||
if (!m.isBodiesAsleep) b.bulletDo();
|
if (!m.isBodiesAsleep) b.bulletDo();
|
||||||
|
simulation.runEphemera();
|
||||||
}
|
}
|
||||||
simulation.isTimeSkipping = false;
|
simulation.isTimeSkipping = false;
|
||||||
},
|
},
|
||||||
|
ephemera: [], //array that is used to store ephemera objects
|
||||||
|
removeEphemera: function (name) {
|
||||||
|
for (let i = 0, len = simulation.ephemera.length; i < len; i++) {
|
||||||
|
if (simulation.ephemera[i].name === name) {
|
||||||
|
simulation.ephemera.splice(i, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
runEphemera() {
|
||||||
|
for (let i = 0; i < simulation.ephemera.length; i++) {
|
||||||
|
simulation.ephemera[i].do();
|
||||||
|
}
|
||||||
|
},
|
||||||
// timeMobSkip() {
|
// timeMobSkip() {
|
||||||
// simulation.gravity();
|
// simulation.gravity();
|
||||||
// Engine.update(engine, simulation.delta);
|
// Engine.update(engine, simulation.delta);
|
||||||
@@ -745,6 +763,7 @@ const simulation = {
|
|||||||
level.populateLevels()
|
level.populateLevels()
|
||||||
|
|
||||||
input.endKeySensing();
|
input.endKeySensing();
|
||||||
|
simulation.ephemera = []
|
||||||
b.removeAllGuns();
|
b.removeAllGuns();
|
||||||
tech.setupAllTech(); //sets tech to default values
|
tech.setupAllTech(); //sets tech to default values
|
||||||
tech.cancelCount = 0;
|
tech.cancelCount = 0;
|
||||||
|
|||||||
@@ -1908,8 +1908,9 @@ const spawn = {
|
|||||||
|
|
||||||
const k = 642 //k=r^2/m
|
const k = 642 //k=r^2/m
|
||||||
me.split = function () {
|
me.split = function () {
|
||||||
Matter.Body.scale(this, 0.45, 0.45);
|
const scale = 0.45
|
||||||
this.radius = Math.sqrt(this.mass * k / Math.PI)
|
Matter.Body.scale(this, scale, scale);
|
||||||
|
this.radius *= scale;
|
||||||
spawn.cellBoss(this.position.x, this.position.y, this.radius, this.cellID);
|
spawn.cellBoss(this.position.x, this.position.y, this.radius, this.cellID);
|
||||||
mob[mob.length - 1].health = this.health
|
mob[mob.length - 1].health = this.health
|
||||||
}
|
}
|
||||||
@@ -1928,7 +1929,7 @@ const spawn = {
|
|||||||
if (this.seePlayer.recall && this.mass < this.cellMassMax) { //grow cell radius
|
if (this.seePlayer.recall && this.mass < this.cellMassMax) { //grow cell radius
|
||||||
const scale = 1 + 0.0002 * this.cellMassMax / this.mass;
|
const scale = 1 + 0.0002 * this.cellMassMax / this.mass;
|
||||||
Matter.Body.scale(this, scale, scale);
|
Matter.Body.scale(this, scale, scale);
|
||||||
this.radius = Math.sqrt(this.mass * k / Math.PI)
|
this.radius *= scale;
|
||||||
}
|
}
|
||||||
if (!(simulation.cycle % this.seePlayerFreq)) { //move away from other mobs
|
if (!(simulation.cycle % this.seePlayerFreq)) { //move away from other mobs
|
||||||
const repelRange = 150
|
const repelRange = 150
|
||||||
|
|||||||
73
js/tech.js
73
js/tech.js
@@ -258,7 +258,7 @@ const tech = {
|
|||||||
return dmg
|
return dmg
|
||||||
},
|
},
|
||||||
duplicationChance() {
|
duplicationChance() {
|
||||||
return Math.max(0, (tech.isPowerUpsVanish ? 0.12 : 0) + (tech.isStimulatedEmission ? 0.15 : 0) + tech.cancelCount * 0.043 + tech.duplicateChance + 0.05 * tech.isExtraGunField + m.duplicateChance + tech.fieldDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0) + tech.isQuantumEraserDuplication * (1 - 0.016 * (simulation.difficultyMode ** 2))) // + (m.fieldMode === 0 || m.fieldMode === 9) * 0.03 * m.coupling)
|
return Math.min(1, Math.max(0, (tech.isPowerUpsVanish ? 0.12 : 0) + (tech.isStimulatedEmission ? 0.15 : 0) + tech.cancelCount * 0.043 + tech.duplicateChance + 0.05 * tech.isExtraGunField + m.duplicateChance + tech.fieldDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0) + tech.isQuantumEraserDuplication * (1 - 0.016 * (simulation.difficultyMode ** 2)))) // + (m.fieldMode === 0 || m.fieldMode === 9) * 0.03 * m.coupling)
|
||||||
},
|
},
|
||||||
isScaleMobsWithDuplication: false,
|
isScaleMobsWithDuplication: false,
|
||||||
maxDuplicationEvent() {
|
maxDuplicationEvent() {
|
||||||
@@ -1247,8 +1247,10 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "collider",
|
name: "collider",
|
||||||
descriptionFunction() {
|
descriptionFunction() {
|
||||||
return `after mobs <strong>die</strong> there is a <strong>+33%</strong> chance <br>to smash <strong>power ups</strong> into a different <strong>flavor</strong>`
|
return `after mobs <strong>die</strong> there is a <strong>+33%</strong> chance to<br>collide <strong>power ups</strong> to form different <strong>power ups</strong>`
|
||||||
|
// return `after mobs <strong>die</strong> there is a <strong>+33%</strong> chance to convert<br>${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, ${powerUps.orb.research(1)}, <strong class='color-m'>tech</strong>, <strong class='color-f'>field</strong>, <strong class='color-g'>gun</strong> into other types`
|
||||||
},
|
},
|
||||||
|
|
||||||
maxCount: 3,
|
maxCount: 3,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -2717,7 +2719,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
tech.isCrouchRegen = true; //only used to check for requirements
|
tech.isCrouchRegen = true; //only used to check for requirements
|
||||||
m.regenEnergy = function () {
|
m.regenEnergy = function () {
|
||||||
if (m.immuneCycle < m.cycle && m.crouch) m.energy += 7 * m.fieldRegen;
|
if (m.immuneCycle < m.cycle && m.crouch && m.fieldCDcycle < m.cycle) m.energy += 7 * m.fieldRegen;
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2758,7 +2760,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
tech.isDamageAfterKillNoRegen = true;
|
tech.isDamageAfterKillNoRegen = true;
|
||||||
m.regenEnergy = function () {
|
m.regenEnergy = function () {
|
||||||
if (m.immuneCycle < m.cycle && (m.lastKillCycle + 300 < m.cycle)) m.energy += m.fieldRegen;
|
if (m.immuneCycle < m.cycle && (m.lastKillCycle + 300 < m.cycle) && m.fieldCDcycle < m.cycle) m.energy += m.fieldRegen;
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2887,7 +2889,7 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "antiscience",
|
name: "antiscience",
|
||||||
descriptionFunction() {
|
descriptionFunction() {
|
||||||
return `<strong>+66%</strong> <strong class='color-d'>damage</strong><br><strong>–10</strong> ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} after picking up a <strong class='color-m'>tech</strong>`
|
return `<strong>–10</strong> ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} after picking up a <strong class='color-m'>tech</strong><br><strong>+66%</strong> <strong class='color-d'>damage</strong>`
|
||||||
},
|
},
|
||||||
// description: "<strong>+66%</strong> <strong class='color-d'>damage</strong><br><strong>–10</strong> <strong class='color-h'>health</strong> after picking up a <strong class='color-m'>tech</strong>",
|
// description: "<strong>+66%</strong> <strong class='color-d'>damage</strong><br><strong>–10</strong> <strong class='color-h'>health</strong> after picking up a <strong class='color-m'>tech</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
@@ -3020,9 +3022,9 @@ const tech = {
|
|||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isHealTech: true,
|
isHealTech: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return !tech.isHealAttract
|
return true
|
||||||
},
|
},
|
||||||
requires: "not accretion",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isOverHeal = true;
|
tech.isOverHeal = true;
|
||||||
},
|
},
|
||||||
@@ -3032,20 +3034,20 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "accretion",
|
name: "accretion",
|
||||||
description: `${powerUps.orb.heal(1)} follow you, even between levels<br>spawn ${powerUps.orb.heal(3)}`,
|
description: `${powerUps.orb.heal(1)} follow you, even between levels<br>spawn ${powerUps.orb.heal(5)}`,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isHealTech: true,
|
isHealTech: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return m.fieldMode !== 9 && !tech.isOverHeal
|
return m.fieldMode !== 9
|
||||||
},
|
},
|
||||||
requires: "not wormhole, quenching",
|
requires: "not wormhole",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isHealAttract = true
|
tech.isHealAttract = true
|
||||||
powerUps.setPowerUpMode();
|
powerUps.setPowerUpMode();
|
||||||
for (let i = 0; i < 3; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal");
|
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal");
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isHealAttract = false
|
tech.isHealAttract = false
|
||||||
@@ -3315,7 +3317,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "perturbation theory",
|
name: "perturbation theory",
|
||||||
description: `if you have no ${powerUps.orb.research(1)} in your inventory<br><strong>+60%</strong> <strong><em>fire rate</em></strong>`,
|
description: `if you have no ${powerUps.orb.research(1)} in your inventory<br><strong>+70%</strong> <strong><em>fire rate</em></strong>`,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -3326,7 +3328,7 @@ const tech = {
|
|||||||
requires: "no research",
|
requires: "no research",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isRerollHaste = true;
|
tech.isRerollHaste = true;
|
||||||
tech.researchHaste = 0.4;
|
tech.researchHaste = 0.3;
|
||||||
b.setFireCD();
|
b.setFireCD();
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
@@ -3399,7 +3401,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "brainstorming",
|
name: "brainstorming",
|
||||||
description: "<strong class='color-m'>tech</strong> choices <strong>randomize</strong><br>every <strong>2</strong> seconds for <strong>10</strong> seconds",
|
description: "<strong class='color-m'>tech</strong> choices <strong>randomize</strong><br>every <strong>1.5</strong> seconds for <strong>10</strong> seconds",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -3411,7 +3413,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
tech.isBrainstorm = true
|
tech.isBrainstorm = true
|
||||||
tech.isBrainstormActive = false
|
tech.isBrainstormActive = false
|
||||||
tech.brainStormDelay = 2000 - simulation.difficultyMode * 100
|
tech.brainStormDelay = 1800 - simulation.difficultyMode * 100
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isBrainstorm = false
|
tech.isBrainstorm = false
|
||||||
@@ -6913,7 +6915,7 @@ const tech = {
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.haveGunCheck("laser") && !tech.isPulseLaser) || tech.isLaserBotUpgrade
|
return (tech.haveGunCheck("laser") && !tech.isPulseLaser) || tech.isLaserBotUpgrade || tech.isLaserField
|
||||||
},
|
},
|
||||||
requires: "laser, not pulse",
|
requires: "laser, not pulse",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -6998,7 +7000,7 @@ const tech = {
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade) && !tech.isWideLaser && !tech.isPulseLaser && !tech.historyLaser
|
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade || tech.isLaserField) && !tech.isWideLaser && !tech.isPulseLaser && !tech.historyLaser
|
||||||
},
|
},
|
||||||
requires: "laser, not diffuse beam, pulse, or slow light",
|
requires: "laser, not diffuse beam, pulse, or slow light",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -7115,7 +7117,7 @@ const tech = {
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.haveGunCheck("laser") || tech.isLaserBotUpgrade || tech.isLaserMine) && !tech.isPulseLaser && tech.laserDrain === 0.0018
|
return (tech.haveGunCheck("laser") || tech.isLaserBotUpgrade || tech.isLaserMine || tech.isLaserField) && !tech.isPulseLaser && tech.laserDrain === 0.0018
|
||||||
},
|
},
|
||||||
requires: "laser, not free-electron, pulse",
|
requires: "laser, not free-electron, pulse",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -7138,7 +7140,7 @@ const tech = {
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade) && !tech.isPulseLaser && tech.laserDrain === 0.0018
|
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade || tech.isLaserField) && !tech.isPulseLaser && tech.laserDrain === 0.0018
|
||||||
},
|
},
|
||||||
requires: "laser, not pulse, infrared diode",
|
requires: "laser, not pulse, infrared diode",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -7163,7 +7165,7 @@ const tech = {
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade) && !tech.isPulseLaser && tech.laserDrain === 0.0018
|
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade || tech.isLaserField) && !tech.isPulseLaser && tech.laserDrain === 0.0018
|
||||||
},
|
},
|
||||||
requires: "laser, not pulse, infrared diode",
|
requires: "laser, not pulse, infrared diode",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -7231,6 +7233,25 @@ const tech = {
|
|||||||
if (this.count > 0) powerUps.research.changeRerolls(2)
|
if (this.count > 0) powerUps.research.changeRerolls(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "surface plasmons",
|
||||||
|
description: "if <strong>deflecting</strong> a mob drains all your energy<br>emit <strong class='color-laser'>laser</strong> beams in every direction",
|
||||||
|
isFieldTech: true,
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
frequency: 2,
|
||||||
|
frequencyDefault: 2,
|
||||||
|
allowed() {
|
||||||
|
return m.fieldMode === 4 || m.fieldMode === 1 || m.fieldMode === 0
|
||||||
|
},
|
||||||
|
requires: "molecular assembler, standing wave, field emitter",
|
||||||
|
effect() {
|
||||||
|
tech.isLaserField = true
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
tech.isLaserField = false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "spherical harmonics",
|
name: "spherical harmonics",
|
||||||
description: "<strong>+40%</strong> <strong>standing wave</strong> deflection efficiency<br>no longer deactivates on mob <strong>shields</strong>", //<strong>standing wave</strong> oscillates in a 3rd dimension<br>
|
description: "<strong>+40%</strong> <strong>standing wave</strong> deflection efficiency<br>no longer deactivates on mob <strong>shields</strong>", //<strong>standing wave</strong> oscillates in a 3rd dimension<br>
|
||||||
@@ -7245,19 +7266,18 @@ const tech = {
|
|||||||
requires: "standing wave",
|
requires: "standing wave",
|
||||||
effect() {
|
effect() {
|
||||||
tech.harmonics++
|
tech.harmonics++
|
||||||
m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.6) * Math.pow(0.6, (tech.harmonics - 2))
|
m.fieldShieldingScale = 1.6 * Math.pow(0.6, (tech.harmonics - 2))
|
||||||
m.harmonicShield = m.harmonicAtomic
|
m.harmonicShield = m.harmonicAtomic
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.harmonics = 2
|
tech.harmonics = 2
|
||||||
m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.6) * Math.pow(0.6, (tech.harmonics - 2))
|
m.fieldShieldingScale = 1.6 * Math.pow(0.6, (tech.harmonics - 2))
|
||||||
m.harmonicShield = m.harmonic3Phase
|
m.harmonicShield = m.harmonic3Phase
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "expansion",
|
name: "expansion",
|
||||||
description: "<strong>+50%</strong> <strong>standing wave</strong> deflection efficiency<br>using <strong>standing wave</strong> field <strong>expands</strong> its <strong>radius</strong>",
|
description: "using <strong>standing wave</strong> field <strong>expands</strong> its <strong>radius</strong>",
|
||||||
// description: "use <strong class='color-f'>energy</strong> to <strong>expand</strong> <strong>standing wave</strong><br>the field slowly <strong>contracts</strong> when not used",
|
|
||||||
isFieldTech: true,
|
isFieldTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -7269,11 +7289,11 @@ const tech = {
|
|||||||
requires: "standing wave",
|
requires: "standing wave",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isStandingWaveExpand = true
|
tech.isStandingWaveExpand = true
|
||||||
m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.3) * Math.pow(0.6, (tech.harmonics - 2))
|
// m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.6) * Math.pow(0.6, (tech.harmonics - 2))
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isStandingWaveExpand = false
|
tech.isStandingWaveExpand = false
|
||||||
m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.3) * Math.pow(0.6, (tech.harmonics - 2))
|
// m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.6) * Math.pow(0.6, (tech.harmonics - 2))
|
||||||
m.harmonicRadius = 1
|
m.harmonicRadius = 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -11462,4 +11482,5 @@ const tech = {
|
|||||||
isDivisor: null,
|
isDivisor: null,
|
||||||
isFoamCavitation: null,
|
isFoamCavitation: null,
|
||||||
isHealAttract: null,
|
isHealAttract: null,
|
||||||
|
isLaserField: null,
|
||||||
}
|
}
|
||||||
45
todo.txt
45
todo.txt
@@ -1,20 +1,55 @@
|
|||||||
******************************************************** NEXT PATCH **************************************************
|
******************************************************** NEXT PATCH **************************************************
|
||||||
|
|
||||||
some new images
|
tech - after deflecting drains all your energy, shoot lasers in every direction
|
||||||
|
is it too hard to safely lose all energy after deflecting
|
||||||
|
add in some mob knock back or damage immunity?
|
||||||
|
make this a tech?
|
||||||
|
balance damage
|
||||||
|
download image
|
||||||
|
sometimes the field goes on CD after deflection but when energy isn't 0
|
||||||
|
fixed?
|
||||||
|
look at side effects of setting standing wave, molecular assembler, emitter to not disable at 0 energy, not 0.05 or 0.1
|
||||||
|
might allow repeated deflection with no CD?
|
||||||
|
energy regen is disable when deflection is on CD
|
||||||
|
m.fieldCDcycle < m.cycle
|
||||||
|
|
||||||
|
tech expansion no long gives deflection efficiency
|
||||||
|
|
||||||
|
retrocausality drains 30% less energy as time rewinds, but each time you start to rewind you drain 30 energy
|
||||||
|
no longer provides immunity for 1 second after on ending rewind
|
||||||
|
also spawns 20% fewer bots and grenades
|
||||||
|
|
||||||
bug fixes
|
bug fixes
|
||||||
|
|
||||||
|
added a generic system to add code that loops for a set time
|
||||||
|
Example code:
|
||||||
|
simulation.ephemera.push({
|
||||||
|
name: "uniqueName",
|
||||||
|
count: 60, //cycles before it self removes
|
||||||
|
do() {
|
||||||
|
this.count--
|
||||||
|
if (this.count < 0) simulation.removeEphemera(this.name)
|
||||||
|
//run code here
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
*********************************************************** TODO *****************************************************
|
*********************************************************** TODO *****************************************************
|
||||||
|
|
||||||
tech: using research spawns a heal and ammo
|
tech: choose next map by name after exiting current map
|
||||||
|
use modified tech selection code?
|
||||||
|
this might be too much work without much reward
|
||||||
|
JUNK only?
|
||||||
|
|
||||||
|
|
||||||
|
build a system to add in methods to an array that runs these objects in the game loop
|
||||||
|
method to run the code
|
||||||
|
condition to remove from array should be inside the method
|
||||||
|
|
||||||
Tech: relativity
|
Tech: relativity
|
||||||
Simulation speed scales with movement speed. When still, time moves at 0.4 speed, at full walking speed it’s 1. (So if you’re falling or something and you move faster the simulation will be faster than usual)
|
Simulation speed scales with movement speed. When still, time moves at 0.4 speed, at full walking speed it’s 1. (So if you’re falling or something and you move faster the simulation will be faster than usual)
|
||||||
Also a damage and/or defense boost to make it worth using
|
Also a damage and/or defense boost to make it worth using
|
||||||
|
|
||||||
Tech: Turbine - Energy generation is proportional to your speed up to +X% energy generation at 40 speed
|
Tech: Turbine - Energy generation is proportional to your speed up to +X% energy generation at 40 speed
|
||||||
Tech: "Electric Reactive Armor": Defense increases by 2% for each 1 energy generation you have
|
|
||||||
|
|
||||||
wormhole tech - teleport away mobs with mass below 3 when they get too near the player
|
wormhole tech - teleport away mobs with mass below 3 when they get too near the player
|
||||||
short CD, small energy cost, only mobs below a mass
|
short CD, small energy cost, only mobs below a mass
|
||||||
@@ -1155,6 +1190,10 @@ possible names for tech
|
|||||||
nuclear pasta - hard matter in neutron star
|
nuclear pasta - hard matter in neutron star
|
||||||
nonlocal
|
nonlocal
|
||||||
fine-tuned universe
|
fine-tuned universe
|
||||||
|
nonperturbative
|
||||||
|
D-branes
|
||||||
|
instanton or pseudoparticle
|
||||||
|
soliton (wave packet)
|
||||||
hall effect thrusters
|
hall effect thrusters
|
||||||
spaghettification
|
spaghettification
|
||||||
particle accelerator
|
particle accelerator
|
||||||
|
|||||||
Reference in New Issue
Block a user