added game info in pause
This commit is contained in:
@@ -511,7 +511,7 @@ const b = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "entanglement",
|
name: "entanglement",
|
||||||
description: "<strong>10%</strong> less <strong>harm</strong> for each gun in your <strong>inventory</strong><br> while your <strong>first gun</strong> is equipped",
|
description: "<strong>13%</strong> less <strong>harm</strong> for each gun in your <strong>inventory</strong><br> while your <strong>first gun</strong> is equipped",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -1047,7 +1047,7 @@ const b = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "specular reflection",
|
name: "specular reflection",
|
||||||
description: "the <strong>laser</strong> gains <strong>+1</strong> reflection<br><strong>+33%</strong> laser <strong class='color-d'>damage</strong> and <strong class='color-f'>energy</strong> drain",
|
description: "the <strong>laser</strong> gains <strong>+1</strong> reflection<br><strong>+50%</strong> laser <strong class='color-d'>damage</strong> and <strong class='color-f'>energy</strong> drain",
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -1056,8 +1056,8 @@ const b = {
|
|||||||
requires: "laser",
|
requires: "laser",
|
||||||
effect() {
|
effect() {
|
||||||
b.modLaserReflections++;
|
b.modLaserReflections++;
|
||||||
b.modLaserDamage += 0.02; //base is 0.05
|
b.modLaserDamage += 0.025; //base is 0.05
|
||||||
b.modLaserFieldDrain += 0.0006 //base is 0.002
|
b.modLaserFieldDrain += 0.001 //base is 0.002
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
b.modLaserReflections = 2;
|
b.modLaserReflections = 2;
|
||||||
@@ -1103,9 +1103,9 @@ const b = {
|
|||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return mech.fieldUpgrades[mech.fieldMode].name === "standing wave harmonics" || mech.fieldUpgrades[mech.fieldMode].name === "diamagnetic field"
|
return mech.fieldUpgrades[mech.fieldMode].name === "standing wave harmonics" || mech.fieldUpgrades[mech.fieldMode].name === "perfect diamagnetism"
|
||||||
},
|
},
|
||||||
requires: "standing wave harmonics<br>or diamagnetic field",
|
requires: "standing wave harmonics<br>or perfect diamagnetism",
|
||||||
effect() {
|
effect() {
|
||||||
b.modBlockDmg += 0.6 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
|
b.modBlockDmg += 0.6 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
|
||||||
},
|
},
|
||||||
|
|||||||
12
js/index.js
12
js/index.js
@@ -19,7 +19,17 @@ const build = {
|
|||||||
let text = `
|
let text = `
|
||||||
<div class="pause-grid-module">
|
<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;">
|
||||||
|
level: ${level.levelsCleared} - ${level.levels[level.onLevel]} (${level.difficultyText()})
|
||||||
|
<br>${mob.length} mobs, ${body.length} blocks, ${bullet.length} bullets, ${powerUp.length} power ups
|
||||||
|
<br>mouse: (${game.mouseInGame.x.toFixed(1)}, ${game.mouseInGame.y.toFixed(1)}) ${mech.cycle} cycles
|
||||||
|
<br>
|
||||||
|
<br>health: ${(mech.health*100).toFixed(0)}% energy: ${(mech.energy*100).toFixed(0)}% mass: ${player.mass.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)})
|
||||||
|
</div>
|
||||||
|
|
||||||
|
`;
|
||||||
// <div class="pause-grid-module" style="display: flex; justify-content: space-between;padding-bottom:20px;">
|
// <div class="pause-grid-module" style="display: flex; justify-content: space-between;padding-bottom:20px;">
|
||||||
// <span>${game.SVGleftMouse} fire gun</span>
|
// <span>${game.SVGleftMouse} fire gun</span>
|
||||||
// <span>${game.SVGrightMouse} use field</span>
|
// <span>${game.SVGrightMouse} use field</span>
|
||||||
|
|||||||
16
js/level.js
16
js/level.js
@@ -15,7 +15,7 @@ const level = {
|
|||||||
if (level.levelsCleared === 0) {
|
if (level.levelsCleared === 0) {
|
||||||
// level.difficultyIncrease(9)
|
// level.difficultyIncrease(9)
|
||||||
// b.giveGuns("mine")
|
// b.giveGuns("mine")
|
||||||
mech.setField("perfect diamagnetism")
|
// mech.setField("perfect diamagnetism")
|
||||||
// b.giveMod("irradiated needles");
|
// b.giveMod("irradiated needles");
|
||||||
// b.giveMod("reflective cavity");
|
// b.giveMod("reflective cavity");
|
||||||
|
|
||||||
@@ -72,18 +72,20 @@ const level = {
|
|||||||
if (game.difficulty < 1) game.difficulty = 0;
|
if (game.difficulty < 1) game.difficulty = 0;
|
||||||
game.healScale = 1 / (1 + game.difficulty * 0.09)
|
game.healScale = 1 / (1 + game.difficulty * 0.09)
|
||||||
},
|
},
|
||||||
levelAnnounce() {
|
difficultyText() {
|
||||||
let mode = document.getElementById("difficulty-select").value
|
let mode = document.getElementById("difficulty-select").value
|
||||||
if (mode === "0") {
|
if (mode === "0") {
|
||||||
mode = "(easy)"
|
return "easy"
|
||||||
} else if (mode === "1") {
|
} else if (mode === "1") {
|
||||||
mode = "(normal)"
|
return "normal"
|
||||||
} else if (mode === "2") {
|
} else if (mode === "2") {
|
||||||
mode = "(hard)"
|
return "hard"
|
||||||
} else if (mode === "4") {
|
} else if (mode === "4") {
|
||||||
mode = "(why)"
|
return "why"
|
||||||
}
|
}
|
||||||
document.title = "n-gon: L" + (level.levelsCleared) + " " + level.levels[level.onLevel] + " " + mode;
|
},
|
||||||
|
levelAnnounce() {
|
||||||
|
document.title = "n-gon: L" + (level.levelsCleared) + " " + level.levels[level.onLevel] + " (" + level.difficultyText() + ")";
|
||||||
},
|
},
|
||||||
//******************************************************************************************************************
|
//******************************************************************************************************************
|
||||||
//******************************************************************************************************************
|
//******************************************************************************************************************
|
||||||
|
|||||||
10
js/player.js
10
js/player.js
@@ -461,7 +461,7 @@ const mech = {
|
|||||||
dmg *= mech.fieldDamageResistance
|
dmg *= mech.fieldDamageResistance
|
||||||
if (b.isModEntanglement && b.inventory[0] === b.activeGun) {
|
if (b.isModEntanglement && b.inventory[0] === b.activeGun) {
|
||||||
for (let i = 0, len = b.inventory.length; i < len; i++) {
|
for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||||
dmg *= 0.9
|
dmg *= 0.87 // 1 - 0.13
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mech.health -= dmg;
|
mech.health -= dmg;
|
||||||
@@ -792,7 +792,7 @@ const mech = {
|
|||||||
if (keys[32] || game.mouseDownRight) {
|
if (keys[32] || game.mouseDownRight) {
|
||||||
if (mech.energy > 0.0007) {
|
if (mech.energy > 0.0007) {
|
||||||
mech.energy -= 0.0007;
|
mech.energy -= 0.0007;
|
||||||
mech.throwCharge += 1 / mech.holdingTarget.mass * b.modThrowChargeRate
|
mech.throwCharge += 0.5 * b.modThrowChargeRate / mech.holdingTarget.mass
|
||||||
//draw charge
|
//draw charge
|
||||||
const x = mech.pos.x + 15 * Math.cos(mech.angle);
|
const x = mech.pos.x + 15 * Math.cos(mech.angle);
|
||||||
const y = mech.pos.y + 15 * Math.sin(mech.angle);
|
const y = mech.pos.y + 15 * Math.sin(mech.angle);
|
||||||
@@ -910,9 +910,9 @@ const mech = {
|
|||||||
ctx.lineWidth = 2.5 - 1.5 * wave;
|
ctx.lineWidth = 2.5 - 1.5 * wave;
|
||||||
ctx.lineCap = "butt"
|
ctx.lineCap = "butt"
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
let eye = 13;
|
let eye = 20;
|
||||||
const curve = 0.6 + 0.08 * wave
|
const curve = 0.5 + 0.06 * wave
|
||||||
let aMag = (1 - curve) * Math.PI * mech.fieldArc
|
let aMag = (1 - curve * 1.2) * Math.PI * mech.fieldArc
|
||||||
let a = mech.angle + aMag
|
let a = mech.angle + aMag
|
||||||
let cp1x = mech.pos.x + curve * range * Math.cos(a)
|
let cp1x = mech.pos.x + curve * range * Math.cos(a)
|
||||||
let cp1y = mech.pos.y + curve * range * Math.sin(a)
|
let cp1y = mech.pos.y + curve * range * Math.sin(a)
|
||||||
|
|||||||
3
todo.txt
3
todo.txt
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
************** TODO - n-gon **************
|
************** TODO - n-gon **************
|
||||||
|
|
||||||
|
gun or mod - drones that only last for 2 seconds
|
||||||
|
|
||||||
field - the basic field emitter, but no energy loss and no knock back on blocks
|
field - the basic field emitter, but no energy loss and no knock back on blocks
|
||||||
this field should make blocking a viable strategy
|
this field should make blocking a viable strategy
|
||||||
gain energy on blocking?
|
gain energy on blocking?
|
||||||
@@ -69,6 +71,7 @@ lore - a robot (the player) gains self awareness
|
|||||||
final mod is "this is just a simulation"
|
final mod is "this is just a simulation"
|
||||||
you get immortality and Infinity damage
|
you get immortality and Infinity damage
|
||||||
the next level is the final level
|
the next level is the final level
|
||||||
|
when you die with Quantum Immortality there is a chance of lore text
|
||||||
|
|
||||||
atmosphere levels: change the pace, give the user a rest between combat
|
atmosphere levels: change the pace, give the user a rest between combat
|
||||||
low or no combat, but more graphics
|
low or no combat, but more graphics
|
||||||
|
|||||||
Reference in New Issue
Block a user