diff --git a/.DS_Store b/.DS_Store index e90bcb8..e0de150 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/bullet.js b/js/bullet.js index 83874d2..10b0bbb 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -1873,7 +1873,7 @@ const b = { }, onEnd() { if (tech.isMutualism && this.isMutualismActive && !tech.isEnergyHealth) { - m.health += 0.005 + 0.005 * tech.isSporeWorm + m.health += 0.01 if (m.health > m.maxHealth) m.health = m.maxHealth; m.displayHealth(); } @@ -1931,7 +1931,7 @@ const b = { }); Composite.add(engine.world, bullet[bIndex]); //add bullet to world if (tech.isMutualism && m.health > 0.02) { - m.health -= 0.005 - 0.005 * tech.isSporeWorm + m.health -= 0.01 m.displayHealth(); bullet[bIndex].isMutualismActive = true } @@ -1969,7 +1969,7 @@ const b = { }, onEnd() { if (tech.isMutualism && this.isMutualismActive && !tech.isEnergyHealth) { - m.health += 0.005 + 0.005 * tech.isSporeWorm + m.health += 0.005 if (m.health > m.maxHealth) m.health = m.maxHealth; m.displayHealth(); } @@ -2051,8 +2051,8 @@ const b = { }); Composite.add(engine.world, bullet[bIndex]); //add bullet to world - if (tech.isMutualism && m.health > 0.02) { - m.health -= 0.005 - 0.005 * tech.isSporeWorm + if (tech.isMutualism && m.health > 0.01) { + m.health -= 0.005 m.displayHealth(); bullet[bIndex].isMutualismActive = true } @@ -5083,7 +5083,7 @@ const b = { const previousCharge = this.charge let smoothRate = (m.crouch ? 0.98 : 0.985) * (0.98 + 0.02 * b.fireCDscale) //small b.fireCDscale = faster shots, b.fireCDscale=1 = normal shot, big b.fireCDscale = slower chot this.charge = this.charge * smoothRate + 1 - smoothRate - m.energy -= (this.charge - previousCharge) * (tech.isRailEnergyGain ? 1 : 0.33) //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen + m.energy += (this.charge - previousCharge) * (tech.isRailEnergyGain ? 1 : -0.33) //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen //draw targeting let best; let range = 3000 diff --git a/js/level.js b/js/level.js index fcda538..5276bc4 100644 --- a/js/level.js +++ b/js/level.js @@ -16,7 +16,7 @@ const level = { // level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why // simulation.isHorizontalFlipped = true // tech.isFieldFree = true - // m.setField("time dilation") + // m.setField("perfect diamagnetism") // b.giveGuns("rail gun") // tech.missileBotCount++; // b.missileBot(); @@ -56,7 +56,7 @@ const level = { // for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false); // for (let i = 0; i < 7; i++) tech.giveTech("undefined") // lore.techCount = 6 - simulation.enableConstructMode() //used to build maps in testing mode + // simulation.enableConstructMode() //used to build maps in testing mode // simulation.isCheating = false //true; // localSettings.loreCount = 3; //this sets what conversation is heard @@ -2270,10 +2270,11 @@ const level = { spawn.mapRect(5300, -275, 50, 175); spawn.mapRect(5050, -100, 50, 150); spawn.mapRect(4850, -275, 50, 175); + // level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why // spawn.starter(1900, -500, 200) //big boy - // spawn.growBossCulture(1900, -500) + spawn.growBossCulture(1900, -500) // spawn.blinkBoss(1900, -500) - spawn.snakeSpitBoss(1900, -500) + // spawn.snakeSpitBoss(1900, -500) // spawn.growBossCulture(1900, -500) // spawn.sneaker(1900, -500) // spawn.historyBoss(1200, -500) @@ -2281,8 +2282,8 @@ const level = { // spawn.focuser(1600, -500) // spawn.laserTargetingBoss(1700, -120) // spawn.bomberBoss(1400, -500) - // spawn.hopBoss(1800, -120) - spawn.streamBoss(1600, -500) + // spawn.beamer(1800, -120) + // spawn.orbitalBoss(1600, -500) // spawn.powerUpBoss(1600, -500) // spawn.cellBossCulture(1600, -500) // spawn.laserTargetingBoss(1600, -500) diff --git a/js/mob.js b/js/mob.js index 079107d..ede5414 100644 --- a/js/mob.js +++ b/js/mob.js @@ -458,7 +458,6 @@ const mobs = { ctx.arc(m.pos.x, m.pos.y, 40, 0, 2 * Math.PI); ctx.fillStyle = "rgba(255,0,170,0.15)"; ctx.fill(); - } ctx.beginPath(); ctx.arc(this.position.x, this.position.y, this.laserRange * 0.9, 0, 2 * Math.PI); diff --git a/js/player.js b/js/player.js index 53efedf..40b8cb6 100644 --- a/js/player.js +++ b/js/player.js @@ -1578,7 +1578,7 @@ const m = { // description: "gain energy when blocking
no recoil when blocking", effect: () => { m.fieldShieldingScale = 0; - m.fieldBlockCD = 4; + m.fieldBlockCD = 3; m.grabPowerUpRange2 = 10000000 m.fieldPosition = { x: m.pos.x, y: m.pos.y } m.fieldAngle = m.angle @@ -1619,7 +1619,45 @@ const m = { ctx.lineWidth = 3; ctx.strokeStyle = "#f0f"; ctx.stroke(); - } else if (!isFree) { + } else if (isFree) { + //when blocking draw this graphic + // const len = mob[i].vertices.length - 1; + ctx.fillStyle = "rgba(110,170,200," + (0.2 + 0.4 * Math.random()) + ")"; + ctx.lineWidth = 2; + ctx.strokeStyle = "#000"; + // const angleOff = m.fieldAngle + 2 * m.fieldArc * (Math.random() - 0.5) + // const off = { + // x: m.fieldRange * Math.cos(angleOff), + // y: m.fieldRange * Math.sin(angleOff), + // } + // const where = Vector.add(m.fieldPosition, off) + // ctx.beginPath(); + // ctx.moveTo(where.x, where.y); + // ctx.lineTo(mob[i].vertices[len].x, mob[i].vertices[len].y); + // ctx.lineTo(mob[i].vertices[0].x, mob[i].vertices[0].y); + // ctx.fill(); + // ctx.stroke(); + // for (let j = 0; j < len; j++) { + // ctx.beginPath(); + // ctx.moveTo(where.x, where.y); + // ctx.lineTo(mob[i].vertices[j].x, mob[i].vertices[j].y); + // ctx.lineTo(mob[i].vertices[j + 1].x, mob[i].vertices[j + 1].y); + // ctx.fill(); + // ctx.stroke(); + // } + + + const len = mob[i].vertices.length - 1; + const mag = mob[i].radius + ctx.beginPath(); + ctx.moveTo(mob[i].vertices[len].x + mag * (Math.random() - 0.5), mob[i].vertices[len].y + mag * (Math.random() - 0.5)) + for (let j = 0; j < len; j++) { + ctx.lineTo(mob[i].vertices[j].x + mag * (Math.random() - 0.5), mob[i].vertices[j].y + mag * (Math.random() - 0.5)); + } + ctx.lineTo(mob[i].vertices[len].x + mag * (Math.random() - 0.5), mob[i].vertices[len].y + mag * (Math.random() - 0.5)) + ctx.fill(); + ctx.stroke(); + } else { //when blocking draw this graphic const eye = 15; const len = mob[i].vertices.length - 1; @@ -1643,7 +1681,7 @@ const m = { } if (tech.isStunField) mobs.statusStun(mob[i], tech.isStunField) //knock backs - const massRoot = Math.sqrt(Math.max(0.15, mob[i].mass)); // masses above 12 can start to overcome the push back + const massRoot = Math.sqrt(Math.max(0.15, mob[i].mass)); Matter.Body.setVelocity(mob[i], { x: player.velocity.x - (20 * unit.x) / massRoot, y: player.velocity.y - (20 * unit.y) / massRoot @@ -1655,7 +1693,7 @@ const m = { } else { if (mob[i].isDropPowerUp && player.speed < 12) { - const massRootCap = Math.sqrt(Math.min(10, Math.max(0.4, mob[i].mass))); // masses above 12 can start to overcome the push back + const massRootCap = Math.sqrt(Math.min(10, Math.max(0.2, mob[i].mass))); Matter.Body.setVelocity(player, { x: 0.9 * player.velocity.x + 0.6 * unit.x * massRootCap, y: 0.9 * player.velocity.y + 0.6 * unit.y * massRootCap @@ -2155,7 +2193,7 @@ const m = { m.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists) } - //shooting (or using field) enable cloak + //not shooting (or using field) enable cloak if (m.energy < 0.05 && m.fireCDcycle < m.cycle && !input.fire) m.fireCDcycle = m.cycle if (m.fireCDcycle + 30 < m.cycle && !input.fire) { //automatically cloak if not firing if (!m.isCloak) { diff --git a/js/powerup.js b/js/powerup.js index 22f4d6b..102ba8a 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -456,7 +456,8 @@ const powerUps = { } else if (powerUps.research.count) { text += `
` for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `
` - text += `
  research
` + // text += `  research` + text += `  ${tech.isResearchReality?"alternate reality": "research"}` } //(${powerUps.research.count}) // text += `
${simulation.SVGrightMouse} activate the shield with the right mouse
fields shield you from damage
and let you pick up and throw blocks
` @@ -589,7 +590,8 @@ const powerUps = { } else if (powerUps.research.count) { text += `
` for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `
` - text += `
  research
` + // text += `  research` + text += `  ${tech.isResearchReality?"alternate reality": "research"}` } document.getElementById("choose-grid").innerHTML = text @@ -677,7 +679,7 @@ const powerUps = { } else if (powerUps.research.count) { text += `
` for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `
` - text += `
  research
` + text += `  ${tech.isResearchReality?"alternate reality": "research"}` } // console.log(powerUps.gun.choiceLog) // console.log(choice1, choice2, choice3) diff --git a/js/spawn.js b/js/spawn.js index cb45e04..b390bc7 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -4041,7 +4041,7 @@ const spawn = { }, orbitalBoss(x, y, radius = 88) { const nodeBalance = Math.random() - const nodes = Math.min(15, Math.floor(1 + 5 * nodeBalance + 0.75 * Math.sqrt(simulation.difficulty))) + const nodes = Math.min(15, Math.floor(2 + 4 * nodeBalance + 0.75 * Math.sqrt(simulation.difficulty))) mobs.spawn(x, y, nodes, radius, "rgb(255,0,150)"); let me = mob[mob.length - 1]; me.isBoss = true; @@ -4051,8 +4051,8 @@ const spawn = { me.stroke = "transparent"; //used for drawGhost me.seeAtDistance2 = 2000000; me.memory = Infinity; - me.frictionAir = 0.02; - me.accelMag = 0.00015 * Math.sqrt(simulation.accelScale) + me.frictionAir = 0.04; + me.accelMag = 0.0003 * simulation.accelScale me.collisionFilter.mask = cat.player | cat.bullet //| cat.body spawn.shield(me, x, y, 1); diff --git a/js/tech.js b/js/tech.js index 760be54..0cd7eeb 100644 --- a/js/tech.js +++ b/js/tech.js @@ -171,7 +171,7 @@ if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.45 if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599 if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 2 : 0.66 - if (m.isSneakAttack && m.cycle > m.lastKillCycle + 240) dmg *= 4 + if (m.isSneakAttack && m.cycle > m.lastKillCycle + 240) dmg *= tech.sneakAttackDmg if (tech.isTechDamage) dmg *= 1.9 if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance()) if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy) * 0.5 @@ -341,8 +341,8 @@ description: "spawn 8 guns, but you can't switch guns
guns cycle automatically with each new level", maxCount: 1, count: 0, - frequency: 3, - frequencyDefault: 3, + frequency: 2, + frequencyDefault: 2, allowed() { return (tech.isDamageForGuns || tech.isFireRateForGuns) && b.inventory.length + 5 < b.guns.length }, @@ -365,7 +365,7 @@ description: "spawn a gun and double the frequency
of finding tech for your guns", maxCount: 1, count: 0, - frequency: 2, + frequency: 1, isNonRefundable: true, // isExperimentHide: true, isBadRandomOption: true, @@ -383,17 +383,17 @@ remove() {} }, { - name: "specialist", + name: "ad hoc", description: "for every gun in your inventory spawn a
heal, research, field, ammo, or tech", maxCount: 1, //random power up count: 0, - frequency: 2, + frequency: 1, isNonRefundable: true, // isExperimentHide: true, allowed() { - return b.inventory.length > 3 + return b.inventory.length > 1 }, - requires: "at least 4 guns", + requires: "at least 2 guns", effect() { for (let i = 0; i < b.inventory.length; i++) { if (Math.random() < 0.2) { @@ -2582,7 +2582,7 @@ effect() { tech.isFallingDamage = true; m.setMaxHealth(); - m.addHealth(1) + m.addHealth(1 / simulation.healScale) }, remove() { tech.isFallingDamage = false; @@ -2800,9 +2800,9 @@ frequency: 1, frequencyDefault: 1, allowed() { - return !tech.isSwitchReality && !tech.isCollisionRealitySwitch + return !tech.isSwitchReality && !tech.isCollisionRealitySwitch && !tech.isJunkResearch }, - requires: "many-worlds, non-unitary", + requires: "many-worlds, non-unitary, not pseudoscience", effect() { tech.isResearchReality = true; for (let i = 0; i < 16; i++) powerUps.spawn(m.pos.x + Math.random() * 60, m.pos.y + Math.random() * 60, "research", false); @@ -2918,9 +2918,9 @@ frequency: 1, frequencyDefault: 1, allowed() { - return tech.isResearchBoss || tech.isMetaAnalysis || tech.isRerollBots || tech.isDeathAvoid || tech.isRerollDamage || build.isExperimentSelection + return !tech.isResearchReality //tech.isResearchBoss || tech.isMetaAnalysis || tech.isRerollBots || tech.isDeathAvoid || tech.isRerollDamage || build.isExperimentSelection }, - requires: "abiogenesis, meta-analysis, bot fabrication, anthropic principle, or Bayesian statistics", + requires: "not Ψ(t) collapse", //"abiogenesis, meta-analysis, bot fabrication, anthropic principle, or Bayesian statistics, not Ψ(t) collapse", effect() { tech.isJunkResearch = true; }, @@ -3029,7 +3029,7 @@ effect() { tech.duplicateChance += 0.1 powerUps.setDo(); //needed after adjusting duplication chance - tech.addJunkTechToPool(18) + tech.addJunkTechToPool(30) }, remove() { tech.duplicateChance = 0 @@ -4269,7 +4269,7 @@ }, { name: "MIRV", - description: "launch +1 missile at a time
decrease size and fire rate by 10%", + description: "missile gun and bot launch +1 missile
decrease size and fire rate by 10%", isGunTech: true, maxCount: 9, count: 0, @@ -5879,6 +5879,25 @@ tech.isCloakStun = false; } }, + { + name: "ambush", + description: "metamaterial cloaking field damage effect
is increased from 300% to 500%", + isFieldTech: true, + maxCount: 1, + count: 0, + frequency: 2, + frequencyDefault: 2, + allowed() { + return m.fieldUpgrades[m.fieldMode].name === "metamaterial cloaking" + }, + requires: "metamaterial cloaking", + effect() { + tech.sneakAttackDmg = 6 + }, + remove() { + tech.sneakAttackDmg = 4 + } + }, { name: "dynamical systems", description: "use 1 research
increase your damage by 35%", @@ -7443,7 +7462,7 @@ }, { name: "quantum black hole", - description: "use your energy and 1 research to spawn
inside the event horizon of a huge black hole", + description: "use your energy and 4 research to spawn
inside the event horizon of a huge black hole", maxCount: 9, count: 0, frequency: 0, @@ -7451,13 +7470,13 @@ isExperimentHide: true, isJunk: true, allowed() { - return powerUps.research.count > 0 + return powerUps.research.count > 3 }, - requires: "at least 1 research", + requires: "at least 4 research", effect() { m.energy = 0 spawn.suckerBoss(m.pos.x, m.pos.y - 700) - powerUps.research.changeRerolls(-1) + powerUps.research.changeRerolls(-4) simulation.makeTextLog(`m.research --
${powerUps.research.count}`) }, remove() {} diff --git a/todo.txt b/todo.txt index 4fb4d1e..6e54a90 100644 --- a/todo.txt +++ b/todo.txt @@ -1,10 +1,15 @@ ******************************************************** NEXT PATCH ******************************************************** -cloaking field no longer gets smaller when you are low on energy -invisible map element bug fixed +tech: ambush - cloaking damage effect is increase from 300% to 500% + +several bug fixes + ******************************************************** TODO ******************************************************** +laser damage seems low based on 2 runs + history is low damage + drones can combine with other drones to get bigger? drones that grab powers ups can grab more then one and get even bigger each time