anthropic
mob orbitals can now be destroyed, but it takes a very large amount of damage laser-bot upgrade: gives 75% damage, range, and energy efficiency (was 400% damage, but they ran out of energy too fast) boom-bots are now smart about not hurting the player with explosions while doing the most damage tech: strong anthropic principle - after anthropic principle prevents your death do 137.03599 extra damage for the rest of the level
This commit is contained in:
31
js/player.js
31
js/player.js
@@ -304,7 +304,6 @@ const m = {
|
||||
},
|
||||
alive: false,
|
||||
switchWorlds() {
|
||||
//count tech
|
||||
const totalGuns = b.inventory.length - tech.isRewindGun //count guns, but not CPT gun
|
||||
simulation.isTextLogOpen = false; //prevent console spam
|
||||
//remove all tech and count current tech total
|
||||
@@ -312,8 +311,9 @@ const m = {
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (
|
||||
!tech.tech[i].isNonRefundable &&
|
||||
!tech.tech[i].isLore &&
|
||||
tech.tech[i].name !== "many-worlds" &&
|
||||
tech.tech[i].name !== "perturbation theory"
|
||||
tech.tech[i].name !== "decoherence"
|
||||
) {
|
||||
totalTech += tech.tech[i].count
|
||||
tech.tech[i].remove();
|
||||
@@ -321,10 +321,10 @@ const m = {
|
||||
tech.tech[i].count = 0
|
||||
}
|
||||
}
|
||||
lore.techCount = 0;
|
||||
// lore.techCount = 0;
|
||||
// tech.removeLoreTechFromPool();
|
||||
// tech.addLoreTechToPool();
|
||||
tech.removeJunkTechFromPool();
|
||||
tech.removeLoreTechFromPool();
|
||||
tech.addLoreTechToPool();
|
||||
tech.armorFromPowerUps = 0;
|
||||
tech.totalCount = 0;
|
||||
const randomBotCount = b.totalBots()
|
||||
@@ -334,7 +334,7 @@ const m = {
|
||||
bullet = [];
|
||||
|
||||
//randomize health
|
||||
m.health = 0.7 + Math.random()
|
||||
m.health = m.health * (1 + 0.5 * (Math.random() - 0.5))
|
||||
if (m.health > 1) m.health = 1;
|
||||
m.displayHealth();
|
||||
|
||||
@@ -344,7 +344,11 @@ const m = {
|
||||
//track ammo/ ammoPack count
|
||||
let ammoCount = 0
|
||||
for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||
if (b.guns[b.inventory[i]].ammo !== Infinity) ammoCount += b.guns[b.inventory[i]].ammo / b.guns[b.inventory[i]].ammoPack
|
||||
if (b.guns[b.inventory[i]].ammo !== Infinity) {
|
||||
ammoCount += b.guns[b.inventory[i]].ammo / b.guns[b.inventory[i]].ammoPack
|
||||
} else {
|
||||
ammoCount += 5
|
||||
}
|
||||
}
|
||||
//removes guns and ammo
|
||||
b.inventory = [];
|
||||
@@ -369,6 +373,7 @@ const m = {
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (tech.tech[i].count < tech.tech[i].maxCount &&
|
||||
!tech.tech[i].isBadRandomOption &&
|
||||
!tech.tech[i].isLore &&
|
||||
tech.tech[i].allowed() &&
|
||||
(!tech.tech[i].isJunk || Math.random() < 0.25)) options.push(i);
|
||||
// !tech.tech[i].isNonRefundable &&
|
||||
@@ -489,13 +494,13 @@ const m = {
|
||||
let dmg = 1
|
||||
dmg *= m.fieldHarmReduction
|
||||
if (tech.isImmortal) dmg *= 0.84
|
||||
if (tech.isHarmReduceAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 0.33 : 1.33
|
||||
if (tech.isHarmReduceAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 0.25 : 1.25
|
||||
if (tech.healthDrain) dmg *= 1 + 2.667 * tech.healthDrain //tech.healthDrain = 0.03 at one stack //cause more damage
|
||||
if (tech.squirrelFx !== 1) dmg *= 1 + (tech.squirrelFx - 1) / 5 //cause more damage
|
||||
if (tech.isBlockHarm && m.isHolding) dmg *= 0.2
|
||||
if (tech.isSpeedHarm) dmg *= 1 - Math.min(player.speed * 0.0185, 0.55)
|
||||
if (tech.isSlowFPS) dmg *= 0.8
|
||||
if (tech.isPiezo) dmg *= 0.85
|
||||
// if (tech.isPiezo) dmg *= 0.85
|
||||
if (tech.isHarmReduce && m.fieldUpgrades[m.fieldMode].name === "negative mass field" && m.isFieldActive) dmg *= 0.5
|
||||
if (tech.isBotArmor) dmg *= 0.94 ** b.totalBots()
|
||||
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33;
|
||||
@@ -631,6 +636,7 @@ const m = {
|
||||
m.energy -= dmg;
|
||||
if (m.energy < 0 || isNaN(m.energy)) { //taking deadly damage
|
||||
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}`)
|
||||
@@ -1505,7 +1511,7 @@ const m = {
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong>block</strong> mobs<br>excess <strong class='color-f'>energy</strong> used to build <strong>drones</strong><br><strong>double</strong> your default <strong class='color-f'>energy</strong> regeneration",
|
||||
effect: () => {
|
||||
m.hold = function() {
|
||||
if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 200) {
|
||||
if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 200 && (m.cycle % 2)) {
|
||||
if (tech.isSporeField) {
|
||||
// const len = Math.floor(5 + 4 * Math.random())
|
||||
const len = Math.ceil(m.energy * 10)
|
||||
@@ -2664,7 +2670,7 @@ const m = {
|
||||
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 - 40
|
||||
player.position.y < level.exit.y + 40
|
||||
) {
|
||||
level.nextLevel()
|
||||
}
|
||||
@@ -2773,6 +2779,7 @@ const m = {
|
||||
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
//fix collisions
|
||||
collisionChecks = (event) => {
|
||||
const pairs = event.pairs;
|
||||
@@ -2803,7 +2810,7 @@ const m = {
|
||||
return
|
||||
}
|
||||
m.damage(dmg);
|
||||
if (tech.isPiezo) m.energy += 4;
|
||||
if (tech.isPiezo) m.energy += 20.48;
|
||||
if (tech.isBayesian) powerUps.ejectTech()
|
||||
if (mob[k].onHit) mob[k].onHit(k);
|
||||
m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to collision damage for 30 cycles
|
||||
|
||||
Reference in New Issue
Block a user