pause menu on selection
you can see your build while in the power up selection menu balance - metamaterial cloaking field gives 111% more damage (up from 66%) mod: Newton's 1st law - harm reduction when moving fast (thanks NoHaxJustPi) mod: Newton's 2nd law - damage increase while moving fast
This commit is contained in:
14
js/bullet.js
14
js/bullet.js
@@ -3362,21 +3362,21 @@ const b = {
|
|||||||
} else {
|
} else {
|
||||||
mech.fireCDcycle = mech.cycle
|
mech.fireCDcycle = mech.cycle
|
||||||
mech.energy -= mech.fieldRegen + mod.laserFieldDrain * mod.isLaserDiode
|
mech.energy -= mech.fieldRegen + mod.laserFieldDrain * mod.isLaserDiode
|
||||||
const dmg = 0.25 * mod.laserDamage // 3.5 * 0.55 = 200% more damage
|
const dmg = 0.5 * mod.laserDamage // 3.5 * 0.55 = 200% more damage
|
||||||
ctx.strokeStyle = "#f00";
|
ctx.strokeStyle = "#f00";
|
||||||
let spacing, len
|
let spacing, len
|
||||||
if (mod.wideLaser === 3) {
|
if (mod.wideLaser === 3) {
|
||||||
ctx.lineWidth = 2
|
ctx.lineWidth = 2
|
||||||
spacing = 1
|
spacing = 2
|
||||||
len = 19 + mod.historyLaser * 10
|
len = 10 + mod.historyLaser * 5
|
||||||
} else if (mod.wideLaser === 4) {
|
} else if (mod.wideLaser === 4) {
|
||||||
ctx.lineWidth = 3
|
ctx.lineWidth = 3
|
||||||
spacing = 1
|
spacing = 1
|
||||||
len = 29 + mod.historyLaser * 10
|
len = 15 + mod.historyLaser * 5
|
||||||
} else {
|
} else {
|
||||||
ctx.lineWidth = 1
|
ctx.lineWidth = 1
|
||||||
spacing = 3
|
spacing = 5
|
||||||
len = 9 + mod.historyLaser * 10
|
len = 5 + mod.historyLaser * 5
|
||||||
}
|
}
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
b.laser({
|
b.laser({
|
||||||
@@ -3386,7 +3386,7 @@ const b = {
|
|||||||
x: mech.pos.x + 3000 * Math.cos(mech.angle),
|
x: mech.pos.x + 3000 * Math.cos(mech.angle),
|
||||||
y: mech.pos.y + 3000 * Math.sin(mech.angle)
|
y: mech.pos.y + 3000 * Math.sin(mech.angle)
|
||||||
}, dmg, 0, true);
|
}, dmg, 0, true);
|
||||||
for (let i = 0; i < len; i++) {
|
for (let i = 1; i < len; i++) {
|
||||||
const history = mech.history[(mech.cycle - i * spacing) % 300]
|
const history = mech.history[(mech.cycle - i * spacing) % 300]
|
||||||
b.laser({
|
b.laser({
|
||||||
x: history.position.x + 20 * Math.cos(history.angle),
|
x: history.position.x + 20 * Math.cos(history.angle),
|
||||||
|
|||||||
@@ -177,11 +177,10 @@ const build = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
pauseGrid() {
|
pauseGrid() {
|
||||||
let text = `
|
let text = ""
|
||||||
<div class="pause-grid-module">
|
if (!game.isChoosing) text += `<div class="pause-grid-module">
|
||||||
<span style="font-size:1.5em;font-weight: 600;">PAUSED</span> press P to resume
|
<span style="font-size:1.5em;font-weight: 600;">PAUSED</span> press P to resume</div>
|
||||||
</div>
|
<div class="pause-grid-module" style = "font-size: 13px;line-height: 120%;padding: 5px;">
|
||||||
<div class="pause-grid-module" style = "font-size: 13px;line-height: 120%;padding: 5px;">
|
|
||||||
<strong class='color-d'>damage</strong> increase: ${((mod.damageFromMods()-1)*100).toFixed(0)}%
|
<strong class='color-d'>damage</strong> increase: ${((mod.damageFromMods()-1)*100).toFixed(0)}%
|
||||||
<br><strong class='color-harm'>harm</strong> reduction: ${((1-mech.harmReduction())*100).toFixed(0)}%
|
<br><strong class='color-harm'>harm</strong> reduction: ${((1-mech.harmReduction())*100).toFixed(0)}%
|
||||||
<br><strong>fire delay</strong> decrease: ${((1-b.fireCD)*100).toFixed(0)}%
|
<br><strong>fire delay</strong> decrease: ${((1-b.fireCD)*100).toFixed(0)}%
|
||||||
|
|||||||
47
js/mods.js
47
js/mods.js
@@ -95,6 +95,7 @@ const mod = {
|
|||||||
if (mod.isRerollDamage) dmg *= 1 + 0.04 * powerUps.reroll.rerolls
|
if (mod.isRerollDamage) dmg *= 1 + 0.04 * powerUps.reroll.rerolls
|
||||||
if (mod.isOneGun && b.inventory.length < 2) dmg *= 1.25
|
if (mod.isOneGun && b.inventory.length < 2) dmg *= 1.25
|
||||||
if (mod.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.5
|
if (mod.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.5
|
||||||
|
if (mod.isSpeedDamage) dmg *= 1 + Math.min(0.33, player.speed * 0.011)
|
||||||
return dmg * mod.slowFire * mod.aimDamage
|
return dmg * mod.slowFire * mod.aimDamage
|
||||||
},
|
},
|
||||||
totalBots() {
|
totalBots() {
|
||||||
@@ -818,6 +819,38 @@ const mod = {
|
|||||||
mech.setMovement()
|
mech.setMovement()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Newton's 1st law",
|
||||||
|
description: "moving at high <strong>speeds</strong> reduces <strong class='color-harm'>harm</strong><br>by up to <strong>50%</strong>",
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return mech.Fx > 0.016
|
||||||
|
},
|
||||||
|
requires: "speed increase",
|
||||||
|
effect() {
|
||||||
|
mod.isSpeedHarm = true
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
mod.isSpeedHarm = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Newton's 2nd law",
|
||||||
|
description: "moving at high <strong>speeds</strong> increases <strong class='color-d'>damage</strong><br> by up to <strong>33%</strong>",
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
allowed() {
|
||||||
|
return mech.Fx > 0.016
|
||||||
|
},
|
||||||
|
requires: "speed increase",
|
||||||
|
effect() {
|
||||||
|
mod.isSpeedDamage = true
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
mod.isSpeedDamage = false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Pauli exclusion",
|
name: "Pauli exclusion",
|
||||||
description: `<strong>immune</strong> to <strong class='color-harm'>harm</strong> for <strong>0.5</strong> seconds longer<br>after receiving <strong class='color-harm'>harm</strong> from a collision`,
|
description: `<strong>immune</strong> to <strong class='color-harm'>harm</strong> for <strong>0.5</strong> seconds longer<br>after receiving <strong class='color-harm'>harm</strong> from a collision`,
|
||||||
@@ -2534,7 +2567,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "diffraction grating",
|
name: "diffraction grating",
|
||||||
description: `your <strong>laser</strong> gains <strong>2 diverging</strong> beams<br>decrease laser <strong class='color-d'>damage</strong> by <strong>10%</strong>`,
|
description: `your <strong>laser</strong> gains <strong>2 diverging</strong> beams<br>decrease individual beam <strong class='color-d'>damage</strong> by <strong>10%</strong>`,
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -2622,7 +2655,7 @@ const mod = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
this.description = "<strong>laser</strong> beam is <strong>spread</strong> into your recent <strong>past</strong><br>increase total beam <strong class='color-d'>damage</strong> by <strong>200%</strong>"
|
this.description = "<strong>laser</strong> beam is <strong>spread</strong> into your recent <strong>past</strong><br>increase total laser <strong class='color-d'>damage</strong> by <strong>200%</strong>"
|
||||||
mod.historyLaser = 0
|
mod.historyLaser = 0
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod()
|
if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod()
|
||||||
@@ -2885,7 +2918,7 @@ const mod = {
|
|||||||
},
|
},
|
||||||
requires: "standing wave harmonics",
|
requires: "standing wave harmonics",
|
||||||
effect() {
|
effect() {
|
||||||
mod.blockDmg += 0.7 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
|
mod.blockDmg += 0.75 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mod.blockDmg = 0;
|
mod.blockDmg = 0;
|
||||||
@@ -2901,8 +2934,8 @@ const mod = {
|
|||||||
},
|
},
|
||||||
requires: "standing wave harmonics",
|
requires: "standing wave harmonics",
|
||||||
effect() {
|
effect() {
|
||||||
mech.fieldRange += 175 * 0.17
|
mech.fieldRange += 175 * 0.2
|
||||||
mech.fieldShieldingScale *= 0.6
|
mech.fieldShieldingScale *= 0.55
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
mech.fieldRange = 175;
|
mech.fieldRange = 175;
|
||||||
@@ -3359,5 +3392,7 @@ const mod = {
|
|||||||
overfillDrain: null,
|
overfillDrain: null,
|
||||||
isNeutronSlow: null,
|
isNeutronSlow: null,
|
||||||
isRailAreaDamage: null,
|
isRailAreaDamage: null,
|
||||||
historyLaser: null
|
historyLaser: null,
|
||||||
|
isSpeedHarm: null,
|
||||||
|
isSpeedDamage: null
|
||||||
}
|
}
|
||||||
15
js/player.js
15
js/player.js
@@ -135,6 +135,11 @@ const mech = {
|
|||||||
transY: 0,
|
transY: 0,
|
||||||
history: [], //tracks the last second of player position
|
history: [], //tracks the last second of player position
|
||||||
move() {
|
move() {
|
||||||
|
mech.pos.x = player.position.x;
|
||||||
|
mech.pos.y = playerBody.position.y - mech.yOff;
|
||||||
|
mech.Vx = player.velocity.x;
|
||||||
|
mech.Vy = player.velocity.y;
|
||||||
|
|
||||||
//tracks the last second of player information
|
//tracks the last second of player information
|
||||||
// console.log(mech.history)
|
// console.log(mech.history)
|
||||||
mech.history.splice(mech.cycle % 300, 1, {
|
mech.history.splice(mech.cycle % 300, 1, {
|
||||||
@@ -152,11 +157,6 @@ const mech = {
|
|||||||
});
|
});
|
||||||
// const back = 59 // 59 looks at 1 second ago //29 looks at 1/2 a second ago
|
// const back = 59 // 59 looks at 1 second ago //29 looks at 1/2 a second ago
|
||||||
// historyIndex = (mech.cycle - back) % 60
|
// historyIndex = (mech.cycle - back) % 60
|
||||||
|
|
||||||
mech.pos.x = player.position.x;
|
|
||||||
mech.pos.y = playerBody.position.y - mech.yOff;
|
|
||||||
mech.Vx = player.velocity.x;
|
|
||||||
mech.Vy = player.velocity.y;
|
|
||||||
},
|
},
|
||||||
transSmoothX: 0,
|
transSmoothX: 0,
|
||||||
transSmoothY: 0,
|
transSmoothY: 0,
|
||||||
@@ -459,6 +459,7 @@ const mech = {
|
|||||||
harmReduction() {
|
harmReduction() {
|
||||||
let dmg = 1
|
let dmg = 1
|
||||||
dmg *= mech.fieldHarmReduction
|
dmg *= mech.fieldHarmReduction
|
||||||
|
if (mod.isSpeedHarm) dmg *= 1 - Math.min(player.speed * 0.018, 0.5)
|
||||||
if (mod.isSlowFPS) dmg *= 0.85
|
if (mod.isSlowFPS) dmg *= 0.85
|
||||||
if (mod.isPiezo) dmg *= 0.85
|
if (mod.isPiezo) dmg *= 0.85
|
||||||
if (mod.isHarmReduce && mech.fieldUpgrades[mech.fieldMode].name === "negative mass field" && mech.isFieldActive) dmg *= 0.6
|
if (mod.isHarmReduce && mech.fieldUpgrades[mech.fieldMode].name === "negative mass field" && mech.isFieldActive) dmg *= 0.6
|
||||||
@@ -1768,13 +1769,13 @@ const mech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "metamaterial cloaking", //"weak photonic coupling" "electromagnetically induced transparency" "optical non-coupling" "slow light field" "electro-optic transparency"
|
name: "metamaterial cloaking", //"weak photonic coupling" "electromagnetically induced transparency" "optical non-coupling" "slow light field" "electro-optic transparency"
|
||||||
description: "<strong class='color-cloaked'>cloak</strong> after not using your gun or field<br>while <strong class='color-cloaked'>cloaked</strong> mobs can't see you<br>increase <strong class='color-d'>damage</strong> by <strong>66%</strong>",
|
description: "<strong class='color-cloaked'>cloak</strong> after not using your gun or field<br>while <strong class='color-cloaked'>cloaked</strong> mobs can't see you<br>increase <strong class='color-d'>damage</strong> by <strong>111%</strong>",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
mech.fieldFire = true;
|
mech.fieldFire = true;
|
||||||
mech.fieldMeterColor = "#fff";
|
mech.fieldMeterColor = "#fff";
|
||||||
mech.fieldPhase = 0;
|
mech.fieldPhase = 0;
|
||||||
mech.isCloak = false
|
mech.isCloak = false
|
||||||
mech.fieldDamage = 1.66
|
mech.fieldDamage = 2.11 // 1 + 111/100
|
||||||
mech.fieldDrawRadius = 0
|
mech.fieldDrawRadius = 0
|
||||||
const drawRadius = 1000
|
const drawRadius = 1000
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const powerUps = {
|
|||||||
}
|
}
|
||||||
game.paused = true;
|
game.paused = true;
|
||||||
game.isChoosing = true; //stops p from un pausing on key down
|
game.isChoosing = true; //stops p from un pausing on key down
|
||||||
|
build.pauseGrid()
|
||||||
},
|
},
|
||||||
endDraft() {
|
endDraft() {
|
||||||
if (mod.manyWorlds && powerUps.reroll.rerolls < 1) {
|
if (mod.manyWorlds && powerUps.reroll.rerolls < 1) {
|
||||||
@@ -42,6 +43,7 @@ const powerUps = {
|
|||||||
document.getElementById("choose-background").style.display = "none"
|
document.getElementById("choose-background").style.display = "none"
|
||||||
document.body.style.cursor = "none";
|
document.body.style.cursor = "none";
|
||||||
document.body.style.overflow = "hidden"
|
document.body.style.overflow = "hidden"
|
||||||
|
build.unPauseGrid()
|
||||||
game.paused = false;
|
game.paused = false;
|
||||||
game.isChoosing = false; //stops p from un pausing on key down
|
game.isChoosing = false; //stops p from un pausing on key down
|
||||||
mech.immuneCycle = mech.cycle + 60; //player is immune to collision damage for 30 cycles
|
mech.immuneCycle = mech.cycle + 60; //player is immune to collision damage for 30 cycles
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const spawn = {
|
|||||||
me.frictionAir = 0.01;
|
me.frictionAir = 0.01;
|
||||||
me.memory = Infinity;
|
me.memory = Infinity;
|
||||||
me.locatePlayer();
|
me.locatePlayer();
|
||||||
const density = 1
|
const density = 0.95
|
||||||
Matter.Body.setDensity(me, density); //extra dense //normal is 0.001 //makes effective life much larger
|
Matter.Body.setDensity(me, density); //extra dense //normal is 0.001 //makes effective life much larger
|
||||||
// spawn.shield(me, x, y, 1);
|
// spawn.shield(me, x, y, 1);
|
||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
@@ -104,7 +104,7 @@ const spawn = {
|
|||||||
};
|
};
|
||||||
me.onDamage = function() {};
|
me.onDamage = function() {};
|
||||||
me.cycle = 420;
|
me.cycle = 420;
|
||||||
me.endCycle = 720;
|
me.endCycle = 780;
|
||||||
me.mode = 0;
|
me.mode = 0;
|
||||||
me.do = function() {
|
me.do = function() {
|
||||||
Matter.Body.setPosition(this, { //hold position
|
Matter.Body.setPosition(this, { //hold position
|
||||||
@@ -173,7 +173,7 @@ const spawn = {
|
|||||||
this.modeSuck()
|
this.modeSuck()
|
||||||
this.modeLasers()
|
this.modeLasers()
|
||||||
}
|
}
|
||||||
me.spawnInterval = 362
|
me.spawnInterval = 395
|
||||||
me.modeSpawns = function() {
|
me.modeSpawns = function() {
|
||||||
if (!(this.cycle % this.spawnInterval) && !mech.isBodiesAsleep && mob.length < 40) {
|
if (!(this.cycle % this.spawnInterval) && !mech.isBodiesAsleep && mob.length < 40) {
|
||||||
if (this.mode !== 3) Matter.Body.setAngularVelocity(this, 0.1)
|
if (this.mode !== 3) Matter.Body.setAngularVelocity(this, 0.1)
|
||||||
|
|||||||
38
todo.txt
38
todo.txt
@@ -1,15 +1,14 @@
|
|||||||
*********** NEXT PATCH ***********
|
*********** NEXT PATCH ***********
|
||||||
|
you can see your build while in the power up selection menu
|
||||||
|
balance - metamaterial cloaking field gives 111% more damage (up from 66%)
|
||||||
|
|
||||||
balance: mod capacitor - gives 1% damage for every 7% energy (was 5.5%)
|
mod: Newton's 1st law - harm reduction when moving fast (thanks NoHaxJustPi)
|
||||||
some fixes on community level detour
|
mod: Newton's 2nd law - damage increase while moving fast
|
||||||
added a once every 7 second check to try to undo the crouch bug
|
|
||||||
(I have no idea how to crouch bug is happening, so I can't even test this fix)
|
|
||||||
|
|
||||||
mod: slow light propagation - laser is divided into your past, and increase total damage by 200%
|
|
||||||
let me know about balance (is this too strong or too weak)
|
|
||||||
|
|
||||||
************** BUGS **************
|
************** BUGS **************
|
||||||
|
|
||||||
|
(always) make it so that when you are immune to harm you can either jump on mobs or you pass through them
|
||||||
|
|
||||||
(4+ reports before potential fix) bug - crouch and worm hole? -> crouch locked in
|
(4+ reports before potential fix) bug - crouch and worm hole? -> crouch locked in
|
||||||
players have extra gravity
|
players have extra gravity
|
||||||
might be from the short jump code
|
might be from the short jump code
|
||||||
@@ -25,11 +24,17 @@ mod: slow light propagation - laser is divided into your past, and increase tota
|
|||||||
|
|
||||||
|
|
||||||
************** TODO **************
|
************** TODO **************
|
||||||
mod - if you take damage and you have full energy remove your energy and go back in time 1 second
|
|
||||||
for time dilation field?
|
time dilation - slow down the game engine by 1/2, but run an extra player cycle to simulate slow motion
|
||||||
check to see if your previous location is clear or mobs, blocks
|
|
||||||
go back proportional to your energy
|
flavor - your bullets destroy blocks
|
||||||
pause game, switch the game.loop to cycle backwards in player position until energy runs out
|
this isn't really a bonus, so maybe just add this as flavor to another mod/field
|
||||||
|
|
||||||
|
mod - if you take damage and you have full energy remove your energy and go back in time 1 second
|
||||||
|
for time dilation field?
|
||||||
|
check to see if your previous location is clear or mobs, blocks
|
||||||
|
go back proportional to your energy
|
||||||
|
pause game, switch the game.loop to cycle backwards in player position until energy runs out
|
||||||
|
|
||||||
mod plasma : plasma length increases then decreases as you hold down the field button (like stabbing with a spear)
|
mod plasma : plasma length increases then decreases as you hold down the field button (like stabbing with a spear)
|
||||||
grows to 1.5 longer after 0.3 seconds, then returns to normal length over 1 second, until field is pressed again
|
grows to 1.5 longer after 0.3 seconds, then returns to normal length over 1 second, until field is pressed again
|
||||||
@@ -47,12 +52,8 @@ mod laser history
|
|||||||
or double thickness beam
|
or double thickness beam
|
||||||
|
|
||||||
technology - player data logging
|
technology - player data logging
|
||||||
|
|
||||||
mod/field - pressing field while crouched sends the player back in time
|
mod/field - pressing field while crouched sends the player back in time
|
||||||
mod for time dilation?
|
mod for time dilation?
|
||||||
mod - When you fire your laser also fire from where you were 1/2 a second in the past
|
|
||||||
stacking mod each stack produces another laser from farther in the past
|
|
||||||
drains extra energy
|
|
||||||
could be used in mob targeting
|
could be used in mob targeting
|
||||||
build a new type of attraction for mobs
|
build a new type of attraction for mobs
|
||||||
if mobs can't see player, they check to see if they can see where the player was in the history
|
if mobs can't see player, they check to see if they can see where the player was in the history
|
||||||
@@ -66,8 +67,6 @@ using a reroll gives 3 options for mods, and 3 options for guns/fields/mods
|
|||||||
adjust css to make 2 columns of 3
|
adjust css to make 2 columns of 3
|
||||||
can't use with cardinality
|
can't use with cardinality
|
||||||
|
|
||||||
Laser mod: For each reflection of laser, damage increases by 10%
|
|
||||||
|
|
||||||
new power up - increase damage and fire speed, for 15 seconds
|
new power up - increase damage and fire speed, for 15 seconds
|
||||||
named boost?
|
named boost?
|
||||||
enabled by a mod?
|
enabled by a mod?
|
||||||
@@ -93,9 +92,6 @@ add an ending to the game
|
|||||||
Mod: "Solar Power": Energy regeneration is doubled while standing still
|
Mod: "Solar Power": Energy regeneration is doubled while standing still
|
||||||
run in the 1 second check
|
run in the 1 second check
|
||||||
|
|
||||||
mod: take less harm if you are in the air
|
|
||||||
require squirrel cage rotor
|
|
||||||
|
|
||||||
mechanic - remove a random mod as a condition for picking up a really good mod
|
mechanic - remove a random mod as a condition for picking up a really good mod
|
||||||
|
|
||||||
mechanic - do something for 2 seconds after firing
|
mechanic - do something for 2 seconds after firing
|
||||||
|
|||||||
Reference in New Issue
Block a user