drone repair

tech: automatic - always fire, but get 2.5x ammo
  requires inertial frame

tech: drone repair - while drones are your active gun, drones respawn with a 50% chance to consume ammo
This commit is contained in:
landgreen
2021-04-02 10:53:44 -07:00
parent 94314f7a59
commit 45fb86189b
8 changed files with 480 additions and 282 deletions

View File

@@ -187,7 +187,7 @@ const powerUps = {
if (tech.isAmmoForGun && b.inventory.length > 0 && b.activeGun) {
const target = b.guns[b.activeGun]
if (target.ammo !== Infinity) {
const ammoAdded = Math.ceil(Math.random() * target.ammoPack) + Math.ceil(0.7 * Math.random() * target.ammoPack)
const ammoAdded = Math.ceil(Math.random() * target.ammoPack) + Math.ceil(0.7 * Math.random() * target.ammoPack) * (tech.isAlwaysFire ? 3 : 1)
target.ammo += ammoAdded
simulation.makeTextLog(`${target.name}.<span class='color-gun'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}`)
}
@@ -195,7 +195,7 @@ const powerUps = {
for (let i = 0, len = b.inventory.length; i < len; i++) {
const target = b.guns[b.inventory[i]]
if (target.ammo !== Infinity) {
const ammoAdded = Math.ceil(Math.random() * target.ammoPack)
const ammoAdded = Math.ceil(Math.random() * target.ammoPack) * (tech.isAlwaysFire ? 3 : 1)
target.ammo += ammoAdded
simulation.makeTextLog(`${target.name}.<span class='color-gun'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}`)
}