diff --git a/index.html b/index.html index b943379..bd41ecc 100644 --- a/index.html +++ b/index.html @@ -87,45 +87,47 @@ -->
- + + + + builds + + - +
about
-
- - -
- - -
- - -
-

- @@ -183,11 +185,11 @@ Github hosts the source code for n-gon.
It's written in JavaScript, CSS, and HTML. -
+ diff --git a/js/bullets.js b/js/bullets.js index a528fd2..e6f643c 100644 --- a/js/bullets.js +++ b/js/bullets.js @@ -57,7 +57,7 @@ const b = { }, mods: [{ name: "depleted uranium rounds", - description: "your bullets are 10% larger
increased momentum and physical damage", + description: "your bullets are 10% larger
increased mass and physical damage", have: false, //0 effect: () => { //good for guns that do mostly projectile damage: @@ -224,7 +224,7 @@ const b = { }, { name: "monogamy", - description: "using your first gun reduces damage taken
scales by 7% for each gun in your inventory", + description: "using your first gun reduces damage taken
scales by 7% for each gun in your inventory", have: false, //20 effect: () => { // good with long term planning b.isModMonogamy = true @@ -943,7 +943,7 @@ const b = { } }, { name: "wave beam", //3 - description: "fire a stream of oscillating particles
bullets propagate through solids", + description: "emit a sine wave of oscillating particles
particles propagate through walls", ammo: 0, ammoPack: 85, have: false, @@ -1192,7 +1192,7 @@ const b = { } }, { name: "flak", //8 - description: "fire a cluster of short range projectiles
explode on contact or after half a second", + description: "fire a cluster of short range projectiles
explodes on contact or after half a second", ammo: 0, ammoPack: 20, have: false, diff --git a/js/game.js b/js/game.js index 915fc36..467fa18 100644 --- a/js/game.js +++ b/js/game.js @@ -457,7 +457,7 @@ const game = { document.getElementById("controls").style.display = "inline"; document.getElementById("build-button").style.display = "inline" isShowingBuilds = false - // document.getElementById("settings").style.display = "inline"; + document.getElementById("settings").style.display = "inline"; document.getElementById("splash").style.display = "inline"; document.getElementById("dmg").style.display = "none"; document.getElementById("health-bg").style.display = "none"; @@ -470,6 +470,7 @@ const game = { document.body.style.overflow = "hidden" document.getElementById("build-grid").style.display = "none" document.getElementById("controls").style.display = "none"; + document.getElementById("settings").style.display = "none"; document.getElementById("build-button").style.display = "none"; document.getElementById("splash").onclick = null; //removes the onclick effect so the function only runs once document.getElementById("splash").style.display = "none"; //hides the element that spawned the function diff --git a/js/index.js b/js/index.js index 459ab33..97f865f 100644 --- a/js/index.js +++ b/js/index.js @@ -168,12 +168,14 @@ const build = { } document.getElementById("build-button").addEventListener("click", () => { + document.getElementById("build-button").style.display = "none"; const el = document.getElementById("build-grid") if (build.isShowingBuilds) { el.style.display = "none" build.isShowingBuilds = false document.body.style.overflow = "hidden" document.getElementById("controls").style.display = 'inline' + document.getElementById("settings").style.display = 'inline' } else { build.list = [] let text = '

choose up to 5 powers

' @@ -192,6 +194,7 @@ document.getElementById("build-button").addEventListener("click", () => { document.body.style.overflowY = "scroll"; document.body.style.overflowX = "hidden"; document.getElementById("controls").style.display = 'none' + document.getElementById("settings").style.display = 'none' } }); diff --git a/js/player.js b/js/player.js index 18f87e9..11b80b6 100644 --- a/js/player.js +++ b/js/player.js @@ -1133,7 +1133,7 @@ const mech = { }, { name: "plasma torch", - description: "use energy to emit damaging beam
decreasedshield range and efficiency", + description: "use energy to emit damaging plasma
decreasedshield range and efficiency", effect: () => { mech.fieldMode = 2; mech.fieldText(); diff --git a/js/powerups.js b/js/powerups.js index b1e5cab..892acb9 100644 --- a/js/powerups.js +++ b/js/powerups.js @@ -45,8 +45,8 @@ const powerUps = { if (!game.lastLogTime) game.makeTextLog("+energy", 300); } else { //ammo given scales as mobs take more hits to kill - let ammo = Math.ceil((target.ammoPack * (0.4 + 0.05 * Math.random())) / b.dmgScale); - if (level.isBuildRun) ammo *= 2 + let ammo = Math.ceil((target.ammoPack * (0.45 + 0.06 * Math.random())) / Math.sqrt(b.dmgScale)); + if (level.isBuildRun) ammo = Math.floor(ammo * 1.2) target.ammo += ammo; game.updateGunHUD(); game.makeTextLog("
  +" + ammo + " ammo for " + target.name + "", 300); diff --git a/style.css b/style.css index 99e1002..58b5145 100644 --- a/style.css +++ b/style.css @@ -43,12 +43,21 @@ summary { font-size: 1.2em; } +.SVG-button { + border: 2px #333 solid; + border-radius: 9px; +} + +.SVG-button:hover { + background-color: #eee; +} + #build-button { - position: sticky; - bottom: 0px; - right: 1px; + + position: absolute; + top: 3px; + right: 3px; z-index: 12; - font-size: 1.3em; } #build-grid { @@ -84,7 +93,7 @@ summary { } .build-grid-module:hover { - background-color: #fff; + background-color: #eee; } .gun-module { @@ -107,15 +116,20 @@ summary { z-index: 12; font-size: 1.3em; } */ +#settings { + position: absolute; + bottom: 0px; + right: 1px; + z-index: 12; + font-size: 1.5em; +} #controls { position: absolute; bottom: 0px; left: 1px; z-index: 12; - font-size: 1.3em; - /* background-color: #ccc; */ - /* border-radius: 5px; */ + font-size: 1.5em; } #details-div { @@ -274,7 +288,7 @@ em { } .color-f { - color: #0cf; + color: #0ad; letter-spacing: 1px; } @@ -284,19 +298,19 @@ em { } .color-h { - color: #0c8; + color: #0b7; letter-spacing: 1px; } .color-e { - color: #e50; + color: #d60; letter-spacing: 1px; } .color-s { - color: #066; + color: #055; font-weight: 900; - letter-spacing: 1px; + letter-spacing: 2px; } .faded {
FIRE