This commit is contained in:
landgreen
2020-03-31 06:01:54 -07:00
parent 860daf9160
commit fc34952a86
5 changed files with 46 additions and 34 deletions

View File

@@ -584,24 +584,6 @@ const b = {
b.isModEntanglement = false;
}
},
{
name: "ground state",
description: "reduce <strong>harm</strong> by <strong>67%</strong><br>you <strong>no longer</strong> passively regenerate <strong class='color-f'>energy</strong>",
maxCount: 1,
count: 0,
allowed() {
return true
},
requires: "",
effect: () => {
b.modEnergyRegen = 0;
mech.fieldRegen = b.modEnergyRegen;
},
remove() {
b.modEnergyRegen = 0.005;
mech.fieldRegen = b.modEnergyRegen;
}
},
{
name: "piezoelectricity",
description: "<strong>colliding</strong> with mobs fills your <strong class='color-f'>energy</strong><br><strong>15%</strong> less <strong>harm</strong> from mob collisions",
@@ -619,6 +601,24 @@ const b = {
b.isModPiezo = false;
}
},
{
name: "ground state",
description: "reduce <strong>harm</strong> by <strong>50%</strong><br>you <strong>no longer</strong> passively regenerate <strong class='color-f'>energy</strong>",
maxCount: 1,
count: 0,
allowed() {
return b.isModPiezo
},
requires: "piezoelectricity",
effect: () => {
b.modEnergyRegen = 0;
mech.fieldRegen = b.modEnergyRegen;
},
remove() {
b.modEnergyRegen = 0.001;
mech.fieldRegen = b.modEnergyRegen;
}
},
{
name: "energy conservation",
description: "<strong>15%</strong> of <strong class='color-d'>damage</strong> done is recovered as <strong class='color-f'>energy</strong>",

View File

@@ -56,6 +56,20 @@ const game = {
ctx.restore();
game.drawCursor();
},
timeSkip(cycles = 60) {
for (let i = 0; i < cycles; i++) {
game.cycle++;
// mech.cycle++;
game.gravity();
Engine.update(engine, game.delta);
level.checkZones();
level.checkQuery();
mech.move();
mobs.loop();
mech.hold();
b.bulletActions();
}
},
mouse: {
x: canvas.width / 2,
y: canvas.height / 2

View File

@@ -16,8 +16,9 @@ const level = {
// level.difficultyIncrease(9)
// b.giveGuns("ice IX")
// mech.setField("time dilation field")
// mech.energy = 0.1;
// b.giveMod("ground state");
// b.giveMod("reflective cavity");
// b.giveMod("photovoltaics");
level.intro(); //starting level
// level.testingMap();

View File

@@ -508,10 +508,10 @@ const mech = {
if (b.isModDroneOnDamage) {
const len = (dmg - 0.06 * Math.random()) * 40
for (let i = 0; i < len; i++) {
if (Math.random() < 0.75) b.drone() //spawn drone
if (Math.random() < 0.5) b.drone() //spawn drone
}
}
if (b.isModMineOnDamage && dmg > 0.005 + 0.1 * Math.random()) {
if (b.isModMineOnDamage && dmg > 0.004 + 0.05 * Math.random()) {
b.mine({
x: mech.pos.x,
y: mech.pos.y - 80
@@ -522,7 +522,7 @@ const mech = {
}
dmg *= mech.fieldDamageResistance
if (!b.modEnergyRegen) dmg *= 0.33 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy
if (!b.modEnergyRegen) dmg *= 0.5 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy
if (b.isModEntanglement && b.inventory[0] === b.activeGun) {
for (let i = 0, len = b.inventory.length; i < len; i++) {
dmg *= 0.84 // 1 - 0.16
@@ -738,7 +738,7 @@ const mech = {
},
setHoldDefaults() {
if (mech.energy < mech.fieldEnergyMax) mech.energy = mech.fieldEnergyMax;
mech.fieldRegen = b.modEnergyRegen;
mech.fieldRegen = b.modEnergyRegen; //0.001
mech.fieldMeterColor = "#0cf"
mech.fieldShieldingScale = 1;
mech.fieldDamageResistance = 1;
@@ -1305,8 +1305,8 @@ const mech = {
const DRAIN = 0.0023
if (mech.energy > DRAIN) {
mech.energy -= DRAIN;
if (mech.energy < 0) {
mech.fieldCDcycle = mech.cycle + 60;
if (mech.energy < DRAIN) {
mech.fieldCDcycle = mech.cycle + 120;
mech.energy = 0;
mech.wakeCheck();
}
@@ -1370,7 +1370,7 @@ const mech = {
if (mech.energy > DRAIN) {
mech.energy -= DRAIN;
if (mech.energy < 0) {
mech.fieldCDcycle = mech.cycle + 60;
mech.fieldCDcycle = mech.cycle + 120;
mech.energy = 0;
}
//calculate laser collision
@@ -1585,7 +1585,7 @@ const mech = {
zeroG(body, this.fieldDrawRadius);
}
if (mech.energy < 0) {
mech.fieldCDcycle = mech.cycle + 60;
mech.fieldCDcycle = mech.cycle + 120;
mech.energy = 0;
}
//add extra friction for horizontal motion
@@ -1765,7 +1765,7 @@ const mech = {
if (mech.energy > DRAIN) {
mech.energy -= DRAIN;
if (mech.energy < 0) {
mech.fieldCDcycle = mech.cycle + 60;
mech.fieldCDcycle = mech.cycle + 120;
mech.energy = 0;
}
mech.isStealth = true //isStealth disables most uses of foundPlayer()

View File

@@ -1,13 +1,10 @@
new mod - ground state: reduce harm by 77% but you don't regen energy
negative feedback, entanglement, fluoroantimonic acid now indicate effects with text
entanglement 13% -> 16% damage reduction
piezoelectricity 10% -> 15% harm reduction
acute stress response now does 33% damage and drains 50% energy once when a mob dies
************** TODO - n-gon **************
mob Boss - time skipper: sends a pulse wave out that will cause time to jump forward 1 second.
what about a series of short time skips forward 10 cycles at a time
add a way to run player submitted maps.
MOB stabber - extends one vector like the shooter, but quickly in order to stab