diff --git a/js/bullets.js b/js/bullets.js index 8c24786..fdcd544 100644 --- a/js/bullets.js +++ b/js/bullets.js @@ -1234,14 +1234,12 @@ const b = { game.updateGunHUD(); } } else { - if (b.isModAmmoFromHealth && mech.health > b.isModAmmoFromHealth) { mech.damage(b.isModAmmoFromHealth * mech.health); powerUps.spawn(mech.pos.x, mech.pos.y, "ammo"); if (Math.random() < b.isModBayesian) powerUps.spawn(mech.pos.x, mech.pos.y, "ammo"); } mech.fireCDcycle = mech.cycle + 30; //fire cooldown - // game.makeTextLog("
Q, E, and mouse wheel change weapons
", 200); } @@ -1264,7 +1262,6 @@ const b = { } } } - //draw ctx.beginPath(); for (let i = 0, len = bullet.length; i < len; i++) { @@ -2084,11 +2081,10 @@ const b = { if (gun === b.guns[i].name) gun = i } } - if (!b.guns[gun].have) b.inventory.push(gun); - if (b.activeGun === null) b.activeGun = gun //if no active gun switch to new gun b.guns[gun].have = true; b.guns[gun].ammo = Math.floor(b.guns[gun].ammoPack * ammoPacks); + if (b.activeGun === null) b.activeGun = gun //if no active gun switch to new gun } game.makeGunHUD(); }, diff --git a/js/player.js b/js/player.js index 7ce8e08..3989b27 100644 --- a/js/player.js +++ b/js/player.js @@ -895,7 +895,7 @@ const mech = { ctx.stroke(); }, grabPowerUp() { //look for power ups to grab with field - const grabPowerUpRange2 = (mech.fieldRange + 220) * (mech.fieldRange + 220) + const grabPowerUpRange2 = 156000 //(mech.fieldRange + 220) * (mech.fieldRange + 220) for (let i = 0, len = powerUp.length; i < len; ++i) { const dxP = mech.pos.x - powerUp[i].position.x; const dyP = mech.pos.y - powerUp[i].position.y; @@ -1024,11 +1024,11 @@ const mech = { // } // } // }, - lookForPickUp(range = mech.fieldRange) { //find body to pickup + lookForPickUp() { //find body to pickup mech.energy -= mech.fieldRegen; const grabbing = { targetIndex: null, - targetRange: range, + targetRange: 150, // lookingAt: false //false to pick up object in range, but not looking at }; for (let i = 0, len = body.length; i < len; ++i) { diff --git a/todo.txt b/todo.txt index f317321..26f15ae 100644 --- a/todo.txt +++ b/todo.txt @@ -1,5 +1,9 @@ ************** TODO - n-gon ************** +consider using the "e" key for picking up blocks and just q for gun swaps + good for: plasma torch, time dilation, negative mass + bad for: basic, nano-scale, harmonic + mod - status effects last 1 second longer wait until you have more status effects written