back up before adjusting keycodes
This commit is contained in:
23
js/bullet.js
23
js/bullet.js
@@ -166,8 +166,8 @@ const b = {
|
||||
},
|
||||
explosion(where, radius) { // typically explode is used for some bullets with .onEnd
|
||||
let dist, sub, knock;
|
||||
let dmg = radius * 0.01;
|
||||
if (mod.isExplosionHarm) radius *= 1.35
|
||||
let dmg = radius * 0.013;
|
||||
if (mod.isExplosionHarm) radius *= 1.43 // sqrt(2)radius for 2x more area
|
||||
if (mod.isSmallExplosion) {
|
||||
radius *= 0.5
|
||||
dmg *= 1.5
|
||||
@@ -198,12 +198,11 @@ const b = {
|
||||
|
||||
if (mod.isImmuneExplosion) {
|
||||
const mitigate = Math.min(1, Math.max(1 - mech.energy * 0.6, 0))
|
||||
mech.damage(mitigate * radius * (mod.isExplosionHarm) ? 0.0004 : 0.0001);
|
||||
mech.damage(mitigate * radius * (mod.isExplosionHarm ? 0.0004 : 0.0001));
|
||||
} else {
|
||||
mech.damage(radius * (mod.isExplosionHarm) ? 0.0004 : 0.0001);
|
||||
mech.damage(radius * (mod.isExplosionHarm ? 0.0004 : 0.0001));
|
||||
}
|
||||
|
||||
|
||||
// if (!(mod.isImmuneExplosion && mech.energy > 0.97)) {
|
||||
// if (mod.isExplosionHarm) {
|
||||
// mech.damage(radius * 0.0004); //300% more player damage from explosions
|
||||
@@ -806,8 +805,8 @@ const b = {
|
||||
this.endCycle = game.cycle
|
||||
if (mod.isHeavyWater) mobs.statusDoT(who, 0.15, 300)
|
||||
if (mod.iceEnergy && !who.shield && !who.isShielded && who.dropPowerUp && !who.alive) {
|
||||
mech.energy += mod.iceEnergy * 0.66
|
||||
mech.addHealth(mod.iceEnergy * 0.03)
|
||||
mech.energy += mod.iceEnergy * 0.66 * mech.maxEnergy
|
||||
mech.addHealth(mod.iceEnergy * 0.04)
|
||||
}
|
||||
},
|
||||
onEnd() {},
|
||||
@@ -1990,8 +1989,8 @@ const b = {
|
||||
name: "flechettes",
|
||||
description: "fire a volley of <strong class='color-p'>uranium-235</strong> <strong>needles</strong><br>does <strong class='color-p'>radioactive</strong> <strong class='color-d'>damage</strong> over <strong>3</strong> seconds",
|
||||
ammo: 0,
|
||||
ammoPack: 45,
|
||||
defaultAmmoPack: 45,
|
||||
ammoPack: 55,
|
||||
defaultAmmoPack: 55,
|
||||
have: false,
|
||||
count: 0, //used to track how many shots are in a volley before a big CD
|
||||
lastFireCycle: 0, //use to remember how longs its been since last fire, used to reset count
|
||||
@@ -2018,9 +2017,9 @@ const b = {
|
||||
this.immuneList.push(who.id)
|
||||
who.foundPlayer();
|
||||
if (mod.isFastDot) {
|
||||
mobs.statusDoT(who, 3.9, 30)
|
||||
mobs.statusDoT(who, 4, 30)
|
||||
} else {
|
||||
mobs.statusDoT(who, 0.65, mod.isSlowDot ? 360 : 180)
|
||||
mobs.statusDoT(who, 0.66, mod.isSlowDot ? 360 : 180)
|
||||
}
|
||||
game.drawList.push({ //add dmg to draw queue
|
||||
x: this.position.x,
|
||||
@@ -2072,7 +2071,7 @@ const b = {
|
||||
makeFlechette(mech.angle - 0.02 - 0.005 * Math.random())
|
||||
}
|
||||
|
||||
const CD = (mech.crouch) ? 68 : 35
|
||||
const CD = (mech.crouch) ? 60 : 30
|
||||
if (this.lastFireCycle + CD < mech.cycle) this.count = 0 //reset count if it cycles past the CD
|
||||
this.lastFireCycle = mech.cycle
|
||||
if (this.count > ((mech.crouch) ? 7 : 1)) {
|
||||
|
||||
@@ -584,6 +584,7 @@ document.body.addEventListener("mouseleave", (e) => { //prevents mouse getting s
|
||||
//keyboard input
|
||||
const keys = [];
|
||||
document.body.addEventListener("keydown", (e) => {
|
||||
console.log(e.keyCode)
|
||||
keys[e.keyCode] = true;
|
||||
if (mech.alive) game.keyPress();
|
||||
});
|
||||
|
||||
20
js/level.js
20
js/level.js
@@ -3842,25 +3842,25 @@ const level = {
|
||||
for (let i = 0; i < num; i++) {
|
||||
game.difficulty++
|
||||
game.dmgScale += 0.37; //damage done by mobs increases each level
|
||||
b.dmgScale *= 0.92; //damage done by player decreases each level
|
||||
if (game.accelScale < 5) game.accelScale *= 1.027 //mob acceleration increases each level
|
||||
if (game.lookFreqScale > 0.2) game.lookFreqScale *= 0.975 //mob cycles between looks decreases each level
|
||||
if (game.CDScale > 0.2) game.CDScale *= 0.966 //mob CD time decreases each level
|
||||
b.dmgScale *= 0.93; //damage done by player decreases each level
|
||||
if (game.accelScale < 5) game.accelScale *= 1.02 //mob acceleration increases each level
|
||||
if (game.lookFreqScale > 0.2) game.lookFreqScale *= 0.98 //mob cycles between looks decreases each level
|
||||
if (game.CDScale > 0.2) game.CDScale *= 0.97 //mob CD time decreases each level
|
||||
}
|
||||
game.healScale = 1 / (1 + game.difficulty * 0.07) //a higher denominator makes for lower heals // mech.health += heal * game.healScale;
|
||||
game.healScale = 1 / (1 + game.difficulty * 0.06) //a higher denominator makes for lower heals // mech.health += heal * game.healScale;
|
||||
},
|
||||
difficultyDecrease(num = 1) { //used in easy mode for game.reset()
|
||||
for (let i = 0; i < num; i++) {
|
||||
game.difficulty--
|
||||
game.dmgScale -= 0.37; //damage done by mobs increases each level
|
||||
if (game.dmgScale < 0.1) game.dmgScale = 0.1;
|
||||
b.dmgScale /= 0.92; //damage done by player decreases each level
|
||||
if (game.accelScale > 0.2) game.accelScale /= 1.027 //mob acceleration increases each level
|
||||
if (game.lookFreqScale < 5) game.lookFreqScale /= 0.975 //mob cycles between looks decreases each level
|
||||
if (game.CDScale < 5) game.CDScale /= 0.966 //mob CD time decreases each level
|
||||
b.dmgScale /= 0.93; //damage done by player decreases each level
|
||||
if (game.accelScale > 0.2) game.accelScale /= 1.02 //mob acceleration increases each level
|
||||
if (game.lookFreqScale < 5) game.lookFreqScale /= 0.98 //mob cycles between looks decreases each level
|
||||
if (game.CDScale < 5) game.CDScale /= 0.97 //mob CD time decreases each level
|
||||
}
|
||||
if (game.difficulty < 1) game.difficulty = 0;
|
||||
game.healScale = 1 / (1 + game.difficulty * 0.07)
|
||||
game.healScale = 1 / (1 + game.difficulty * 0.06)
|
||||
},
|
||||
difficultyText(mode = document.getElementById("difficulty-select").value) {
|
||||
if (mode === "0") {
|
||||
|
||||
18
js/mods.js
18
js/mods.js
@@ -83,7 +83,7 @@ const mod = {
|
||||
damageFromMods() {
|
||||
let dmg = mech.fieldDamage
|
||||
// if (mod.aimDamage>1)
|
||||
if (mod.isEnergyNoAmmo) dmg *= 1.4
|
||||
if (mod.isEnergyNoAmmo) dmg *= 1.5
|
||||
if (mod.isDamageForGuns) dmg *= 1 + 0.07 * b.inventory.length
|
||||
if (mod.isLowHealthDmg) dmg *= 1 + 0.6 * Math.max(0, 1 - mech.health)
|
||||
if (mod.isHarmDamage && mech.lastHarmCycle + 600 > mech.cycle) dmg *= 2;
|
||||
@@ -133,7 +133,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "exciton-lattice",
|
||||
description: `increase <strong class='color-d'>damage</strong> by <strong>40%</strong>, but<br><strong class='color-g'>ammo</strong> will no longer <strong>spawn</strong>`,
|
||||
description: `increase <strong class='color-d'>damage</strong> by <strong>50%</strong>, but<br><strong class='color-g'>ammo</strong> will no longer <strong>spawn</strong>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -420,7 +420,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "ammonium nitrate",
|
||||
description: "increase <strong class='color-e'>explosive</strong> <strong>area</strong> by <strong>60%</strong>, but<br>you take <strong>300%</strong> more <strong class='color-harm'>harm</strong> from <strong class='color-e'>explosions</strong>",
|
||||
description: "increase <strong class='color-e'>explosive</strong> <strong>area</strong> by <strong>100%</strong>, but<br>you take <strong>400%</strong> more <strong class='color-harm'>harm</strong> from <strong class='color-e'>explosions</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -1217,7 +1217,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "stimulated emission",
|
||||
description: "<strong>8%</strong> chance to <strong>duplicate</strong> spawned <strong>power ups</strong>",
|
||||
description: "<strong>9%</strong> chance to <strong>duplicate</strong> spawned <strong>power ups</strong>",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -1225,12 +1225,12 @@ const mod = {
|
||||
},
|
||||
requires: "",
|
||||
effect: () => {
|
||||
mod.duplicateChance += 0.08
|
||||
mod.duplicateChance += 0.09
|
||||
game.draw.powerUp = game.draw.powerUpBonus //change power up draw
|
||||
|
||||
},
|
||||
remove() {
|
||||
mod.duplicateChance -= 0.08 * this.count
|
||||
mod.duplicateChance -= 0.09 * this.count
|
||||
if (!mod.duplicateChance) game.draw.powerUp = game.draw.powerUpNormal
|
||||
}
|
||||
},
|
||||
@@ -2220,8 +2220,8 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "thermoelectric effect",
|
||||
description: "<strong>killing</strong> mobs with <strong>ice IX</strong> gives <strong>3%</strong> <strong class='color-h'>health</strong><br>and overfills your <strong class='color-f'>energy</strong> by <strong>66%</strong>",
|
||||
maxCount: 3,
|
||||
description: "<strong>killing</strong> mobs with <strong>ice IX</strong> gives <strong>4%</strong> <strong class='color-h'>health</strong><br>and overloads <strong class='color-f'>energy</strong> by <strong>100%</strong> of your max",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return (mod.haveGunCheck("ice IX") || mod.isIceField) && !mod.isHeavyWater
|
||||
@@ -2660,7 +2660,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "pair production",
|
||||
description: "<strong>power ups</strong> overfill your <strong class='color-f'>energy</strong><br>temporarily gain <strong>3x</strong> your maximum <strong class='color-f'>energy</strong>",
|
||||
description: "<strong>power ups</strong> overload your <strong class='color-f'>energy</strong><br>by <strong>300%</strong> of your maximum <strong class='color-f'>energy</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
|
||||
Reference in New Issue
Block a user