relay switch

bug fix - grower mob becoming immune to damage when shielded and growing bigger than shield

relay switch - toggles ON/OFF when you pick up a power up
tech: ice IX condenser - if ON make a couple Ice IX crystals every second
This commit is contained in:
landgreen
2021-03-26 05:54:28 -07:00
parent 84e4079181
commit 3ab42884ca
9 changed files with 206 additions and 118 deletions

View File

@@ -482,6 +482,17 @@ const powerUps = {
b.mine(who.position, { x: 0, y: 0 }, 0, tech.isMineAmmoBack)
}
}
if (tech.isRelay) {
if (tech.isFlipFlopOn) {
tech.isFlipFlopOn = false
if (document.getElementById("tech-switch")) document.getElementById("tech-switch").innerHTML = ` = <strong>OFF</strong>`
m.eyeFillColor = 'transparent'
} else {
tech.isFlipFlopOn = true //immune to damage this hit, lose immunity for next hit
if (document.getElementById("tech-switch")) document.getElementById("tech-switch").innerHTML = ` = <strong>ON</strong>`
m.eyeFillColor = m.fieldMeterColor //'#0cf'
}
}
},
giveRandomAmmo() {
const ammoTarget = Math.floor(Math.random() * (b.guns.length));