wikipedia
JUNK: wikipedia - After you get a new tech you have 7 seconds to study before a quiz, 4 research if you aces the quiz. this code for this works 80% of the time every time renamed propagator->Verlet integration it's now a skin tech 1.6->3x damage slightly increased the time skip amount on some skins the feet will hang lower while player is in the air on some skins the upper legs are skinnier mouse over on orbs for tech, field, and gun has a tooltip with text added keyword CSS style for "bot" added an aura around powerUpBoss so you can kinda see it inside walls quenching just gives max health from over healing instead of damaging you first depolarization does 0.5->0.4x damage when on cooldown many-worlds spawns a tech and also 3 coupling at the start of each new level dynamic equilibrium does 1.15x more damage and only stacks to 9->3 orbital bots collide with a 1.2x larger range Zectron no longer drains energy when balls hit you, but the balls still stop supply chain just gives a gun and a flat 10 ammo polyurethane foam will only trigger up to 55 total foam per harpoon to prevent a huge number of foam bubbles causing lag no cap for super balls for now fixed bug with planned obsolescence + instant tech fixed bug with ice crystal nucleation applied science gives each gunTech with a short delay this helps with sorting and maybe other rare bugs fixed bug with delivery drones and path integration you can no longer deflect snakeBoss, but it moves a bit slower
This commit is contained in:
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
38
js/bullet.js
38
js/bullet.js
@@ -94,7 +94,7 @@ const b = {
|
||||
}
|
||||
},
|
||||
outOfAmmo() { //triggers after firing when you have NO ammo
|
||||
simulation.makeTextLog(`${b.guns[b.activeGun].name}.<span class='color-g'>ammo</span><span class='color-symbol'>:</span> 0`);
|
||||
simulation.inGameConsole(`${b.guns[b.activeGun].name}.<span class='color-g'>ammo</span><span class='color-symbol'>:</span> 0`);
|
||||
m.fireCDcycle = m.cycle + 30; //fire cooldown
|
||||
if (tech.isAmmoFromHealth) {
|
||||
const amount = 0.02
|
||||
@@ -198,7 +198,7 @@ const b = {
|
||||
}
|
||||
if (gunTechPool.length) {
|
||||
const index = Math.floor(Math.random() * gunTechPool.length)
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[gunTechPool[index]].name}</strong>")`)
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[gunTechPool[index]].name}</strong>")`)
|
||||
tech.giveTech(gunTechPool[index]) // choose from the gun pool
|
||||
} else {
|
||||
tech.giveTech() //get normal tech if you can't find any gun tech
|
||||
@@ -1839,6 +1839,7 @@ const b = {
|
||||
minDmgSpeed: 4,
|
||||
lookFrequency: Math.floor(7 + Math.random() * 3),
|
||||
density: tech.harpoonDensity, //0.001 is normal for blocks, 0.004 is normal for harpoon, 0.004*6 when buffed
|
||||
foamSpawned: 0,
|
||||
beforeDmg(who) {
|
||||
if (tech.isShieldPierce && who.isShielded) { //disable shields
|
||||
who.isShielded = false
|
||||
@@ -1861,11 +1862,12 @@ const b = {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tech.isFoamBall) {
|
||||
for (let i = 0, len = Math.min(30, 2 + 2 * Math.sqrt(this.mass)); i < len; i++) {
|
||||
const radius = 5 + 8 * Math.random()
|
||||
if (tech.isFoamBall && this.foamSpawned < 55) {
|
||||
for (let i = 0, len = Math.min(30, 2 + 3 * Math.sqrt(this.mass)); i < len; i++) {
|
||||
const radius = 5 + 9 * Math.random()
|
||||
const velocity = { x: Math.max(0.5, 2 - radius * 0.1), y: 0 }
|
||||
b.foam(this.position, Vector.rotate(velocity, 6.28 * Math.random()), radius)
|
||||
this.foamSpawned++
|
||||
}
|
||||
}
|
||||
if (tech.isHarpoonPowerUp && simulation.cycle - 480 < tech.harpoonPowerUpCycle) {
|
||||
@@ -3203,7 +3205,7 @@ const b = {
|
||||
bullet[bullet.length - 1].isMutualismActive = true
|
||||
}
|
||||
},
|
||||
delayDrones(where, droneCount = 1) {
|
||||
delayDrones(where, droneCount = 1, deliveryCount = 0) {
|
||||
let respawnDrones = () => {
|
||||
if (droneCount > 0) {
|
||||
requestAnimationFrame(respawnDrones);
|
||||
@@ -3213,7 +3215,7 @@ const b = {
|
||||
b.droneRadioactive({ x: where.x + 50 * (Math.random() - 0.5), y: where.y + 50 * (Math.random() - 0.5) }, 0)
|
||||
} else {
|
||||
b.drone({ x: where.x + 50 * (Math.random() - 0.5), y: where.y + 50 * (Math.random() - 0.5) }, 0)
|
||||
if (tech.isDroneGrab && deliveryCount > 0) {
|
||||
if (tech.isDroneGrab && deliveryCount > 0) { //
|
||||
const who = bullet[bullet.length - 1]
|
||||
who.isImproved = true;
|
||||
const SCALE = 2.25
|
||||
@@ -3747,7 +3749,7 @@ const b = {
|
||||
bullet[me] = Bodies.polygon(where.x, where.y, 12, radius, b.fireAttributes(dir, false));
|
||||
Composite.add(engine.world, bullet[me]); //add bullet to world
|
||||
Matter.Body.setVelocity(bullet[me], velocity);
|
||||
bullet[me].calcDensity = function () { return 0.0007 + 0.0007 * tech.isSuperHarm + 0.0004 * tech.isBulletTeleport }
|
||||
bullet[me].calcDensity = function () { return 0.0007 + 0.0007 * tech.isSuperHarm + 0.0007 * tech.isBulletTeleport }
|
||||
Matter.Body.setDensity(bullet[me], bullet[me].calcDensity());
|
||||
bullet[me].endCycle = simulation.cycle + Math.floor(270 + 90 * Math.random());
|
||||
bullet[me].minDmgSpeed = 0;
|
||||
@@ -3760,15 +3762,15 @@ const b = {
|
||||
this.force.y += this.mass * gravity;;
|
||||
if (Matter.Query.collides(this, [player]).length) {
|
||||
this.endCycle = 0
|
||||
m.energy -= 0.04
|
||||
if (m.energy < 0) m.energy = 0
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
x: this.position.x,
|
||||
y: this.position.y,
|
||||
radius: radius,
|
||||
color: "#0ad",
|
||||
time: 15
|
||||
});
|
||||
// m.energy -= 0.04
|
||||
// if (m.energy < 0) m.energy = 0
|
||||
// simulation.drawList.push({ //add dmg to draw queue
|
||||
// x: this.position.x,
|
||||
// y: this.position.y,
|
||||
// radius: radius,
|
||||
// color: "#0ad",
|
||||
// time: 15
|
||||
// });
|
||||
}
|
||||
}
|
||||
bullet[me].cycle = 0
|
||||
@@ -5660,7 +5662,7 @@ const b = {
|
||||
phase: 2 * Math.PI * Math.random(),
|
||||
do() {
|
||||
if (!m.isCloak) { //if time dilation isn't active
|
||||
const size = 33
|
||||
const size = 40
|
||||
q = Matter.Query.region(mob, {
|
||||
min: {
|
||||
x: this.position.x - size,
|
||||
|
||||
@@ -118,7 +118,7 @@ function collisionChecks(event) {
|
||||
if (tech.isCollisionRealitySwitch && m.alive) {
|
||||
m.switchWorlds()
|
||||
simulation.trails(90)
|
||||
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
simulation.inGameConsole(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
}
|
||||
if (tech.isPiezo) m.energy += 20.48;
|
||||
if (tech.isCouplingNoHit && m.coupling > 0) {
|
||||
|
||||
32
js/index.js
32
js/index.js
@@ -13,7 +13,7 @@ Math.hash = s => {
|
||||
// document.getElementById("seed").placeholder = Math.initialSeed = Math.floor(Date.now() % 100000) //random every time: just the time in milliseconds UTC
|
||||
|
||||
window.addEventListener('error', error => {
|
||||
simulation.makeTextLog(`<strong style='color:red;'>ERROR:</strong> ${error.message} <u>${error.filename}:${error.lineno}</u>`)
|
||||
simulation.inGameConsole(`<strong style='color:red;'>ERROR:</strong> ${error.message} <u>${error.filename}:${error.lineno}</u>`)
|
||||
});
|
||||
|
||||
document.getElementById("seed").placeholder = Math.initialSeed = String(Math.floor(Date.now() % 100000))
|
||||
@@ -138,7 +138,7 @@ function beforeUnloadEventListener(event) {
|
||||
event.preventDefault();
|
||||
if (tech.isExitPrompt) {
|
||||
tech.damage *= 1.25
|
||||
simulation.makeTextLog(`damage <span class='color-symbol'>*=</span> ${1.25}`)
|
||||
simulation.inGameConsole(`damage <span class='color-symbol'>*=</span> ${1.25}`)
|
||||
if (Math.random() < 0.25) {
|
||||
removeEventListener('beforeunload', beforeUnloadEventListener);
|
||||
}
|
||||
@@ -456,15 +456,15 @@ const build = {
|
||||
generatePauseLeft() {
|
||||
//left side
|
||||
let botText = ""
|
||||
if (tech.nailBotCount) botText += `<br>nail-bots ${tech.nailBotCount}`
|
||||
if (tech.orbitBotCount) botText += `<br>orbital-bots ${tech.orbitBotCount}`
|
||||
if (tech.boomBotCount) botText += `<br>boom-bots ${tech.boomBotCount}`
|
||||
if (tech.laserBotCount) botText += `<br>laser-bots ${tech.laserBotCount}`
|
||||
if (tech.foamBotCount) botText += `<br>foam-bots ${tech.foamBotCount}`
|
||||
if (tech.soundBotCount) botText += `<br>sound-bots ${tech.soundBotCount}`
|
||||
if (tech.dynamoBotCount) botText += `<br>dynamo-bots ${tech.dynamoBotCount}`
|
||||
if (tech.plasmaBotCount) botText += `<br>plasma-bots ${tech.plasmaBotCount}`
|
||||
if (tech.missileBotCount) botText += `<br>missile-bots ${tech.missileBotCount}`
|
||||
if (tech.nailBotCount) botText += `<br><strong class='color-bot no-box'>nail-bots ${tech.nailBotCount}</strong>`
|
||||
if (tech.orbitBotCount) botText += `<br><strong class='color-bot no-box'>orbital-bots ${tech.orbitBotCount}</strong>`
|
||||
if (tech.boomBotCount) botText += `<br><strong class='color-bot no-box'>boom-bots ${tech.boomBotCount}</strong>`
|
||||
if (tech.laserBotCount) botText += `<br><strong class='color-bot no-box'>laser-bots ${tech.laserBotCount}</strong>`
|
||||
if (tech.foamBotCount) botText += `<br><strong class='color-bot no-box'>foam-bots ${tech.foamBotCount}</strong>`
|
||||
if (tech.soundBotCount) botText += `<br><strong class='color-bot no-box'>sound-bots ${tech.soundBotCount}</strong>`
|
||||
if (tech.dynamoBotCount) botText += `<br><strong class='color-bot no-box'>dynamo-bots ${tech.dynamoBotCount}</strong>`
|
||||
if (tech.plasmaBotCount) botText += `<br><strong class='color-bot no-box'>plasma-bots ${tech.plasmaBotCount}</strong>`
|
||||
if (tech.missileBotCount) botText += `<br><strong class='color-bot no-box'>missile-bots ${tech.missileBotCount}</strong>`
|
||||
|
||||
// <strong class='color-g'>${b.activeGun === null || b.activeGun === undefined ? "undefined" : b.guns[b.activeGun].name}</strong> (${b.activeGun === null || b.activeGun === undefined ? "0" : b.guns[b.activeGun].ammo})
|
||||
|
||||
@@ -497,6 +497,7 @@ const build = {
|
||||
${m.coupling ? `<br><span style = 'font-size:90%;'>` + m.couplingDescription(m.coupling) + `</span> from ${(m.coupling).toFixed(0)} ${powerUps.orb.coupling(1)}` : ""}
|
||||
<br><strong class='color-dup'>duplication</strong> ${(tech.duplicationChance() * 100).toFixed(0)}%
|
||||
<span style="float: right;"><strong class='color-junk'>JUNK</strong> ${(100 * tech.junkChance).toFixed(0)}%</span>
|
||||
${botText}
|
||||
<br>
|
||||
<br> ${level.levelAnnounce()}
|
||||
<span style="float: right;">position (${player.position.x.toFixed(0)}, ${player.position.y.toFixed(0)})</span>
|
||||
@@ -504,7 +505,6 @@ ${m.coupling ? `<br><span style = 'font-size:90%;'>` + m.couplingDescription(m.c
|
||||
<span style="float: right;">mouse (${simulation.mouseInGame.x.toFixed(0)}, ${simulation.mouseInGame.y.toFixed(0)})</span>
|
||||
<br>cycles ${m.cycle}
|
||||
<span style="float: right;">velocity (${player.velocity.x.toFixed(2)}, ${player.velocity.y.toFixed(2)})</span>
|
||||
${botText}
|
||||
<br>mobs ${mob.length} (${spawn.pickList[0]}, ${spawn.pickList[0]})
|
||||
<span style="float: right;">blocks ${body.length}</span>
|
||||
<br>bullets ${bullet.length}
|
||||
@@ -1100,7 +1100,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
// url += `&level=${Math.abs(Number(document.getElementById("starting-level").value))}`
|
||||
// alert('n-gon build URL copied to clipboard.\nPaste into browser address bar.')
|
||||
} else {
|
||||
simulation.makeTextLog("n-gon build URL copied to clipboard.<br>Paste into browser address bar.")
|
||||
simulation.inGameConsole("n-gon build URL copied to clipboard.<br>Paste into browser address bar.")
|
||||
}
|
||||
console.log('n-gon build URL copied to clipboard.\nPaste into browser address bar.')
|
||||
console.log(url)
|
||||
@@ -1465,14 +1465,14 @@ window.addEventListener("keydown", function (event) {
|
||||
case input.key.testing:
|
||||
if (m.alive && localSettings.loreCount > 0 && !simulation.paused && !build.isExperimentSelection) {
|
||||
if (simulation.difficultyMode > 4) {
|
||||
simulation.makeTextLog("<em>testing mode disabled for this difficulty</em>");
|
||||
simulation.inGameConsole("<em>testing mode disabled for this difficulty</em>");
|
||||
break
|
||||
}
|
||||
if (simulation.testing) {
|
||||
simulation.testing = false;
|
||||
simulation.loop = simulation.normalLoop
|
||||
if (simulation.isConstructionMode) document.getElementById("construct").style.display = 'none'
|
||||
simulation.makeTextLog("", 0);
|
||||
simulation.inGameConsole("", 0);
|
||||
} else {
|
||||
simulation.testing = true;
|
||||
simulation.loop = simulation.testingLoop
|
||||
@@ -1480,7 +1480,7 @@ window.addEventListener("keydown", function (event) {
|
||||
if (simulation.isConstructionMode) {
|
||||
document.getElementById("construct").style.display = 'inline'
|
||||
} else {
|
||||
simulation.makeTextLog(
|
||||
simulation.inGameConsole(
|
||||
`<table class="pause-table">
|
||||
<tr>
|
||||
<td class='key-input-pause'>T</td>
|
||||
|
||||
260
js/level.js
260
js/level.js
@@ -28,7 +28,7 @@ const level = {
|
||||
// tech.tech[297].frequency = 100
|
||||
// tech.addJunkTechToPool(0.5)
|
||||
// m.couplingChange(10)
|
||||
// m.setField("plasma torch") //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 10 grappling hook
|
||||
// m.setField("grappling hook") //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 10 grappling hook
|
||||
// m.energy = 0
|
||||
// powerUps.research.count = 3
|
||||
// tech.isHookWire = true
|
||||
@@ -37,34 +37,29 @@ const level = {
|
||||
// m.damage(0.1);
|
||||
// b.giveGuns("super balls") //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("shotgun") //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("wave") //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("wave") //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("laser") //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
|
||||
// tech.laserColor = "#fff"
|
||||
// tech.laserColorAlpha = "rgba(255, 255, 255, 0.5)"
|
||||
|
||||
// b.guns[8].ammo = 100000000
|
||||
// requestAnimationFrame(() => { tech.giveTech("stimulated emission") });
|
||||
// tech.giveTech("1st ionization energy")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("booby trap")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("obsolescence")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("brainstorming")
|
||||
// requestAnimationFrame(() => { for (let i = 0; i < 3; i++) tech.giveTech("mechatronics") });
|
||||
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("eternalism") });
|
||||
// for (let i = 0; i < 2; i++) tech.giveTech("technical debt")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("emergence")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("foam-bot")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("Bitter electromagnet")
|
||||
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("wikipedia") });
|
||||
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("field coupling") });
|
||||
// for (let i = 0; i < 1; i++) tech.giveTech("Verlet integration")
|
||||
// m.lastKillCycle = m.cycle
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("determinism")
|
||||
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
|
||||
// for (let i = 0; i < 1; i++) powerUps.directSpawn(450, -50, "tech");
|
||||
// for (let i = 0; i < 1; i++) powerUps.directSpawn(m.pos.x, m.pos.y - 50, "difficulty", false);
|
||||
// spawn.mapRect(575, -700, 25, 425); //block mob line of site on testing
|
||||
// level.flocculation();
|
||||
// level.testing();
|
||||
|
||||
level[simulation.isTraining ? "walk" : "initial"]() //normal starting level **************************************************
|
||||
|
||||
// for (let i = 0; i < 1; ++i) spawn.snakeBoss(1900, -500)
|
||||
// for (let i = 0; i < 2; i++) spawn.ghoster(level.exit.x, level.exit.y) //ghosters need to spawn after the map loads
|
||||
// simulation.isAutoZoom = false; //look in close
|
||||
// simulation.zoomScale *= 0.5;
|
||||
// simulation.setZoom();
|
||||
// for (let i = 0; i < 1; ++i) spawn.powerUpBoss(1900, -500)
|
||||
// for (let i = 0; i < 3; i++) spawn.starter(1900, -500) //ghosters need to spawn after the map loads
|
||||
|
||||
// for (let i = 0; i < 1; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "entanglement");
|
||||
// for (let i = 0; i < 2; ++i) powerUps.directSpawn(m.pos.x + 450, m.pos.y + 50 * Math.random(), "boost");
|
||||
@@ -103,7 +98,7 @@ const level = {
|
||||
}
|
||||
if (!simulation.isTraining) {
|
||||
document.title = "n-gon: " + level.levelAnnounce();
|
||||
simulation.makeTextLog(`<span class='color-var'>level</span>.onLevel <span class='color-symbol'>=</span> "<span class='color-text'>${level.levels[level.onLevel]}</span>"`);
|
||||
simulation.inGameConsole(`<span class='color-var'>level</span>.onLevel <span class='color-symbol'>=</span> "<span class='color-text'>${level.levels[level.onLevel]}</span>"`);
|
||||
}
|
||||
simulation.setupCamera(player.position);
|
||||
simulation.setZoom();
|
||||
@@ -151,13 +146,14 @@ const level = {
|
||||
}
|
||||
if (tech.isGunChoice && Number.isInteger(tech.buffedGun) && b.inventory.length) {
|
||||
var gun = b.guns[b.inventory[tech.buffedGun]].name
|
||||
simulation.makeTextLog(`pigeonhole principle: <strong>${(1.3 * Math.max(0, b.inventory.length)).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> for <strong class="highlight">${gun}</strong>`, 600);
|
||||
simulation.inGameConsole(`pigeonhole principle: <strong>${(1.3 * Math.max(0, b.inventory.length)).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> for <strong class="highlight">${gun}</strong>`, 600);
|
||||
}
|
||||
if (tech.isSwitchReality && level.levelsCleared !== 0) {
|
||||
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
simulation.inGameConsole(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
m.switchWorlds()
|
||||
simulation.trails()
|
||||
powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
|
||||
powerUps.spawn(player.position.x + 50, player.position.y - Math.random() * 50, "tech", false);
|
||||
powerUps.spawnDelay("coupling", 3);
|
||||
}
|
||||
if (tech.isHealLowHealth) {
|
||||
const len = tech.isEnergyHealth ? 5 * Math.max(0, m.maxEnergy - m.energy) : 5 * Math.max(0, m.maxHealth - m.health)
|
||||
@@ -169,22 +165,22 @@ const level = {
|
||||
const ammoPerOrb = b.guns[b.activeGun].ammoPack
|
||||
const a = Math.ceil(rate * b.guns[b.activeGun].ammo / ammoPerOrb)
|
||||
powerUps.spawnDelay("ammo", a, 4);
|
||||
simulation.makeTextLog(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${a > 20 ? a + powerUps.orb.ammo(1) : powerUps.orb.ammo(a)}`)
|
||||
simulation.inGameConsole(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${a > 20 ? a + powerUps.orb.ammo(1) : powerUps.orb.ammo(a)}`)
|
||||
}
|
||||
if (powerUps.research.count > 0) {
|
||||
const r = Math.ceil(rate * powerUps.research.count)
|
||||
simulation.makeTextLog(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-r'>research</span> <span class='color-symbol'>=</span> ${r > 20 ? r + powerUps.orb.research(1) : powerUps.orb.research(r)}`)
|
||||
simulation.inGameConsole(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-r'>research</span> <span class='color-symbol'>=</span> ${r > 20 ? r + powerUps.orb.research(1) : powerUps.orb.research(r)}`)
|
||||
powerUps.spawnDelay("research", r, 4);
|
||||
}
|
||||
if (m.coupling > 0) {
|
||||
const c = Math.ceil(rate * m.coupling)
|
||||
powerUps.spawnDelay("coupling", c, 4);
|
||||
simulation.makeTextLog(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-coupling'>coupling</span> <span class='color-symbol'>=</span> ${c > 20 ? c + powerUps.orb.coupling(1) : powerUps.orb.coupling(c)}`)
|
||||
simulation.inGameConsole(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-coupling'>coupling</span> <span class='color-symbol'>=</span> ${c > 20 ? c + powerUps.orb.coupling(1) : powerUps.orb.coupling(c)}`)
|
||||
}
|
||||
const healPerOrb = (powerUps.heal.size() / 40 / (simulation.healScale ** 0.25)) ** 2
|
||||
const h = Math.ceil(rate * m.health / healPerOrb)
|
||||
powerUps.spawnDelay("heal", h, 4);
|
||||
simulation.makeTextLog(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-h'>health</span> <span class='color-symbol'>=</span> ${h > 20 ? h + powerUps.orb.heal(1) : powerUps.orb.heal(h)}`)
|
||||
simulation.inGameConsole(`${(rate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-h'>health</span> <span class='color-symbol'>=</span> ${h > 20 ? h + powerUps.orb.heal(1) : powerUps.orb.heal(h)}`)
|
||||
|
||||
// trying to spawn smaller heals
|
||||
// const healPerOrb = (powerUps.heal.size() / 40 / (simulation.healScale ** 0.25)) ** 2
|
||||
@@ -194,18 +190,20 @@ const level = {
|
||||
// const overHeal = h - Math.floor(h)
|
||||
// powerUps.spawn(m.pos.x, m.pos.y, "heal", true, null, Math.max(0.25, overHeal) * 40 * (simulation.healScale ** 0.25))
|
||||
// if (h > healPerOrb) powerUps.spawnDelay("heal", h);
|
||||
// simulation.makeTextLog(`${(Math.ceil(tech.interestRate * 100)).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-h'>health</span> <span class='color-symbol'>=</span> ${h > 20 ? h + powerUps.orb.heal(1) : powerUps.orb.heal(h)}`)
|
||||
// simulation.inGameConsole(`${(Math.ceil(tech.interestRate * 100)).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-h'>health</span> <span class='color-symbol'>=</span> ${h > 20 ? h + powerUps.orb.heal(1) : powerUps.orb.heal(h)}`)
|
||||
}
|
||||
if (tech.ejectOld > 0) {
|
||||
if (tech.isEjectOld) {
|
||||
let index = null //find oldest tech that you have
|
||||
for (let i = 0; i < tech.tech.length; i++) {
|
||||
if (tech.tech[i].count > 0) index = i
|
||||
if (tech.tech[i].count > 0 && !tech.tech[i].isInstant) {
|
||||
index = i
|
||||
}
|
||||
}
|
||||
console.log(index)
|
||||
if (index) { //eject it
|
||||
const effect = Math.pow(1.1, tech.tech[index].count)
|
||||
simulation.makeTextLog(`<strong>${(effect).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> <em>//from obsolescence</em>`, 360)
|
||||
simulation.inGameConsole(`<strong>${(effect).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> <em>//from obsolescence</em>`, 360)
|
||||
tech.damage *= effect
|
||||
tech.ejectOld *= effect
|
||||
powerUps.ejectTech(index)
|
||||
}
|
||||
}
|
||||
@@ -213,7 +211,7 @@ const level = {
|
||||
trainingText(say) {
|
||||
simulation.lastLogTime = 0; //clear previous messages
|
||||
simulation.isTextLogOpen = true
|
||||
simulation.makeTextLog(`<span style="font-size: 120%;line-height: 120%;"><span style="color:#51f;">supervised.learning</span>(<span style="color:#777; font-size: 80%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span><br>${say}</span>`, Infinity)
|
||||
simulation.inGameConsole(`<span style="font-size: 120%;line-height: 120%;"><span style="color:#51f;">supervised.learning</span>(<span style="color:#777; font-size: 80%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span><br>${say}</span>`, Infinity)
|
||||
simulation.isTextLogOpen = false
|
||||
},
|
||||
trainingBackgroundColor: "#e1e1e1",
|
||||
@@ -279,8 +277,8 @@ const level = {
|
||||
}
|
||||
},
|
||||
announceMobTypes() {
|
||||
simulation.makeTextLog(`spawn<span class='color-symbol'>.</span>${spawn.pickList[0]}<span class='color-symbol'>(</span>x<span class='color-symbol'>,</span>y<span class='color-symbol'>)</span>`)
|
||||
simulation.makeTextLog(`spawn<span class='color-symbol'>.</span>${spawn.pickList[1]}<span class='color-symbol'>(</span>x<span class='color-symbol'>,</span>y<span class='color-symbol'>)</span>`)
|
||||
simulation.inGameConsole(`spawn<span class='color-symbol'>.</span>${spawn.pickList[0]}<span class='color-symbol'>(</span>x<span class='color-symbol'>,</span>y<span class='color-symbol'>)</span>`)
|
||||
simulation.inGameConsole(`spawn<span class='color-symbol'>.</span>${spawn.pickList[1]}<span class='color-symbol'>(</span>x<span class='color-symbol'>,</span>y<span class='color-symbol'>)</span>`)
|
||||
},
|
||||
disableExit: false,
|
||||
nextLevel() {
|
||||
@@ -443,7 +441,7 @@ const level = {
|
||||
if (index !== -1) {
|
||||
level.communityLevels.splice(index, 1);
|
||||
// console.log('removed level:', remove[i])
|
||||
requestAnimationFrame(() => { simulation.makeTextLog(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
|
||||
requestAnimationFrame(() => { simulation.inGameConsole(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
|
||||
}
|
||||
}
|
||||
// console.log('community levels after', level.communityLevels)
|
||||
@@ -454,7 +452,7 @@ const level = {
|
||||
if (index !== -1) {
|
||||
level.playableLevels.splice(index, 1);
|
||||
// console.log('removed level:', remove[i])
|
||||
requestAnimationFrame(() => { simulation.makeTextLog(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
|
||||
requestAnimationFrame(() => { simulation.inGameConsole(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
|
||||
}
|
||||
}
|
||||
// console.log('Landgreen levels after', level.playableLevels)
|
||||
@@ -628,7 +626,7 @@ const level = {
|
||||
let text = `
|
||||
<div class="choose-grid-module" id = "choose-training" style = "font-size: 1em; padding:10px;color:#333;">
|
||||
<h2 style="text-align: center;letter-spacing: 5px;">training</h2>
|
||||
Begin the <strong>guided tutorial</strong> that shows you how to use your ${powerUps.field.gun()} and ${powerUps.orb.gun()}.
|
||||
Begin the <strong>guided tutorial</strong> that shows you how to use your ${powerUps.field()} and ${powerUps.orb.gun()}.
|
||||
</div>
|
||||
<div class="choose-grid-module" id = "choose-unPause" style = "font-size: 1em; padding:10px;color:#333;">
|
||||
<h2 style="text-align: center; letter-spacing: 7px;">play</h2>
|
||||
@@ -2531,8 +2529,8 @@ const level = {
|
||||
//bonus power ups for clearing runs in the last game
|
||||
if (!simulation.isCheating && localSettings.levelsClearedLastGame > 1) {
|
||||
for (let i = 0; i < localSettings.levelsClearedLastGame / 3; i++) powerUps.spawn(2095 + 2 * Math.random(), -1270 - 50 * i, "tech", false); //spawn a tech for levels cleared in last game
|
||||
simulation.makeTextLog(`for (let i <span class='color-symbol'>=</span> 0; i <span class='color-symbol'><</span> localSettings.levelsClearedLastGame <span class='color-symbol'>/</span> 3; i<span class='color-symbol'>++</span>)`);
|
||||
simulation.makeTextLog(`{ powerUps.spawn(m.pos.x, m.pos.y, "tech") <em>//simulation superposition</em>}`);
|
||||
simulation.inGameConsole(`for (let i <span class='color-symbol'>=</span> 0; i <span class='color-symbol'><</span> localSettings.levelsClearedLastGame <span class='color-symbol'>/</span> 3; i<span class='color-symbol'>++</span>)`);
|
||||
simulation.inGameConsole(`{ powerUps.spawn(m.pos.x, m.pos.y, "tech") <em>//simulation superposition</em>}`);
|
||||
localSettings.levelsClearedLastGame = 0 //after getting bonus power ups reset run history
|
||||
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
}
|
||||
@@ -2981,7 +2979,7 @@ const level = {
|
||||
if (gateButton.isUp) {
|
||||
gateButton.query();
|
||||
if (!gateButton.isUp) {
|
||||
simulation.makeTextLog(`station gate opened`, 360);
|
||||
simulation.inGameConsole(`station gate opened`, 360);
|
||||
if (stationNumber > 0) {
|
||||
if (!isExitOpen && gatesOpenRight < stationNumber) level.newLevelOrPhase() //run some new level tech effects
|
||||
gatesOpenRight = stationNumber
|
||||
@@ -2993,7 +2991,7 @@ const level = {
|
||||
gatesOpenRight = stationNumber
|
||||
}
|
||||
if (Math.abs(stationNumber) > 0 && ((Math.abs(stationNumber) + 1) % stationList.length) === 0) {
|
||||
simulation.makeTextLog(`level exit opened`, 360);
|
||||
simulation.inGameConsole(`level exit opened`, 360);
|
||||
isExitOpen = true;
|
||||
}
|
||||
}
|
||||
@@ -8574,7 +8572,7 @@ const level = {
|
||||
|
||||
},
|
||||
stronghold() { // player made level by Francois 👑 from discord
|
||||
simulation.makeTextLog(`<strong>stronghold</strong> by <span class='color-var'>Francois</span>`);
|
||||
simulation.inGameConsole(`<strong>stronghold</strong> by <span class='color-var'>Francois</span>`);
|
||||
|
||||
const boost1 = level.boost(1470, -250, 1080)
|
||||
const boost2 = level.boost(-370, 0, 800)
|
||||
@@ -8744,7 +8742,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
basement() { // player made level by Francois 👑 from discord
|
||||
simulation.makeTextLog(`<strong>basement</strong> by <span class='color-var'>Francois</span>`);
|
||||
simulation.inGameConsole(`<strong>basement</strong> by <span class='color-var'>Francois</span>`);
|
||||
let button, door, buttonDoor, buttonPlateformEnd, doorPlateform
|
||||
let isLevelReversed = Math.random();
|
||||
if (isLevelReversed < 0.7) {
|
||||
@@ -9028,7 +9026,7 @@ const level = {
|
||||
powerUps.chooseRandomPowerUp(3100, 1630);
|
||||
},
|
||||
// detours() { //by Francois from discord
|
||||
// simulation.makeTextLog(`<strong>detours</strong> by <span class='color-var'>Francois</span>`);
|
||||
// simulation.inGameConsole(`<strong>detours</strong> by <span class='color-var'>Francois</span>`);
|
||||
// level.setPosToSpawn(0, 0); //lower start
|
||||
// level.exit.y = 150;
|
||||
// spawn.mapRect(level.enter.x, 45, 100, 20);
|
||||
@@ -9341,7 +9339,7 @@ const level = {
|
||||
// }
|
||||
// },
|
||||
house() { //by Francois from discord
|
||||
simulation.makeTextLog(`<strong>house</strong> by <span class='color-var'>Francois</span>`);
|
||||
simulation.inGameConsole(`<strong>house</strong> by <span class='color-var'>Francois</span>`);
|
||||
const rotor = level.rotor(4251, -325, 120, 20, 200, 0, 0.01, 0, -0.0001);
|
||||
const hazard = level.hazard(4350, -1000, 300, 110);
|
||||
const doorBedroom = level.door(1152, -1150, 25, 250, 250);
|
||||
@@ -9817,7 +9815,7 @@ const level = {
|
||||
}
|
||||
},
|
||||
perplex() { //by Oranger from discord
|
||||
simulation.makeTextLog(`<strong>perplex</strong> by <span class='color-var'>Oranger</span>`);
|
||||
simulation.inGameConsole(`<strong>perplex</strong> by <span class='color-var'>Oranger</span>`);
|
||||
document.body.style.backgroundColor = "#dcdcde";
|
||||
level.setPosToSpawn(-600, 400);
|
||||
spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20);
|
||||
@@ -10003,7 +10001,7 @@ const level = {
|
||||
spawn.secondaryBossChance(7725, 2275)
|
||||
},
|
||||
coliseum() {
|
||||
simulation.makeTextLog(`<strong>coliseum</strong> by <span class='color-var'>iNoobBoi</span>`);
|
||||
simulation.inGameConsole(`<strong>coliseum</strong> by <span class='color-var'>iNoobBoi</span>`);
|
||||
level.custom = () => {
|
||||
level.exit.drawAndCheck();
|
||||
|
||||
@@ -10154,7 +10152,7 @@ const level = {
|
||||
spawn.secondaryBossChance(6600, 600)
|
||||
},
|
||||
crossfire() {
|
||||
simulation.makeTextLog(`<strong>crossfire</strong> by <span class='color-var'>iNoobBoi</span>`);
|
||||
simulation.inGameConsole(`<strong>crossfire</strong> by <span class='color-var'>iNoobBoi</span>`);
|
||||
|
||||
//*1.5
|
||||
//Level Setup
|
||||
@@ -10319,7 +10317,7 @@ const level = {
|
||||
spawn.debris(9300, -900, 400, debrisCount);
|
||||
},
|
||||
vats() { // Made by Dablux#6610 on Discord
|
||||
simulation.makeTextLog(`<strong>vats</strong> by <span class='color-var'>Dablux</span>`);
|
||||
simulation.inGameConsole(`<strong>vats</strong> by <span class='color-var'>Dablux</span>`);
|
||||
|
||||
simulation.zoomScale = 1500;
|
||||
level.setPosToSpawn(4400, -1060)
|
||||
@@ -10761,7 +10759,7 @@ const level = {
|
||||
}
|
||||
},
|
||||
ngon() { //make by Oranger
|
||||
simulation.makeTextLog(`<strong>"ngon"</strong> by <span class='color-var'>Oranger</span>`);
|
||||
simulation.inGameConsole(`<strong>"ngon"</strong> by <span class='color-var'>Oranger</span>`);
|
||||
|
||||
document.body.style.backgroundColor = "#dcdcde";
|
||||
let needGravity = [];
|
||||
@@ -11166,7 +11164,7 @@ const level = {
|
||||
}
|
||||
},
|
||||
tunnel() { // by Scarlettt
|
||||
simulation.makeTextLog(`<strong>tunnel</strong> by <span class='color-var'>Scarlettt</span>`);
|
||||
simulation.inGameConsole(`<strong>tunnel</strong> by <span class='color-var'>Scarlettt</span>`);
|
||||
|
||||
level.custom = () => {
|
||||
level.exit.drawAndCheck();
|
||||
@@ -11640,7 +11638,7 @@ const level = {
|
||||
}
|
||||
},
|
||||
run() {
|
||||
simulation.makeTextLog(`<strong>run</strong> by <span class='color-var'>iNoobBoi</span>`);
|
||||
simulation.inGameConsole(`<strong>run</strong> by <span class='color-var'>iNoobBoi</span>`);
|
||||
|
||||
addPartToMap = (len) => { //adds new map elements to the level while the level is already running //don't forget to run simulation.draw.setPaths() after you all the the elements so they show up visually
|
||||
map[len].collisionFilter.category = cat.map;
|
||||
@@ -11689,14 +11687,14 @@ const level = {
|
||||
addPartToMap(map.length - 1);
|
||||
simulation.draw.setPaths();
|
||||
|
||||
simulation.makeTextLog(`<strong>UNKNOWN</strong>: "Well done. Now climb."`, 600);
|
||||
simulation.makeTextLog(`<strong>UNKNOWN</strong>: "I left a gift at the top."`, 600);
|
||||
simulation.inGameConsole(`<strong>UNKNOWN</strong>: "Well done. Now climb."`, 600);
|
||||
simulation.inGameConsole(`<strong>UNKNOWN</strong>: "I left a gift at the top."`, 600);
|
||||
|
||||
climbTime = true;
|
||||
} //toggles on a mapRect when player passes a certain area
|
||||
|
||||
if (m.pos.x > 9000 && endTime === false) {
|
||||
simulation.makeTextLog("<strong>UNKNOWN</strong>: \"Good luck. I hope you get out of here.\"", 600);
|
||||
simulation.inGameConsole("<strong>UNKNOWN</strong>: \"Good luck. I hope you get out of here.\"", 600);
|
||||
endTime = true;
|
||||
}
|
||||
|
||||
@@ -11877,11 +11875,11 @@ const level = {
|
||||
|
||||
//Mob Spawning
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog("<strong>UNKNOWN</strong>: \"You cannot kill them.\"", 600);
|
||||
simulation.inGameConsole("<strong>UNKNOWN</strong>: \"You cannot kill them.\"", 600);
|
||||
}, 2000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog("<strong>UNKNOWN</strong>: \"But I have slowed them down for you.\"", 600);
|
||||
simulation.inGameConsole("<strong>UNKNOWN</strong>: \"But I have slowed them down for you.\"", 600);
|
||||
}, 6000);
|
||||
|
||||
|
||||
@@ -11897,7 +11895,7 @@ const level = {
|
||||
spawn[runMobList[Math.floor(Math.random() * runMobList.length)]](6600, -1000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog("<strong>UNKNOWN</strong>: \"Run.\"", 600);
|
||||
simulation.inGameConsole("<strong>UNKNOWN</strong>: \"Run.\"", 600);
|
||||
}, 10000);
|
||||
} //some of the mobs
|
||||
if (simulation.difficulty > 20) {
|
||||
@@ -11907,7 +11905,7 @@ const level = {
|
||||
spawn[runMobList[Math.floor(Math.random() * runMobList.length)]](7400, -800);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog("<strong>UNKNOWN</strong>: \"RUN!\"", 600);
|
||||
simulation.inGameConsole("<strong>UNKNOWN</strong>: \"RUN!\"", 600);
|
||||
}, 11000);
|
||||
} //most of the mobs
|
||||
if (simulation.difficulty > 30) {
|
||||
@@ -11917,7 +11915,7 @@ const level = {
|
||||
spawn[runMobList[Math.floor(Math.random() * runMobList.length)]](7500, -300);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog("<strong>UNKNOWN</strong>: \"GET OUT OF HERE.\"", 600);
|
||||
simulation.inGameConsole("<strong>UNKNOWN</strong>: \"GET OUT OF HERE.\"", 600);
|
||||
}, 12000);
|
||||
} //all the mobs
|
||||
|
||||
@@ -11926,7 +11924,7 @@ const level = {
|
||||
spawn.randomLevelBoss(-2200, -700, ["powerUpBossBaby", "blockBoss", "revolutionBoss"]);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog("<strong>UNKNOWN</strong>: \"They are coming for you.\"", 600);
|
||||
simulation.inGameConsole("<strong>UNKNOWN</strong>: \"They are coming for you.\"", 600);
|
||||
}, 14000);
|
||||
}
|
||||
anotherBoss(-1800, -700); //custom second boss spawn
|
||||
@@ -11982,7 +11980,7 @@ const level = {
|
||||
}
|
||||
},
|
||||
islands() {
|
||||
simulation.makeTextLog(`<strong>islands</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole(`<strong>islands</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
|
||||
const boost1 = level.boost(58500, -18264, 1300);
|
||||
let portal2, portal3;
|
||||
@@ -12327,7 +12325,7 @@ const level = {
|
||||
powerUps.spawn(3000, -230, "heal");
|
||||
},
|
||||
temple() {
|
||||
simulation.makeTextLog(`<strong>temple</strong> by <span class='color-var'>Scar1337</span>`);
|
||||
simulation.inGameConsole(`<strong>temple</strong> by <span class='color-var'>Scar1337</span>`);
|
||||
|
||||
const V = Vector;
|
||||
const Equation = (function () {
|
||||
@@ -13489,7 +13487,7 @@ const level = {
|
||||
if (!isInBounds) {
|
||||
m.damage(0.1 * simulation.difficultyMode);
|
||||
trapPlayer(level.enter.x, level.enter.y);
|
||||
simulation.makeTextLog("<span style='color: #f00'>" + name + "</span>: You thought I could let you get away with that?");
|
||||
simulation.inGameConsole("<span style='color: #f00'>" + name + "</span>: You thought I could let you get away with that?");
|
||||
}
|
||||
},
|
||||
room0() {
|
||||
@@ -13895,7 +13893,7 @@ const level = {
|
||||
setPos(a, b);
|
||||
freeze(a);
|
||||
};
|
||||
const makeLore = (x, t) => simulation.makeTextLog(`<h2 style='color: #f00; display: inline-block'>${name}:</h2> <h3 style='display: inline-block'>${x}</h3>`, t);
|
||||
const makeLore = (x, t) => simulation.inGameConsole(`<h2 style='color: #f00; display: inline-block'>${name}:</h2> <h3 style='display: inline-block'>${x}</h3>`, t);
|
||||
level.custom = () => {
|
||||
// All the logic gets handled here. How nice!
|
||||
for (const i in LogicHandler) {
|
||||
@@ -13924,7 +13922,7 @@ const level = {
|
||||
};
|
||||
},
|
||||
dripp() {
|
||||
simulation.makeTextLog(`<strong>dripp</strong> by <span class='color-var'>M. B.</span>`);
|
||||
simulation.inGameConsole(`<strong>dripp</strong> by <span class='color-var'>M. B.</span>`);
|
||||
|
||||
const door = level.door(780, -350, 15, 400, 265);
|
||||
const buttonDoor = level.button(420, -10);
|
||||
@@ -14119,7 +14117,7 @@ const level = {
|
||||
},
|
||||
biohazard() {
|
||||
// MAP BY INOOBBOI AND THESHWARMA
|
||||
simulation.makeTextLog(`<strong>biohazard</strong> by <span class='color-var'>INOOBBOI</span> and <span class='color-var'>THESHWARMA</span>`);
|
||||
simulation.inGameConsole(`<strong>biohazard</strong> by <span class='color-var'>INOOBBOI</span> and <span class='color-var'>THESHWARMA</span>`);
|
||||
|
||||
// set here for the cutscene later
|
||||
level.setPosToSpawn(-2800, -150)
|
||||
@@ -15266,7 +15264,7 @@ const level = {
|
||||
anotherBoss(0, 0) //will only spawn historyBoss if there is an additional boss
|
||||
},
|
||||
stereoMadness() {
|
||||
simulation.makeTextLog(`<strong>stereoMadness</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole(`<strong>stereoMadness</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
let totalCoin = 0;
|
||||
const hunter = function (x, y, radius = 30) { //doesn't stop chasing until past 105000
|
||||
mobs.spawn(x, y, 6, radius, "black");
|
||||
@@ -15280,7 +15278,7 @@ const level = {
|
||||
me.memory = Infinity;
|
||||
me.seeAtDistance2 = Infinity;
|
||||
Matter.Body.setDensity(me, 1)
|
||||
simulation.makeTextLog(`<b style="color: #3498DB;">Ω:</b><em style="color: #141414;"><b> Intruder Detected</b></em>`);
|
||||
simulation.inGameConsole(`<b style="color: #3498DB;">Ω:</b><em style="color: #141414;"><b> Intruder Detected</b></em>`);
|
||||
me.boost = 10;
|
||||
me.do = function () {
|
||||
if (me.boost == 1 && m.fieldMode == 3 || m.fieldMode == 9 && me.boost == 1) {
|
||||
@@ -15463,7 +15461,7 @@ const level = {
|
||||
innerBar.style.backgroundColor = m.eyeFillColor;
|
||||
}
|
||||
if (m.pos.x > 25360 && textlogOne == 0) {
|
||||
simulation.makeTextLog(`<div><em>A stong force pushes you forward...</em></div>`)
|
||||
simulation.inGameConsole(`<div><em>A stong force pushes you forward...</em></div>`)
|
||||
textlogOne++;
|
||||
}
|
||||
if (m.pos.x < -3000) {
|
||||
@@ -15473,12 +15471,12 @@ const level = {
|
||||
});
|
||||
|
||||
if (textlogTwo == 0)
|
||||
simulation.makeTextLog(`<div><em>A strong force pushes you away...</em></div>`);
|
||||
simulation.inGameConsole(`<div><em>A strong force pushes you away...</em></div>`);
|
||||
textlogTwo++;
|
||||
}
|
||||
if (m.pos.y > 1055) {
|
||||
Matter.Body.setPosition(player, { x: 0, y: -150 });
|
||||
simulation.makeTextLog(`<div><em>There is nowhere to run...</em></div>`);
|
||||
simulation.inGameConsole(`<div><em>There is nowhere to run...</em></div>`);
|
||||
m.damage(0.1 * simulation.difficultyMode);
|
||||
}
|
||||
if (m.alive == false && barThere == true) {
|
||||
@@ -16080,7 +16078,7 @@ const level = {
|
||||
}
|
||||
document.body.style.transitionDuration = "0ms";
|
||||
document.body.style.backgroundColor = "#696969";
|
||||
simulation.makeTextLog(`<div><em>You have earned: </em><b>` + Math.min(3, totalCoin) + `</b><em> tech</em></div>`)
|
||||
simulation.inGameConsole(`<div><em>You have earned: </em><b>` + Math.min(3, totalCoin) + `</b><em> tech</em></div>`)
|
||||
if (barThere == true) { //only runs once
|
||||
document.body.removeChild(bar);
|
||||
for (let i = 0, len = Math.min(3, totalCoin); i < len; i++) powerUps.directSpawn(player.position.x, player.position.y, "tech");
|
||||
@@ -16846,7 +16844,7 @@ const level = {
|
||||
hunter(0, -1000)
|
||||
},
|
||||
yingYang() {
|
||||
simulation.makeTextLog(`<strong>yingYang</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole(`<strong>yingYang</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
|
||||
let destroyed = false;
|
||||
const lock = level.door(425, -1400, 50, 300, 300);
|
||||
@@ -17198,7 +17196,7 @@ const level = {
|
||||
powerUps.addResearchToLevel()
|
||||
},
|
||||
staircase() {
|
||||
simulation.makeTextLog(`<strong>staircase</strong> by <span class='color-var'>ryanbear</span>`);
|
||||
simulation.inGameConsole(`<strong>staircase</strong> by <span class='color-var'>ryanbear</span>`);
|
||||
|
||||
level.custom = () => {
|
||||
level.exit.drawAndCheck();
|
||||
@@ -17286,7 +17284,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
fortress() {
|
||||
simulation.makeTextLog(`<strong>fortress</strong> by <span class='color-var'>Desboot</span>`);
|
||||
simulation.inGameConsole(`<strong>fortress</strong> by <span class='color-var'>Desboot</span>`);
|
||||
const boost1 = level.boost(3600, -250, 1000)
|
||||
const boost2 = level.boost(60, -604, 1000)
|
||||
const boost3 = level.boost(2160, -1260, 1000)
|
||||
@@ -17427,7 +17425,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
commandeer() {
|
||||
simulation.makeTextLog(`<strong>commandeer</strong> by <span class='color-var'>Desboot</span>`);
|
||||
simulation.inGameConsole(`<strong>commandeer</strong> by <span class='color-var'>Desboot</span>`);
|
||||
|
||||
let waterFallWidth = 400
|
||||
let waterFallX = 15900
|
||||
@@ -18030,7 +18028,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
clock() {
|
||||
simulation.makeTextLog(`<strong>clock</strong> by <span class='color-var'>Cornbread 2100</span>`);
|
||||
simulation.inGameConsole(`<strong>clock</strong> by <span class='color-var'>Cornbread 2100</span>`);
|
||||
|
||||
function drawBackgroundGear(x, y, r1, r2, rot, color, speed, numTeeth = 5, toothWidth = 75, linew = 2) {
|
||||
var vertices = getGearVertices(x, y, r1, r2, numTeeth, simulation.cycle * speed + rot, toothWidth / 100);
|
||||
@@ -19768,7 +19766,7 @@ const level = {
|
||||
}
|
||||
},
|
||||
buttonbutton() {
|
||||
simulation.makeTextLog(`<strong>buttonbutton</strong> by <span class='color-var'>||Destabilized E||</span>`);
|
||||
simulation.inGameConsole(`<strong>buttonbutton</strong> by <span class='color-var'>||Destabilized E||</span>`);
|
||||
const mover = level.mover(1425, -1949, 600, 25); //x,y,width.height,VxGoal,force
|
||||
|
||||
let portal
|
||||
@@ -19875,7 +19873,7 @@ const level = {
|
||||
spawn.randomLevelBoss(1840, 675)
|
||||
},
|
||||
movers() {
|
||||
simulation.makeTextLog(`<strong>movers</strong> by <span class='color-var'>ryanbear</span>`);
|
||||
simulation.inGameConsole(`<strong>movers</strong> by <span class='color-var'>ryanbear</span>`);
|
||||
level.custom = () => {
|
||||
level.exit.drawAndCheck();
|
||||
level.enter.draw();
|
||||
@@ -20028,7 +20026,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
downpour() {
|
||||
simulation.makeTextLog(`<strong>Downpour</strong> by <span class='color-var'>DesBoot</span>`);
|
||||
simulation.inGameConsole(`<strong>Downpour</strong> by <span class='color-var'>DesBoot</span>`);
|
||||
let mobsspawned = 0
|
||||
const laser = level.hazard(7492, -2612, 10, 500, 0.3) //laserintro
|
||||
|
||||
@@ -20063,7 +20061,7 @@ const level = {
|
||||
// color.map = "#444" //custom map color
|
||||
|
||||
|
||||
//simulation.makeTextLog(stopcycle)
|
||||
//simulation.inGameConsole(stopcycle)
|
||||
level.custom = () => {
|
||||
do {
|
||||
|
||||
@@ -20090,17 +20088,17 @@ const level = {
|
||||
// }
|
||||
// if (rainCount > 12) {
|
||||
// rainCount = 1
|
||||
// simulation.makeTextLog(rainCount)
|
||||
// simulation.inGameConsole(rainCount)
|
||||
|
||||
// } else {
|
||||
// rainCount = rainCount + 1
|
||||
// simulation.makeTextLog(rainCount)
|
||||
// simulation.inGameConsole(rainCount)
|
||||
// }
|
||||
} while (Math.random() < 0.8);
|
||||
//simulation.makeTextLog(stopcycle)
|
||||
//simulation.makeTextLog(m.cycle)
|
||||
//simulation.inGameConsole(stopcycle)
|
||||
//simulation.inGameConsole(m.cycle)
|
||||
// ctx.fillStyle = "rgba(228,255,0,0.8)"
|
||||
// //simulation.makeTextLog(stopcycle)
|
||||
// //simulation.inGameConsole(stopcycle)
|
||||
// ctx.fillRect(50.4, -1210.0, 100, 100)
|
||||
// stopcycle = m.cycle + Math.random * 600;
|
||||
//stopcycle = m.cycles + Math.random * 600
|
||||
@@ -22895,7 +22893,7 @@ const level = {
|
||||
Object.assign(spawn, obj); //ez
|
||||
},
|
||||
superNgonBros() {
|
||||
simulation.makeTextLog(`<strong>Super N-gon Bros</strong> by <span class='color-var'>DesBoot</span>`);
|
||||
simulation.inGameConsole(`<strong>Super N-gon Bros</strong> by <span class='color-var'>DesBoot</span>`);
|
||||
|
||||
let bowserKilled = 0
|
||||
let flagY = -750
|
||||
@@ -23019,19 +23017,19 @@ const level = {
|
||||
me.onDeath = function () {
|
||||
if (Math.random() < 0.1) {
|
||||
spawn.randomSmallMob(me.position.x, me.position.y - 75);
|
||||
simulation.makeTextLog('mob')
|
||||
simulation.inGameConsole('mob')
|
||||
} else {
|
||||
if (Math.random() < 0.07) {
|
||||
powerUps.spawn(me.position.x, me.position.y + (75 * (player.velocity.y / Math.abs(player.velocity.y))), "tech", true);
|
||||
simulation.makeTextLog('tech')
|
||||
simulation.inGameConsole('tech')
|
||||
} else {
|
||||
if (Math.random() < 0.4) {
|
||||
powerUps.spawn(me.position.x, me.position.y + (75 * (player.velocity.y / Math.abs(player.velocity.y))), "heal", true);
|
||||
simulation.makeTextLog('heal')
|
||||
simulation.inGameConsole('heal')
|
||||
} else {
|
||||
//if (Math.random() < 0.8){
|
||||
powerUps.spawn(me.position.x, me.position.y + (75 * (player.velocity.y / Math.abs(player.velocity.y))), "ammo", true);
|
||||
simulation.makeTextLog('ammo')
|
||||
simulation.inGameConsole('ammo')
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -23079,7 +23077,7 @@ const level = {
|
||||
firstElevatorY -= 5
|
||||
}
|
||||
|
||||
//simulation.makeTextLog(firstElevatorY)
|
||||
//simulation.inGameConsole(firstElevatorY)
|
||||
elevator1.move();
|
||||
elevator2.move();
|
||||
if (player.position.x > 0 && player.position.y < -9000 && player.position.y > -10000) {
|
||||
@@ -23095,7 +23093,7 @@ const level = {
|
||||
portal[3].query()
|
||||
portal2[2].query()
|
||||
portal2[3].query()
|
||||
//simulation.makeTextLog(firstBlockBroken)
|
||||
//simulation.inGameConsole(firstBlockBroken)
|
||||
level.exit.drawAndCheck();
|
||||
if (player.position.x > 4100 && secondMobsReached == 0) {
|
||||
secondMobsSpawned = 1
|
||||
@@ -23138,7 +23136,7 @@ const level = {
|
||||
level.enter.draw();
|
||||
if (finalRoomReached == 0 && player.position.x > 21150) {
|
||||
finalRoomReached = 1
|
||||
simulation.makeTextLog('Thank you M, but our techs are in another castle!')
|
||||
simulation.inGameConsole('Thank you M, but our techs are in another castle!')
|
||||
}
|
||||
//mobs
|
||||
if (firstMobsSpawned == 1 && firstMobsReached == 0) {
|
||||
@@ -23414,7 +23412,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
underpass() {
|
||||
simulation.makeTextLog(`<strong>underpass</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole(`<strong>underpass</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
|
||||
let key = false;
|
||||
const door = level.door(2650, -825, 50, 250, 250, 10);
|
||||
@@ -26295,7 +26293,7 @@ const level = {
|
||||
},
|
||||
cantilever() { // made by Eclipse#7932 on discord, (TheSpudguy)(@PurpleSunsetGames on github)
|
||||
// simulation.enableConstructMode();
|
||||
simulation.makeTextLog(`<strong>underpass</strong> by <span class='color-var'>Eclipse#7932</span>`);
|
||||
simulation.inGameConsole(`<strong>underpass</strong> by <span class='color-var'>Eclipse#7932</span>`);
|
||||
|
||||
level.setPosToSpawn(0, -50); //normal spawn
|
||||
level.exit.x = 5500;
|
||||
@@ -26358,7 +26356,7 @@ const level = {
|
||||
powerUps.addResearchToLevel(); //needs to run after mobs are spawned
|
||||
},
|
||||
tlinat() { // _Destined_ formerly Richard0820#2652
|
||||
simulation.makeTextLog(`<strong>tlinat</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole(`<strong>tlinat</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.fallHeight = 1 / 0, level.setPosToSpawn(0, -1e3), level.exit.x = 5100, level.exit.y = 3770, spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20), spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 20), level.defaultZoom = 3000, simulation.zoomTransition(level.defaultZoom), document.body.style.backgroundColor = "#d8dadf";
|
||||
let e = 0,
|
||||
t = 0;
|
||||
@@ -26498,7 +26496,7 @@ const level = {
|
||||
n(o[l], e + 250 * l - Math.abs(1.5 * e), t)
|
||||
}
|
||||
}
|
||||
simulation.makeTextLog(`<img src="https://raw.githubusercontent.com/Whyisthisnotavalable/image-yy/main/Hotpot-removed.png" width="100" height="100" style="background-image: radial-gradient(circle, gray, black, transparent)"><br>Look up<br><em>Walk right to tp to maze</em><br><b>Exit is at the bottom left</b>`), Matter.Body.scale(player.parts[3], 2, 2), level.custom = () => {
|
||||
simulation.inGameConsole(`<img src="https://raw.githubusercontent.com/Whyisthisnotavalable/image-yy/main/Hotpot-removed.png" width="100" height="100" style="background-image: radial-gradient(circle, gray, black, transparent)"><br>Look up<br><em>Walk right to tp to maze</em><br><b>Exit is at the bottom left</b>`), Matter.Body.scale(player.parts[3], 2, 2), level.custom = () => {
|
||||
if (level.exit.drawAndCheck(), level.enter.draw(), player.position.y > 1e5 && Matter.Body.setPosition(player, {
|
||||
x: 5100,
|
||||
y: -5925
|
||||
@@ -26508,7 +26506,7 @@ const level = {
|
||||
y: -5925
|
||||
}), e++;
|
||||
for (let e = 0; e < map.length; e++) Math.random() < .75 && ghoster(map[e].position.x, map[e].position.y);
|
||||
simulation.makeTextLog("Watch out for <b>ghosters</b><br>Peace ✌️")
|
||||
simulation.inGameConsole("Watch out for <b>ghosters</b><br>Peace ✌️")
|
||||
}
|
||||
player.position.x > level.exit.x && player.position.x < level.exit.x + 100 && player.position.y > level.exit.y - 150 && player.position.y < level.exit.y - 0 && player.velocity.y < .15 && 0 == t && (t++, Matter.Body.scale(player.parts[3], .5, .5))
|
||||
}, level.customTopLayer = () => {
|
||||
@@ -26581,7 +26579,7 @@ const level = {
|
||||
},
|
||||
ruins() { // by SiddhUPe
|
||||
// simulation.enableConstructMode()
|
||||
simulation.makeTextLog(`<strong>ruins</strong> by <span class='color-var'>SiddhUPe</span>`);
|
||||
simulation.inGameConsole(`<strong>ruins</strong> by <span class='color-var'>SiddhUPe</span>`);
|
||||
|
||||
level.setPosToSpawn(0, -50); //normal spawn
|
||||
level.exit.x = 19531;
|
||||
@@ -27662,7 +27660,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
ace() {
|
||||
simulation.makeTextLog(`<strong>ace</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole(`<strong>ace</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
let isDestroyed = false;
|
||||
const ace = {
|
||||
spawnOrbitals(who, radius, chance = Math.min(0.25 + simulation.difficulty * 0.005)) {
|
||||
@@ -28935,7 +28933,7 @@ const level = {
|
||||
}
|
||||
},
|
||||
crimsonTowers() {
|
||||
simulation.makeTextLog(`crimsonTowers by Richard0820. Thank you desboot for the video: <a href="https://www.youtube.com/watch?v=hkdY0mDF2SY&feature=youtu.be&ab_channel=DesBoot">Source</a>`)
|
||||
simulation.inGameConsole(`crimsonTowers by Richard0820. Thank you desboot for the video: <a href="https://www.youtube.com/watch?v=hkdY0mDF2SY&feature=youtu.be&ab_channel=DesBoot">Source</a>`)
|
||||
const ace = {
|
||||
spawnOrbitals(who, radius, chance = Math.min(0.25 + simulation.difficulty * 0.005)) {
|
||||
if (Math.random() < chance) {
|
||||
@@ -30070,8 +30068,8 @@ const level = {
|
||||
level.exit.x = map[272].position.x;
|
||||
},
|
||||
LaunchSite() {
|
||||
simulation.makeTextLog(`<strong>Launch Site</strong> by <span class='color-var'>Des Boot</span>`);
|
||||
simulation.makeTextLog(`The rain stopped...`);
|
||||
simulation.inGameConsole(`<strong>Launch Site</strong> by <span class='color-var'>Des Boot</span>`);
|
||||
simulation.inGameConsole(`The rain stopped...`);
|
||||
level.setPosToSpawn(0, -50); //normal spawn
|
||||
const elevatortoggle = level.toggle(13650, 3000)
|
||||
let newMobsSpawned = false;
|
||||
@@ -30486,7 +30484,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
shipwreck() {
|
||||
simulation.makeTextLog(`<strong>shipwreck</strong> by <span class='color-var'>3xionDev</span>`);
|
||||
simulation.inGameConsole(`<strong>shipwreck</strong> by <span class='color-var'>3xionDev</span>`);
|
||||
level.setPosToSpawn(0, -50); //normal spawn
|
||||
level.exit.x = 1500;
|
||||
level.exit.y = -1875;
|
||||
@@ -30800,7 +30798,7 @@ const level = {
|
||||
level.customTopLayer = () => { };
|
||||
},
|
||||
unchartedCave() {
|
||||
simulation.makeTextLog(`<strong>unchartedCave</strong> by <span class='color-var'>3xionDev</span>`);
|
||||
simulation.inGameConsole(`<strong>unchartedCave</strong> by <span class='color-var'>3xionDev</span>`);
|
||||
level.setPosToSpawn(0, -50); //normal spawn
|
||||
level.exit.x = 20985;
|
||||
level.exit.y = 2816;
|
||||
@@ -31211,7 +31209,7 @@ const level = {
|
||||
level.customTopLayer = () => { };
|
||||
},
|
||||
dojo() { // By weird_pusheen
|
||||
simulation.makeTextLog(`<strong>dojo</strong> by <span class='color-var'>werid_pusheen</span>, fixed by <span class='color-var'>Cornbread 2100</span>`)
|
||||
simulation.inGameConsole(`<strong>dojo</strong> by <span class='color-var'>werid_pusheen</span>, fixed by <span class='color-var'>Cornbread 2100</span>`)
|
||||
const vanishes = [];
|
||||
const smoofes = [];
|
||||
const leftRotor = level.rotor(-550, 900, 950, 25);
|
||||
@@ -31661,7 +31659,7 @@ const level = {
|
||||
powerUps.addResearchToLevel() //needs to run after mobs are spawned
|
||||
},
|
||||
arena() {
|
||||
simulation.makeTextLog(`<strong>arena</strong> by <span class='color-var'>Whyisthisnotavalable</span>`)
|
||||
simulation.inGameConsole(`<strong>arena</strong> by <span class='color-var'>Whyisthisnotavalable</span>`)
|
||||
let genisis, genisisJumpSensor, genisisBody, genisisHead, genisisHeadSensor, genisisBodySensor;
|
||||
let control = { left: false, right: false, up: false, down: false };
|
||||
const g = {
|
||||
@@ -32235,7 +32233,7 @@ const level = {
|
||||
if (tech.isCollisionRealitySwitch && g.alive) {
|
||||
g.switchWorlds()
|
||||
simulation.trails()
|
||||
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
simulation.inGameConsole(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
}
|
||||
if (tech.isPiezo) g.energy += 20.48;
|
||||
if (tech.isCouplingNoHit && g.coupling > 0) {
|
||||
@@ -32706,10 +32704,10 @@ const level = {
|
||||
);
|
||||
b.guns = gunArray;
|
||||
} else {
|
||||
simulation.makeTextLog(`Thank you for using my sword mod<br>I'll save you the trouble of killing genisis<br><div style="font-family: monospace;">g.<span style="color: crimson;">damage</span>(Infinity)</div>`);
|
||||
simulation.inGameConsole(`Thank you for using my sword mod<br>I'll save you the trouble of killing genisis<br><div style="font-family: monospace;">g.<span style="color: crimson;">damage</span>(Infinity)</div>`);
|
||||
g.damage(Infinity);
|
||||
}
|
||||
simulation.makeTextLog(`<strong>arena</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole(`<strong>arena</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
let index = 0;
|
||||
let index2 = 0;
|
||||
let { sword: sword, bladeSegments: bladeSegments } = createSword();
|
||||
@@ -32898,7 +32896,7 @@ const level = {
|
||||
}
|
||||
}
|
||||
index2++;
|
||||
setTimeout(() => { simulation.makeTextLog(`If you want to keep this sword, visit <a href="https://github.com/Whyisthisnotavalable/n-scythe">https://github.com/Whyisthisnotavalable/n-scythe</a>. The sword is there.`) }, 1000)
|
||||
setTimeout(() => { simulation.inGameConsole(`If you want to keep this sword, visit <a href="https://github.com/Whyisthisnotavalable/n-scythe">https://github.com/Whyisthisnotavalable/n-scythe</a>. The sword is there.`) }, 1000)
|
||||
}
|
||||
for (let i = 0; i < bladeSegments.length; i++) {
|
||||
const blade = bladeSegments[i];
|
||||
@@ -33464,9 +33462,9 @@ const level = {
|
||||
}
|
||||
},
|
||||
soft() {
|
||||
simulation.makeTextLog(`<img src="https://raw.githubusercontent.com/Whyisthisnotavalable/image-yy/main/Hotpot-removed.png" width="100" height="100" style="background-image: radial-gradient(circle, gray, black, transparent)">`);
|
||||
simulation.makeTextLog(`<strong>soft</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.makeTextLog("<em>The lasers deal less damage the higher level you are</em>")
|
||||
simulation.inGameConsole(`<img src="https://raw.githubusercontent.com/Whyisthisnotavalable/image-yy/main/Hotpot-removed.png" width="100" height="100" style="background-image: radial-gradient(circle, gray, black, transparent)">`);
|
||||
simulation.inGameConsole(`<strong>soft</strong> by <span class='color-var'>Richard0820</span>`);
|
||||
simulation.inGameConsole("<em>The lasers deal less damage the higher level you are</em>")
|
||||
const portals = [];
|
||||
portals.push(level.portal({
|
||||
x: -1525,
|
||||
@@ -33943,7 +33941,7 @@ const level = {
|
||||
soft.annihilate(clothArray[0]);
|
||||
clothArray.splice(0, 1);
|
||||
}, 1000); //prevents bugs
|
||||
simulation.makeTextLog("Couldn't be so simple, could it?", 2000 * Math.random());
|
||||
simulation.inGameConsole("Couldn't be so simple, could it?", 2000 * Math.random());
|
||||
index1++;
|
||||
}
|
||||
};
|
||||
@@ -34021,10 +34019,10 @@ const level = {
|
||||
},
|
||||
flappyGon() { //community map by digin
|
||||
level.announceMobTypes();
|
||||
simulation.makeTextLog(`<strong>flappy n-gon</strong> by <span style="font-weight: bold;color: purple;">Digin</span>`);
|
||||
setTimeout(() => { simulation.makeTextLog("<b>gravity</b> is a <b>choice</b>"); }, 1000);
|
||||
setTimeout(() => { simulation.makeTextLog("everyone will fly"); }, 2000);
|
||||
setTimeout(() => { simulation.makeTextLog("<b>jump from the post and find out</b>"); }, 3000);
|
||||
simulation.inGameConsole(`<strong>flappy n-gon</strong> by <span style="font-weight: bold;color: purple;">Digin</span>`);
|
||||
setTimeout(() => { simulation.inGameConsole("<b>gravity</b> is a <b>choice</b>"); }, 1000);
|
||||
setTimeout(() => { simulation.inGameConsole("everyone will fly"); }, 2000);
|
||||
setTimeout(() => { simulation.inGameConsole("<b>jump from the post and find out</b>"); }, 3000);
|
||||
level.setPosToSpawn(0, -50); //normal spawn
|
||||
level.exit.x = 8600;
|
||||
level.exit.y = -1100;
|
||||
@@ -34100,9 +34098,9 @@ const level = {
|
||||
},
|
||||
rings() {
|
||||
level.announceMobTypes();
|
||||
simulation.makeTextLog(`<strong>rings</strong> by <span style="font-weight: bold;color: purple;">ThatLittleFrog</span>`);
|
||||
simulation.inGameConsole(`<strong>rings</strong> by <span style="font-weight: bold;color: purple;">ThatLittleFrog</span>`);
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog("<b>go up</b>");
|
||||
simulation.inGameConsole("<b>go up</b>");
|
||||
}, 2000);
|
||||
level.setPosToSpawn(0, -2000); // spawn high up so you can go to the bottom of the lowest ring without tripping the too-low reset
|
||||
level.exit.x = 0;
|
||||
@@ -34213,7 +34211,7 @@ const level = {
|
||||
powerUps.addResearchToLevel();
|
||||
},
|
||||
trial() { // trial, collab between Cirryn and Tarantula Hawk
|
||||
simulation.makeTextLog(`<strong>trial</strong> by <span class='color-var'>Cirryn and Tarantula Hawk</span>`);
|
||||
simulation.inGameConsole(`<strong>trial</strong> by <span class='color-var'>Cirryn and Tarantula Hawk</span>`);
|
||||
level.setPosToSpawn(0, -50);
|
||||
level.exit.x = 4150;
|
||||
level.exit.y = -30;
|
||||
@@ -34324,40 +34322,40 @@ const level = {
|
||||
door.draw();
|
||||
if (!button.isUp && !didTrialBegin) {
|
||||
didTrialBegin = true;
|
||||
simulation.makeTextLog('<strong>The Trial has begun.</strong>');
|
||||
simulation.inGameConsole('<strong>The Trial has begun.</strong>');
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog('<span style="color: purple;">first wave (domitable)</span>');
|
||||
simulation.inGameConsole('<span style="color: purple;">first wave (domitable)</span>');
|
||||
wave(randomWave(2 + simulation.difficulty * 0.1, spawn.fullPickList));
|
||||
}, 3000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog('<span style="color: purple;">second wave (domitable)</span>');
|
||||
simulation.inGameConsole('<span style="color: purple;">second wave (domitable)</span>');
|
||||
wave(randomWave(2 + simulation.difficulty * 0.1, spawn.fullPickList));
|
||||
}, 13000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog('<span style="color: purple;">third wave <strong>(indomitable)</strong></span>');
|
||||
simulation.inGameConsole('<span style="color: purple;">third wave <strong>(indomitable)</strong></span>');
|
||||
wave(randomWave(4, ["assassin"]));
|
||||
}, 23000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog('<span style="color: purple;">fourth wave (domitable)</span>');
|
||||
simulation.inGameConsole('<span style="color: purple;">fourth wave (domitable)</span>');
|
||||
wave(randomWave(4 + simulation.difficulty / 2, spawn.fullPickList));
|
||||
}, 39000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog('<span style="color: purple;">fifth wave (domitable)</span>');
|
||||
simulation.inGameConsole('<span style="color: purple;">fifth wave (domitable)</span>');
|
||||
wave(randomWave(4 + simulation.difficulty / 2, spawn.fullPickList));
|
||||
}, 49000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog('<span style="color: purple;">sixth wave <strong>(indomitable)</strong></span>');
|
||||
simulation.inGameConsole('<span style="color: purple;">sixth wave <strong>(indomitable)</strong></span>');
|
||||
wave(randomWave(7, ["mercenary"]));
|
||||
}, 59000);
|
||||
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog('<span style="color: red;">seventh wave <strong>(boss)</strong></span>');
|
||||
simulation.inGameConsole('<span style="color: red;">seventh wave <strong>(boss)</strong></span>');
|
||||
spawn.randomLevelBoss(700, -1000);
|
||||
var mainBoss = mob[mob.length - 1];
|
||||
mainBoss.oldOnDeath = mainBoss.onDeath;
|
||||
|
||||
30
js/lore.js
30
js/lore.js
@@ -38,7 +38,7 @@ const lore = {
|
||||
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
document.getElementById("control-testing").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
|
||||
// document.getElementById("experiment-button").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
|
||||
simulation.makeTextLog(`<span class='color-var'>lore</span>.unlockTesting()`, Infinity);
|
||||
simulation.inGameConsole(`<span class='color-var'>lore</span>.unlockTesting()`, Infinity);
|
||||
|
||||
sound.portamento(50)
|
||||
sound.portamento(83.333)
|
||||
@@ -48,7 +48,7 @@ const lore = {
|
||||
color: "#f20",
|
||||
voice: undefined,
|
||||
text: function (say) {
|
||||
simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
|
||||
simulation.inGameConsole(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
|
||||
lore.talkingColor = this.color
|
||||
const utterance = new SpeechSynthesisUtterance(say);
|
||||
utterance.lang = "en-AU" //"en-IN"; //de-DE en-GB fr-FR en-US en-AU
|
||||
@@ -61,7 +61,7 @@ const lore = {
|
||||
voice: undefined,
|
||||
text: function (say) {
|
||||
if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
|
||||
simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
|
||||
simulation.inGameConsole(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
|
||||
lore.talkingColor = this.color
|
||||
if (lore.isSpeech) {
|
||||
const utterance = new SpeechSynthesisUtterance(say);
|
||||
@@ -95,7 +95,7 @@ const lore = {
|
||||
color: "#f20",
|
||||
text: function (say) {
|
||||
if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
|
||||
simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
|
||||
simulation.inGameConsole(`input.audio(<span style="color:#888; font-size: 70%;">${(Date.now() / 1000).toFixed(0)} s</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
|
||||
lore.talkingColor = this.color
|
||||
if (lore.isSpeech) {
|
||||
utterance = new SpeechSynthesisUtterance(say);
|
||||
@@ -622,8 +622,8 @@ const lore = {
|
||||
console.log(`https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`)
|
||||
console.log(`Latitude: ${latitude} °, Longitude: ${longitude} °`)
|
||||
lore.miriam.text("We tracked the location down to this Latitude and Longitude:")
|
||||
simulation.makeTextLog(`Latitude: ${latitude} °, Longitude: ${longitude} °`, Infinity);
|
||||
simulation.makeTextLog(`https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`, Infinity);
|
||||
simulation.inGameConsole(`Latitude: ${latitude} °, Longitude: ${longitude} °`, Infinity);
|
||||
simulation.inGameConsole(`https://www.openstreetmap.org/#map=18/${latitude}/${longitude}`, Infinity);
|
||||
}
|
||||
|
||||
function error() {
|
||||
@@ -769,13 +769,13 @@ const lore = {
|
||||
},
|
||||
() => {
|
||||
lore.miriam.text("We can spawn power ups with this command:")
|
||||
simulation.makeTextLog(`powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
|
||||
simulation.inGameConsole(`powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
|
||||
powerUps.spawn(player.position.x, player.position.y - 100, "heal")
|
||||
},
|
||||
() => {
|
||||
setTimeout(() => {
|
||||
lore.miriam.text("or we can make a bunch of them:")
|
||||
simulation.makeTextLog(`for (let i = 0; i < 100; i++) powerUps.spawn(0, 500, "coupling")`, Infinity);
|
||||
simulation.inGameConsole(`for (let i = 0; i < 100; i++) powerUps.spawn(0, 500, "coupling")`, Infinity);
|
||||
for (let i = 0; i < 100; i++) powerUps.spawn(5 - 10 * Math.random(), -500 * Math.random(), "coupling")
|
||||
}, 2000);
|
||||
},
|
||||
@@ -798,9 +798,9 @@ const lore = {
|
||||
count++
|
||||
if (mob.length === 0 || count > 3600 + 900 * mob.length) {
|
||||
lore.miriam.text("I'll spawn some more power ups for you.")
|
||||
simulation.makeTextLog(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
|
||||
simulation.inGameConsole(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
|
||||
for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "heal")
|
||||
simulation.makeTextLog(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
|
||||
simulation.inGameConsole(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
|
||||
for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "ammo")
|
||||
spawn.dragonFlyBoss(-1400, -300);
|
||||
spawn.dragonFlyBoss(1400, -300);
|
||||
@@ -820,9 +820,9 @@ const lore = {
|
||||
count++
|
||||
if (mob.length === 0 || count > 3600 + 900 * mob.length) {
|
||||
lore.anand.text("DragonFlyBoss is my favorite.")
|
||||
simulation.makeTextLog(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
|
||||
simulation.inGameConsole(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "heal")`, Infinity);
|
||||
for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "heal")
|
||||
simulation.makeTextLog(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
|
||||
simulation.inGameConsole(`for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100, "ammo")`, Infinity);
|
||||
for (let i = 0; i < 10; i++) powerUps.spawn(player.position.x, player.position.y - 100 - i * 20, "ammo")
|
||||
spawn.historyBoss(0, -400);
|
||||
spawn.powerUpBossBaby(-1500, -100);
|
||||
@@ -841,7 +841,7 @@ const lore = {
|
||||
count++
|
||||
if (mob.length === 0 || count > 3600 + 900 * mob.length) {
|
||||
lore.miriam.text("Here are some extra tech.")
|
||||
simulation.makeTextLog(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "tech")`, Infinity);
|
||||
simulation.inGameConsole(`for (let i = 0; i < 6; i++) powerUps.spawn(player.position.x, player.position.y - 100, "tech")`, Infinity);
|
||||
for (let i = 0; i < 6; i++) powerUps.spawn(0, -200 - i * 40, "tech")
|
||||
spawn.historyBoss(0, -400);
|
||||
spawn.blinkBoss(-1400, -300);
|
||||
@@ -902,7 +902,7 @@ const lore = {
|
||||
x: 0,
|
||||
y: -500
|
||||
})
|
||||
simulation.makeTextLog(`Matter.Body.setPosition(player, { x: 0, y: -500 })`, 180);
|
||||
simulation.inGameConsole(`Matter.Body.setPosition(player, { x: 0, y: -500 })`, 180);
|
||||
}, 1500);
|
||||
|
||||
} else if (m.alive) {
|
||||
@@ -1180,7 +1180,7 @@ const lore = {
|
||||
// return product_Range(r + 1, n) / product_Range(1, n - r);
|
||||
// }
|
||||
// }
|
||||
// simulation.makeTextLog(`n <span class='color-symbol'>=</span> ${combinations(tech.tech.length + b.guns.length + m.fieldUpgrades.length, 50).toExponential(10)}`, Infinity);
|
||||
// simulation.inGameConsole(`n <span class='color-symbol'>=</span> ${combinations(tech.tech.length + b.guns.length + m.fieldUpgrades.length, 50).toExponential(10)}`, Infinity);
|
||||
// lore.miriam.text(`There are roughly 5 times 10 to the 60 possible combinations. `)
|
||||
// },
|
||||
// () => { lore.miriam.text("Even if each simulation took 1 nano-second,") },
|
||||
|
||||
@@ -1223,9 +1223,9 @@ const mobs = {
|
||||
});
|
||||
}
|
||||
|
||||
if (tech.deathSkipTime && !m.isBodiesAsleep) {
|
||||
if (tech.isVerlet && !m.isBodiesAsleep) {
|
||||
requestAnimationFrame(() => {
|
||||
simulation.timePlayerSkip((this.isBoss ? 45 : 25) * tech.deathSkipTime)
|
||||
simulation.timePlayerSkip(this.isBoss ? 60 : 30)
|
||||
simulation.loop(); //ending with a wipe and normal loop fixes some very minor graphical issues where things are draw in the wrong locations
|
||||
}); //wrapping in animation frame prevents errors, probably
|
||||
}
|
||||
|
||||
231
js/player.js
231
js/player.js
@@ -442,7 +442,7 @@ const m = {
|
||||
simulation.clearNow = true; //triggers a map reset
|
||||
m.switchWorlds()
|
||||
simulation.isTextLogOpen = true;
|
||||
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> 0.${len - i - 1}`, swapPeriod);
|
||||
simulation.inGameConsole(`simulation.amplitude <span class='color-symbol'>=</span> 0.${len - i - 1}`, swapPeriod);
|
||||
simulation.isTextLogOpen = false;
|
||||
simulation.wipe = function () { //set wipe to have trails
|
||||
ctx.fillStyle = `rgba(255,255,255,${(i + 1) * (i + 1) * 0.006})`;
|
||||
@@ -455,7 +455,7 @@ const m = {
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
}
|
||||
simulation.isTextLogOpen = true;
|
||||
simulation.makeTextLog("simulation.amplitude <span class='color-symbol'>=</span> null");
|
||||
simulation.inGameConsole("simulation.amplitude <span class='color-symbol'>=</span> null");
|
||||
tech.isImmortal = false //disable future immortality
|
||||
}, 6 * swapPeriod);
|
||||
} else if (m.alive) { //normal death code here
|
||||
@@ -537,7 +537,7 @@ const m = {
|
||||
setMaxHealth(isMessage) {
|
||||
m.maxHealth = m.baseHealth + tech.extraMaxHealth + 4 * tech.isFallingDamage
|
||||
document.getElementById("health-bg").style.width = `${Math.floor(300 * m.maxHealth)}px`
|
||||
if (isMessage) simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${m.maxHealth.toFixed(2)}`)
|
||||
if (isMessage) simulation.inGameConsole(`<span class='color-var'>m</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${m.maxHealth.toFixed(2)}`)
|
||||
if (m.health > m.maxHealth) m.health = m.maxHealth;
|
||||
m.displayHealth();
|
||||
},
|
||||
@@ -678,7 +678,7 @@ const m = {
|
||||
damage(dmg) {
|
||||
if (tech.isRewindAvoidDeath && (m.energy + 0.05) > Math.min(0.95, m.maxEnergy) && dmg > 0.01) {
|
||||
const steps = Math.floor(Math.min(299, 150 * m.energy))
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.rewind(${steps})`)
|
||||
simulation.inGameConsole(`<span class='color-var'>m</span>.rewind(${steps})`)
|
||||
m.rewind(steps)
|
||||
return
|
||||
}
|
||||
@@ -698,7 +698,7 @@ const m = {
|
||||
if (tech.isDeathAvoid && powerUps.research.count && !tech.isDeathAvoidedThisLevel) {
|
||||
tech.isDeathAvoidedThisLevel = true
|
||||
powerUps.research.changeRerolls(-1)
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
||||
simulation.inGameConsole(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
||||
for (let i = 0; i < 22; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
||||
m.energy = m.maxEnergy + 0.1
|
||||
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
||||
@@ -726,7 +726,7 @@ const m = {
|
||||
tech.isDeathAvoidedThisLevel = true
|
||||
m.health = 0.05
|
||||
powerUps.research.changeRerolls(-1)
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
||||
simulation.inGameConsole(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
||||
<br>${powerUps.research.count}`)
|
||||
for (let i = 0; i < 16; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
||||
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
||||
@@ -886,15 +886,21 @@ const m = {
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
ctx.lineTo(m.foot.x, m.foot.y);
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = 6;
|
||||
ctx.lineWidth = 5;
|
||||
ctx.stroke();
|
||||
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 12, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 12, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 4;
|
||||
ctx.stroke();
|
||||
|
||||
@@ -923,11 +929,6 @@ const m = {
|
||||
m.yOffWhen.stand = 49
|
||||
m.yOffWhen.crouch = 22
|
||||
m.isAltSkin = false
|
||||
m.color = {
|
||||
hue: 0,
|
||||
sat: 0,
|
||||
light: 100,
|
||||
}
|
||||
|
||||
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
|
||||
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 10}%)`
|
||||
@@ -971,15 +972,6 @@ const m = {
|
||||
m.squirrelJump = 1.16;
|
||||
m.setMovement()
|
||||
|
||||
// m.yOffWhen.jump = 70
|
||||
// m.yOffWhen.stand = 49
|
||||
// m.yOffWhen.crouch = 22
|
||||
// m.color = {
|
||||
// hue: 184,
|
||||
// sat: 0,
|
||||
// light: 55,
|
||||
// }
|
||||
// m.setFillColors();
|
||||
m.draw = function () {
|
||||
m.walk_cycle += m.flipLegs * m.Vx;
|
||||
ctx.save();
|
||||
@@ -1059,11 +1051,6 @@ const m = {
|
||||
},
|
||||
polar() {
|
||||
m.isAltSkin = true
|
||||
m.color = {
|
||||
hue: 0,
|
||||
sat: 0,
|
||||
light: 100,
|
||||
}
|
||||
// m.setFillColors();
|
||||
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
|
||||
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 35}%)`
|
||||
@@ -1081,12 +1068,10 @@ const m = {
|
||||
ctx.translate(m.pos.x, m.pos.y);
|
||||
m.calcLeg(Math.PI, -3);
|
||||
|
||||
|
||||
const diff = (m.lastKillCycle - m.cycle + tech.isDamageCooldownTime) / tech.isDamageCooldownTime
|
||||
const color = diff < 0 ? "#fff" : "#aaa"
|
||||
const hue = 220 + 20 * Math.sin(0.01 * m.cycle)
|
||||
const colorInverse = diff < 0 ? `hsl(${hue}, 80%, 40%)` : "#fff"
|
||||
// const colorInverseFade = diff < 0 ? "#ccc" : "#fff"
|
||||
m.drawLeg(color, colorInverse);
|
||||
m.calcLeg(0, 0);
|
||||
m.drawLeg(color, colorInverse);
|
||||
@@ -1100,21 +1085,14 @@ const m = {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(15, 0)
|
||||
ctx.lineTo(28, 0)
|
||||
// ctx.arc(15, 0, 4, 0, 2 * Math.PI);
|
||||
ctx.strokeStyle = colorInverse;
|
||||
ctx.lineWidth = 4;
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
|
||||
|
||||
// const scale = diff>0.3
|
||||
// console.log(diff.toFixed(3), scale.toFixed(3))
|
||||
ctx.beginPath();
|
||||
ctx.ellipse(m.pos.x, m.pos.y, 24, 18, 3.14 * Math.random(), 0, 2 * Math.PI)
|
||||
// `rgba(0,0,${100 + 30 * Math.sin(0.1 * m.cycle)},0.8)`
|
||||
ctx.fillStyle = diff < 0 ? `hsl(${hue}, 80%, 40%)` : `rgba(255,255,255,${Math.min(Math.max(0, diff + 0.3), 1)})`
|
||||
// ctx.fillStyle = colorInverse
|
||||
// ctx.fillStyle = `rgba(0,0,0,${scale})`
|
||||
ctx.fill();
|
||||
|
||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||
@@ -1134,15 +1112,21 @@ const m = {
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
ctx.lineTo(m.foot.x, m.foot.y);
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = 6;
|
||||
ctx.lineWidth = 5;
|
||||
ctx.stroke();
|
||||
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 3;
|
||||
ctx.stroke();
|
||||
|
||||
@@ -1166,22 +1150,16 @@ const m = {
|
||||
m.isAltSkin = true
|
||||
m.yOffWhen.stand = 52
|
||||
m.yOffWhen.jump = 72
|
||||
// m.yOffWhen.crouch = 22
|
||||
// m.color = {
|
||||
// hue: 184,
|
||||
// sat: 0,
|
||||
// light: 55,
|
||||
// }
|
||||
// m.setFillColors();
|
||||
|
||||
m.draw = function () {
|
||||
m.walk_cycle += m.flipLegs * m.Vx;
|
||||
ctx.save();
|
||||
ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5 //|| (m.cycle % 40 > 20)
|
||||
ctx.translate(m.pos.x, m.pos.y);
|
||||
m.calcLeg(Math.PI, -1.25);
|
||||
m.drawLeg("#606070");
|
||||
m.drawLeg("#606080");
|
||||
m.calcLeg(0, 0);
|
||||
m.drawLeg("#445");
|
||||
m.drawLeg("#446");
|
||||
|
||||
|
||||
ctx.rotate(m.angle);
|
||||
@@ -1193,17 +1171,14 @@ const m = {
|
||||
ctx.beginPath();
|
||||
const arc = 0.7 + 0.17 * Math.sin(m.cycle * 0.012)
|
||||
ctx.arc(0, 0, 30, -arc, arc, true); //- Math.PI / 2
|
||||
ctx.strokeStyle = "#445";
|
||||
ctx.strokeStyle = "#446";
|
||||
ctx.lineWidth = 2;
|
||||
ctx.stroke();
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(13, 0)
|
||||
ctx.lineTo(20, 0)
|
||||
// ctx.beginPath();
|
||||
// ctx.arc(15, 0, 4, 0, 2 * Math.PI);
|
||||
ctx.lineWidth = 5;
|
||||
ctx.strokeStyle = "#445";
|
||||
ctx.stroke();
|
||||
|
||||
ctx.restore();
|
||||
@@ -1230,9 +1205,15 @@ const m = {
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 12, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 12, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 4;
|
||||
ctx.stroke();
|
||||
|
||||
@@ -1302,16 +1283,22 @@ const m = {
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
ctx.lineTo(m.foot.x, m.foot.y);
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = 6;
|
||||
ctx.lineWidth = 5;
|
||||
ctx.stroke();
|
||||
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
|
||||
ctx.lineWidth = 4;
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 3;
|
||||
ctx.stroke();
|
||||
|
||||
//hip joint
|
||||
@@ -1324,7 +1311,7 @@ const m = {
|
||||
ctx.moveTo(m.foot.x + 5, m.foot.y);
|
||||
ctx.arc(m.foot.x, m.foot.y + 1, 5, 0, 2 * Math.PI);
|
||||
ctx.strokeStyle = "rgba(0,255,255,0.25)";
|
||||
ctx.lineWidth = 5;
|
||||
ctx.lineWidth = 6;
|
||||
ctx.stroke();
|
||||
ctx.fillStyle = m.fillColor;
|
||||
ctx.fill();
|
||||
@@ -1521,9 +1508,15 @@ const m = {
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 4;
|
||||
ctx.stroke();
|
||||
|
||||
@@ -1641,9 +1634,15 @@ const m = {
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 4;
|
||||
ctx.stroke();
|
||||
|
||||
@@ -1665,12 +1664,7 @@ const m = {
|
||||
},
|
||||
CPT() {
|
||||
m.isAltSkin = true
|
||||
m.color = {
|
||||
hue: 0,
|
||||
sat: 0,
|
||||
light: 100,
|
||||
}
|
||||
// m.setFillColors();
|
||||
|
||||
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
|
||||
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 35}%)`
|
||||
let grd = ctx.createLinearGradient(-20, 0, 15, 0);
|
||||
@@ -1718,15 +1712,21 @@ const m = {
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
ctx.lineTo(m.foot.x, m.foot.y);
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = 6;
|
||||
ctx.lineWidth = 5;
|
||||
ctx.stroke();
|
||||
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 3;
|
||||
ctx.stroke();
|
||||
|
||||
@@ -1746,14 +1746,95 @@ const m = {
|
||||
ctx.restore();
|
||||
}
|
||||
},
|
||||
verlet() {
|
||||
m.isAltSkin = true
|
||||
|
||||
m.draw = function () {
|
||||
ctx.fillStyle = m.fillColor;
|
||||
m.walk_cycle += m.flipLegs * m.Vx;
|
||||
ctx.save();
|
||||
ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5 //|| (m.cycle % 40 > 20)
|
||||
ctx.translate(m.pos.x, m.pos.y);
|
||||
m.calcLeg(Math.PI, -2);
|
||||
m.drawLeg("#4a4a4a");
|
||||
m.calcLeg(0, 0);
|
||||
m.drawLeg("#333");
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, 30, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = m.bodyGradient
|
||||
ctx.fill();
|
||||
|
||||
const rate = 0.09
|
||||
ctx.strokeStyle = "#000";
|
||||
ctx.lineWidth = 1;
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, rate * (simulation.cycle + 0) % 30, 0, 2 * Math.PI);
|
||||
ctx.stroke();
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, rate * (simulation.cycle + 15 / rate) % 30, 0, 2 * Math.PI);
|
||||
ctx.stroke();
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, 30, 0, 2 * Math.PI);
|
||||
ctx.stroke();
|
||||
|
||||
ctx.globalCompositeOperation = "difference";
|
||||
ctx.rotate(m.angle);
|
||||
ctx.beginPath();
|
||||
ctx.arc(21, 0, 8, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = input.fire ? "#0ff" : input.field ? "#d30" : `#fff`
|
||||
ctx.fill();
|
||||
ctx.restore();
|
||||
|
||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||
powerUps.boost.draw()
|
||||
}
|
||||
m.drawLeg = function (stroke) {
|
||||
// if (simulation.mouseInGame.x > m.pos.x) {
|
||||
if (m.angle > -Math.PI / 2 && m.angle < Math.PI / 2) {
|
||||
m.flipLegs = 1;
|
||||
} else {
|
||||
m.flipLegs = -1;
|
||||
}
|
||||
ctx.save();
|
||||
ctx.scale(m.flipLegs, 1); //leg lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.hip.x, m.hip.y);
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
ctx.lineTo(m.foot.x, m.foot.y);
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = 1;
|
||||
ctx.stroke();
|
||||
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
const footDrop = m.onGround ? 5 : 10
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + footDrop);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + footDrop);
|
||||
ctx.lineWidth = 1;
|
||||
ctx.stroke();
|
||||
|
||||
//hip joint
|
||||
ctx.beginPath();
|
||||
ctx.arc(m.hip.x, m.hip.y, 9, 0, 2 * Math.PI);
|
||||
//knee joint
|
||||
ctx.moveTo(m.knee.x + 5, m.knee.y);
|
||||
ctx.arc(m.knee.x, m.knee.y, 3, 0, 2 * Math.PI);
|
||||
//foot joint
|
||||
ctx.moveTo(m.foot.x + 5, m.foot.y);
|
||||
ctx.arc(m.foot.x, m.foot.y, 4, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = "#000";
|
||||
ctx.fill();
|
||||
// ctx.lineWidth = 2;
|
||||
// ctx.stroke();
|
||||
ctx.restore();
|
||||
}
|
||||
},
|
||||
hexagon() {
|
||||
m.isAltSkin = true
|
||||
m.color = {
|
||||
hue: 0,
|
||||
sat: 0,
|
||||
light: 100,
|
||||
}
|
||||
// m.setFillColors();
|
||||
|
||||
m.fillColor = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light}%)`
|
||||
m.fillColorDark = `hsl(${m.color.hue},${m.color.sat}%,${m.color.light - 35}%)`
|
||||
let grd = ctx.createLinearGradient(-30, 0, 30, 0);
|
||||
@@ -1813,9 +1894,15 @@ const m = {
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
if (m.onGround) {
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
|
||||
} else {
|
||||
ctx.lineTo(m.foot.x - 13, m.foot.y + 8);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 13, m.foot.y + 8);
|
||||
}
|
||||
ctx.lineWidth = 3;
|
||||
ctx.stroke();
|
||||
|
||||
@@ -2188,7 +2275,7 @@ const m = {
|
||||
},
|
||||
setMaxEnergy(isMessage = true) {
|
||||
m.maxEnergy = (tech.isMaxEnergyTech ? 0.5 : 1) + tech.bonusEnergy + tech.healMaxEnergyBonus + tech.harmonicEnergy + 3 * tech.isGroundState + 1.5 * (m.fieldMode === 1) + (m.fieldMode === 0 || m.fieldMode === 1) * 0.05 * m.coupling + 0.77 * tech.isStandingWaveExpand
|
||||
if (isMessage) simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-f'>maxEnergy</span> <span class='color-symbol'>=</span> ${(m.maxEnergy.toFixed(2))}`)
|
||||
if (isMessage) simulation.inGameConsole(`<span class='color-var'>m</span>.<span class='color-f'>maxEnergy</span> <span class='color-symbol'>=</span> ${(m.maxEnergy.toFixed(2))}`)
|
||||
},
|
||||
fieldMeterColor: "#0cf",
|
||||
drawRegenEnergy(bgColor = "rgba(0, 0, 0, 0.4)", range = 60) {
|
||||
@@ -2238,6 +2325,8 @@ const m = {
|
||||
m.fieldRegen = 0.001667 //10 energy per second plasma torch
|
||||
} else if (m.fieldMode === 8) {
|
||||
m.fieldRegen = 0.001667 //10 energy per second pilot wave
|
||||
} else if (m.fieldMode === 9) {
|
||||
m.fieldRegen = 0.00117 //7 energy per second wormhole
|
||||
} else if (m.fieldMode === 10) {
|
||||
m.fieldRegen = 0.0015 //9 energy per second grappling hook
|
||||
} else {
|
||||
@@ -2915,7 +3004,7 @@ const m = {
|
||||
}
|
||||
},
|
||||
couplingChange(change = 0) {
|
||||
if (change > 0 && level.onLevel !== -1) simulation.makeTextLog(`<div class="coupling-circle"></div> m.coupling <span class='color-symbol'>+=</span> ${change}`, 60); //level.onLevel !== -1 means not on lore level
|
||||
if (change > 0 && level.onLevel !== -1) simulation.inGameConsole(`<div class="coupling-circle"></div> m.coupling <span class='color-symbol'>+=</span> ${change}`, 60); //level.onLevel !== -1 means not on lore level
|
||||
m.coupling += change
|
||||
if (m.coupling < 0) {
|
||||
//look for coupling power ups on this level and remove them to prevent exploiting tech ejections
|
||||
@@ -2953,7 +3042,7 @@ const m = {
|
||||
document.getElementById("field").innerHTML = m.fieldUpgrades[index].name
|
||||
m.setHoldDefaults();
|
||||
m.fieldUpgrades[index].effect();
|
||||
simulation.makeTextLog(`<div class="circle-grid field"></div> <span class='color-var'>m</span>.setField("<strong class='color-text'>${m.fieldUpgrades[m.fieldMode].name}</strong>")<br>input.key.field<span class='color-symbol'>:</span> ["<span class='color-text'>MouseRight</span>"]`);
|
||||
simulation.inGameConsole(`<div class="circle-grid field"></div> <span class='color-var'>m</span>.setField("<strong class='color-text'>${m.fieldUpgrades[m.fieldMode].name}</strong>")<br>input.key.field<span class='color-symbol'>:</span> ["<span class='color-text'>MouseRight</span>"]`);
|
||||
},
|
||||
fieldUpgrades: [{
|
||||
name: "field emitter",
|
||||
@@ -4679,7 +4768,7 @@ const m = {
|
||||
{
|
||||
name: "wormhole",
|
||||
//<strong class='color-worm'>wormholes</strong> attract <strong class='color-block'>blocks</strong> and power ups<br>
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong>tunnel</strong> through a <strong class='color-worm'>wormhole</strong><br><strong>+7%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br><strong>6</strong> <strong class='color-f'>energy</strong> per second", //<br>bullets may also traverse <strong class='color-worm'>wormholes</strong>
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong>tunnel</strong> through a <strong class='color-worm'>wormhole</strong><br><strong>+7%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br><strong>7</strong> <strong class='color-f'>energy</strong> per second", //<br>bullets may also traverse <strong class='color-worm'>wormholes</strong>
|
||||
drain: 0,
|
||||
effect: function () {
|
||||
m.fieldMeterColor = "#bbf" //"#0c5"
|
||||
|
||||
@@ -84,21 +84,21 @@ const powerUps = {
|
||||
}
|
||||
},
|
||||
tech(num = 1) {
|
||||
return `<div class="circle-grid tech" style="width: 1.32em; height: 1.32em;margin-bottom: -0.3em;"></div>`
|
||||
return `<div class="circle-grid tech tooltip" style="width: 1.32em; height: 1.32em;"><span class="tooltiptext color-m">tech</span></div>`
|
||||
},
|
||||
field(num = 1) {
|
||||
return `<div class="circle-grid field"></div>`
|
||||
return `<div class="circle-grid field tooltip"><span class="tooltiptext color-f">field</span></div>`
|
||||
},
|
||||
gun(num = 1) {
|
||||
return `<div class="circle-grid gun"></div>`
|
||||
return `<div class="circle-grid gun tooltip"><span class="tooltiptext color-g">gun</span></div>`
|
||||
},
|
||||
gunTech(num = 1) {
|
||||
return `<div class="circle-grid tech" style="position:relative; top:-0.05em; left:0.55em;opacity:0.8;margin-left:-0.55em;"></div>
|
||||
<div class="circle-grid gun" style="position:relative; top:-0.05em; left:-0.55em; opacity:0.65;margin-right:-0.55em;"></div>`
|
||||
return `<div class="circle-grid tech tooltip" style="position:relative; top:-0.05em; left:0.55em;opacity:0.8;margin-left:-0.55em;"><span class="tooltiptext"><span class="color-g">gun</span><span class="color-m">tech</span></span></div>
|
||||
<div class="circle-grid gun tooltip" style="position:relative; top:-0.05em; left:-0.55em; opacity:0.65;margin-right:-0.55em;"><span class="tooltiptext"><span class="color-g">gun</span><span class="color-m">tech</span></span></div>`
|
||||
},
|
||||
fieldTech(num = 1) {
|
||||
return `<div class="circle-grid tech" style="position:relative; top:-0.05em; left:0.55em;opacity:0.8;margin-left:-0.55em;"></div>
|
||||
<div class="circle-grid field" style="position:relative; top:-0.05em; left:-0.55em;opacity:0.65;margin-right:-0.55em;"></div>`
|
||||
return `<div class="circle-grid tech tooltip" style="position:relative; top:-0.05em; left:0.55em;opacity:0.8;margin-left:-0.55em;"><span class="tooltiptext"><span class="color-f">field</span><span class="color-m">tech</span></span></div>
|
||||
<div class="circle-grid field tooltip" style="position:relative; top:-0.05em; left:-0.55em;opacity:0.65;margin-right:-0.55em;"><span class="tooltiptext"><span class="color-f">field</span><span class="color-m">tech</span></span></div>`
|
||||
},
|
||||
coupling(num = 1) {
|
||||
switch (num) {
|
||||
@@ -246,12 +246,12 @@ const powerUps = {
|
||||
if (b.inventory.length === 2) text += `
|
||||
<br>input.key.nextGun<span class='color-symbol'>:</span> ["<span class='color-text'>${input.key.nextGun}</span>","<span class='color-text'>MouseWheel</span>"]
|
||||
<br>input.key.previousGun<span class='color-symbol'>:</span> ["<span class='color-text'>${input.key.previousGun}</span>","<span class='color-text'>MouseWheel</span>"]`
|
||||
simulation.makeTextLog(text);
|
||||
simulation.inGameConsole(text);
|
||||
} else if (type === "field") {
|
||||
m.setField(index)
|
||||
} else if (type === "tech") {
|
||||
// if (tech.isBanish && tech.tech[index].isBanished) tech.tech[index].isBanished = false
|
||||
simulation.makeTextLog(`<div class="circle-grid tech"></div> <span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[index].name}</strong>")`);
|
||||
simulation.inGameConsole(`<div class="circle-grid tech"></div> <span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[index].name}</strong>")`);
|
||||
tech.giveTech(index)
|
||||
}
|
||||
powerUps.endDraft(type);
|
||||
@@ -289,7 +289,7 @@ const powerUps = {
|
||||
if (tech.isCancelDuplication) {
|
||||
const value = 0.05
|
||||
tech.duplication += value
|
||||
simulation.makeTextLog(`tech.duplicationChance() <span class='color-symbol'>+=</span> ${value}`)
|
||||
simulation.inGameConsole(`tech.duplicationChance() <span class='color-symbol'>+=</span> ${value}`)
|
||||
simulation.circleFlare(value);
|
||||
}
|
||||
if (tech.isCancelRerolls) {
|
||||
@@ -582,7 +582,7 @@ const powerUps = {
|
||||
}
|
||||
if (tech.isResearchDamage) {
|
||||
tech.damage *= 1.05
|
||||
simulation.makeTextLog(`<strong>1.05x</strong> <strong class='color-d'>damage</strong>`);
|
||||
simulation.inGameConsole(`<strong>1.05x</strong> <strong class='color-d'>damage</strong>`);
|
||||
tech.addJunkTechToPool(0.01)
|
||||
}
|
||||
powerUps.research.currentRerollCount++
|
||||
@@ -592,12 +592,12 @@ const powerUps = {
|
||||
// const index = powerUps.tech.choiceLog.length - i - 1
|
||||
// if (powerUps.tech.choiceLog[index] && tech.tech[powerUps.tech.choiceLog[index]]) tech.tech[powerUps.tech.choiceLog[index]].isBanished = true
|
||||
// }
|
||||
// simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`)
|
||||
// simulation.inGameConsole(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`)
|
||||
// }
|
||||
if (tech.isResearchReality) {
|
||||
m.switchWorlds()
|
||||
simulation.trails()
|
||||
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
simulation.inGameConsole(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
}
|
||||
powerUps[type].effect();
|
||||
},
|
||||
@@ -616,24 +616,35 @@ const powerUps = {
|
||||
let overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
|
||||
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
|
||||
m.addHealth(heal);
|
||||
if (healOutput > 0) simulation.makeTextLog(`<div class="circle-grid heal"></div> <span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
||||
if (healOutput > 0) simulation.inGameConsole(`<div class="circle-grid heal"></div> <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
|
||||
overHeal *= 2 //double the over heal converted to max health
|
||||
//make sure overHeal doesn't kill player
|
||||
if (m.health - overHeal * m.defense() < 0) overHeal = m.health - 0.01
|
||||
if (overHeal > m.maxHealth) overHeal = m.maxHealth //just in case overHeal gets too big
|
||||
tech.extraMaxHealth += overHeal //increase max health
|
||||
tech.extraMaxHealth += 0.3 * overHeal //increase max health
|
||||
m.setMaxHealth();
|
||||
m.damage(overHeal);
|
||||
overHeal *= m.defense() // account for defense after m.damage() so the text log is accurate
|
||||
simulation.makeTextLog(`<div class="circle-grid heal"></div> <span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(overHeal).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
||||
simulation.inGameConsole(`<div class="circle-grid heal"></div> <span class='color-var'>m</span>.maxHealth <span class='color-symbol'>+=</span> ${(0.3 * overHeal).toFixed(3)}`)
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
x: m.pos.x,
|
||||
y: m.pos.y,
|
||||
radius: overHeal * 500 * simulation.healScale,
|
||||
color: simulation.mobDmgColor,
|
||||
radius: overHeal * 100 * simulation.healScale,
|
||||
color: "#0eb",
|
||||
time: simulation.drawTime
|
||||
});
|
||||
|
||||
// overHeal *= 2 //double the over heal converted to max health
|
||||
// //make sure overHeal doesn't kill player
|
||||
// if (m.health - overHeal * m.defense() < 0) overHeal = m.health - 0.01
|
||||
// if (overHeal > m.maxHealth) overHeal = m.maxHealth //just in case overHeal gets too big
|
||||
// tech.extraMaxHealth += overHeal //increase max health
|
||||
// m.setMaxHealth();
|
||||
// m.damage(overHeal);
|
||||
// overHeal *= m.defense() // account for defense after m.damage() so the text log is accurate
|
||||
// simulation.inGameConsole(`<div class="circle-grid heal"></div> <span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(overHeal).toFixed(3)}`) // <br>${m.health.toFixed(3)}
|
||||
// simulation.drawList.push({ //add dmg to draw queue
|
||||
// x: m.pos.x,
|
||||
// y: m.pos.y,
|
||||
// radius: overHeal * 500 * simulation.healScale,
|
||||
// color: simulation.mobDmgColor,
|
||||
// time: simulation.drawTime
|
||||
// });
|
||||
} else if (overHeal > 0.13) { //if leftover heals spawn a new spammer heal power up
|
||||
requestAnimationFrame(() => {
|
||||
powerUps.directSpawn(this.position.x, this.position.y, "heal", true, null, Math.min(1, overHeal) * 40 * (simulation.healScale ** 0.25))// directSpawn(x, y, target, moving = true, mode = null, size = powerUps[target].size()) {
|
||||
@@ -731,8 +742,6 @@ const powerUps = {
|
||||
}
|
||||
},
|
||||
cancelText(type) {
|
||||
// if (localSettings.isHideImages) { }
|
||||
|
||||
if (tech.isSuperDeterminism) {
|
||||
return `<div></div>`
|
||||
} else if (tech.isCancelTech && tech.cancelTechCount === 0) {
|
||||
@@ -873,7 +882,7 @@ const powerUps = {
|
||||
<div class="circle-grid-skin"></div>
|
||||
<div class="circle-grid-skin-eye"></div>
|
||||
</span>
|
||||
${tech.tech[choose].name} ${techCountText}</div>
|
||||
${tech.tech[choose].name} ${techCountText}</div>
|
||||
${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() : tech.tech[choose].description}</div></div>`
|
||||
},
|
||||
fieldTechText(choose, click) {
|
||||
@@ -1186,7 +1195,7 @@ const powerUps = {
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i, true)
|
||||
}
|
||||
simulation.makeTextLog(`decoherence <span class='color-var'>tech</span> ejected<br>options reset`)
|
||||
simulation.inGameConsole(`decoherence <span class='color-var'>tech</span> ejected<br>options reset`)
|
||||
}
|
||||
}
|
||||
if (tech.tooManyTechChoices) {
|
||||
@@ -1211,7 +1220,7 @@ const powerUps = {
|
||||
const choose = options[Math.floor(Math.seededRandom(0, options.length))] //pick an element from the array of options
|
||||
if (tech.isBanish) {
|
||||
tech.tech[choose].isBanished = true
|
||||
if (i === 0) simulation.makeTextLog(`options.length = ${optionLengthNoDuplicates} <em class='color-text'>//tech removed from pool by decoherence</em>`)
|
||||
if (i === 0) simulation.inGameConsole(`options.length = ${optionLengthNoDuplicates} <em class='color-text'>//tech removed from pool by decoherence</em>`)
|
||||
}
|
||||
removeOption(choose) //move from future options pool to avoid repeats on this selection
|
||||
tech.tech[choose].isRecentlyShown = true //this flag prevents this option from being shown the next time you pick up a tech power up
|
||||
@@ -1504,7 +1513,7 @@ const powerUps = {
|
||||
powerUps.spawn(x, y + 40, "heal", false)
|
||||
powerUps.spawn(x, y - 40, "heal", false)
|
||||
}
|
||||
if (tech.isResearchReality) powerUps.spawnDelay("research", 5)
|
||||
if (tech.isResearchReality) powerUps.spawnDelay("research", 6)
|
||||
if (tech.isBanish) powerUps.spawnDelay("research", 2)
|
||||
if (tech.isCouplingNoHit) powerUps.spawnDelay("coupling", 9)
|
||||
// if (tech.isRerollDamage) powerUps.spawnDelay("research", 1)
|
||||
@@ -1561,7 +1570,7 @@ const powerUps = {
|
||||
|
||||
if (have.length) {
|
||||
choose = have[Math.floor(Math.random() * have.length)]
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.remove("<strong class='color-text'>${tech.tech[choose].name}</strong>")`)
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.remove("<strong class='color-text'>${tech.tech[choose].name}</strong>")`)
|
||||
|
||||
for (let i = 0; i < tech.tech[choose].count; i++) {
|
||||
powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
|
||||
@@ -1580,7 +1589,7 @@ const powerUps = {
|
||||
return false
|
||||
}
|
||||
} else if (tech.tech[choose].count && !tech.tech[choose].isInstant) {
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.remove("<strong class='color-text'>${tech.tech[choose].name}</strong>")`)
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.remove("<strong class='color-text'>${tech.tech[choose].name}</strong>")`)
|
||||
|
||||
for (let i = 0; i < tech.tech[choose].count; i++) {
|
||||
powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
|
||||
|
||||
@@ -451,7 +451,7 @@ const simulation = {
|
||||
// <path d="M827,112 h30 a140,140,0,0,1,140,140 v68 h-167 z" fill="#7ce" stroke="none" /> -->
|
||||
// SVGleftMouse: '<svg viewBox="750 0 200 765" class="mouse-icon" width="40px" height = "60px" stroke-linecap="round" stroke-linejoin="round" stroke-width="25px" stroke="#000" fill="none"> <path fill="#fff" stroke="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M832.41,106.64 V323.55 H651.57 V256.64 c0-82.5,67.5-150,150-150 Z" fill="#149" stroke="none" /> <path fill="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M657 317 h 340 h-170 v-207" /> <ellipse fill="#fff" cx="827.57" cy="218.64" rx="29" ry="68" /> </svg>',
|
||||
// SVGrightMouse: '<svg viewBox="750 0 200 765" class="mouse-icon" width="40px" height = "60px" stroke-linecap="round" stroke-linejoin="round" stroke-width="25px" stroke="#000" fill="none"> <path fill="#fff" stroke="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M827,112 h30 a140,140,0,0,1,140,140 v68 h-167 z" fill="#0cf" stroke="none" /> <path fill="none" d="M827,112 h30 a140,140,0,0,1,140,140 v268 a140,140,0,0,1-140,140 h-60 a140,140,0,0,1-140-140v-268 a140,140,0,0,1,140-140h60" /> <path d="M657 317 h 340 h-170 v-207" /> <ellipse fill="#fff" cx="827.57" cy="218.64" rx="29" ry="68" /> </svg>',
|
||||
makeTextLog(text, time = 240) {
|
||||
inGameConsole(text, time = 240) {
|
||||
if (!localSettings.isHideHUD && simulation.isTextLogOpen && !build.isExperimentSelection) {
|
||||
if (simulation.lastLogTime > m.cycle) { //if there is an older message
|
||||
document.getElementById("text-log").innerHTML = document.getElementById("text-log").innerHTML + '<br>' + text;
|
||||
@@ -848,9 +848,9 @@ const simulation = {
|
||||
document.getElementById("text-log").style.display = "none"
|
||||
document.getElementById("fade-out").style.opacity = 0;
|
||||
document.title = "n-gon";
|
||||
simulation.makeTextLog(`Math.seed <span class='color-symbol'>=</span> ${Math.initialSeed}`);
|
||||
simulation.makeTextLog(`<span class='color-var'>const</span> engine <span class='color-symbol'>=</span> Engine.create(); <em>//simulation begin</em>`);
|
||||
simulation.makeTextLog(`engine.timing.timeScale <span class='color-symbol'>=</span> 1`);
|
||||
simulation.inGameConsole(`Math.seed <span class='color-symbol'>=</span> ${Math.initialSeed}`);
|
||||
simulation.inGameConsole(`<span class='color-var'>const</span> engine <span class='color-symbol'>=</span> Engine.create(); <em>//simulation begin</em>`);
|
||||
simulation.inGameConsole(`engine.timing.timeScale <span class='color-symbol'>=</span> 1`);
|
||||
m.alive = true;
|
||||
m.definePlayerMass();
|
||||
m.onGround = false
|
||||
@@ -1199,7 +1199,7 @@ const simulation = {
|
||||
}
|
||||
|
||||
//respawn drones in animation frame
|
||||
requestAnimationFrame(() => { b.delayDrones({ x: level.enter.x + 50, y: level.enter.y - 60 }, droneCount) });
|
||||
requestAnimationFrame(() => { b.delayDrones({ x: level.enter.x + 50, y: level.enter.y - 60 }, droneCount, deliveryCount) });
|
||||
|
||||
//respawn spores in animation frame
|
||||
let respawnSpores = () => {
|
||||
|
||||
103
js/spawn.js
103
js/spawn.js
@@ -151,26 +151,12 @@ const spawn = {
|
||||
const sub = Vector.sub(player.position, this.position)
|
||||
const mag = Vector.magnitude(sub)
|
||||
// follow physics
|
||||
// Matter.Body.setVelocity(this, { x: 0, y: 0 });
|
||||
// const where = Vector.add(this.position, Vector.mult(Vector.normalise(sub), this.chaseSpeed))
|
||||
// if (mag > 10) Matter.Body.setPosition(this, { x: where.x, y: where.y });
|
||||
|
||||
// if (true) {
|
||||
// if (m.crouch) {
|
||||
// if (Vector.magnitude(Vector.sub(this.position, m.pos)) > this.radius) {
|
||||
// attract *= 40
|
||||
// } else {
|
||||
// Matter.Body.setVelocity(this, Vector.mult(this.velocity, 0.9)); //friction
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
if (tech.isMoveDarkMatter && m.crouch && input.down) {
|
||||
Matter.Body.setVelocity(this, Vector.add(Vector.mult(this.velocity, 0.97), Vector.mult(player.velocity, 0.03)))
|
||||
Matter.Body.setPosition(this, Vector.add(Vector.mult(this.position, 0.95), Vector.mult(player.position, 0.05)))
|
||||
}
|
||||
const force = Vector.mult(Vector.normalise(sub), 0.000000003)
|
||||
|
||||
const force = Vector.mult(Vector.normalise(sub), 0.000000003 * (this.distanceToPlayer() > 4000 ? 3 : 1))
|
||||
this.force.x += force.x
|
||||
this.force.y += force.y
|
||||
|
||||
@@ -977,9 +963,9 @@ const spawn = {
|
||||
|
||||
//add lore level as next level if player took lore tech earlier in the game
|
||||
if (lore.techCount > (lore.techGoal - 1) && !simulation.isCheating) {
|
||||
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}`, 360);
|
||||
simulation.inGameConsole(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}`, 360);
|
||||
setTimeout(function () {
|
||||
simulation.makeTextLog(`level.levels.push("<span class='lore-text'>null</span>")`, 720);
|
||||
simulation.inGameConsole(`level.levels.push("<span class='lore-text'>null</span>")`, 720);
|
||||
unlockExit()
|
||||
level.levels.push("null")
|
||||
}, 4000);
|
||||
@@ -991,14 +977,14 @@ const spawn = {
|
||||
if (!simulation.paused && !simulation.onTitlePage) {
|
||||
count++
|
||||
if (count < 660) {
|
||||
if (count === 1 && simulation.difficultyMode < 5) simulation.makeTextLog(`<em>//enter testing mode to set level.levels.length to <strong>Infinite</strong></em>`);
|
||||
if (!(count % 60)) simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> ${((count / 60 - Math.random()) * 0.1).toFixed(3)}`);
|
||||
if (count === 1 && simulation.difficultyMode < 5) simulation.inGameConsole(`<em>//enter testing mode to set level.levels.length to <strong>Infinite</strong></em>`);
|
||||
if (!(count % 60)) simulation.inGameConsole(`simulation.analysis <span class='color-symbol'>=</span> ${((count / 60 - Math.random()) * 0.1).toFixed(3)}`);
|
||||
} else if (count === 660) {
|
||||
simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> 1 <em>//analysis complete</em>`);
|
||||
simulation.inGameConsole(`simulation.analysis <span class='color-symbol'>=</span> 1 <em>//analysis complete</em>`);
|
||||
} else if (count === 780) {
|
||||
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}`)
|
||||
simulation.inGameConsole(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}`)
|
||||
} else if (count === 1020) {
|
||||
simulation.makeTextLog(`Engine.clear(engine) <em>//simulation successful</em>`);
|
||||
simulation.inGameConsole(`Engine.clear(engine) <em>//simulation successful</em>`);
|
||||
} else if (count === 1260) {
|
||||
// tech.isImmortal = false;
|
||||
// m.death()
|
||||
@@ -1031,7 +1017,7 @@ const spawn = {
|
||||
if (simulation.testing || simulation.difficultyMode > 4) {
|
||||
unlockExit()
|
||||
setTimeout(function () {
|
||||
simulation.makeTextLog(`level.levels.length <span class='color-symbol'>=</span> <strong>Infinite</strong>`);
|
||||
simulation.inGameConsole(`level.levels.length <span class='color-symbol'>=</span> <strong>Infinite</strong>`);
|
||||
}, 1500);
|
||||
} else {
|
||||
if (!simulation.onTitlePage) requestAnimationFrame(loop);
|
||||
@@ -1811,47 +1797,20 @@ const spawn = {
|
||||
Matter.Body.setVelocity(mob[mob.length - 1], { x: this.velocity.x, y: this.velocity.y })
|
||||
}
|
||||
for (let i = 0; i < powerUp.length; i++) powerUp[i].collisionFilter.mask = cat.map | cat.powerUp
|
||||
for (let i = 0; i < 40; i++) this.colors();
|
||||
};
|
||||
|
||||
//steal all power ups
|
||||
// for (let i = 0; i < Math.min(powerUp.length, this.vertices.length); i++) {
|
||||
// powerUp[i].collisionFilter.mask = 0
|
||||
// Matter.Body.setPosition(powerUp[i], this.vertices[i])
|
||||
// Matter.Body.setVelocity(powerUp[i], {
|
||||
// x: 0,
|
||||
// y: 0
|
||||
// })
|
||||
// }
|
||||
// me.powerUpList = []
|
||||
// me.constrainPowerUps = function() {
|
||||
// for (let i = 0; i < Math.min(powerUp.length, this.vertices.length); i++) {
|
||||
// //remove other constraints on power up
|
||||
// for (let i = 0, len = cons.length; i < len; ++i) {
|
||||
// if (cons[i].bodyB === powerUp[i] || cons[i].bodyA === powerUp[i]) {
|
||||
// Matter.Composite.remove(engine.world, cons[i]);
|
||||
// cons.splice(i, 1);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// //add to list
|
||||
// this.powerUpList.push(powerUp[i])
|
||||
// //position and stop
|
||||
// powerUp[i].collisionFilter.mask = 0
|
||||
// Matter.Body.setPosition(powerUp[i], this.vertices[i])
|
||||
// Matter.Body.setVelocity(powerUp[i], { x: 0, y: 0 })
|
||||
// //add constraint
|
||||
// cons[cons.length] = Constraint.create({
|
||||
// pointA: this.vertices[i],
|
||||
// bodyB: powerUp[i],
|
||||
// stiffness: 1,
|
||||
// damping: 1
|
||||
// });
|
||||
// Composite.add(engine.world, cons[cons.length - 1]);
|
||||
// }
|
||||
// for (let i = 0; i < this.powerUpList.length; i++) {}
|
||||
// }
|
||||
// me.constrainPowerUps()
|
||||
me.colors = function () {
|
||||
const unit = Vector.rotate({ x: 1, y: 0 }, Math.random() * 6.28)
|
||||
const where = Vector.add(this.position, Vector.mult(unit, 700 - 500 * Math.random() * Math.random()))
|
||||
const colors = ["#0ae", "#f55", "#f7b", "#0eb", "#467", "hsl(246,100%,77%)", "#0cf", "#26a"]
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
x: where.x,
|
||||
y: where.y,
|
||||
radius: 5 + 10 * Math.random(),
|
||||
color: colors[Math.floor(Math.random() * colors.length)], //#0cf
|
||||
time: 17//4 + Math.floor(15 * Math.random())
|
||||
});
|
||||
}
|
||||
me.do = function () {
|
||||
this.stroke = `hsl(0,0%,${80 + 25 * Math.sin(simulation.cycle * 0.01)}%)`
|
||||
if (this.isInvulnerable) {
|
||||
@@ -1870,12 +1829,6 @@ const spawn = {
|
||||
this.damageReduction = this.startingDamageReduction
|
||||
}
|
||||
}
|
||||
//steal all power ups
|
||||
// for (let i = 0; i < Math.min(powerUp.length, this.vertices.length); i++) {
|
||||
// powerUp[i].collisionFilter.mask = 0
|
||||
// Matter.Body.setPosition(powerUp[i], this.vertices[i])
|
||||
// Matter.Body.setVelocity(powerUp[i], { x: 0, y: 0 })
|
||||
// }
|
||||
if (this.alive) {
|
||||
for (let i = 0; i < Math.min(powerUp.length, this.vertices.length); i++) {
|
||||
powerUp[i].collisionFilter.mask = 0
|
||||
@@ -1887,6 +1840,9 @@ const spawn = {
|
||||
this.seePlayerCheckByDistance();
|
||||
this.attraction();
|
||||
this.checkStatus();
|
||||
|
||||
//aura around boss so it can bee seen more easily even when inside walls
|
||||
if (!(simulation.cycle % 5)) this.colors();
|
||||
};
|
||||
},
|
||||
|
||||
@@ -3873,9 +3829,10 @@ const spawn = {
|
||||
mobs.spawn(x, y, 0, 25, `rgba(255,0,200)`); //"rgb(221,102,119)"
|
||||
let me = mob[mob.length - 1];
|
||||
me.stroke = "transparent"; //used for drawGhost
|
||||
Matter.Body.setDensity(me, 0.03); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
me.isUnblockable = true;
|
||||
Matter.Body.setDensity(me, 0.033); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
me.isBoss = true;
|
||||
me.damageReduction = 0.6
|
||||
me.damageReduction = 0.5
|
||||
me.startingDamageReduction = me.damageReduction
|
||||
me.isInvulnerable = false
|
||||
me.nextHealthThreshold = 0.75
|
||||
@@ -3888,7 +3845,7 @@ const spawn = {
|
||||
me.friction = 0;
|
||||
me.memory = 240
|
||||
me.seePlayerFreq = 55
|
||||
me.delay = 4 + 2 * simulation.CDScale;//8 + 3 * simulation.CDScale;
|
||||
me.delay = 5 + 2 * simulation.CDScale;//8 + 3 * simulation.CDScale;
|
||||
me.nextBlinkCycle = me.delay;
|
||||
me.JumpDistance = 0//set in redMode()
|
||||
// spawn.shield(me, x, y, 1);
|
||||
|
||||
395
js/tech.js
395
js/tech.js
@@ -61,7 +61,7 @@ const tech = {
|
||||
}
|
||||
if (tech.tech[index].count === 0) return 0
|
||||
const totalRemoved = tech.tech[index].count
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.removeTech("<span class='color-text'>${tech.tech[index].name}</span>")`, 360)
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.removeTech("<span class='color-text'>${tech.tech[index].name}</span>")`, 360)
|
||||
tech.tech[index].remove();
|
||||
tech.removeCount += totalRemoved
|
||||
tech.tech[index].count = 0;
|
||||
@@ -73,11 +73,11 @@ const tech = {
|
||||
},
|
||||
junkChance: 0,
|
||||
addJunkTechToPool(percent) { //percent is number between 0-1
|
||||
simulation.makeTextLog(`<strong>+${(100 * percent).toFixed(0)}%</strong> <span class='color-text'>JUNK</span><span class='color-var'>tech</span> chance (${(100 * tech.junkChance).toFixed(0)} total chance)`)
|
||||
// tech.junkChance += (1 - tech.junkChance) * percent
|
||||
tech.junkChance += percent
|
||||
if (tech.junkChance < 0.001 || tech.junkChance === undefined) tech.junkChance = 0
|
||||
if (tech.junkChance > 1) tech.junkChance = 1
|
||||
simulation.inGameConsole(`<strong>+${(100 * percent).toFixed(0)}%</strong> <span class='color-text'>JUNK</span><span class='color-var'>tech</span> chance (${(100 * tech.junkChance).toFixed(0)} total chance)`)
|
||||
// tech.junkChance += (1 - tech.junkChance) * percent
|
||||
return percent
|
||||
|
||||
//make an array for possible junk tech to add
|
||||
@@ -92,7 +92,7 @@ const tech = {
|
||||
// }
|
||||
// const num = Math.ceil(percent * countNonJunk) //scale number added
|
||||
// for (let i = 0; i < num; i++) tech.tech[options[Math.floor(Math.random() * options.length)]].frequency++ //add random array options to tech pool
|
||||
// simulation.makeTextLog(`<span class='color-var'>tech</span>.tech.push(${num.toFixed(0)} <span class='color-text'>JUNK</span>)`)
|
||||
// simulation.inGameConsole(`<span class='color-var'>tech</span>.tech.push(${num.toFixed(0)} <span class='color-text'>JUNK</span>)`)
|
||||
// return num
|
||||
// } else {
|
||||
// return 0
|
||||
@@ -125,7 +125,7 @@ const tech = {
|
||||
// give a random tech from the tech I don't have
|
||||
if (options.length > 0) {
|
||||
let newTech = options[Math.floor(Math.random() * options.length)]
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[newTech].name}</strong>")<em> //random tech</em>`);
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[newTech].name}</strong>")<em> //random tech</em>`);
|
||||
tech.giveTech(newTech)
|
||||
}
|
||||
} else {
|
||||
@@ -141,7 +141,7 @@ const tech = {
|
||||
if (!found) return //if name not found don't give any tech
|
||||
}
|
||||
if (tech.isMetaAnalysis && tech.tech[index].isJunk) {
|
||||
simulation.makeTextLog(`//tech: meta-analysis replaced junk tech with random tech`);
|
||||
simulation.inGameConsole(`//tech: meta-analysis replaced junk tech with random tech`);
|
||||
tech.giveTech('random')
|
||||
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 40 * Math.random(), m.pos.y + 40 * Math.random(), "research");
|
||||
return
|
||||
@@ -152,8 +152,72 @@ const tech = {
|
||||
tech.tech[index].effect(); //give specific tech
|
||||
tech.tech[index].count++
|
||||
if (!tech.tech[index].isInstant) tech.totalCount++ //used in power up randomization
|
||||
requestAnimationFrame(() => {
|
||||
if (tech.isWiki) {
|
||||
async function getWikipediaIntro(subject) {
|
||||
// const searchEndpoint = `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&explaintext&titles=${encodeURIComponent(subject).replace(/' /g, '%27')}&format=json&origin=*`;
|
||||
const searchEndpoint = `https://en.wikipedia.org/w/api.php?action=opensearch&search=${encodeURIComponent(subject).replace(/' /g, '%27')}&limit=1&namespace=0&format=json&origin=*`;
|
||||
try {
|
||||
// Perform a search to get the closest matching title
|
||||
const searchResponse = await fetch(searchEndpoint);
|
||||
const searchData = await searchResponse.json();
|
||||
if (searchData[1].length === 0) throw new Error('No matching pages found');
|
||||
const closestTitle = searchData[1][0];
|
||||
// Use the closest matching title to get the page content
|
||||
const contentEndpoint = `https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&explaintext&titles=${encodeURIComponent(closestTitle)}&format=json&origin=*`;
|
||||
const contentResponse = await fetch(contentEndpoint);
|
||||
const contentData = await contentResponse.json();
|
||||
const pages = contentData.query.pages;
|
||||
const pageId = Object.keys(pages)[0];
|
||||
return pages[pageId].extract
|
||||
} catch (error) {
|
||||
console.error('Error fetching Wikipedia intro:', error);
|
||||
}
|
||||
}
|
||||
const subject = tech.tech[index].name
|
||||
getWikipediaIntro(subject).then(intro => {
|
||||
let tab = window.open(`https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(subject).replace(/' /g, '%27')}&title=Special:Search`, "_blank");
|
||||
if (tab) {
|
||||
let checkInterval = setInterval(() => {
|
||||
if (tab.closed) {
|
||||
clearInterval(checkInterval); // Stop checking once the tab is closed
|
||||
|
||||
const introArray = intro.split(" ")
|
||||
const wordLimit = 7
|
||||
const wordNumber = Math.ceil(Math.random() * wordLimit)
|
||||
const answer = prompt(`On the wikipedia page for ${subject} what is word ${wordNumber + 1}?`)
|
||||
console.log(introArray[wordNumber])
|
||||
if (introArray[wordNumber]) {
|
||||
if (answer && answer.toLowerCase() === introArray[wordNumber].toLowerCase().replace(/[^a-zA-Z]/g, '')) {
|
||||
powerUps.spawnDelay("research", 5)
|
||||
simulation.inGameConsole(`correct!`, 360)
|
||||
} else {
|
||||
simulation.inGameConsole(`<strong>${answer}</strong> is wrong, it was <strong>${introArray[wordNumber]}</strong>`, 360)
|
||||
}
|
||||
let text = `"`
|
||||
for (let i = 0; i < wordLimit; i++) {
|
||||
if (i === wordNumber) {
|
||||
text += `<strong>${introArray[i]}</strong> `
|
||||
} else {
|
||||
text += `${introArray[i]} `
|
||||
}
|
||||
}
|
||||
simulation.inGameConsole(text + `..."`, 360)
|
||||
} else {
|
||||
simulation.inGameConsole(`hmmm I'm not sure the answer, so I'll say it's correct!`, 360)
|
||||
powerUps.spawnDelay("research", 5)
|
||||
}
|
||||
}
|
||||
}, 1000); // Check every 1 second
|
||||
setTimeout(() => {
|
||||
tab.close();
|
||||
}, 7000); // Close the tab after 7 seconds
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//move new tech to the top of the tech list
|
||||
requestAnimationFrame(() => {
|
||||
if (index > 0 && !build.isExperimentSelection) {
|
||||
const [item] = tech.tech.splice(index, 1); // Remove the element from the array
|
||||
tech.tech.unshift(item); // Add the element to the front of the array
|
||||
@@ -211,7 +275,7 @@ const tech = {
|
||||
if (tech.isNoDefenseDamage && m.defense() === 1) dmg *= 2
|
||||
if (tech.isImmunityDamage && m.immuneCycle > m.cycle) dmg *= 4
|
||||
if (tech.isPowerUpDamage) dmg *= 1 + 0.07 * powerUp.length
|
||||
if (tech.isDamageCooldown) dmg *= m.lastKillCycle + tech.isDamageCooldownTime > m.cycle ? 0.5 : 4
|
||||
if (tech.isDamageCooldown) dmg *= m.lastKillCycle + tech.isDamageCooldownTime > m.cycle ? 0.4 : 4
|
||||
if (tech.isDamageAfterKillNoRegen && m.lastKillCycle + 300 > m.cycle) dmg *= 2
|
||||
if (tech.isDivisor && b.activeGun !== undefined && b.activeGun !== null && b.guns[b.activeGun].ammo % 3 === 0) dmg *= 1.9
|
||||
if (tech.isNoGroundDamage) dmg *= m.onGround ? 0.9 : 2
|
||||
@@ -219,7 +283,7 @@ const tech = {
|
||||
if (tech.isGunChoice && tech.buffedGun === b.inventoryGun) dmg *= 1 + 0.3 * b.inventory.length
|
||||
if (powerUps.boost.endCycle > m.cycle) dmg *= 1 + powerUps.boost.damage
|
||||
if (m.coupling && (m.fieldMode === 0 || m.fieldMode === 5)) dmg *= 1 + 0.015 * m.coupling
|
||||
if (tech.deathSkipTime) dmg *= 1 + 0.6 * tech.deathSkipTime
|
||||
if (tech.isVerlet) dmg *= 3
|
||||
if (tech.isTechDebt) dmg *= tech.totalCount > 20 ? Math.pow(0.85, tech.totalCount - 20) : 4 - 0.15 * tech.totalCount
|
||||
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.71828
|
||||
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
|
||||
@@ -347,6 +411,27 @@ const tech = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Verlet integration",
|
||||
description: "<strong>3x</strong> <strong class='color-d'>damage</strong><br>after mobs <strong>die</strong> advance time <strong>0.5</strong> seconds",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin
|
||||
},
|
||||
requires: "not skinned",
|
||||
effect() {
|
||||
tech.isVerlet = true
|
||||
m.skin.verlet();
|
||||
},
|
||||
remove() {
|
||||
tech.isVerlet = false
|
||||
if (this.count) m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Hilbert space",
|
||||
description: "<strong>4x</strong> <strong class='color-d'>damage</strong><br>after a <strong>collision</strong> enter an <strong class='alt'>alternate reality</strong>",
|
||||
@@ -488,7 +573,7 @@ const tech = {
|
||||
{
|
||||
name: "depolarization",
|
||||
descriptionFunction() {
|
||||
return `<strong>4x</strong> <strong class='color-d'>damage</strong>, but if a mob <strong>dies</strong><br><strong>0.5x</strong> <strong class='color-d'>damage</strong> for <strong>${(tech.isDamageCooldownTime / 60).toFixed(1)}</strong> seconds instead`
|
||||
return `<strong>4x</strong> <strong class='color-d'>damage</strong>, but if a mob <strong>dies</strong><br><strong>0.4x</strong> <strong class='color-d'>damage</strong> for <strong>${(tech.isDamageCooldownTime / 60).toFixed(1)}</strong> seconds instead`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -630,7 +715,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "ordnance",
|
||||
description: `spawn ${powerUps.orb.gun()} and gain <strong>2x</strong> <em class='flicker'>${powerUps.orb.gunTech()} frequency</em><br><strong>+6%</strong> <strong class='color-junk'>JUNK</strong> chance`,
|
||||
description: `spawn ${powerUps.orb.gun()} and get <strong>2x</strong> <em class='flicker'>frequency</em> for ${powerUps.orb.gunTech()}<br><strong>+6%</strong> <strong class='color-junk'>JUNK</strong> chance`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -786,14 +871,23 @@ const tech = {
|
||||
},
|
||||
requires: "at least 2 guns",
|
||||
effect() {
|
||||
for (let i = b.inventory.length - 1; i > -1; i--) { //backwards because some tech can remove or add guns
|
||||
const gunTechPool = [] //find gun tech for this gun
|
||||
const delay = 20
|
||||
let i = (b.inventory.length) * delay
|
||||
let gunIndex = -1
|
||||
let cycle = () => {
|
||||
if (i > 0) {
|
||||
if (m.alive) requestAnimationFrame(cycle);
|
||||
if (!simulation.paused && !simulation.isChoosing) {
|
||||
i--
|
||||
if (!(i % delay)) {
|
||||
gunIndex++
|
||||
//find gun tech for this gun
|
||||
const gunTechPool = []
|
||||
for (let j = 0, len = tech.tech.length; j < len; j++) {
|
||||
// console.log(j, tech.tech[j].isGunTech, tech.tech[j].allowed(), !tech.tech[j].isJunk, !tech.tech[j].isBadRandomOption, tech.tech[j].count < tech.tech[j].maxCount)
|
||||
const originalActiveGunIndex = b.activeGun //set current gun to active so allowed works
|
||||
b.activeGun = b.inventory[i] //to make the .allowed work for guns that aren't active
|
||||
b.activeGun = b.inventory[gunIndex] //to make the .allowed work for guns that aren't active
|
||||
if (tech.tech[j].isGunTech && tech.tech[j].allowed() && !tech.tech[j].isJunk && !tech.tech[j].isBadRandomOption && tech.tech[j].count < tech.tech[j].maxCount) {
|
||||
const regex = tech.tech[j].requires.search(b.guns[b.inventory[i]].name) //get string index of gun name
|
||||
const regex = tech.tech[j].requires.search(b.guns[b.inventory[gunIndex]].name) //get string index of gun name
|
||||
const not = tech.tech[j].requires.search(' not ') //get string index of ' not '
|
||||
if (regex !== -1 && (not === -1 || not > regex)) gunTechPool.push(j) //look for the gun name in the requirements, but the gun name needs to show up before the word ' not '
|
||||
}
|
||||
@@ -807,24 +901,60 @@ const tech = {
|
||||
b.inventoryGun = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//give the tech that was found for this gun
|
||||
if (gunTechPool.length) {
|
||||
const index = Math.floor(Math.random() * gunTechPool.length)
|
||||
// console.log(gunTechPool, index, gunTechPool[index], tech.tech[gunTechPool[index]].name)
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[gunTechPool[index]].name}</span>")`, 360)
|
||||
// tech.tech[gunTechPool[index]].isInstant = true //makes it not remove properly under paradigm shift
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[gunTechPool[index]].name}</span>")`, 360)
|
||||
tech.giveTech(gunTechPool[index]) // choose from the gun pool
|
||||
// console.log(gunTechPool, index, gunTechPool[index], tech.tech[gunTechPool[index]].name)
|
||||
// tech.tech[gunTechPool[index]].isFromAppliedScience = true //makes it not remove properly under paradigm shift
|
||||
}
|
||||
}
|
||||
simulation.boldActiveGunHUD();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
requestAnimationFrame(cycle);
|
||||
|
||||
// for (let i = b.inventory.length - 1; i > -1; i--) { //backwards because some tech can remove or add guns
|
||||
// const gunTechPool = [] //find gun tech for this gun
|
||||
// for (let j = 0, len = tech.tech.length; j < len; j++) {
|
||||
// // console.log(j, tech.tech[j].isGunTech, tech.tech[j].allowed(), !tech.tech[j].isJunk, !tech.tech[j].isBadRandomOption, tech.tech[j].count < tech.tech[j].maxCount)
|
||||
// const originalActiveGunIndex = b.activeGun //set current gun to active so allowed works
|
||||
// b.activeGun = b.inventory[i] //to make the .allowed work for guns that aren't active
|
||||
// if (tech.tech[j].isGunTech && tech.tech[j].allowed() && !tech.tech[j].isJunk && !tech.tech[j].isBadRandomOption && tech.tech[j].count < tech.tech[j].maxCount) {
|
||||
// const regex = tech.tech[j].requires.search(b.guns[b.inventory[i]].name) //get string index of gun name
|
||||
// const not = tech.tech[j].requires.search(' not ') //get string index of ' not '
|
||||
// if (regex !== -1 && (not === -1 || not > regex)) gunTechPool.push(j) //look for the gun name in the requirements, but the gun name needs to show up before the word ' not '
|
||||
// }
|
||||
// b.activeGun = originalActiveGunIndex
|
||||
// if (!b.guns[b.activeGun].have) {
|
||||
// if (b.inventory.length === 0) {
|
||||
// b.activeGun = null
|
||||
// } else {
|
||||
// b.activeGun = b.inventory[0]
|
||||
// }
|
||||
// b.inventoryGun = 0;
|
||||
// }
|
||||
// }
|
||||
// if (gunTechPool.length) {
|
||||
// const index = Math.floor(Math.random() * gunTechPool.length)
|
||||
// // console.log(gunTechPool, index, gunTechPool[index], tech.tech[gunTechPool[index]].name)
|
||||
// simulation.inGameConsole(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[gunTechPool[index]].name}</span>")`, 360)
|
||||
// // tech.tech[gunTechPool[index]].isInstant = true //makes it not remove properly under paradigm shift
|
||||
// tech.giveTech(gunTechPool[index]) // choose from the gun pool
|
||||
// // console.log(gunTechPool, index, gunTechPool[index], tech.tech[gunTechPool[index]].name)
|
||||
// // tech.tech[gunTechPool[index]].isFromAppliedScience = true //makes it not remove properly under paradigm shift
|
||||
// }
|
||||
// }
|
||||
// simulation.boldActiveGunHUD();
|
||||
},
|
||||
remove() { }
|
||||
},
|
||||
{
|
||||
name: "supply chain",
|
||||
descriptionFunction() {
|
||||
return `spawn ${powerUps.orb.gun()}<br>spawn ${powerUps.orb.ammo()} to match your current <strong class='color-ammo'>ammo</strong>`
|
||||
return `spawn ${powerUps.orb.gun()} ${powerUps.orb.ammo(10)}`
|
||||
},
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
@@ -836,11 +966,11 @@ const tech = {
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
let ammoCount = 0 //count ammo
|
||||
if (b.activeGun && b.activeGun !== undefined && b.guns[b.activeGun].have && b.guns[b.activeGun].ammo !== Infinity) {
|
||||
ammoCount += b.guns[b.activeGun].ammo / b.guns[b.activeGun].ammoPack
|
||||
}
|
||||
powerUps.spawnDelay("ammo", Math.ceil(ammoCount))
|
||||
// let ammoCount = 0 //count ammo
|
||||
// if (b.activeGun && b.activeGun !== undefined && b.guns[b.activeGun].have && b.guns[b.activeGun].ammo !== Infinity) {
|
||||
// ammoCount += b.guns[b.activeGun].ammo / b.guns[b.activeGun].ammoPack
|
||||
// }
|
||||
powerUps.spawnDelay("ammo", 10)
|
||||
powerUps.spawn(m.pos.x, m.pos.y, "gun");
|
||||
},
|
||||
remove() { }
|
||||
@@ -861,9 +991,9 @@ const tech = {
|
||||
effect() {
|
||||
if (this.gun === undefined) this.gun = Math.floor(Math.random() * (b.guns.length - 1)) //don't pick laser
|
||||
|
||||
simulation.makeTextLog(`${b.guns[this.gun].ammoPack} → ${2 * b.guns[this.gun].ammoPack} average <strong class='color-ammo'>ammo</strong> per ${powerUps.orb.ammo(1)} for <strong class='color-g'>${b.guns[this.gun].name}</strong>`)
|
||||
simulation.inGameConsole(`${b.guns[this.gun].ammoPack} → ${2 * b.guns[this.gun].ammoPack} average <strong class='color-ammo'>ammo</strong> per ${powerUps.orb.ammo(1)} for <strong class='color-g'>${b.guns[this.gun].name}</strong>`)
|
||||
b.guns[this.gun].ammoPack *= 2
|
||||
// simulation.makeTextLog(`${(tech.interestRate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-h'>health</span> <span class='color-symbol'>=</span> ${h > 20 ? h + powerUps.orb.heal(1) : powerUps.orb.heal(h)}`)
|
||||
// simulation.inGameConsole(`${(tech.interestRate * 100).toFixed(0)}<span class='color-symbol'>%</span> <span class='color-m'>interest</span> on <span class='color-h'>health</span> <span class='color-symbol'>=</span> ${h > 20 ? h + powerUps.orb.heal(1) : powerUps.orb.heal(h)}`)
|
||||
|
||||
// for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "ammo");
|
||||
},
|
||||
@@ -895,7 +1025,7 @@ const tech = {
|
||||
for (let i = 0; i < options.length; i++) {
|
||||
const index = options[i]
|
||||
const scale = (i < options.length / 2) ? 4 : 0.25
|
||||
simulation.makeTextLog(`${(b.guns[index].ammoPack).toFixed(1)} <span ${scale < 1 ? 'style="color: #f00;"' : ''}>→</span> ${(b.guns[index].ammoPack * scale).toFixed(1)} average <strong class='color-ammo'>ammo</strong> per ${powerUps.orb.ammo(1)} for <strong class='color-g'>${b.guns[index].name}</strong>`, Infinity)
|
||||
simulation.inGameConsole(`${(b.guns[index].ammoPack).toFixed(1)} <span ${scale < 1 ? 'style="color: #f00;"' : ''}>→</span> ${(b.guns[index].ammoPack * scale).toFixed(1)} average <strong class='color-ammo'>ammo</strong> per ${powerUps.orb.ammo(1)} for <strong class='color-g'>${b.guns[index].name}</strong>`, Infinity)
|
||||
b.guns[index].ammoPack *= scale
|
||||
}
|
||||
},
|
||||
@@ -1115,7 +1245,7 @@ const tech = {
|
||||
name: "microstates",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Microstate_(statistical_mechanics)' class="link">microstates</a>`,
|
||||
descriptionFunction() {
|
||||
return `use ${powerUps.orb.research(3)}<br><strong>1.01x</strong> <strong class='color-d'>damage</strong> per <strong>bullet</strong> or <strong>bot</strong> <em style ="float: right;">(${(1 + bullet.length * 0.01).toFixed(2)}x)</em>`
|
||||
return `use ${powerUps.orb.research(3)}<br><strong>1.01x</strong> <strong class='color-d'>damage</strong> per <strong>bullet</strong> or <strong class='color-bot'>bot</strong> <em style ="float: right;">(${(1 + bullet.length * 0.01).toFixed(2)}x)</em>`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -1201,7 +1331,7 @@ const tech = {
|
||||
tech.fireRate /= rate
|
||||
this.totalRate.push(rate)
|
||||
b.setFireCD();
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.fireRate *= ${rate} //heuristics`);
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.fireRate *= ${rate} //heuristics`);
|
||||
},
|
||||
remove() {
|
||||
if (this.count && m.alive) {
|
||||
@@ -1231,7 +1361,7 @@ const tech = {
|
||||
const damage = (Math.floor((Math.random() * 0.3 + 1) * 100)) / 100
|
||||
tech.damage *= damage
|
||||
this.damageSoFar.push(damage)
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.damage *= ${damage} //mechatronics`);
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.damage *= ${damage} //mechatronics`);
|
||||
},
|
||||
remove() {
|
||||
if (this.count && m.alive) for (let i = 0; i < this.damageSoFar.length; i++) tech.damage /= this.damageSoFar[i]
|
||||
@@ -1368,22 +1498,6 @@ const tech = {
|
||||
tech.sporesOnDeath = 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "propagator",
|
||||
description: "after mobs <strong>die</strong> advance time <strong>0.5</strong> seconds<br><strong>1.6x</strong> <strong class='color-d'>damage</strong>",
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
allowed: () => true,
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.deathSkipTime++
|
||||
},
|
||||
remove() {
|
||||
tech.deathSkipTime = 0
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "exciton",
|
||||
descriptionFunction() {
|
||||
@@ -1529,7 +1643,7 @@ const tech = {
|
||||
{
|
||||
name: "scrap bots",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Scrap' class="link">scrap bots</a>`,
|
||||
description: "after mobs <strong>die</strong> you have a <strong>33%</strong> chance<br>to build scrap <strong class='color-bot'>bots</strong> that operate for <strong>15</strong> seconds",
|
||||
description: "after mobs <strong>die</strong> you have a <strong>33%</strong> chance<br>to construct scrap <strong class='color-bot'>bots</strong> that operate for <strong>15</strong> seconds",
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1569,7 +1683,7 @@ const tech = {
|
||||
{
|
||||
name: "nail-bot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">nail-bot</a>`,
|
||||
description: "a <strong class='color-bot'>bot</strong> fires <strong>nails</strong> at mobs in line of sight",
|
||||
description: "construct a <strong class='color-bot'>bot</strong> fires <strong>nails</strong> at mobs in line of sight",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1595,7 +1709,7 @@ const tech = {
|
||||
{
|
||||
name: "nail-bot upgrade",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">nail-bot upgrade</a>`,
|
||||
description: "<strong>convert</strong> your bots to <strong>nail-bots</strong><br><strong>4x</strong> <em>fire rate</em> and <strong>1.4x</strong> nail <strong>velocity</strong>",
|
||||
description: "<strong>convert</strong> your <strong class='color-bot'>bots</strong> to <strong class='color-bot'>nail-bots</strong><br><strong>4x</strong> <em>fire rate</em> and <strong>1.4x</strong> nail <strong>velocity</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
@@ -1627,7 +1741,7 @@ const tech = {
|
||||
{
|
||||
name: "foam-bot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">foam-bot</a>`,
|
||||
description: "a <strong class='color-bot'>bot</strong> sprays sticky <strong>foam</strong> at nearby mobs",
|
||||
description: "construct a <strong class='color-bot'>bot</strong> sprays sticky <strong>foam</strong> at nearby mobs",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1653,7 +1767,7 @@ const tech = {
|
||||
{
|
||||
name: "foam-bot upgrade",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">foam-bot upgrade</a>`,
|
||||
description: "<strong>convert</strong> your bots to <strong>foam-bots</strong><br><strong>2.5x</strong> foam <strong>size</strong> and <em>fire rate</em>",
|
||||
description: "<strong>convert</strong> your <strong class='color-bot'>bots</strong> to <strong class='color-bot'>foam-bots</strong><br><strong>2.5x</strong> foam <strong>size</strong> and <em>fire rate</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
@@ -1685,7 +1799,7 @@ const tech = {
|
||||
{
|
||||
name: "sound-bot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">sound-bot</a>`,
|
||||
description: "a <strong class='color-bot'>bot</strong> emits <strong>expanding arcs</strong><br>aimed towards nearby mobs",
|
||||
description: "construct a <strong class='color-bot'>bot</strong> emits expanding<br>arcs of <strong>sound</strong> aimed towards nearby mobs",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1709,7 +1823,7 @@ const tech = {
|
||||
{
|
||||
name: "sound-bot upgrade",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">sound-bot upgrade</a>`,
|
||||
description: "<strong>convert</strong> your bots to <strong>sound-bots</strong><br><strong>2x</strong> wave <em>fire rate</em>, <strong class='color-d'>damage</strong>, and duration",
|
||||
description: "<strong>convert</strong> your <strong class='color-bot'>bots</strong> to <strong class='color-bot'>sound-bots</strong><br><strong>2x</strong> wave <em>fire rate</em>, <strong class='color-d'>damage</strong>, and duration",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
@@ -1741,7 +1855,7 @@ const tech = {
|
||||
{
|
||||
name: "boom-bot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">boom-bot</a>`,
|
||||
description: "a <strong class='color-bot'>bot</strong> <strong>defends</strong> the space around you<br>ignites an <strong class='color-e'>explosion</strong> after hitting a mob",
|
||||
description: "construct a <strong class='color-bot'>bot</strong> <strong>defends</strong> the space around you<br>ignites an <strong class='color-e'>explosion</strong> after hitting a mob",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1767,7 +1881,7 @@ const tech = {
|
||||
{
|
||||
name: "boom-bot upgrade",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">boom-bot upgrade</a>`,
|
||||
description: "<strong>convert</strong> your bots to <strong>boom-bots</strong><br><strong>4x</strong> <strong class='color-e'>explosion</strong> <strong class='color-d'>damage</strong> and size",
|
||||
description: "<strong>convert</strong> your <strong class='color-bot'>bots</strong> to <strong class='color-bot'>boom-bots</strong><br><strong>4x</strong> <strong class='color-e'>explosion</strong> <strong class='color-d'>damage</strong> and size",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
@@ -1799,7 +1913,7 @@ const tech = {
|
||||
{
|
||||
name: "laser-bot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">laser-bot</a>`,
|
||||
description: "a <strong class='color-bot'>bot</strong> uses <strong class='color-f'>energy</strong> to emit a <strong class='color-laser'>laser</strong> beam<br>that targets nearby mobs",
|
||||
description: "construct a <strong class='color-bot'>bot</strong> uses <strong class='color-f'>energy</strong> to emit a <strong class='color-laser'>laser</strong><br>that targets nearby mobs",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1825,7 +1939,7 @@ const tech = {
|
||||
{
|
||||
name: "laser-bot upgrade",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">laser-bot upgrade</a>`,
|
||||
description: "<strong>convert</strong> your bots to <strong>laser-bots</strong><br><strong>2x</strong> <strong class='color-d'>damage</strong>, efficiency, and range",
|
||||
description: "<strong>convert</strong> your <strong class='color-bot'>bots</strong> to <strong class='color-bot'>laser-bots</strong><br><strong>2x</strong> <strong class='color-d'>damage</strong>, efficiency, and range",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
@@ -1857,7 +1971,7 @@ const tech = {
|
||||
{
|
||||
name: "orbital-bot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">orbital-bot</a>`,
|
||||
description: "a <strong class='color-bot'>bot</strong> is locked in <strong>orbit</strong> around you<br><strong>stuns</strong> and <strong class='color-d'>damages</strong> mobs on <strong>contact</strong>",
|
||||
description: "construct a <strong class='color-bot'>bot</strong> is locked in <strong>orbit</strong> around you<br><strong>stuns</strong> and <strong class='color-d'>damages</strong> mobs on <strong>contact</strong>",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1883,7 +1997,7 @@ const tech = {
|
||||
{
|
||||
name: "orbital-bot upgrade",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">orbital-bot upgrade</a>`,
|
||||
description: "<strong>convert</strong> your bots to <strong>orbital-bots</strong><br><strong>4x</strong> orbital <strong class='color-d'>damage</strong> and <strong>2x</strong> <strong>radius</strong>",
|
||||
description: "<strong>convert</strong> your <strong class='color-bot'>bots</strong> to <strong class='color-bot'>orbital-bots</strong><br><strong>4x</strong> orbital <strong class='color-d'>damage</strong> and <strong>2x</strong> <strong>radius</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
@@ -1924,7 +2038,7 @@ const tech = {
|
||||
{
|
||||
name: "dynamo-bot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">dynamo-bot</a>`,
|
||||
description: "a <strong class='color-bot'>bot</strong> <strong class='color-d'>damages</strong> mobs while it <strong>traces</strong> your path<br><strong>+8</strong> <strong class='color-f'>energy</strong> per second when nearby",
|
||||
description: "construct a <strong class='color-bot'>bot</strong> <strong class='color-d'>damages</strong> mobs it touches<br><strong>+8</strong> <strong class='color-f'>energy</strong> per second when nearby",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -1950,7 +2064,7 @@ const tech = {
|
||||
{
|
||||
name: "dynamo-bot upgrade",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">dynamo-bot upgrade</a>`,
|
||||
description: "<strong>convert</strong> your bots to <strong>dynamo-bots</strong><br><strong>+24</strong> <strong class='color-f'>energy</strong> per second when nearby",
|
||||
description: "<strong>convert</strong> your <strong class='color-bot'>bots</strong> to <strong class='color-bot'>dynamo-bots</strong><br><strong>+24</strong> <strong class='color-f'>energy</strong> per second when nearby",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 3,
|
||||
@@ -2025,7 +2139,7 @@ const tech = {
|
||||
name: "bot fabrication",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">bot fabrication</a>`,
|
||||
descriptionFunction() {
|
||||
return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them<br>to build a random <strong class='color-bot'>bot</strong> <em style ="float: right;">(+1 cost every 5 bots)</em>`
|
||||
return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them<br>to construct a random <strong class='color-bot'>bot</strong> <em style ="float: right;">(+1 cost every 5 bots)</em>`
|
||||
},
|
||||
// description: `if you collect ${powerUps.orb.research(2)}use them to build a<br>random <strong class='color-bot'>bot</strong> <em>(+1 cost every 5 bots)</em>`,
|
||||
maxCount: 1,
|
||||
@@ -2040,7 +2154,7 @@ const tech = {
|
||||
effect() {
|
||||
tech.isRerollBots = true;
|
||||
powerUps.research.changeRerolls(0)
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>=</span> 0`)
|
||||
simulation.inGameConsole(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>=</span> 0`)
|
||||
},
|
||||
remove() {
|
||||
tech.isRerollBots = false;
|
||||
@@ -2049,7 +2163,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "open-source",
|
||||
description: `${powerUps.orb.tech()}, ${powerUps.orb.field()}, and ${powerUps.orb.gun()} have <strong>+1</strong> bot <strong class='color-choice'><span>ch</span><span>oi</span><span>ce</span></strong><br><strong>3x</strong> <em class='flicker'>bot-${powerUps.orb.tech()} frequency</em>`,
|
||||
description: `${powerUps.orb.tech()}, ${powerUps.orb.field()}, and ${powerUps.orb.gun()} have <strong>+1</strong> <strong class='color-bot'>bot</strong> <strong class='color-choice'><span>ch</span><span>oi</span><span>ce</span></strong><br><strong>3x</strong> <em class='flicker'>frequency</em> for ${powerUps.orb.tech()} with <strong class='color-bot'>bots</strong>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -2147,7 +2261,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "robotics",
|
||||
description: `spawn <strong>2</strong> random <strong>bots</strong>`,
|
||||
description: `construct <strong>2</strong> random <strong class='color-bot'>bots</strong>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -2166,7 +2280,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "bot manufacturing",
|
||||
description: `use ${powerUps.orb.research(2)} to build<br><strong>3</strong> random <strong class='color-bot'>bots</strong>`,
|
||||
description: `use ${powerUps.orb.research(2)} to construct<br><strong>3</strong> random <strong class='color-bot'>bots</strong>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -2215,7 +2329,7 @@ const tech = {
|
||||
b.nailBot()
|
||||
tech.nailBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isNailBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isNailBotUpgrade = true`)
|
||||
})
|
||||
notUpgradedBots.push(() => {
|
||||
tech.giveTech("foam-bot upgrade")
|
||||
@@ -2223,7 +2337,7 @@ const tech = {
|
||||
b.foamBot()
|
||||
tech.foamBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isFoamBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isFoamBotUpgrade = true`)
|
||||
})
|
||||
notUpgradedBots.push(() => {
|
||||
tech.giveTech("sound-bot upgrade")
|
||||
@@ -2231,7 +2345,7 @@ const tech = {
|
||||
b.soundBot()
|
||||
tech.soundBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isSoundBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isSoundBotUpgrade = true`)
|
||||
})
|
||||
notUpgradedBots.push(() => {
|
||||
tech.giveTech("boom-bot upgrade")
|
||||
@@ -2239,7 +2353,7 @@ const tech = {
|
||||
b.boomBot()
|
||||
tech.boomBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isBoomBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isBoomBotUpgrade = true`)
|
||||
})
|
||||
notUpgradedBots.push(() => {
|
||||
tech.giveTech("laser-bot upgrade")
|
||||
@@ -2247,7 +2361,7 @@ const tech = {
|
||||
b.laserBot()
|
||||
tech.laserBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isLaserBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isLaserBotUpgrade = true`)
|
||||
})
|
||||
notUpgradedBots.push(() => {
|
||||
tech.giveTech("orbital-bot upgrade")
|
||||
@@ -2255,7 +2369,7 @@ const tech = {
|
||||
b.orbitBot()
|
||||
tech.orbitBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isOrbitalBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isOrbitalBotUpgrade = true`)
|
||||
})
|
||||
notUpgradedBots.push(() => {
|
||||
tech.giveTech("dynamo-bot upgrade")
|
||||
@@ -2263,7 +2377,7 @@ const tech = {
|
||||
b.dynamoBot()
|
||||
tech.dynamoBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isDynamoBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isDynamoBotUpgrade = true`)
|
||||
})
|
||||
|
||||
notUpgradedBots[Math.floor(Math.random() * notUpgradedBots.length)]() //choose random function from the array and run it
|
||||
@@ -3236,7 +3350,7 @@ const tech = {
|
||||
{
|
||||
name: "quenching",
|
||||
descriptionFunction() {
|
||||
return `${powerUps.orb.heal()} over<strong class='color-h'>healing</strong> results in <strong>2x</strong> <strong class='color-h'>health</strong> loss<br> and <strong>2x</strong> maximum <strong class='color-h'>health</strong> increase`
|
||||
return `<strong>0.3x</strong> of ${powerUps.orb.heal()} over<strong class='color-h'>healing</strong><br>is added to <strong>maximum</strong> <strong class='color-h'>health</strong>`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -3308,7 +3422,7 @@ const tech = {
|
||||
{
|
||||
name: "maintenance",
|
||||
descriptionFunction() {
|
||||
return `<strong>2x</strong> <em class='flicker'><strong class='color-h'>healing</strong>-${powerUps.orb.tech()} frequency</em><br>spawn ${powerUps.orb.heal(13)}`
|
||||
return `<strong>2x</strong> <em class='flicker'>frequency</em> for ${powerUps.orb.tech()} with <strong class='color-h'>healing</strong><br>spawn ${powerUps.orb.heal(13)}`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -3459,7 +3573,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "many-worlds",
|
||||
description: `at the start of each <strong>level</strong> spawn ${powerUps.orb.tech()}<br>and enter an <strong class='alt'>alternate reality</strong>`,
|
||||
description: `at the start of each <strong>level</strong> spawn ${powerUps.orb.tech()} ${powerUps.orb.coupling(3)}<br>and enter an <strong class='alt'>alternate reality</strong>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -3479,7 +3593,7 @@ const tech = {
|
||||
{
|
||||
name: "Ψ(t) collapse",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Wave_function_collapse' class="link">Ψ(t) collapse</a>`,
|
||||
description: `after a <strong>boss</strong> <strong>dies</strong> spawn ${powerUps.orb.research(5)}<br>if you <strong class='color-r'>research</strong> enter an <strong class='alt'>alternate reality</strong>`,
|
||||
description: `after a <strong>boss</strong> <strong>dies</strong> spawn ${powerUps.orb.research(6)}<br>if you <strong class='color-r'>research</strong> enter an <strong class='alt'>alternate reality</strong>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -3648,7 +3762,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "unified field theory",
|
||||
description: `when <strong>paused</strong> you can click to <strong>change</strong> your ${powerUps.orb.field()}<br><strong>2x</strong> <em class='flicker'>${powerUps.orb.fieldTech()} frequency</em>`,
|
||||
description: `when <strong>paused</strong> you can click to <strong>change</strong> your ${powerUps.orb.field()}<br><strong>2x</strong> frequency for <em class='flicker'>${powerUps.orb.fieldTech()}</em>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -3695,7 +3809,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "brainstorming",
|
||||
description: `${powerUps.orb.tech()} <strong class='color-choice'><span>ch</span><span>oi</span><span>ces</span></strong> <strong>randomize</strong><br>every <strong>1.5</strong> seconds for <strong>10</strong> seconds`,
|
||||
description: `<strong>randomize</strong> ${powerUps.orb.tech()} <strong class='color-choice'><span>ch</span><span>oi</span><span>ces</span></strong><br>every <strong>1.5</strong> seconds for <strong>10</strong> seconds`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -3832,7 +3946,7 @@ const tech = {
|
||||
{
|
||||
name: "technical debt",
|
||||
descriptionFunction() {
|
||||
return `decrease <strong class='color-d'>damage</strong> by <strong>0.15x</strong> for each ${powerUps.orb.tech()} you have<br>increase <strong class='color-d'>damage</strong> by <strong>4x</strong><em style ="float: right;">(${(tech.totalCount > 20 ? (Math.pow(0.85, tech.totalCount - 20)) : (4 - 0.15 * tech.totalCount)).toFixed(2)}x)</em>`
|
||||
return `increase <strong class='color-d'>damage</strong> by <strong>4x</strong>, but reduce <strong class='color-d'>damage</strong><br>by <strong>0.15x</strong> for each ${powerUps.orb.tech()} you have<em style ="float: right;">(${(tech.totalCount > 20 ? (Math.pow(0.85, tech.totalCount - 20)) : (4 - 0.15 * tech.totalCount)).toFixed(2)}x)</em>`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4346,7 +4460,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "strange loop",
|
||||
description: `<strong>1.1x</strong> <strong class='color-d'>damage</strong><br><span class='color-remove'>removing</span> this gives a random <span class='color-remove'>remove</span>-${powerUps.orb.tech()}`,
|
||||
description: `<strong>1.1x</strong> <strong class='color-d'>damage</strong><br><span class='color-remove'>removing</span> this gives a random ${powerUps.orb.tech()} with <span class='color-remove'>remove</span>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -4460,7 +4574,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "deprecated",
|
||||
scale: 0.07,
|
||||
scale: 0.08,
|
||||
descriptionFunction() {
|
||||
return `after <span class='color-remove'>removing</span> this gain<br><strong>${1 + this.scale}x</strong> <strong class='color-d'>damage</strong> per <span class='color-remove'>removed</span> ${powerUps.orb.tech()}<em style ="float: right;">(${(1 + this.scale * ((this.frequency === 0 ? 0 : 1) + tech.removeCount)).toFixed(2)}x)</em>`
|
||||
},
|
||||
@@ -4487,7 +4601,7 @@ const tech = {
|
||||
{
|
||||
name: "planned obsolescence",
|
||||
descriptionFunction() {
|
||||
return `at the start of each <strong>level</strong> <span class='color-remove'>eject</span> your oldest ${powerUps.orb.tech()}<br>and gain <strong>1.1x</strong> <strong class='color-d'>damage</strong> each time` //<em style ="float: right;">(${(tech.ejectOld).toFixed(2)}x)</em>
|
||||
return `at the start of each <strong>level</strong> <span class='color-remove'>eject</span> your oldest ${powerUps.orb.tech()}<br>and gain <strong>1.1x</strong> <strong class='color-d'>damage</strong> each time` //<em style ="float: right;">(${(tech.isEjectOld).toFixed(2)}x)</em>
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4499,10 +4613,10 @@ const tech = {
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.ejectOld = 1 //this grows
|
||||
tech.isEjectOld = true
|
||||
},
|
||||
remove() {
|
||||
tech.ejectOld = 0
|
||||
tech.isEjectOld = false
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -4600,7 +4714,7 @@ const tech = {
|
||||
for (let i = 0, len = pool.length * 0.5; i < len; i++) removeCount += tech.removeTech(pool[i])
|
||||
this.damage = this.damagePerRemoved * removeCount
|
||||
tech.damage *= (1 + this.damage)
|
||||
simulation.makeTextLog(`<strong>${(1 + this.damage).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> <em>//from Occam's razor</em>`, 360)
|
||||
simulation.inGameConsole(`<strong>${(1 + this.damage).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> <em>//from Occam's razor</em>`, 360)
|
||||
},
|
||||
remove() {
|
||||
if (this.count && m.alive) tech.damage /= (1 + this.damage)
|
||||
@@ -4849,7 +4963,7 @@ const tech = {
|
||||
effect() {
|
||||
tech.isIceCrystals = true;
|
||||
b.guns[0].ammoPack = Infinity
|
||||
b.guns[0].recordedAmmo = b.guns[i].ammo
|
||||
b.guns[0].recordedAmmo = b.guns[0].ammo
|
||||
b.guns[0].ammo = Infinity
|
||||
simulation.updateGunHUD();
|
||||
},
|
||||
@@ -5310,7 +5424,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "Zectron",
|
||||
description: `<strong>2x</strong> <strong>super ball</strong> <strong class='color-d'>damage</strong>, but<br><strong>-4</strong> <strong class='color-f'>energy</strong> after you collide with <strong>super balls</strong>`,
|
||||
description: `<strong>2x</strong> <strong>super ball</strong> <strong class='color-d'>damage</strong>, but<br>after you collide with <strong>super balls</strong> they stop`,
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -6749,7 +6863,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "surfactant",
|
||||
description: `use ${powerUps.orb.research(2)}to trade your <strong>foam</strong> ${powerUps.orb.gun()}<br>for <strong>2</strong> <strong class='color-bot'>foam-bots</strong> and <strong>foam-bot upgrade</strong>`,
|
||||
description: `use ${powerUps.orb.research(2)}to trade your <strong>foam</strong> ${powerUps.orb.gun()}<br>for <strong>2</strong> <strong class='color-bot'>foam-bots</strong> and <strong class='color-bot'>foam-bot upgrade</strong>`,
|
||||
// isGunTech: true,
|
||||
isRemoveGun: true,
|
||||
maxCount: 1,
|
||||
@@ -6770,7 +6884,7 @@ const tech = {
|
||||
b.foamBot()
|
||||
tech.foamBotCount++;
|
||||
}
|
||||
simulation.makeTextLog(`tech.isFoamBotUpgrade = true`)
|
||||
simulation.inGameConsole(`tech.isFoamBotUpgrade = true`)
|
||||
if (tech.haveGunCheck("foam", false)) b.removeGun("foam")
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
||||
@@ -7222,7 +7336,7 @@ const tech = {
|
||||
//pick one option
|
||||
if (options.length) {
|
||||
const index = options[Math.floor(Math.random() * options.length)]
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>//optical amplifier</em>`, 360);
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>//optical amplifier</em>`, 360);
|
||||
tech.giveTech(index)
|
||||
techGiven++
|
||||
}
|
||||
@@ -7230,7 +7344,7 @@ const tech = {
|
||||
if (techGiven > 0) {
|
||||
tech.isStuckOn = true
|
||||
} else { //eject if none found
|
||||
simulation.makeTextLog(`0 <span class='color-var'>tech</span> found <em>//optical amplifier</em>`);
|
||||
simulation.inGameConsole(`0 <span class='color-var'>tech</span> found <em>//optical amplifier</em>`);
|
||||
const loop = () => {
|
||||
if (!simulation.paused && m.alive) {
|
||||
for (let i = 0; i < tech.tech.length; i++) {
|
||||
@@ -7784,10 +7898,10 @@ const tech = {
|
||||
{
|
||||
name: "dynamic equilibrium",
|
||||
descriptionFunction() {
|
||||
return `increase <strong class='color-d'>damage</strong> by your most recent ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br> <em style ="float: right;">(${(1 + (tech.lastHitDamage === 0 ? 5 : tech.lastHitDamage) * m.lastHit).toFixed(2)}x)</em>`
|
||||
return `increase <strong class='color-d'>damage</strong> by your most recent ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br> <em style ="float: right;">(${(1 + (tech.lastHitDamage === 0 ? 6 : tech.lastHitDamage) * m.lastHit).toFixed(2)}x)</em>`
|
||||
},
|
||||
isFieldTech: true,
|
||||
maxCount: 9,
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 200,
|
||||
@@ -7796,7 +7910,7 @@ const tech = {
|
||||
},
|
||||
requires: "negative mass, pilot wave",
|
||||
effect() {
|
||||
tech.lastHitDamage += 5;
|
||||
tech.lastHitDamage += 6;
|
||||
},
|
||||
remove() {
|
||||
tech.lastHitDamage = 0;
|
||||
@@ -8178,49 +8292,25 @@ const tech = {
|
||||
{
|
||||
name: "plasma jet",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Plasma_(physics)' class="link">plasma jet</a>`,
|
||||
description: `use ${powerUps.orb.research(2)}<br><strong>1.5x</strong> <strong class='color-plasma'>plasma</strong> <strong>torch</strong> range`,
|
||||
description: `use ${powerUps.orb.research(1)}<br><strong>1.5x</strong> <strong class='color-plasma'>plasma</strong> <strong>torch</strong> range`,
|
||||
isFieldTech: true,
|
||||
maxCount: 1,
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return (tech.plasmaBotCount || m.fieldMode === 5) && (build.isExperimentSelection || powerUps.research.count > 1) && !tech.isPlasmaBall
|
||||
return (tech.plasmaBotCount || m.fieldMode === 5) && (build.isExperimentSelection || powerUps.research.count > 0) && !tech.isPlasmaBall
|
||||
},
|
||||
requires: "plasma torch, not plasma ball",
|
||||
effect() {
|
||||
tech.isPlasmaRange += 0.5;
|
||||
for (let i = 0; i < 2; i++) {
|
||||
for (let i = 0; i < 1; i++) {
|
||||
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
tech.isPlasmaRange = 1;
|
||||
if (this.count > 0) powerUps.research.changeRerolls(this.count * 2)
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "plasma jet",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Plasma_(physics)' class="link">plasma jet</a>`,
|
||||
description: `use ${powerUps.orb.research(2)}<br><strong>1.5x</strong> <strong class='color-plasma'>plasma</strong> <strong>torch</strong> range`,
|
||||
isFieldTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return (tech.plasmaBotCount || m.fieldMode === 5) && (build.isExperimentSelection || powerUps.research.count > 1) && !tech.isPlasmaBall
|
||||
},
|
||||
requires: "plasma torch, not plasma ball",
|
||||
effect() {
|
||||
tech.isPlasmaRange += 0.5;
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
tech.isPlasmaRange = 1;
|
||||
if (this.count > 0) powerUps.research.changeRerolls(this.count * 2)
|
||||
if (this.count > 0) powerUps.research.changeRerolls(this.count)
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -9288,7 +9378,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "reinforcement learning",
|
||||
description: `<strong>10x</strong> current <em class='flicker'>${powerUps.orb.tech()} frequency</em>`,
|
||||
description: `<strong>10x</strong> <em class='flicker'>frequency</em> for current ${powerUps.orb.tech()}`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -9430,7 +9520,7 @@ const tech = {
|
||||
if (tech.tech[i].isJunk) list.push(tech.tech[i].name)
|
||||
}
|
||||
let name = list[Math.floor(Math.random() * list.length)]
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${name}</span>")`);
|
||||
simulation.inGameConsole(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${name}</span>")`);
|
||||
tech.giveTech(name)
|
||||
}
|
||||
},
|
||||
@@ -10179,7 +10269,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "probability",
|
||||
description: `<strong>100x</strong> <em class='flicker'>frequency</em><br>of a random ${powerUps.orb.tech()}`,
|
||||
description: `<strong>100x</strong> <em class='flicker'>frequency</em> for<br>a random ${powerUps.orb.tech()}`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
@@ -10273,7 +10363,7 @@ const tech = {
|
||||
effect() {
|
||||
setInterval(() => {
|
||||
let score = Math.ceil(1000 * Math.random() * Math.random() * Math.random() * Math.random() * Math.random())
|
||||
simulation.makeTextLog(`simulation.score <span class='color-symbol'>=</span> ${score.toFixed(0)}`);
|
||||
simulation.inGameConsole(`simulation.score <span class='color-symbol'>=</span> ${score.toFixed(0)}`);
|
||||
}, 10000); //every 10 seconds
|
||||
},
|
||||
remove() { }
|
||||
@@ -10350,7 +10440,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "repartitioning",
|
||||
description: `set the <em class='flicker'>frequency</em> of finding non<strong class='color-junk'>JUNK</strong>-${powerUps.orb.tech()} to <strong>0</strong><br>spawn ${powerUps.orb.tech()}${powerUps.orb.tech()}${powerUps.orb.tech()}${powerUps.orb.tech()}${powerUps.orb.tech()}`,
|
||||
description: `set the <strong class='color-junk'>JUNK</strong> chance to <strong>100%</strong><br>spawn ${powerUps.orb.tech()}${powerUps.orb.tech()}${powerUps.orb.tech()}${powerUps.orb.tech()}${powerUps.orb.tech()}`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
@@ -10361,13 +10451,7 @@ const tech = {
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (tech.tech[i].isJunk) {
|
||||
tech.tech[i].frequency = 2
|
||||
} else {
|
||||
tech.tech[i].frequency = 0
|
||||
}
|
||||
}
|
||||
tech.addJunkTechToPool(1)
|
||||
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x, m.pos.y, "tech");
|
||||
},
|
||||
remove() { }
|
||||
@@ -11044,7 +11128,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "translucent",
|
||||
description: `spawn ${powerUps.orb.gun()}${powerUps.orb.gun()}${powerUps.orb.gun()}<br>your <strong class='color-g'>bullets</strong> and bots are transparent`,
|
||||
description: `spawn ${powerUps.orb.gun()}${powerUps.orb.gun()}${powerUps.orb.gun()}<br>your <strong class='color-g'>bullets</strong> and <strong class='color-bot'>bots</strong> are transparent`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
@@ -11121,7 +11205,7 @@ const tech = {
|
||||
m.energy = 0
|
||||
spawn.suckerBoss(m.pos.x, m.pos.y - 700)
|
||||
powerUps.research.changeRerolls(-4)
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
||||
simulation.inGameConsole(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
||||
},
|
||||
remove() { }
|
||||
},
|
||||
@@ -11169,7 +11253,7 @@ const tech = {
|
||||
for (let i = 0; i < 20; i++) {
|
||||
spawn[this.mobType](m.pos.x, m.pos.y - 700)
|
||||
}
|
||||
simulation.makeTextLog(`spawn<span class='color-symbol'>.</span>${this.mobType}<span class='color-symbol'>(</span>x<span class='color-symbol'>,</span>y<span class='color-symbol'>)</span>`)
|
||||
simulation.inGameConsole(`spawn<span class='color-symbol'>.</span>${this.mobType}<span class='color-symbol'>(</span>x<span class='color-symbol'>,</span>y<span class='color-symbol'>)</span>`)
|
||||
|
||||
},
|
||||
remove() { }
|
||||
@@ -11344,6 +11428,24 @@ const tech = {
|
||||
return text
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "wikipedia",
|
||||
description: `After you get ${powerUps.orb.tech()} you have 7 seconds to study for a quiz. If you ace the quiz you get ${powerUps.orb.research(5)}`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
isJunk: true,
|
||||
allowed() {
|
||||
return true
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.isWiki = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isWiki = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "cosmogonic myth",
|
||||
description: `<span style = "opacity: 9%;">open a portal to a primordial version of reality<br>in 5 minutes close the portal, spawn 1 of each power up</span>`,
|
||||
@@ -11895,7 +11997,7 @@ const tech = {
|
||||
isClusterExplode: null,
|
||||
isCircleExplode: null,
|
||||
isPetalsExplode: null,
|
||||
deathSkipTime: null,
|
||||
isVerlet: null,
|
||||
isIceMaxHealthLoss: null,
|
||||
isIceKill: null,
|
||||
isCritKill: null,
|
||||
@@ -11953,5 +12055,6 @@ const tech = {
|
||||
isMaxHealthDefense: null,
|
||||
isNoDefenseDamage: null,
|
||||
isMaxHealthDamage: null,
|
||||
ejectOld: null,
|
||||
isEjectOld: null,
|
||||
isWiki: null,
|
||||
}
|
||||
73
style.css
73
style.css
@@ -9,6 +9,7 @@ body {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
cursor: auto;
|
||||
/* filter: grayscale(1); */
|
||||
/* transition: background-color 0.2s ease-in-out; */
|
||||
}
|
||||
|
||||
@@ -285,7 +286,7 @@ summary {
|
||||
border: 1px solid #444;
|
||||
/* min-height: 88px; */
|
||||
line-height: 100%;
|
||||
background-color: #fff;
|
||||
background-color: var(--card-color);
|
||||
}
|
||||
|
||||
.sort-button {
|
||||
@@ -353,7 +354,6 @@ summary {
|
||||
|
||||
.experiment-start-box {
|
||||
background-color: var(--card-color);
|
||||
/* font-size: 1em; */
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
@@ -373,6 +373,7 @@ summary {
|
||||
padding: 0.2em 0px;
|
||||
/* height: 210px; */
|
||||
box-shadow: 8px 8px 6px rgba(0, 0, 50, 0.15);
|
||||
/* opacity: 0.1; */
|
||||
}
|
||||
|
||||
.card-background {
|
||||
@@ -385,7 +386,7 @@ summary {
|
||||
}
|
||||
|
||||
.card-text {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
background-color: var(--card-color);
|
||||
padding: 0.5em 1em;
|
||||
border: 1px solid #444;
|
||||
margin-top: -1px;
|
||||
@@ -570,7 +571,7 @@ summary {
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
border: 2px #333 solid;
|
||||
background-color: #fff;
|
||||
background-color: var(--card-color);
|
||||
}
|
||||
|
||||
|
||||
@@ -669,14 +670,12 @@ summary {
|
||||
z-index: 2;
|
||||
font-size: 23px;
|
||||
color: #222;
|
||||
/* background-color: rgba(255, 255, 255, 0.4); */
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
line-height: 120%;
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 5px;
|
||||
/*border: 2px solid rgba(0, 0, 0, 0.4);*/
|
||||
}
|
||||
|
||||
#field {
|
||||
@@ -688,13 +687,11 @@ summary {
|
||||
color: #000;
|
||||
text-align: right;
|
||||
opacity: 0.7;
|
||||
/* line-height: 140%; */
|
||||
background-color: rgba(190, 210, 245, 0.25);
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
padding: 0px 5px 0px 5px;
|
||||
border-radius: 5px;
|
||||
/*border: 2px solid rgba(0, 0, 0, 0.4);*/
|
||||
}
|
||||
|
||||
#tech {
|
||||
@@ -726,10 +723,8 @@ summary {
|
||||
font-size: 1.15em;
|
||||
color: #555;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
/* transition: opacity 0.15s; */
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
/* font-family: monospace; */
|
||||
}
|
||||
|
||||
.color-text {
|
||||
@@ -856,6 +851,8 @@ summary {
|
||||
text-shadow: 0px -5px 9px rgb(255, 0, 204);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.color-dup {
|
||||
font-variant: small-caps;
|
||||
letter-spacing: 1px;
|
||||
@@ -927,9 +924,24 @@ summary {
|
||||
font-weight: 100;
|
||||
}
|
||||
|
||||
.color-bot {
|
||||
font-variant: small-caps;
|
||||
background-color: rgba(75, 125, 150, 0.06);
|
||||
border: 0.1em solid #146;
|
||||
color: #146;
|
||||
padding: 0em 0.3em 0.08em 0.3em;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.no-box {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.color-block {
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
border: 1px solid rgba(0, 0, 0, 0.5);
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border: 0.1em solid #333;
|
||||
padding: 0.5px;
|
||||
font-weight: 100;
|
||||
}
|
||||
@@ -978,20 +990,6 @@ summary {
|
||||
margin-bottom: -0.3em;
|
||||
}
|
||||
|
||||
.circle-grid-big {
|
||||
/* width: 1.7em;
|
||||
height: 1.7em;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
margin-bottom: -0.5em -0.5em -0.5em -0.5em; */
|
||||
width: 1.32em;
|
||||
height: 1.32em;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
margin-bottom: -0.3em;
|
||||
transform: scale(1.5);
|
||||
}
|
||||
|
||||
.circle-grid-instant {
|
||||
width: 1.1em;
|
||||
height: 1.1em;
|
||||
@@ -999,7 +997,6 @@ summary {
|
||||
border: 0.15em solid hsl(255, 100%, 71%);
|
||||
display: inline-block;
|
||||
margin-bottom: -0.35em;
|
||||
/* background-color: hsla(255, 100%, 71%, 0.3); */
|
||||
}
|
||||
|
||||
.circle-grid-skin {
|
||||
@@ -1013,7 +1010,6 @@ summary {
|
||||
position: absolute;
|
||||
top: -0.05em;
|
||||
left: 0em;
|
||||
margin-bottom: -0.3em;
|
||||
}
|
||||
|
||||
.circle-grid-skin-eye {
|
||||
@@ -1026,7 +1022,6 @@ summary {
|
||||
position: absolute;
|
||||
top: 0.45em;
|
||||
left: 0.9em;
|
||||
margin-bottom: -0.3em;
|
||||
}
|
||||
|
||||
.junk {
|
||||
@@ -1654,3 +1649,23 @@ summary {
|
||||
margin-bottom: 10px;
|
||||
/* box-shadow: 4px 4px 4px hsla(240, 0%, 17%, 0.14); */
|
||||
}
|
||||
|
||||
.tooltip {}
|
||||
|
||||
.tooltip .tooltiptext {
|
||||
visibility: hidden;
|
||||
background-color: #fff;
|
||||
border-radius: 0.3em;
|
||||
padding: 0.2em 0.3em;
|
||||
border: solid #000 1px;
|
||||
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
bottom: 100%;
|
||||
left: 0%;
|
||||
margin-left: -50%;
|
||||
}
|
||||
|
||||
.tooltip:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
52
todo.txt
52
todo.txt
@@ -1,9 +1,34 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
new level: flocculation
|
||||
JUNK: wikipedia - After you get a new tech you have 7 seconds to study before a quiz, 4 research if you aces the quiz.
|
||||
this code for this works 80% of the time every time
|
||||
|
||||
snakeBoss does 40% less damage to player
|
||||
renamed propagator->Verlet integration it's now a skin tech
|
||||
1.6->3x damage
|
||||
slightly increased the time skip amount
|
||||
on some skins the feet will hang lower while player is in the air
|
||||
on some skins the upper legs are skinnier
|
||||
mouse over on orbs for tech, field, and gun has a tooltip with text
|
||||
added keyword CSS style for "bot"
|
||||
added an aura around powerUpBoss so you can kinda see it inside walls
|
||||
|
||||
quenching just gives max health from over healing instead of damaging you first
|
||||
depolarization does 0.5->0.4x damage when on cooldown
|
||||
many-worlds spawns a tech and also 3 coupling at the start of each new level
|
||||
dynamic equilibrium does 1.15x more damage and only stacks to 9->3
|
||||
orbital bots collide with a 1.2x larger range
|
||||
Zectron no longer drains energy when balls hit you, but the balls still stop
|
||||
supply chain just gives a gun and a flat 10 ammo
|
||||
|
||||
polyurethane foam will only trigger up to 55 total foam per harpoon
|
||||
to prevent a huge number of foam bubbles causing lag
|
||||
no cap for super balls for now
|
||||
fixed bug with planned obsolescence + instant tech
|
||||
fixed bug with ice crystal nucleation
|
||||
applied science gives each gunTech with a short delay
|
||||
this helps with sorting and maybe other rare bugs
|
||||
fixed bug with delivery drones and path integration
|
||||
you can no longer deflect snakeBoss, but it moves a bit slower
|
||||
|
||||
|
||||
******************************************************** BUGS ********************************************************
|
||||
@@ -12,10 +37,26 @@ ants marching outline on splash screen doesn't sync right on safari
|
||||
|
||||
player can become crouched while not touching the ground if they exit the ground while crouched
|
||||
|
||||
fix door.isClosing actually meaning isClosed?
|
||||
|
||||
*********************************************************** TODO *****************************************************
|
||||
|
||||
tech: - tech have +3 choices to eject your tech
|
||||
<eject> tech name
|
||||
no description?
|
||||
|
||||
harpoon tech: - after firing 4 harpoons your next harpoon has 4x damage
|
||||
need to track number fired
|
||||
|
||||
JUNK tech - similar to cosmogonic myth, open and close tabs
|
||||
after you learn a new tech open it's wiki and spawn a few research?
|
||||
open the wiki for each tech you have,
|
||||
tabs close after 1 minute, and you have to learn something and answer a prompt to get a reward
|
||||
|
||||
tech: - instead of reeling in grappling hook teleport to the hook after releasing field button
|
||||
this might need another buff?
|
||||
give damage immunity after teleport for 1+ seconds to balance
|
||||
|
||||
new level - rework testChamber
|
||||
|
||||
new snakeBoss type that eats mobs
|
||||
each time it eats:
|
||||
heal?
|
||||
@@ -475,7 +516,7 @@ add small SVG pics to in-game console
|
||||
when?
|
||||
one for each field?
|
||||
use stuff on physics notes:
|
||||
simulation.makeTextLog(`
|
||||
simulation.inGameConsole(`
|
||||
<svg class="SVG-title" width="160" height="120">
|
||||
<g fill="transparent" stroke="#333" stroke-width="1" transform="translate(78,75)" stroke-linecap="round">
|
||||
<path d="M-34 -34 l31 31 m6 6 l31 31 M34 -34 l-31 31 m-6 6 l-31 31"></path>
|
||||
@@ -1268,6 +1309,7 @@ possible names for tech
|
||||
quasicrystals - something with low friction, maybe defense?
|
||||
Coalescence - things merging together like clouds. maybe mergin power ups?
|
||||
trihydrogen cation - common molecule in space, dark matter tech?
|
||||
superradiance - laser tech
|
||||
|
||||
******************************************************* DESIGN ******************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user