diff --git a/js/bullets.js b/js/bullets.js index 269a687..53929d8 100644 --- a/js/bullets.js +++ b/js/bullets.js @@ -10,7 +10,7 @@ const b = { modBulletSize: null, modEnergySiphon: null, modHealthDrain: null, - modNoAmmoChance: null, + modNoAmmo: null, modBulletsLastLonger: null, setModDefaults() { b.modFireRate = 1; @@ -18,17 +18,16 @@ const b = { b.modBulletSize = 1; b.modEnergySiphon = 0; b.modHealthDrain = 0; - b.modNoAmmoChance = 0; + b.modNoAmmo = 0; b.modBulletsLastLonger = 1; }, mods: [ () => { b.mod = 0; - game.makeTextLog("Auto-Loading Heuristics
(left click)

your rate of fire 20% is faster

", 1200); + game.makeTextLog("Auto-Loading Heuristics
(left click)

your rate of fire 15% is faster

", 1200); b.setModDefaults(); //good for guns with extra ammo: needles, M80, rapid fire, flak, super balls - b.modFireRate = 0.8 + b.modFireRate = 0.85 //ADD: need to add in something that changes game play - //take damage if fire is held down too long? }, () => { b.mod = 1; @@ -40,39 +39,36 @@ const b = { }, () => { b.mod = 2; - game.makeTextLog("High Caliber Bullets
(left click)

your bullets are 8% larger and do more physical damage

", 1200); + game.makeTextLog("High Caliber Bullets
(left click)

your bullets are 7% larger and do more physical damage

", 1200); b.setModDefaults(); //good for guns that do mostly projectile damage: //testing done at 1.15: one shot(+0.38), rapid fire(+0.25), spray, wave beam(+0.4 adds range and dmg), needles(+0.1) //testing at 1.08: spray(point blank)(+0.25), one shot(+0.16), wave beam(point blank)(+0.14) - b.modBulletSize = 1.08; - //ADD: give knock back to all guns, up damage - + b.modBulletSize = 1.07; + //ADD: need to add in something that changes game play }, () => { b.mod = 3; game.makeTextLog("Energy Siphon
(left click)

regenerate energy proportional to your damage done

", 1200); b.setModDefaults(); //good with laser, Nano-Scale Manufacturing, Standing Wave Harmonics, Phase Decoherence Field - b.modEnergySiphon = 0.3; + b.modEnergySiphon = 0.2; }, () => { b.mod = 4; game.makeTextLog("Entropy Transfer
(left click)

heal proportional to your damage done

", 1200); b.setModDefaults(); //good with guns that overkill: one shot, grenade - b.modHealthDrain = 0.015; - //ADD: health power ups can no longer drop + b.modHealthDrain = 0.01; }, () => { b.mod = 5; - game.makeTextLog("Desublimated Ammunition
(left click)

25% chance you will not consume ammo when firing

", 1200); + game.makeTextLog("Desublimated Ammunition
(left click)

1 out of 3 shots will not consume ammo when crouching

", 1200); b.setModDefaults(); //good with guns that have less ammo: one shot, grenades, missiles, super balls, spray - b.modNoAmmoChance = 0.25 - //ADD: only works when crouched, higher chance, maybe 50% + b.modNoAmmo = 1 }, () => { b.mod = 6; - game.makeTextLog("Anti-Decay Coating
(left click)

your bullets last 30% longer

", 1200); + game.makeTextLog("Anti-Decay Coating
(left click)

your bullets last 25% longer

", 1200); b.setModDefaults(); //good with: drones, super balls, spore, missiles, wave beam(range), rapid fire(range), flak(range) - b.modBulletsLastLonger = 1.3 + b.modBulletsLastLonger = 1.25 }, // () => { // b.mod = 7; @@ -109,7 +105,13 @@ const b = { if (b.guns[this.activeGun].ammo > 0) { b.guns[this.activeGun].fire(); - if (!(b.modNoAmmoChance && b.modNoAmmoChance > Math.random())) { + if (b.modNoAmmo && mech.crouch) { + if (b.modNoAmmo % 3) { + b.guns[this.activeGun].ammo--; + game.updateGunHUD(); + } + b.modNoAmmo++ //makes the no ammo toggle off and on + } else { b.guns[this.activeGun].ammo--; game.updateGunHUD(); } diff --git a/js/game.js b/js/game.js index e4cf3b0..c60d35d 100644 --- a/js/game.js +++ b/js/game.js @@ -407,6 +407,7 @@ const game = { game.clearNow = true; document.getElementById("text-log").style.opacity = 0; document.getElementById("fade-out").style.opacity = 0; + document.title = "n-gon"; // mech.fieldUpgrades[0](); //reset to starting field? or let them keep the field if (!mech.fieldMode) mech.fieldUpgrades[0](); //reset to starting field? or let them keep the field }, diff --git a/js/index.js b/js/index.js index 37b509a..3f089e1 100644 --- a/js/index.js +++ b/js/index.js @@ -2,12 +2,7 @@ /* TODO: ******************************************* ***************************************************** -remove tediousness of puzzle mechanics - on highrise - add a block on the platform below the exit on the far right - in the basement, move the two blocks to the left a bit, so they are closer to the left wall player have to get over - on warehouse - only have one block holding the platform down, and put it near the right side to make it faster to push off +when paused show details on field, mods, guns? Find a diegetic way to see player damage (and or field meter too) a health meter, like the field meter above player? (doesn't work with the field meter) @@ -25,12 +20,11 @@ cap mods to 2 cap field to 1 what about no cap to mods? + mods without caps can't have major negatives + do I want to support a power ramping game play? more upgrades are OK as long as they change game play - no flat damage, or defense buffs - - do I want to support a power climb game play - - This makes skipping content a bad idea + no flat damage, or flat defense buffs + This makes skipping content a bad idea for the player Is that maybe good? No need to nerf content skipping buffs content skipping is a cool play style, but not core game play diff --git a/js/level.js b/js/level.js index babff48..3bdc59e 100644 --- a/js/level.js +++ b/js/level.js @@ -11,10 +11,8 @@ const level = { levels: ["skyscrapers", "rooftops", "warehouse", "highrise", "office", "aerie"], onLevel: 0, start() { - // game.zoomScale = 1400 //1400 if (game.levelsCleared === 0) { - document.title = "n-gon"; - // game.levelsCleared = 4; //for testing to simulate possible mobs spawns + // game.levelsCleared = 5; //for testing to simulate possible mobs spawns // b.giveGuns(1) // set a starting gun for testing // b.giveGuns("all", 1000) // mech.fieldUpgrades[1]() //give a field power up for testing @@ -500,12 +498,12 @@ const level = { spawn.bodyRect(3925, -1400, 100, 150, 0.8); spawn.mapRect(3450, -1250, 1100, 50); spawn.mapRect(3450, -1225, 50, 75); - spawn.mapRect(4500, -1225, 50, 350); + spawn.mapRect(4500, -1225, 50, 390); spawn.mapRect(3450, -725, 1500, 50); spawn.mapRect(5100, -725, 400, 50); - spawn.mapRect(4500, -700, 50, 600); + spawn.mapRect(4500, -735, 50, 635); spawn.bodyRect(4510, -100, 30, 100, 0.8); - spawn.mapRect(4500, -925, 100, 50); + spawn.mapRect(4500, -885, 100, 50); spawn.spawnStairs(3800, 0, 3, 150, 206); //stairs top exit spawn.mapRect(3400, -275, 450, 275); //exit platform @@ -870,7 +868,8 @@ const level = { // spawn.debris(-3950, -2575, 1050, 4); //20 debris per level spawn.debris(-2325, -1825, 2400); //20 debris per level - spawn.debris(-2625, -600, 925); //20 debris per level + spawn.debris(-2625, -600, 600, 6); //20 debris per level + spawn.debris(-2000, -60, 1200, 6); //20 debris per level // if (!game.levelsCleared) powerUps.spawn(2450, -1675, "gun", false); //background level.fillBG.push({ @@ -956,10 +955,16 @@ const level = { spawn.mapRect(-1850, -1150, 1050, 175); spawn.bodyRect(-1907, -1600, 550, 25); - spawn.bodyRect(-1400, -125, 125, 125); - spawn.bodyRect(-1100, -125, 150, 125); - spawn.bodyRect(-1360, -200, 75, 75); - spawn.bodyRect(-1200, -75, 75, 75); + if (game.levelsCleared < 4) { + spawn.bodyRect(-1600, -125, 125, 125); + spawn.bodyRect(-1560, -200, 75, 75); + } else { + spawn.bodyRect(-1200, -125, 125, 125); + spawn.bodyRect(-1160, -200, 75, 75); + } + // spawn.bodyRect(-1100, -125, 150, 125); + + // spawn.bodyRect(-1200, -75, 75, 75); //building 2 spawn.mapRect(-4450, -600, 2300, 750); @@ -984,6 +989,9 @@ const level = { spawn.bodyRect(-3715, -2050, 50, 50); spawn.bodyRect(-3570, -1800, 50, 50); spawn.bodyRect(-2970, -2250, 50, 50); + + if (game.levelsCleared < 4) spawn.bodyRect(-3760, -2400, 50, 50); + spawn.bodyRect(-3080, -2250, 40, 40); spawn.bodyRect(-3420, -650, 50, 50); @@ -1098,9 +1106,9 @@ const level = { // spawn.mapRect(-1900, 600, 2700, 100); spawn.mapRect(1100, 0, 150, 1500); spawn.mapRect(-2850, 1400, 4100, 100); - spawn.mapRect(-2375, 875, 1775, 100); - spawn.mapRect(-1450, 950, 75, 346); - spawn.mapRect(-1433, 662, 41, 111); + spawn.mapRect(-2375, 875, 1775, 75); + spawn.mapRect(-1450, 865, 75, 435); + spawn.mapRect(-1450, 662, 75, 100); spawn.bodyRect(-1418, 773, 11, 102, 1, spawn.propsFriction); //blocking path spawn.mapRect(-2950, 1250, 175, 250); spawn.mapRect(-3050, 1100, 150, 400); @@ -1134,8 +1142,8 @@ const level = { length: 1 }); - spawn.bodyRect(-2775, 1150, 180, 160, 1, spawn.propsSlide); //weight - spawn.bodyRect(-2550, 1150, 200, 150, 1, spawn.propsSlide); //weight + spawn.bodyRect(-2700, 1150, 100, 160, 1, spawn.propsSlide); //weight + spawn.bodyRect(-2550, 1150, 200, 100, 1, spawn.propsSlide); //weight spawn.bodyRect(-2775, 1300, 400, 100, 1, spawn.propsHoist); //hoist cons[cons.length] = Constraint.create({ @@ -1156,7 +1164,7 @@ const level = { spawn.bodyRect(-165, -45, 30, 35, 1); spawn.bodyRect(-750, 400, 150, 150, 0.5); - spawn.bodyRect(-200, 1175, 250, 225, 1); //block to get to top path on bottom level + spawn.bodyRect(-400, 1175, 100, 250, 1); //block to get to top path on bottom level // spawn.bodyRect(-1450, 737, 75, 103, 0.5); //blocking path spawn.bodyRect(-2525, -50, 145, 100, 0.5);