mob: slasher
new mob: slasher - it's basically a jedi harpoon: +33% damage, +33% delay after firing time dilation reverted 50% -> 0% collision harm reduction time dilation can no longer get tech: symbiosis nano-scale: can access tokamak and discrete optimization cache: 11x -> 13x ammo bug fixes
This commit is contained in:
@@ -463,54 +463,56 @@ const powerUps = {
|
||||
return 17;
|
||||
},
|
||||
effect() {
|
||||
if (tech.isAmmoForGun && b.inventory.length > 0 && b.activeGun) { //give extra ammo to one gun only with tech logistics
|
||||
const target = b.guns[b.activeGun]
|
||||
if (target.ammo !== Infinity) {
|
||||
if (tech.ammoCap) {
|
||||
const ammoAdded = Math.ceil(target.ammoPack * 0.7 * tech.ammoCap) //0.7 is average
|
||||
target.ammo = ammoAdded
|
||||
simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${ammoAdded}`)
|
||||
} else {
|
||||
const ammoAdded = Math.ceil((0.7 * Math.random() + 0.7 * Math.random()) * target.ammoPack)
|
||||
target.ammo += ammoAdded
|
||||
simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}`)
|
||||
}
|
||||
}
|
||||
} else { //give ammo to all guns in inventory
|
||||
let textLog = ""
|
||||
for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||
const target = b.guns[b.inventory[i]]
|
||||
if (b.inventory.length > 0) {
|
||||
if (tech.isAmmoForGun && b.activeGun) { //give extra ammo to one gun only with tech logistics
|
||||
const target = b.guns[b.activeGun]
|
||||
if (target.ammo !== Infinity) {
|
||||
if (tech.ammoCap) {
|
||||
const ammoAdded = Math.ceil(target.ammoPack * 0.45 * tech.ammoCap) //0.45 is average
|
||||
const ammoAdded = Math.ceil(target.ammoPack * 0.7 * tech.ammoCap) //0.7 is average
|
||||
target.ammo = ammoAdded
|
||||
textLog += `${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${ammoAdded}<br>`
|
||||
simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${ammoAdded}`)
|
||||
} else {
|
||||
const ammoAdded = Math.ceil((0.45 * Math.random() + 0.45 * Math.random()) * target.ammoPack) //Math.ceil(Math.random() * target.ammoPack)
|
||||
const ammoAdded = Math.ceil((0.7 * Math.random() + 0.7 * Math.random()) * target.ammoPack)
|
||||
target.ammo += ammoAdded
|
||||
textLog += `${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}<br>`
|
||||
simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}`)
|
||||
}
|
||||
}
|
||||
} else { //give ammo to all guns in inventory
|
||||
let textLog = ""
|
||||
for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||
const target = b.guns[b.inventory[i]]
|
||||
if (target.ammo !== Infinity) {
|
||||
if (tech.ammoCap) {
|
||||
const ammoAdded = Math.ceil(target.ammoPack * 0.45 * tech.ammoCap) //0.45 is average
|
||||
target.ammo = ammoAdded
|
||||
textLog += `${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${ammoAdded}<br>`
|
||||
} else {
|
||||
const ammoAdded = Math.ceil((0.45 * Math.random() + 0.45 * Math.random()) * target.ammoPack) //Math.ceil(Math.random() * target.ammoPack)
|
||||
target.ammo += ammoAdded
|
||||
textLog += `${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}<br>`
|
||||
}
|
||||
}
|
||||
}
|
||||
simulation.makeTextLog(textLog)
|
||||
}
|
||||
simulation.makeTextLog(textLog)
|
||||
// } else { //give ammo to all guns in inventory
|
||||
// for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||
// const target = b.guns[b.inventory[i]]
|
||||
// if (target.ammo !== Infinity) {
|
||||
// if (tech.ammoCap) {
|
||||
// const ammoAdded = Math.ceil(target.ammoPack * 0.45 * tech.ammoCap) //0.45 is average
|
||||
// target.ammo = ammoAdded
|
||||
// simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${ammoAdded}`)
|
||||
// } else {
|
||||
// const ammoAdded = Math.ceil((0.45 * Math.random() + 0.45 * Math.random()) * target.ammoPack) //Math.ceil(Math.random() * target.ammoPack)
|
||||
// target.ammo += ammoAdded
|
||||
// simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}`)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
simulation.updateGunHUD();
|
||||
}
|
||||
// } else { //give ammo to all guns in inventory
|
||||
// for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||
// const target = b.guns[b.inventory[i]]
|
||||
// if (target.ammo !== Infinity) {
|
||||
// if (tech.ammoCap) {
|
||||
// const ammoAdded = Math.ceil(target.ammoPack * 0.45 * tech.ammoCap) //0.45 is average
|
||||
// target.ammo = ammoAdded
|
||||
// simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>=</span> ${ammoAdded}`)
|
||||
// } else {
|
||||
// const ammoAdded = Math.ceil((0.45 * Math.random() + 0.45 * Math.random()) * target.ammoPack) //Math.ceil(Math.random() * target.ammoPack)
|
||||
// target.ammo += ammoAdded
|
||||
// simulation.makeTextLog(`${target.name}.<span class='color-g'>ammo</span> <span class='color-symbol'>+=</span> ${ammoAdded}`)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
simulation.updateGunHUD();
|
||||
}
|
||||
},
|
||||
field: {
|
||||
|
||||
Reference in New Issue
Block a user