flecheete slower fire

This commit is contained in:
landgreen
2019-11-06 05:41:43 -08:00
parent 404c40196a
commit c835488f63
4 changed files with 14 additions and 14 deletions

View File

@@ -609,7 +609,7 @@ const b = {
//knock back
const KNOCK = ((mech.crouch) ? 0.025 : 0.25) * b.modBulletSize * b.modBulletSize
player.force.x -= KNOCK * Math.cos(dir)
player.force.y -= KNOCK * Math.sin(dir) * 0.5 //reduce knock back in vertical direction to stop super jumps
player.force.y -= KNOCK * Math.sin(dir) * 0.4 //reduce knock back in vertical direction to stop super jumps
}
},
{
@@ -738,14 +738,14 @@ const b = {
//knock back
const KNOCK = ((mech.crouch) ? 0.015 : 0.15) * b.modBulletSize * b.modBulletSize
player.force.x -= KNOCK * Math.cos(mech.angle)
player.force.y -= KNOCK * Math.sin(mech.angle) * 0.5 //reduce knock back in vertical direction to stop super jumps
player.force.y -= KNOCK * Math.sin(mech.angle) * 0.4 //reduce knock back in vertical direction to stop super jumps
}
},
{
name: "fléchettes",
description: "fire an accurate high speed needle<br>",
ammo: 0,
ammoPack: 19,
ammoPack: 14,
have: false,
fire() {
const me = bullet.length;
@@ -755,9 +755,9 @@ const b = {
} else {
bullet[me] = Bodies.rectangle(mech.pos.x + 40 * Math.cos(mech.angle), mech.pos.y + 40 * Math.sin(mech.angle), 31 * b.modBulletSize, 2 * b.modBulletSize, b.fireAttributes(dir));
}
b.fireProps(mech.crouch ? 40 : 20, mech.crouch ? 45 : 37, dir, me); //cd , speed
b.fireProps(mech.crouch ? 50 : 30, mech.crouch ? 45 : 37, dir, me); //cd , speed
bullet[me].endCycle = game.cycle + Math.floor(180 * b.modBulletsLastLonger);
bullet[me].dmg = mech.crouch ? 1.5 : 1;
bullet[me].dmg = mech.crouch ? 2.2 : 1.6;
b.drawOneBullet(bullet[me].vertices);
bullet[me].do = function () {
//low gravity
@@ -917,7 +917,7 @@ const b = {
name: "grenades",
description: "fire a projectile that <span class='color-e'>explodes</span> on contact or after one second",
ammo: 0,
ammoPack: 11,
ammoPack: 9,
have: false,
fire() {
const me = bullet.length;
@@ -1054,7 +1054,7 @@ const b = {
},
{
name: "spores",
description: "release an orb that discharges <span class='color-s'>spores</span> after 2 seconds<br><span class='color-s'>spores</span> seek out targets<br><span class='color-s'>spores</span> can pass through blocks",
description: "release an orb that discharges <span class='color-s'>spores</span> after 2 seconds<br>seeks out targets<br>passes through blocks",
ammo: 0,
ammoPack: 5,
have: false,

View File

@@ -14,7 +14,7 @@ const level = {
if (game.levelsCleared === 0) {
// game.levelsCleared = 16; //for testing to simulate possible mobs spawns
// b.giveGuns("all", 1000)
// b.giveGuns(9) // set a starting gun for testing
b.giveGuns(6) // set a starting gun for testing
// mech.fieldUpgrades[2].effect(); //give a field power up for testing
// b.giveMod(7)

View File

@@ -44,7 +44,7 @@ const powerUps = {
if (!game.lastLogTime) game.makeTextLog("<span style='font-size:115%;'><span class='color-f'>+energy</span></span>", 300);
} else {
//ammo given scales as mobs take more hits to kill
const ammo = Math.ceil((target.ammoPack * (0.6 + 0.04 * Math.random())) / b.dmgScale);
const ammo = Math.ceil((target.ammoPack * (0.5 + 0.08 * Math.random())) / b.dmgScale);
target.ammo += ammo;
game.updateGunHUD();
if (!game.lastLogTime) game.makeTextLog("<span style='font-size:110%;'>+" + ammo + " ammo for " + target.name + "</span>", 300);
@@ -92,7 +92,7 @@ const powerUps = {
if (options.length > 0) {
let newMod = options[Math.floor(Math.random() * options.length)]
b.giveMod(newMod)
game.makeTextLog(`<div class="circle mod"></div> &nbsp;<strong style='font-size:30px;'>${b.mods[newMod].name}</strong><br><br> ${b.mods[newMod].description}`, 1000);
game.makeTextLog(`<div class="circle mod"></div> &nbsp; <strong style='font-size:30px;'>${b.mods[newMod].name}</strong><br><br> ${b.mods[newMod].description}`, 1000);
}
}
},
@@ -144,7 +144,7 @@ const powerUps = {
powerUps.spawn(x, y, "gun");
return;
}
if (Math.random() < 0.0015 * (b.mods.length - b.modCount)) {
if (Math.random() < 0.0018 * (b.mods.length - b.modCount - 2)) {
powerUps.spawn(x, y, "mod");
return;
}
@@ -158,7 +158,7 @@ const powerUps = {
powerUps.spawn(x, y, "field")
} else if (Math.random() < 0.047 * (b.mods.length - b.modCount)) {
powerUps.spawn(x, y, "mod")
} else if (Math.random() < 0.25) {
} else if (Math.random() < 0.3) {
powerUps.spawn(x, y, "field");
} else if (Math.random() < 0.05 * (7 - b.inventory.length)) { //a new gun has a low chance for each not acquired gun to drop
powerUps.spawn(x, y, "gun")

View File

@@ -232,8 +232,8 @@ em {
}
.circle {
width: 25px;
height: 25px;
width: 20px;
height: 20px;
border-radius: 50%;
display: inline-block;
}