This commit is contained in:
landgreen
2021-04-24 06:42:43 -07:00
parent c7c025244e
commit f6d02d579f
4 changed files with 58 additions and 44 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -21,7 +21,8 @@ const b = {
},
fire() {},
fireNormal() {
if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire) && b.inventory.length) {
if (b.inventory.length) {
if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire)) {
if (b.guns[b.activeGun].ammo > 0) {
b.fireWithAmmo()
} else {
@@ -30,9 +31,11 @@ const b = {
if (m.holdingTarget) m.drop();
}
b.guns[b.activeGun].do();
}
},
fireNotMove() { //added && player.speed < 0.5 && m.onGround
if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire) && b.inventory.length && player.speed < 0.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) {
if (b.inventory.length) {
if (input.fire && m.fireCDcycle < m.cycle && (!input.field || m.fieldFire) && player.speed < 0.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) {
if (b.guns[b.activeGun].ammo > 0) {
b.fireWithAmmo()
} else {
@@ -41,9 +44,11 @@ const b = {
if (m.holdingTarget) m.drop();
}
b.guns[b.activeGun].do();
}
},
fireNotMoveAlwaysFire() { //added && player.speed < 0.5 && m.onGround //removed input.fire && (!input.field || m.fieldFire)
if (m.fireCDcycle < m.cycle && b.inventory.length && player.speed < 0.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) {
if (b.inventory.length) {
if (m.fireCDcycle < m.cycle && player.speed < 0.5 && m.onGround && Math.abs(m.yOff - m.yOffGoal) < 1) {
if (b.guns[b.activeGun].ammo > 0) {
b.fireWithAmmo()
} else {
@@ -52,9 +57,11 @@ const b = {
if (m.holdingTarget) m.drop();
}
b.guns[b.activeGun].do();
}
},
fireFloat() { //added && player.speed < 0.5 && m.onGround
if (input.fire && (!input.field || m.fieldFire) && b.inventory.length) {
if (b.inventory.length) {
if (input.fire && (!input.field || m.fieldFire)) {
if (m.fireCDcycle < m.cycle) {
if (b.guns[b.activeGun].ammo > 0) {
b.fireWithAmmo()
@@ -71,6 +78,7 @@ const b = {
player.force.y = 0
}
b.guns[b.activeGun].do();
}
},
fireWithAmmo() { //triggers after firing when you have ammo
b.guns[b.activeGun].fire();
@@ -110,13 +118,13 @@ const b = {
gun = options[Math.floor(Math.random() * options.length)]
}
if (gun === "all") {
b.activeGun = 0;
b.inventoryGun = 0;
for (let i = 0; i < b.guns.length; i++) {
b.inventory[i] = i;
b.guns[i].have = true;
b.guns[i].ammo = Math.floor(b.guns[i].ammoPack * ammoPacks);
}
b.activeGun = 0;
} else {
if (isNaN(gun)) { //find gun by name
let found = false;
@@ -3193,6 +3201,7 @@ const b = {
this.fire = this.fireNormal
}
},
do() {},
fire() {
},

View File

@@ -4368,7 +4368,7 @@
//**************************************************
{
name: "bremsstrahlung",
description: "<strong>blocking</strong> with <strong>standing wave harmonics</strong><br> does <strong class='color-d'>damage</strong> to mobs",
description: "<strong>blocking</strong> does <strong class='color-d'>damage</strong> to mobs",
isFieldTech: true,
maxCount: 9,
count: 0,

View File

@@ -36,6 +36,11 @@ fix door.isOpen actually meaning isClosed?
******************************************************** TODO ********************************************************
edit foam gun text
apply the new gun.do functions to other guns
rail gun
tech plasma field - plasma field becomes an aoe damage field with the same radius
200% more energy drain, 100% more damage
draw a square (or two) that rapidly spins