block pick up range adjust
This commit is contained in:
@@ -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("<div style='font-size:140%;'>NO AMMO</div><strong class = 'box'>E</strong> / <strong class = 'box'>Q</strong>", 200);
|
||||
game.replaceTextLog = true;
|
||||
game.makeTextLog("<div style='font-size:140%;'>NO AMMO</div> <p style='font-size:90%;'><strong>Q</strong>, <strong>E</strong>, and <strong>mouse wheel</strong> change weapons</p>", 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();
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
4
todo.txt
4
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user