wide laser

tech: antiscience - 100% damage, but lose 11 health when you pick up a tech
tech: laser widebeam + output coupler can now stack up to 9x (was 1x)
  but it not longer works with tech: slow light propagation
This commit is contained in:
landgreen
2021-01-10 05:19:13 -08:00
parent cd0e47df30
commit ef8ae42591
9 changed files with 239 additions and 222 deletions

View File

@@ -461,15 +461,16 @@ const powerUps = {
}
}
},
onPickUp(where) {
onPickUp(who) {
if (tech.isTechDamage && who.name === "tech") mech.damage(0.11)
if (tech.isMassEnergy) mech.energy += 2.5;
if (tech.isMineDrop) b.mine({
x: where.x,
y: where.y
}, {
x: 0,
y: 0
}, 0, tech.isMineAmmoBack)
if (tech.isMineDrop) {
if (tech.isLaserMine) { //laser mine
b.laserMine(who.position)
} else {
b.mine(who.position, { x: 0, y: 0 }, 0, tech.isMineAmmoBack)
}
}
},
giveRandomAmmo() {
const ammoTarget = Math.floor(Math.random() * (b.guns.length));