rest frame
health background finally updates to show max health changes tech: rest frame is removed tech: inertial frame - gain 66% fire rate, but you can't fire when moving tech: dead reckoning - when at rest do 33% more damage requires inertial frame tech: Galilean group - when at rest take 50% less harm requires inertial frame
This commit is contained in:
42
js/bullet.js
42
js/bullet.js
@@ -6,7 +6,15 @@ const b = {
|
|||||||
activeGun: null, //current gun in use by player
|
activeGun: null, //current gun in use by player
|
||||||
inventoryGun: 0,
|
inventoryGun: 0,
|
||||||
inventory: [], //list of what guns player has // 0 starts with basic gun
|
inventory: [], //list of what guns player has // 0 starts with basic gun
|
||||||
fire() {
|
setFireMethod() {
|
||||||
|
if (tech.isFireNotMove) {
|
||||||
|
b.fire = b.fireNotMove
|
||||||
|
} else {
|
||||||
|
b.fire = b.fireNormal
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fire() {},
|
||||||
|
fireNormal() {
|
||||||
if (input.fire && mech.fireCDcycle < mech.cycle && (!input.field || mech.fieldFire) && b.inventory.length) {
|
if (input.fire && mech.fireCDcycle < mech.cycle && (!input.field || mech.fieldFire) && b.inventory.length) {
|
||||||
if (b.guns[b.activeGun].ammo > 0) {
|
if (b.guns[b.activeGun].ammo > 0) {
|
||||||
b.guns[b.activeGun].fire();
|
b.guns[b.activeGun].fire();
|
||||||
@@ -36,6 +44,37 @@ const b = {
|
|||||||
if (mech.holdingTarget) mech.drop();
|
if (mech.holdingTarget) mech.drop();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
fireNotMove() {
|
||||||
|
//added && player.speed < 0.5 && mech.onGround *************************
|
||||||
|
if (input.fire && mech.fireCDcycle < mech.cycle && (!input.field || mech.fieldFire) && b.inventory.length && player.speed < 0.5 && mech.onGround && Math.abs(mech.yOff - mech.yOffGoal) < 1) {
|
||||||
|
if (b.guns[b.activeGun].ammo > 0) {
|
||||||
|
b.guns[b.activeGun].fire();
|
||||||
|
if (tech.isCrouchAmmo && mech.crouch) {
|
||||||
|
if (tech.isCrouchAmmo % 2) {
|
||||||
|
b.guns[b.activeGun].ammo--;
|
||||||
|
simulation.updateGunHUD();
|
||||||
|
}
|
||||||
|
tech.isCrouchAmmo++ //makes the no ammo toggle off and on
|
||||||
|
} else {
|
||||||
|
b.guns[b.activeGun].ammo--;
|
||||||
|
simulation.updateGunHUD();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (tech.isAmmoFromHealth) {
|
||||||
|
if (mech.health > 0.05) {
|
||||||
|
mech.damage(0.05 / mech.harmReduction()); // /mech.harmReduction() undoes damage increase from difficulty
|
||||||
|
if (!(tech.isRewindAvoidDeath && mech.energy > 0.66)) { //don't give ammo if CPT triggered
|
||||||
|
for (let i = 0; i < 3; i++) powerUps.spawn(mech.pos.x, mech.pos.y, "ammo");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
simulation.makeTextLog(`${b.guns[b.activeGun].name}.<span class='color-gun'>ammo</span><span class='color-symbol'>:</span> 0`);
|
||||||
|
}
|
||||||
|
mech.fireCDcycle = mech.cycle + 30; //fire cooldown
|
||||||
|
}
|
||||||
|
if (mech.holdingTarget) mech.drop();
|
||||||
|
}
|
||||||
|
},
|
||||||
giveGuns(gun = "random", ammoPacks = 10) {
|
giveGuns(gun = "random", ammoPacks = 10) {
|
||||||
if (tech.isOneGun) b.removeAllGuns();
|
if (tech.isOneGun) b.removeAllGuns();
|
||||||
if (gun === "random") {
|
if (gun === "random") {
|
||||||
@@ -152,6 +191,7 @@ const b = {
|
|||||||
setFireCD() {
|
setFireCD() {
|
||||||
b.fireCD = tech.fireRate * tech.slowFire * tech.researchHaste * tech.aimDamage / tech.fastTime
|
b.fireCD = tech.fireRate * tech.slowFire * tech.researchHaste * tech.aimDamage / tech.fastTime
|
||||||
if (tech.isFireRateForGuns) b.fireCD *= Math.pow(0.85, b.inventory.length)
|
if (tech.isFireRateForGuns) b.fireCD *= Math.pow(0.85, b.inventory.length)
|
||||||
|
if (tech.isFireNotMove) b.fireCD *= 0.33
|
||||||
},
|
},
|
||||||
fireAttributes(dir, rotate = true) {
|
fireAttributes(dir, rotate = true) {
|
||||||
if (rotate) {
|
if (rotate) {
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ const build = {
|
|||||||
<br><strong><em>fire delay</em></strong> decrease: ${((1-b.fireCD)*100).toFixed(0)}%
|
<br><strong><em>fire delay</em></strong> decrease: ${((1-b.fireCD)*100).toFixed(0)}%
|
||||||
<br><strong class='color-dup'>duplication</strong> chance: ${(Math.min(1,tech.duplicationChance())*100).toFixed(0)}%
|
<br><strong class='color-dup'>duplication</strong> chance: ${(Math.min(1,tech.duplicationChance())*100).toFixed(0)}%
|
||||||
<br>
|
<br>
|
||||||
<br><strong class='color-r'>research</strong>: ${powerUps.research.research}
|
<br><strong class='color-r'>research</strong>: ${powerUps.research.count}
|
||||||
<br><strong class='color-h'>health</strong>: (${(mech.health*100).toFixed(0)} / ${(mech.maxHealth*100).toFixed(0)}) <strong class='color-f'>energy</strong>: (${(mech.energy*100).toFixed(0)} / ${(mech.maxEnergy*100).toFixed(0)})
|
<br><strong class='color-h'>health</strong>: (${(mech.health*100).toFixed(0)} / ${(mech.maxHealth*100).toFixed(0)}) <strong class='color-f'>energy</strong>: (${(mech.energy*100).toFixed(0)} / ${(mech.maxEnergy*100).toFixed(0)})
|
||||||
<br>position: (${player.position.x.toFixed(1)}, ${player.position.y.toFixed(1)}) velocity: (${player.velocity.x.toFixed(1)}, ${player.velocity.y.toFixed(1)})
|
<br>position: (${player.position.x.toFixed(1)}, ${player.position.y.toFixed(1)}) velocity: (${player.velocity.x.toFixed(1)}, ${player.velocity.y.toFixed(1)})
|
||||||
<br>mouse: (${simulation.mouseInGame.x.toFixed(1)}, ${simulation.mouseInGame.y.toFixed(1)}) mass: ${player.mass.toFixed(1)}
|
<br>mouse: (${simulation.mouseInGame.x.toFixed(1)}, ${simulation.mouseInGame.y.toFixed(1)}) mass: ${player.mass.toFixed(1)}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const level = {
|
|||||||
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false);
|
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false);
|
||||||
}
|
}
|
||||||
if (tech.isPerpetualStun) {
|
if (tech.isPerpetualStun) {
|
||||||
for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 60 * 8)
|
for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 600)
|
||||||
}
|
}
|
||||||
if (tech.isGunCycle) {
|
if (tech.isGunCycle) {
|
||||||
b.inventoryGun++;
|
b.inventoryGun++;
|
||||||
|
|||||||
12
js/player.js
12
js/player.js
@@ -464,7 +464,7 @@ const mech = {
|
|||||||
displayHealth() {
|
displayHealth() {
|
||||||
id = document.getElementById("health");
|
id = document.getElementById("health");
|
||||||
// health display follows a x^1.5 rule to make it seem like the player has lower health, this makes the player feel more excitement
|
// health display follows a x^1.5 rule to make it seem like the player has lower health, this makes the player feel more excitement
|
||||||
id.style.width = Math.floor(300 * Math.pow(mech.health, 1.5)) + "px";
|
id.style.width = Math.floor(300 * mech.maxHealth * Math.pow(mech.health / mech.maxHealth, 1.4)) + "px";
|
||||||
//css animation blink if health is low
|
//css animation blink if health is low
|
||||||
if (mech.health < 0.3) {
|
if (mech.health < 0.3) {
|
||||||
id.classList.add("low-health");
|
id.classList.add("low-health");
|
||||||
@@ -482,6 +482,7 @@ const mech = {
|
|||||||
baseHealth: 1,
|
baseHealth: 1,
|
||||||
setMaxHealth() {
|
setMaxHealth() {
|
||||||
mech.maxHealth = mech.baseHealth + tech.bonusHealth + tech.armorFromPowerUps
|
mech.maxHealth = mech.baseHealth + tech.bonusHealth + tech.armorFromPowerUps
|
||||||
|
document.getElementById("health-bg").style.width = `${Math.floor(300*mech.maxHealth)}px`
|
||||||
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${mech.maxHealth.toFixed(2)}`)
|
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${mech.maxHealth.toFixed(2)}`)
|
||||||
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth;
|
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth;
|
||||||
mech.displayHealth();
|
mech.displayHealth();
|
||||||
@@ -501,6 +502,7 @@ const mech = {
|
|||||||
if (tech.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6
|
if (tech.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6
|
||||||
if (tech.energyRegen === 0) dmg *= 0.4
|
if (tech.energyRegen === 0) dmg *= 0.4
|
||||||
if (tech.isTurret && mech.crouch) dmg *= 0.5;
|
if (tech.isTurret && mech.crouch) dmg *= 0.5;
|
||||||
|
if (tech.isRestHarm && player.speed < 1) dmg *= 0.5;
|
||||||
if (tech.isEntanglement && b.inventory[0] === b.activeGun) {
|
if (tech.isEntanglement && b.inventory[0] === b.activeGun) {
|
||||||
for (let i = 0, len = b.inventory.length; i < len; i++) dmg *= 0.87 // 1 - 0.15
|
for (let i = 0, len = b.inventory.length; i < len; i++) dmg *= 0.87 // 1 - 0.15
|
||||||
}
|
}
|
||||||
@@ -620,10 +622,10 @@ const mech = {
|
|||||||
if (tech.isEnergyHealth) {
|
if (tech.isEnergyHealth) {
|
||||||
mech.energy -= dmg;
|
mech.energy -= dmg;
|
||||||
if (mech.energy < 0 || isNaN(mech.energy)) { //taking deadly damage
|
if (mech.energy < 0 || isNaN(mech.energy)) { //taking deadly damage
|
||||||
if (tech.isDeathAvoid && powerUps.research.research && !tech.isDeathAvoidedThisLevel) {
|
if (tech.isDeathAvoid && powerUps.research.count && !tech.isDeathAvoidedThisLevel) {
|
||||||
tech.isDeathAvoidedThisLevel = true
|
tech.isDeathAvoidedThisLevel = true
|
||||||
powerUps.research.changeRerolls(-1)
|
powerUps.research.changeRerolls(-1)
|
||||||
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.research}`)
|
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
||||||
for (let i = 0; i < 6; i++) {
|
for (let i = 0; i < 6; i++) {
|
||||||
powerUps.spawn(mech.pos.x, mech.pos.y, "heal", false);
|
powerUps.spawn(mech.pos.x, mech.pos.y, "heal", false);
|
||||||
}
|
}
|
||||||
@@ -650,12 +652,12 @@ const mech = {
|
|||||||
dmg *= mech.harmReduction()
|
dmg *= mech.harmReduction()
|
||||||
mech.health -= dmg;
|
mech.health -= dmg;
|
||||||
if (mech.health < 0 || isNaN(mech.health)) {
|
if (mech.health < 0 || isNaN(mech.health)) {
|
||||||
if (tech.isDeathAvoid && powerUps.research.research > 0 && !tech.isDeathAvoidedThisLevel) { //&& Math.random() < 0.5
|
if (tech.isDeathAvoid && powerUps.research.count > 0 && !tech.isDeathAvoidedThisLevel) { //&& Math.random() < 0.5
|
||||||
tech.isDeathAvoidedThisLevel = true
|
tech.isDeathAvoidedThisLevel = true
|
||||||
mech.health = 0.05
|
mech.health = 0.05
|
||||||
powerUps.research.changeRerolls(-1)
|
powerUps.research.changeRerolls(-1)
|
||||||
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
||||||
<br>${powerUps.research.research}`)
|
<br>${powerUps.research.count}`)
|
||||||
for (let i = 0; i < 6; i++) powerUps.spawn(mech.pos.x + 10 * Math.random(), mech.pos.y + 10 * Math.random(), "heal", false);
|
for (let i = 0; i < 6; i++) powerUps.spawn(mech.pos.x + 10 * Math.random(), mech.pos.y + 10 * Math.random(), "heal", false);
|
||||||
mech.immuneCycle = mech.cycle + 360 //disable this.immuneCycle bonus seconds
|
mech.immuneCycle = mech.cycle + 360 //disable this.immuneCycle bonus seconds
|
||||||
simulation.wipe = function() { //set wipe to have trails
|
simulation.wipe = function() { //set wipe to have trails
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ const powerUps = {
|
|||||||
simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`)
|
simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tech.manyWorlds && powerUps.research.research === 0) {
|
if (tech.manyWorlds && powerUps.research.count === 0) {
|
||||||
for (let i = 0; i < 2; i++) powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), "research", false);
|
for (let i = 0; i < 2; i++) powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), "research", false);
|
||||||
}
|
}
|
||||||
document.getElementById("choose-grid").style.display = "none"
|
document.getElementById("choose-grid").style.display = "none"
|
||||||
@@ -70,7 +70,7 @@ const powerUps = {
|
|||||||
requestAnimationFrame(cycle);
|
requestAnimationFrame(cycle);
|
||||||
},
|
},
|
||||||
research: {
|
research: {
|
||||||
research: 0,
|
count: 0,
|
||||||
name: "research",
|
name: "research",
|
||||||
color: "#f7b",
|
color: "#f7b",
|
||||||
size() {
|
size() {
|
||||||
@@ -80,17 +80,17 @@ const powerUps = {
|
|||||||
powerUps.research.changeRerolls(1)
|
powerUps.research.changeRerolls(1)
|
||||||
},
|
},
|
||||||
changeRerolls(amount) {
|
changeRerolls(amount) {
|
||||||
powerUps.research.research += amount
|
if (amount !== 0) {
|
||||||
if (powerUps.research.research < 0) {
|
powerUps.research.count += amount
|
||||||
powerUps.research.research = 0
|
if (powerUps.research.count < 0) {
|
||||||
|
powerUps.research.count = 0
|
||||||
} else {
|
} else {
|
||||||
simulation.makeTextLog(`powerUps.research.research <span class='color-symbol'>+=</span> ${amount}`) // <br>${powerUps.research.research}
|
simulation.makeTextLog(`powerUps.research.count <span class='color-symbol'>+=</span> ${amount}`) // <br>${powerUps.research.count}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (tech.isRerollBots) {
|
if (tech.isRerollBots) {
|
||||||
const limit = 5
|
const limit = 5
|
||||||
for (; powerUps.research.research > limit - 1; powerUps.research.research -= limit) {
|
for (; powerUps.research.count > limit - 1; powerUps.research.count -= limit) {
|
||||||
b.randomBot()
|
b.randomBot()
|
||||||
if (tech.renormalization) {
|
if (tech.renormalization) {
|
||||||
for (let i = 0; i < limit; i++) {
|
for (let i = 0; i < limit; i++) {
|
||||||
@@ -103,11 +103,11 @@ const powerUps = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tech.isDeathAvoid && document.getElementById("tech-anthropic")) {
|
if (tech.isDeathAvoid && document.getElementById("tech-anthropic")) {
|
||||||
document.getElementById("tech-anthropic").innerHTML = `-${powerUps.research.research}`
|
document.getElementById("tech-anthropic").innerHTML = `-${powerUps.research.count}`
|
||||||
}
|
}
|
||||||
if (tech.renormalization && Math.random() < 0.37 && amount < 0) powerUps.spawn(mech.pos.x, mech.pos.y, "research");
|
if (tech.renormalization && Math.random() < 0.37 && amount < 0) powerUps.spawn(mech.pos.x, mech.pos.y, "research");
|
||||||
if (tech.isRerollHaste) {
|
if (tech.isRerollHaste) {
|
||||||
if (powerUps.research.research === 0) {
|
if (powerUps.research.count === 0) {
|
||||||
tech.researchHaste = 0.66;
|
tech.researchHaste = 0.66;
|
||||||
b.setFireCD();
|
b.setFireCD();
|
||||||
} else {
|
} else {
|
||||||
@@ -119,7 +119,7 @@ const powerUps = {
|
|||||||
use(type) { //runs when you actually research a list of selections, type can be field, gun, or tech
|
use(type) { //runs when you actually research a list of selections, type can be field, gun, or tech
|
||||||
powerUps.research.changeRerolls(-1)
|
powerUps.research.changeRerolls(-1)
|
||||||
// simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
// simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
||||||
// <br>${powerUps.research.research}`)
|
// <br>${powerUps.research.count}`)
|
||||||
if (tech.isBanish && type === 'tech') { // banish researched tech
|
if (tech.isBanish && type === 'tech') { // banish researched tech
|
||||||
const banishLength = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2
|
const banishLength = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2
|
||||||
if (powerUps.tech.choiceLog.length > banishLength || powerUps.tech.choiceLog.length === banishLength) { //I'm not sure this check is needed
|
if (powerUps.tech.choiceLog.length > banishLength || powerUps.tech.choiceLog.length === banishLength) { //I'm not sure this check is needed
|
||||||
@@ -248,12 +248,12 @@ const powerUps = {
|
|||||||
powerUps.field.choiceLog.push(choice2)
|
powerUps.field.choiceLog.push(choice2)
|
||||||
powerUps.field.choiceLog.push(choice3)
|
powerUps.field.choiceLog.push(choice3)
|
||||||
|
|
||||||
if (powerUps.research.research) {
|
if (powerUps.research.count) {
|
||||||
text += `<div class="choose-grid-module" onclick="powerUps.research.use('field')"><div class="grid-title"> <span style="position:relative;">`
|
text += `<div class="choose-grid-module" onclick="powerUps.research.use('field')"><div class="grid-title"> <span style="position:relative;">`
|
||||||
for (let i = 0, len = Math.min(powerUps.research.research, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
|
for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
|
||||||
text += `</span><span class='research-select'>research</span></div></div>`
|
text += `</span><span class='research-select'>research</span></div></div>`
|
||||||
}
|
}
|
||||||
//(${powerUps.research.research})
|
//(${powerUps.research.count})
|
||||||
// text += `<div style = 'color:#fff'>${simulation.SVGrightMouse} activate the shield with the right mouse<br>fields shield you from damage <br>and let you pick up and throw blocks</div>`
|
// text += `<div style = 'color:#fff'>${simulation.SVGrightMouse} activate the shield with the right mouse<br>fields shield you from damage <br>and let you pick up and throw blocks</div>`
|
||||||
document.getElementById("choose-grid").innerHTML = text
|
document.getElementById("choose-grid").innerHTML = text
|
||||||
powerUps.showDraft();
|
powerUps.showDraft();
|
||||||
@@ -358,11 +358,11 @@ const powerUps = {
|
|||||||
powerUps.tech.choiceLog.push(choice1)
|
powerUps.tech.choiceLog.push(choice1)
|
||||||
powerUps.tech.choiceLog.push(choice2)
|
powerUps.tech.choiceLog.push(choice2)
|
||||||
powerUps.tech.choiceLog.push(choice3)
|
powerUps.tech.choiceLog.push(choice3)
|
||||||
// if (powerUps.research.research) text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"><div class="circle-grid research"></div> research <span class="research-select">${powerUps.research.research}</span></div></div>`
|
// if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"><div class="circle-grid research"></div> research <span class="research-select">${powerUps.research.count}</span></div></div>`
|
||||||
|
|
||||||
if (powerUps.research.research) {
|
if (powerUps.research.count) {
|
||||||
text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"> <span style="position:relative;">`
|
text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"> <span style="position:relative;">`
|
||||||
for (let i = 0, len = Math.min(powerUps.research.research, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
|
for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
|
||||||
text += `</span><span class='research-select'>research</span></div></div>`
|
text += `</span><span class='research-select'>research</span></div></div>`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,10 +445,10 @@ const powerUps = {
|
|||||||
powerUps.gun.choiceLog.push(choice1)
|
powerUps.gun.choiceLog.push(choice1)
|
||||||
powerUps.gun.choiceLog.push(choice2)
|
powerUps.gun.choiceLog.push(choice2)
|
||||||
powerUps.gun.choiceLog.push(choice3)
|
powerUps.gun.choiceLog.push(choice3)
|
||||||
// if (powerUps.research.research) text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"><div class="circle-grid research"></div> research <span class="research-select">${powerUps.research.research}</span></div></div>`
|
// if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"><div class="circle-grid research"></div> research <span class="research-select">${powerUps.research.count}</span></div></div>`
|
||||||
if (powerUps.research.research) {
|
if (powerUps.research.count) {
|
||||||
text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"> <span style="position:relative;">`
|
text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"> <span style="position:relative;">`
|
||||||
for (let i = 0, len = Math.min(powerUps.research.research, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
|
for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
|
||||||
text += `</span><span class='research-select'>research</span></div></div>`
|
text += `</span><span class='research-select'>research</span></div></div>`
|
||||||
}
|
}
|
||||||
// console.log(powerUps.gun.choiceLog)
|
// console.log(powerUps.gun.choiceLog)
|
||||||
|
|||||||
@@ -523,10 +523,11 @@ const simulation = {
|
|||||||
tech.plasmaBotCount = 0;
|
tech.plasmaBotCount = 0;
|
||||||
tech.missileBotCount = 0;
|
tech.missileBotCount = 0;
|
||||||
|
|
||||||
|
b.setFireMethod()
|
||||||
b.setFireCD();
|
b.setFireCD();
|
||||||
simulation.updateTechHUD();
|
simulation.updateTechHUD();
|
||||||
powerUps.totalPowerUps = 0;
|
powerUps.totalPowerUps = 0;
|
||||||
powerUps.research.research = 0;
|
powerUps.research.count = 0;
|
||||||
mech.setFillColors();
|
mech.setFillColors();
|
||||||
// mech.maxHealth = 1
|
// mech.maxHealth = 1
|
||||||
// mech.maxEnergy = 1
|
// mech.maxEnergy = 1
|
||||||
@@ -539,10 +540,6 @@ const simulation = {
|
|||||||
simulation.makeGunHUD();
|
simulation.makeGunHUD();
|
||||||
simulation.lastLogTime = 0;
|
simulation.lastLogTime = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
level.onLevel = 0;
|
level.onLevel = 0;
|
||||||
level.levelsCleared = 0;
|
level.levelsCleared = 0;
|
||||||
//resetting difficulty
|
//resetting difficulty
|
||||||
|
|||||||
163
js/tech.js
163
js/tech.js
@@ -90,7 +90,7 @@ const tech = {
|
|||||||
if (tech.restDamage > 1 && player.speed < 1) dmg *= tech.restDamage
|
if (tech.restDamage > 1 && player.speed < 1) dmg *= tech.restDamage
|
||||||
if (tech.isEnergyDamage) dmg *= 1 + mech.energy / 9;
|
if (tech.isEnergyDamage) dmg *= 1 + mech.energy / 9;
|
||||||
if (tech.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.0038
|
if (tech.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.0038
|
||||||
if (tech.isRerollDamage) dmg *= 1 + 0.035 * powerUps.research.research
|
if (tech.isRerollDamage) dmg *= 1 + 0.035 * powerUps.research.count
|
||||||
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.25
|
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.25
|
||||||
if (tech.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.66
|
if (tech.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.66
|
||||||
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.4, player.speed * 0.013)
|
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.4, player.speed * 0.013)
|
||||||
@@ -324,6 +324,76 @@ const tech = {
|
|||||||
tech.isTurret = false;
|
tech.isTurret = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "inertial frame",
|
||||||
|
description: "<strong>66%</strong> decreased <strong><em>delay</em></strong> after firing<br>you can only <strong>fire</strong> when at <strong>rest</strong>",
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
requires: "",
|
||||||
|
effect: () => {
|
||||||
|
tech.isFireNotMove = true;
|
||||||
|
b.setFireCD();
|
||||||
|
b.setFireMethod();
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
if (tech.isFireNotMove) {
|
||||||
|
tech.isFireNotMove = false
|
||||||
|
b.setFireCD();
|
||||||
|
b.setFireMethod();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "dead reckoning",
|
||||||
|
description: "increase <strong class='color-d'>damage</strong> by <strong>33%</strong> when at <strong>rest</strong>",
|
||||||
|
maxCount: 9,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return tech.isFireNotMove
|
||||||
|
},
|
||||||
|
requires: "inertial frame",
|
||||||
|
effect: () => {
|
||||||
|
tech.restDamage += 0.33
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
tech.restDamage = 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Galilean group",
|
||||||
|
description: "reduce <strong class='color-harm'>harm</strong> by <strong>50%</strong> when at <strong>rest</strong>",
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return tech.isFireNotMove
|
||||||
|
},
|
||||||
|
requires: "inertial frame",
|
||||||
|
effect() {
|
||||||
|
tech.isRestHarm = true
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
tech.isRestHarm = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "kinetic bombardment",
|
||||||
|
description: "increase <strong class='color-d'>damage</strong> by up to <strong>33%</strong><br>at a <strong>distance</strong> of 40 steps from the target",
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
requires: "",
|
||||||
|
effect() {
|
||||||
|
tech.isFarAwayDmg = true; //used in mob.damage()
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
tech.isFarAwayDmg = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "electrostatic discharge",
|
name: "electrostatic discharge",
|
||||||
description: "increase <strong class='color-d'>damage</strong> by <strong>20%</strong><br><strong>20%</strong> increased <strong><em>delay</em></strong> after firing",
|
description: "increase <strong class='color-d'>damage</strong> by <strong>20%</strong><br><strong>20%</strong> increased <strong><em>delay</em></strong> after firing",
|
||||||
@@ -755,7 +825,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return powerUps.research.research > 5 || build.isCustomSelection
|
return powerUps.research.count > 5 || build.isCustomSelection
|
||||||
},
|
},
|
||||||
requires: "at least 6 research",
|
requires: "at least 6 research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -844,38 +914,6 @@ const tech = {
|
|||||||
},
|
},
|
||||||
remove() {}
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "rest frame",
|
|
||||||
description: "increase <strong class='color-d'>damage</strong> by <strong>25%</strong><br>when not <strong>moving</strong>",
|
|
||||||
maxCount: 6,
|
|
||||||
count: 0,
|
|
||||||
allowed() {
|
|
||||||
return mech.Fx === 0.016
|
|
||||||
},
|
|
||||||
requires: "base movement speed",
|
|
||||||
effect: () => {
|
|
||||||
tech.restDamage += 0.25
|
|
||||||
},
|
|
||||||
remove() {
|
|
||||||
tech.restDamage = 1;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "kinetic bombardment",
|
|
||||||
description: "increase <strong class='color-d'>damage</strong> by up to <strong>33%</strong><br>at a <strong>distance</strong> of 40 steps from the target",
|
|
||||||
maxCount: 1,
|
|
||||||
count: 0,
|
|
||||||
allowed() {
|
|
||||||
return true
|
|
||||||
},
|
|
||||||
requires: "",
|
|
||||||
effect() {
|
|
||||||
tech.isFarAwayDmg = true; //used in mob.damage()
|
|
||||||
},
|
|
||||||
remove() {
|
|
||||||
tech.isFarAwayDmg = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "squirrel-cage rotor",
|
name: "squirrel-cage rotor",
|
||||||
description: "<strong>move</strong> and <strong>jump</strong> about <strong>25%</strong> faster",
|
description: "<strong>move</strong> and <strong>jump</strong> about <strong>25%</strong> faster",
|
||||||
@@ -946,7 +984,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "perpetual stun",
|
name: "perpetual stun",
|
||||||
description: "<strong>stun</strong> all mobs for up to <strong>8</strong> seconds<br>at the start of each <strong>level</strong>",
|
description: "<strong>stun</strong> all mobs for up to <strong>10</strong> seconds<br>at the start of each <strong>level</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -960,22 +998,6 @@ const tech = {
|
|||||||
tech.isPerpetualStun = false
|
tech.isPerpetualStun = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "osmoprotectant",
|
|
||||||
description: `collisions with <strong>stunned</strong> or <strong class='color-s'>frozen</strong> mobs<br>cause you <strong>no</strong> <strong class='color-harm'>harm</strong>`,
|
|
||||||
maxCount: 1,
|
|
||||||
count: 0,
|
|
||||||
allowed() {
|
|
||||||
return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage
|
|
||||||
},
|
|
||||||
requires: "a freezing or stunning effect",
|
|
||||||
effect() {
|
|
||||||
tech.isFreezeHarmImmune = true;
|
|
||||||
},
|
|
||||||
remove() {
|
|
||||||
tech.isFreezeHarmImmune = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "Pauli exclusion",
|
name: "Pauli exclusion",
|
||||||
description: `after receiving <strong class='color-harm'>harm</strong> from a <strong>collision</strong> become<br><strong>immune</strong> to <strong class='color-harm'>harm</strong> for an extra <strong>0.75</strong> seconds`,
|
description: `after receiving <strong class='color-harm'>harm</strong> from a <strong>collision</strong> become<br><strong>immune</strong> to <strong class='color-harm'>harm</strong> for an extra <strong>0.75</strong> seconds`,
|
||||||
@@ -1076,7 +1098,22 @@ const tech = {
|
|||||||
tech.isHarmFreeze = false;
|
tech.isHarmFreeze = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "osmoprotectant",
|
||||||
|
description: `collisions with <strong>stunned</strong> or <strong class='color-s'>frozen</strong> mobs<br>cause you <strong>no</strong> <strong class='color-harm'>harm</strong>`,
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage
|
||||||
|
},
|
||||||
|
requires: "a freezing or stunning effect",
|
||||||
|
effect() {
|
||||||
|
tech.isFreezeHarmImmune = true;
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
tech.isFreezeHarmImmune = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "clock gating",
|
name: "clock gating",
|
||||||
description: `<strong>slow</strong> <strong>time</strong> by <strong>50%</strong> after receiving <strong class='color-harm'>harm</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>15%</strong>`,
|
description: `<strong>slow</strong> <strong>time</strong> by <strong>50%</strong> after receiving <strong class='color-harm'>harm</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>15%</strong>`,
|
||||||
@@ -1572,7 +1609,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return powerUps.research.research > 0 || build.isCustomSelection
|
return powerUps.research.count > 0 || build.isCustomSelection
|
||||||
},
|
},
|
||||||
requires: "at least 1 research",
|
requires: "at least 1 research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1592,7 +1629,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return powerUps.research.research > 1 || build.isCustomSelection
|
return powerUps.research.count > 1 || build.isCustomSelection
|
||||||
},
|
},
|
||||||
requires: "at least 2 research",
|
requires: "at least 2 research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1774,13 +1811,13 @@ const tech = {
|
|||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
isCustomHide: true,
|
isCustomHide: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.research > 1
|
return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.count > 1
|
||||||
},
|
},
|
||||||
requires: "at least 1 tech and 1 research, a chance to duplicate power ups",
|
requires: "at least 1 tech and 1 research, a chance to duplicate power ups",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
powerUps.research.changeRerolls(-2)
|
powerUps.research.changeRerolls(-2)
|
||||||
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span> <span class='color-symbol'>-=</span> 2
|
simulation.makeTextLog(`<span class='color-var'>mech</span>.<span class='color-r'>research</span> <span class='color-symbol'>-=</span> 2
|
||||||
<br>${powerUps.research.research}`)
|
<br>${powerUps.research.count}`)
|
||||||
const chanceStore = tech.duplicateChance
|
const chanceStore = tech.duplicateChance
|
||||||
tech.duplicateChance = (tech.isBayesian ? 0.2 : 0) + tech.cancelCount * 0.04 + mech.duplicateChance + tech.duplicateChance * 2 //increase duplication chance to simulate doubling all 3 sources of duplication chance
|
tech.duplicateChance = (tech.isBayesian ? 0.2 : 0) + tech.cancelCount * 0.04 + mech.duplicateChance + tech.duplicateChance * 2 //increase duplication chance to simulate doubling all 3 sources of duplication chance
|
||||||
powerUps.spawn(mech.pos.x, mech.pos.y, "tech");
|
powerUps.spawn(mech.pos.x, mech.pos.y, "tech");
|
||||||
@@ -1867,7 +1904,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return powerUps.research.research === 0 && !tech.manyWorlds
|
return powerUps.research.count === 0 && !tech.manyWorlds
|
||||||
},
|
},
|
||||||
requires: "no research",
|
requires: "no research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1887,7 +1924,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return powerUps.research.research === 0 && !tech.isSuperDeterminism && !tech.isRerollHaste
|
return powerUps.research.count === 0 && !tech.isSuperDeterminism && !tech.isRerollHaste
|
||||||
},
|
},
|
||||||
requires: "not superdeterminism or Ψ(t) collapse<br>no research",
|
requires: "not superdeterminism or Ψ(t) collapse<br>no research",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -1903,7 +1940,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (powerUps.research.research > 1 || build.isCustomSelection) && !tech.isSuperDeterminism && !tech.isRerollHaste
|
return (powerUps.research.count > 1 || build.isCustomSelection) && !tech.isSuperDeterminism && !tech.isRerollHaste
|
||||||
},
|
},
|
||||||
requires: "not superdeterminism or Ψ(t) collapse<br>at least 2 research",
|
requires: "not superdeterminism or Ψ(t) collapse<br>at least 2 research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1919,7 +1956,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (powerUps.research.research > 2 || build.isCustomSelection) && !tech.isDeterminism
|
return (powerUps.research.count > 2 || build.isCustomSelection) && !tech.isDeterminism
|
||||||
},
|
},
|
||||||
requires: "not determinism, at least 3 research",
|
requires: "not determinism, at least 3 research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -1939,7 +1976,7 @@ const tech = {
|
|||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return powerUps.research.research > 4 || build.isCustomSelection
|
return powerUps.research.count > 4 || build.isCustomSelection
|
||||||
},
|
},
|
||||||
requires: "at least 5 research",
|
requires: "at least 5 research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -4074,5 +4111,7 @@ const tech = {
|
|||||||
isDupDamage: null,
|
isDupDamage: null,
|
||||||
isFireRateForGuns: null,
|
isFireRateForGuns: null,
|
||||||
cyclicImmunity: null,
|
cyclicImmunity: null,
|
||||||
isTechDamage: null
|
isTechDamage: null,
|
||||||
|
isFireNotMove: null,
|
||||||
|
isRestHarm: null
|
||||||
}
|
}
|
||||||
@@ -328,7 +328,8 @@ summary {
|
|||||||
top: 15px;
|
top: 15px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
width: 300px;
|
width: 0px;
|
||||||
|
transition: width 1s ease-out;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|||||||
12
todo.txt
12
todo.txt
@@ -1,9 +1,13 @@
|
|||||||
******************************************************** NEXT PATCH ********************************************************
|
******************************************************** NEXT PATCH ********************************************************
|
||||||
|
|
||||||
tech: antiscience - 100% damage, but lose 11 health when you pick up a tech
|
health background finally updates to show max health changes
|
||||||
tech: laser widebeam + output coupler can now stack up to 9x (was 1x)
|
|
||||||
but it not longer works with tech: slow light propagation
|
|
||||||
|
|
||||||
|
tech: rest frame is removed
|
||||||
|
tech: inertial frame - gain 66% fire rate, but you can't fire when moving
|
||||||
|
tech: dead reckoning - when at rest do 33% more damage
|
||||||
|
requires inertial frame
|
||||||
|
tech: Galilean group - when at rest take 50% less harm
|
||||||
|
requires inertial frame
|
||||||
******************************************************** BUGS ********************************************************
|
******************************************************** BUGS ********************************************************
|
||||||
|
|
||||||
CPT check for crouch after rewind
|
CPT check for crouch after rewind
|
||||||
@@ -34,7 +38,7 @@ bot that follows the players history
|
|||||||
give player energy overfill
|
give player energy overfill
|
||||||
AOE damage to mobs
|
AOE damage to mobs
|
||||||
push away mobs
|
push away mobs
|
||||||
wen close to player: damage bonus damage reduction
|
when close to player: damage bonus damage reduction
|
||||||
|
|
||||||
tech: dodge chance for cloaking, harmonic fields, also pilot wave
|
tech: dodge chance for cloaking, harmonic fields, also pilot wave
|
||||||
20% chance up to 3 stacks, not additive
|
20% chance up to 3 stacks, not additive
|
||||||
|
|||||||
Reference in New Issue
Block a user