scroll menus
shotgun balance ice-shot: less spread, higher damage, more crystals needle-shot: more needles, higher damage, less spread foam-shot: 1 more bubble power up selection and pause menu elements scroll individually now it looks great on my computer, but different operating systems and browsers are unpredictable let me know if text is hidden or if it doesn't scroll for you and what OS and browser you're on
This commit is contained in:
@@ -202,9 +202,7 @@
|
||||
<div>
|
||||
<details id="updates">
|
||||
<summary>updates</summary>
|
||||
<div id="updates-div" class="details-div" style="font-size: 70%;height: 400px;overflow: scroll;max-width: 450px;">
|
||||
|
||||
</div>
|
||||
<div id="updates-div" class="details-div" style="font-size: 70%;height: 400px;overflow: scroll;max-width: 450px;"></div>
|
||||
</details>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
18
js/bullet.js
18
js/bullet.js
@@ -2057,7 +2057,7 @@ const b = {
|
||||
friction: 0,
|
||||
frictionAir: 0.023,
|
||||
restitution: 0.9,
|
||||
dmg: 0.5, //damage done in addition to the damage from momentum
|
||||
dmg: 0.55, //damage done in addition to the damage from momentum
|
||||
lookFrequency: 14 + Math.floor(8 * Math.random()),
|
||||
endCycle: simulation.cycle + 150 * tech.isBulletsLastLonger + Math.floor(25 * Math.random()),
|
||||
classType: "bullet",
|
||||
@@ -2781,7 +2781,7 @@ const b = {
|
||||
if (tech.isNailRadiation) {
|
||||
mobs.statusDoT(who, tech.isFastRadiation ? 12 : 3, tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles
|
||||
} else {
|
||||
let dmg = b.dmgScale * 5.5
|
||||
let dmg = b.dmgScale * 6
|
||||
if (tech.isCrit && who.isStunned) dmg *= 4
|
||||
who.damage(dmg, tech.isNeedleShieldPierce);
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
@@ -3775,8 +3775,8 @@ const b = {
|
||||
name: "shotgun",
|
||||
description: "fire a wide <strong>burst</strong> of short range <strong> bullets</strong>",
|
||||
ammo: 0,
|
||||
ammoPack: 5,
|
||||
defaultAmmoPack: 5,
|
||||
ammoPack: 4.5,
|
||||
defaultAmmoPack: 4.5,
|
||||
have: false,
|
||||
do() {},
|
||||
fire() {
|
||||
@@ -3933,10 +3933,10 @@ const b = {
|
||||
});
|
||||
}
|
||||
} else if (tech.isIceShot) {
|
||||
const spread = (m.crouch ? 0.6 : 1.6)
|
||||
for (let i = 0, len = 16 * (tech.isShotgunReversed ? 1.6 : 1); i < len; i++) {
|
||||
const spread = (m.crouch ? 0.7 : 1.2)
|
||||
for (let i = 0, len = 18 * (tech.isShotgunReversed ? 1.6 : 1); i < len; i++) {
|
||||
// iceIX(speed = 0, dir = m.angle + Math.PI * 2 * Math.random(), where = { x: m.pos.x + 30 * Math.cos(m.angle), y: m.pos.y + 30 * Math.sin(m.angle) }) {
|
||||
b.iceIX(14 + 30 * Math.random(), m.angle + spread * (Math.random() - 0.5))
|
||||
b.iceIX(25 + 32 * Math.random(), m.angle + spread * (Math.random() - 0.5))
|
||||
}
|
||||
} else if (tech.isFoamShot) {
|
||||
const spread = (m.crouch ? 0.35 : 0.7)
|
||||
@@ -3944,7 +3944,7 @@ const b = {
|
||||
x: m.pos.x + 25 * Math.cos(m.angle),
|
||||
y: m.pos.y + 25 * Math.sin(m.angle)
|
||||
}
|
||||
const number = 14 * (tech.isShotgunReversed ? 1.6 : 1)
|
||||
const number = 13 * (tech.isShotgunReversed ? 1.6 : 1)
|
||||
for (let i = 0; i < number; i++) {
|
||||
const SPEED = 25 + 12 * Math.random();
|
||||
const angle = m.angle + spread * (Math.random() - 0.5)
|
||||
@@ -3952,7 +3952,7 @@ const b = {
|
||||
}
|
||||
} else if (tech.isNeedleShot) {
|
||||
const number = 12 * (tech.isShotgunReversed ? 1.6 : 1)
|
||||
const spread = (m.crouch ? 0.04 : 0.08)
|
||||
const spread = (m.crouch ? 0.03 : 0.05)
|
||||
let angle = m.angle - (number - 1) * spread * 0.5
|
||||
for (let i = 0; i < number; i++) {
|
||||
b.needle(angle)
|
||||
|
||||
10
js/index.js
10
js/index.js
@@ -264,13 +264,13 @@ const build = {
|
||||
el = document.getElementById("pause-grid-right")
|
||||
el.style.display = "grid"
|
||||
el.innerHTML = text
|
||||
if (countTech > 5 || b.inventory.length > 6) {
|
||||
document.body.style.overflowY = "scroll";
|
||||
document.body.style.overflowX = "hidden";
|
||||
}
|
||||
// if (countTech > 5 || b.inventory.length > 6) {
|
||||
// document.body.style.overflowY = "scroll";
|
||||
// document.body.style.overflowX = "hidden";
|
||||
// }
|
||||
},
|
||||
unPauseGrid() {
|
||||
document.body.style.overflow = "hidden"
|
||||
// document.body.style.overflow = "hidden"
|
||||
document.getElementById("pause-grid-left").style.display = "none"
|
||||
document.getElementById("pause-grid-right").style.display = "none"
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
@@ -25,10 +25,10 @@ const level = {
|
||||
// tech.giveTech("causality bombs")
|
||||
// b.giveGuns("wave beam")
|
||||
// tech.giveTech("phonon")
|
||||
// tech.giveTech("bound state")
|
||||
// tech.giveTech("cardinality")
|
||||
// tech.giveTech("isotropic radiator")
|
||||
// for (let i = 0; i < 9; i++) tech.giveTech("spherical harmonics")
|
||||
// for (let i = 0; i < 3; i++) tech.giveTech("packet length")
|
||||
// for (let i = 0; i < 4; i++) tech.giveTech()
|
||||
|
||||
level.intro(); //starting level
|
||||
// level.testing(); //not in rotation, used for testing
|
||||
|
||||
@@ -643,7 +643,7 @@ const m = {
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
||||
for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
||||
m.energy = m.maxEnergy
|
||||
if (m.immuneCycle < m.cycle + 360) m.immuneCycle = m.cycle + 360 //disable this.immuneCycle bonus seconds
|
||||
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
||||
simulation.wipe = function() { //set wipe to have trails
|
||||
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
@@ -672,7 +672,7 @@ const m = {
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
|
||||
<br>${powerUps.research.count}`)
|
||||
for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
||||
if (m.immuneCycle < m.cycle + 360) m.immuneCycle = m.cycle + 360 //disable this.immuneCycle bonus seconds
|
||||
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
||||
simulation.wipe = function() { //set wipe to have trails
|
||||
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
@@ -160,10 +160,10 @@ const powerUps = {
|
||||
document.getElementById("choose-grid").style.transitionDuration = "0s";
|
||||
}, 500);
|
||||
|
||||
if (tech.isExtraChoice) {
|
||||
document.body.style.overflowY = "scroll";
|
||||
document.body.style.overflowX = "hidden";
|
||||
}
|
||||
// if (tech.isExtraChoice) {
|
||||
// document.body.style.overflowY = "scroll";
|
||||
// document.body.style.overflowX = "hidden";
|
||||
// }
|
||||
simulation.paused = true;
|
||||
simulation.isChoosing = true; //stops p from un pausing on key down
|
||||
build.pauseGrid(true)
|
||||
@@ -206,7 +206,7 @@ const powerUps = {
|
||||
document.getElementById("choose-background").style.opacity = "0"
|
||||
|
||||
document.body.style.cursor = "none";
|
||||
document.body.style.overflow = "hidden"
|
||||
// document.body.style.overflow = "hidden"
|
||||
simulation.paused = false;
|
||||
simulation.isChoosing = false; //stops p from un pausing on key down
|
||||
if (m.immuneCycle < m.cycle + tech.collisionImmuneCycles) m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if (index === 'random') {
|
||||
let options = [];
|
||||
for (let i = 0; i < tech.tech.length; i++) {
|
||||
if (tech.tech[i].count < tech.tech[i].maxCount && tech.tech[i].allowed() && !tech.tech[i].isJunk && !tech.tech[i].isLore) options.push(i);
|
||||
if (tech.tech[i].count < tech.tech[i].maxCount && tech.tech[i].allowed() && !tech.tech[i].isJunk && !tech.tech[i].isLore && !tech.tech[i].isBadRandomOption) options.push(i);
|
||||
}
|
||||
// give a random tech from the tech I don't have
|
||||
if (options.length > 0) {
|
||||
@@ -3826,7 +3826,7 @@
|
||||
},
|
||||
{
|
||||
name: "foam-shot",
|
||||
description: "the <strong>shotgun</strong> fires <strong>14</strong> <strong>foam</strong> bubbles",
|
||||
description: "the <strong>shotgun</strong> fires <strong>13</strong> <strong>foam</strong> bubbles",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -3845,7 +3845,7 @@
|
||||
},
|
||||
{
|
||||
name: "ice-shot",
|
||||
description: "the <strong>shotgun</strong> fires <strong>16</strong> <strong class='color-s'>ice IX</strong> crystals",
|
||||
description: "the <strong>shotgun</strong> fires <strong>18</strong> <strong class='color-s'>ice IX</strong> crystals",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
|
||||
38
style.css
38
style.css
@@ -5,7 +5,7 @@
|
||||
body {
|
||||
font-family: "Helvetica", "Arial", sans-serif;
|
||||
margin: 0;
|
||||
/* overflow: hidden; */
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
user-select: none;
|
||||
cursor: auto;
|
||||
@@ -123,19 +123,6 @@ summary {
|
||||
z-index: 12;
|
||||
}
|
||||
|
||||
#choose-background {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #ccc;
|
||||
/* opacity: 0.6; */
|
||||
/* display: none; */
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s linear;
|
||||
}
|
||||
|
||||
#construct {
|
||||
display: none;
|
||||
position: absolute;
|
||||
@@ -152,6 +139,19 @@ summary {
|
||||
border: 1px #333 solid;
|
||||
}
|
||||
|
||||
#choose-background {
|
||||
position: absolute;
|
||||
z-index: 3;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #ccc;
|
||||
/* opacity: 0.6; */
|
||||
/* display: none; */
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s linear;
|
||||
}
|
||||
|
||||
#choose-grid {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@@ -172,6 +172,9 @@ summary {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition: opacity 0.25s linear;
|
||||
align-content: start;
|
||||
max-height: 100vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.choose-grid-module {
|
||||
@@ -207,7 +210,8 @@ summary {
|
||||
/* grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); */
|
||||
grid-auto-rows: minmax(auto, auto);
|
||||
grid-gap: 0px;
|
||||
align-content: space-between;
|
||||
align-content: start;
|
||||
/* align-content: space-between; */
|
||||
|
||||
z-index: 2;
|
||||
font-size: 1.3em;
|
||||
@@ -216,11 +220,15 @@ summary {
|
||||
#pause-grid-right {
|
||||
justify-content: end;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
#pause-grid-left {
|
||||
justify-content: start;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.pause-grid-module {
|
||||
|
||||
25
todo.txt
25
todo.txt
@@ -1,27 +1,16 @@
|
||||
******************************************************** NEXT PATCH ********************************************************
|
||||
|
||||
shotgun techs:
|
||||
(I haven't done enough testing so let me know if these different shotgun modes aren't balanced)
|
||||
worm shot
|
||||
ice-IX shot
|
||||
foam shot
|
||||
needle shot
|
||||
shotgun balance
|
||||
ice-shot: less spread, higher damage, more crystals
|
||||
needle-shot: more needles, higher damage, less spread
|
||||
foam-shot: 1 more bubble
|
||||
|
||||
foam lasts much longer on shielded mobs
|
||||
overall foam damage is reduced about 8%
|
||||
|
||||
attacks that drain energy don't work when the player is immune to harm
|
||||
slime, radiation fields, black holes
|
||||
energy regen that consumes something (ammo, blocks, power ups) now works when immune to harm
|
||||
but passive energy regen is still stopped while you are immune to harm
|
||||
|
||||
pilot wave field can no longer hit intangible mobs with blocks
|
||||
it was too annoying that you can't use blocks to move around so I reverted it back
|
||||
power up selection and pause menu elements scroll individually now
|
||||
it looks great on my computer, but different operating systems and browsers are unpredictable
|
||||
let me know if text is hidden or if it doesn't scroll for you and what OS and browser you're on
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
snake boss tail should shrink in size
|
||||
|
||||
mob that grows or gets a shield when player is near
|
||||
and charges when player is near
|
||||
charge triggers an escape mode
|
||||
|
||||
Reference in New Issue
Block a user