diff --git a/.DS_Store b/.DS_Store
index d62d47b..c19872b 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index 48fa81e..44b0e78 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -3609,19 +3609,16 @@ const b = {
}
}, {
name: "wave beam",
- description: "emit a wavelet of oscillating particles
that propagate through solids",
+ description: "emit a wave packet of oscillating particles
that propagate through solids",
ammo: 0,
- ammoPack: 82,
+ ammoPack: 75,
have: false,
- packetCounter: 0,
- delay: 44,
+ wavePacketCycle: 0,
+ delay: 40,
do() {
- if (this.packetCounter && !input.fire) {
- this.packetCounter++;
- if (this.packetCounter > 36) { // 36 is one wave packet
- m.fireCDcycle = m.cycle + Math.floor(this.delay * b.fireCD); // cool down
- this.packetCounter = 0;
- }
+ if (this.wavePacketCycle && !input.fire) {
+ this.wavePacketCycle = 0;
+ m.fireCDcycle = m.cycle + Math.floor(this.delay * b.fireCD); // cool down
}
},
damage: 1,
@@ -3631,13 +3628,13 @@ const b = {
bullet[me] = Bodies.polygon(m.pos.x + 25 * Math.cos(m.angle), m.pos.y + 25 * Math.sin(m.angle), 7, 3.5, {
angle: m.angle,
cycle: -0.5,
- endCycle: simulation.cycle + Math.floor((tech.waveReflections ? Infinity : 4.3 * tech.wavePacketLength) * tech.isBulletsLastLonger), // - this.packetCounter + tech.wavePacketLength, //- this.packetCounter + this.packetLength makes the entire packet go away at the same time
+ endCycle: simulation.cycle + Math.floor((tech.waveReflections ? Infinity : 4.3 * tech.wavePacketLength) * tech.isBulletsLastLonger),
inertia: Infinity,
frictionAir: 0,
slow: 0,
- amplitude: (m.crouch ? 10 : 20) * tech.waveAmplitude * Math.sin(this.packetCounter * tech.wavePacketFrequency) * ((i % 2) ? -1 : 1), //(tech.isImaginaryWave ? 1 : -1)
+ amplitude: (m.crouch ? 10 : 20) * Math.sin(this.wavePacketCycle * tech.wavePacketFrequency) * ((i % 2) ? -1 : 1),
minDmgSpeed: 0,
- dmg: b.dmgScale * tech.waveBeamDamage * tech.waveAmplitude * tech.wavePacketLength / 36, //control damage also when you divide by mob.mass //* (tech.isImaginaryWave ? 3 : 1)
+ dmg: b.dmgScale * tech.waveBeamDamage * tech.wavePacketDamage, //also control damage when you divide by mob.mass
classType: "bullet",
collisionFilter: {
category: 0,
@@ -3679,9 +3676,6 @@ const b = {
},
wiggle() {
this.cycle++
- // const where = Vector.mult(transverse, this.amplitude * Math.cos(this.cycle * 0.35)) // 36
- // const where = Vector.mult(transverse, 0.5 * this.amplitude * Math.cos(this.cycle * 0.15)) //36
- // const where = Vector.mult(transverse, 0.15 * this.amplitude * Math.cos(this.cycle * 0.05)) //36
const where = Vector.mult(transverse, this.amplitude * Math.cos(this.cycle * tech.waveFrequency))
Matter.Body.setPosition(this, Vector.add(this.position, where))
}
@@ -3694,7 +3688,7 @@ const b = {
waveSpeedBody = 1.9
}
if (tech.waveReflections) {
- const range = 100 / Math.sqrt(tech.waveFrequency)
+ const range = 100
bullet[me].reflectCycle = range
bullet[me].do = function() {
if (!m.isBodiesAsleep) {
@@ -3723,10 +3717,10 @@ const b = {
const transverse = Vector.normalise(Vector.perp(bullet[me].velocity))
}
//fire some of bullets then delay for a while
- this.packetCounter++
- if (this.packetCounter > tech.wavePacketLength) {
+ this.wavePacketCycle++
+ if (this.wavePacketCycle > tech.wavePacketLength) {
m.fireCDcycle = m.cycle + Math.floor(this.delay * b.fireCD); // cool down
- this.packetCounter = 0;
+ this.wavePacketCycle = 0;
}
}
}, {
diff --git a/js/level.js b/js/level.js
index 61d4e75..f0522a9 100644
--- a/js/level.js
+++ b/js/level.js
@@ -17,14 +17,12 @@ const level = {
// simulation.setZoom();
// m.setField("nano-scale manufacturing")
// b.giveGuns("wave beam")
- // b.giveGuns("foam")
// tech.isExplodeRadio = true
- // for (let i = 0; i < 1; i++) tech.giveTech("amplitude")
- // tech.giveTech("aerogel")
- // for (let i = 0; i < 1; i++) tech.giveTech("wavelength")
// tech.giveTech("phase velocity")
- // tech.giveTech("imaginary")
- // for (let i = 0; i < 2; i++) tech.giveTech("least action")
+ // for (let i = 0; i < 3; i++) tech.giveTech("wavelength")
+ // for (let i = 0; i < 1; i++) tech.giveTech("bound state")
+ // for (let i = 0; i < 3; i++) tech.giveTech("propagation")
+ // for (let i = 0; i < 3; i++) tech.giveTech("amplitude")
// tech.isExplodeRadio = true;
// tech.isMineSentry = true
@@ -1110,13 +1108,13 @@ const level = {
spawn.mapRect(6700, -1800, 800, 2600); //right wall
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump
- // spawn.starter(1900, -500, 200) //big boy
+ spawn.starter(1900, -500, 200) //big boy
// spawn.grower(1900, -500)
// spawn.pulsarBoss(1900, -500)
// spawn.shooterBoss(1900, -500)
// spawn.launcherBoss(1200, -500)
// spawn.laserTargetingBoss(1600, -400)
- spawn.striker(1600, -500)
+ // spawn.striker(1600, -500)
// spawn.laserTargetingBoss(1700, -120)
// spawn.bomberBoss(1400, -500)
// spawn.ghoster(1800, -120)
diff --git a/js/tech.js b/js/tech.js
index 0d5f104..e850ff3 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -3612,9 +3612,93 @@
tech.bulletSize = 1;
}
},
+ {
+ name: "bound state",
+ description: "instead of dissipating normally
wave packets reflect backwards 2 times",
+ isGunTech: true,
+ maxCount: 9,
+ count: 0,
+ frequency: 2,
+ allowed() {
+ return tech.haveGunCheck("wave beam") && tech.wavePacketLength === 36
+ },
+ requires: "wave beam, not wavelength",
+ effect() {
+ tech.waveReflections += 2
+ // tech.waveFrequency = 0.2
+ },
+ remove() {
+ tech.waveReflections = 0
+ // tech.waveFrequency = 0.35 //this is also set in "wavelength"
+ }
+ },
+ {
+ name: "wavelength",
+ description: "wave packet length and duration
is increased by 50%", // description: "holding fire allows the wave beam to emits a second packet
at zero ammo cost",
+ isGunTech: true,
+ maxCount: 9,
+ count: 0,
+ frequency: 2,
+ allowed() {
+ return tech.haveGunCheck("wave beam") && !tech.waveReflections
+ },
+ requires: "wave beam, not bound state",
+ effect() {
+ const scale = 1.5
+ tech.wavePacketLength *= scale //if you change this to not be 36 update /36 in wave .dmg
+ tech.wavePacketFrequency /= scale
+ // tech.wavePacketLength = tech.wavePacketFrequency * 420 //36 //how many wave packets are released // double this to emit 2 packets
+ // tech.waveFrequency *= 0.8
+ },
+ remove() {
+ tech.wavePacketFrequency = 0.088 //shorten wave packet
+ tech.wavePacketLength = tech.wavePacketFrequency * 408 //36.96 //how many wave packets are released // double this to emit 2 packets
+ // tech.waveFrequency = 0.35 //this is also set in "bound state" //increase -> shrink amplitude, add more nodes
+ }
+ },
+ {
+ name: "amplitude",
+ description: "wave packet amplitude is 33% higher
wave damage is increased by 33%",
+ isGunTech: true,
+ maxCount: 3,
+ count: 0,
+ frequency: 2,
+ allowed() {
+ return tech.haveGunCheck("wave beam")
+ },
+ requires: "wave beam",
+ effect() {
+ tech.waveFrequency *= 0.5
+ tech.wavePacketDamage *= 1.33
+ },
+ remove() {
+ tech.waveFrequency = 0.35
+ tech.wavePacketDamage = 1
+ }
+ },
+ {
+ name: "propagation",
+ description: "wave packet propagation speed is 25% slower
wave damage is increased by 50%",
+ isGunTech: true,
+ maxCount: 3,
+ count: 0,
+ frequency: 2,
+ allowed() {
+ return tech.haveGunCheck("wave beam")
+ },
+ requires: "wave beam",
+ effect() {
+ tech.waveBeamSpeed *= 0.75;
+ tech.waveBeamDamage += 0.55 * 0.5
+ },
+ remove() {
+ tech.waveBeamSpeed = 10;
+ tech.waveBeamDamage = 0.55 //this sets base wave beam damage
+ }
+ },
{
name: "phase velocity",
- description: "wavelets propagate faster in solids",
+ description: "wave beam propagates faster through solids
up by 3000% in the map and 760% in blocks",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -3630,87 +3714,9 @@
tech.isPhaseVelocity = false;
}
},
- {
- name: "bound state",
- description: "instead of dissipating normally
wavelets reflect backwards 2 times",
- isGunTech: true,
- maxCount: 9,
- count: 0,
- frequency: 2,
- allowed() {
- return tech.haveGunCheck("wave beam")
- },
- requires: "wave beam",
- effect() {
- tech.waveReflections += 2
- },
- remove() {
- tech.waveReflections = 0
- }
- },
- {
- name: "wavelength",
- description: "wavelet length and duration
is increased by 50%", // description: "holding fire allows the wave beam to emits a second packet
at zero ammo cost",
- isGunTech: true,
- maxCount: 9,
- count: 0,
- frequency: 2,
- allowed() {
- return tech.haveGunCheck("wave beam")
- },
- requires: "wave beam",
- effect() {
- tech.wavePacketLength *= 1.5 //if you change this to not be 36 update /36 in wave .dmg
- tech.wavePacketFrequency *= 0.66666
- tech.waveFrequency *= 0.9
- },
- remove() {
- tech.wavePacketLength = 36
- tech.waveFrequency = 0.35
- tech.wavePacketFrequency = 0.088
- }
- },
- {
- name: "amplitude",
- description: "wavelet amplitude is 33% higher
wave damage is increased by 33%",
- isGunTech: true,
- maxCount: 3,
- count: 0,
- frequency: 2,
- allowed() {
- return tech.haveGunCheck("wave beam")
- },
- requires: "wave beam",
- effect() {
- tech.waveAmplitude += 0.33
- },
- remove() {
- tech.waveAmplitude = 1
- }
- },
- {
- name: "propagation",
- description: "wavelet propagation speed is 25% slower
wave damage is increased by 50%",
- isGunTech: true,
- maxCount: 3,
- count: 0,
- frequency: 2,
- allowed() {
- return tech.haveGunCheck("wave beam")
- },
- requires: "wave beam",
- effect() {
- tech.waveBeamSpeed -= 2.5;
- tech.waveBeamDamage += 0.55 * 0.5
- },
- remove() {
- tech.waveBeamSpeed = 10;
- tech.waveBeamDamage = 0.55 //this sets base wave beam damage
- }
- },
// {
// name: "imaginary",
- // description: "the wavelet is limited to a single strand
wave damage is increased by 300%",
+ // description: "the wavePacket is limited to a single strand
wave damage is increased by 300%",
// isGunTech: true,
// maxCount: 1,
// count: 0,
@@ -6568,5 +6574,5 @@
wavePacketLength: null,
isImaginaryWave: null,
waveBeamSpeed: null,
- waveAmplitude: null,
+ wavePacketAmplitude: null,
}
\ No newline at end of file
diff --git a/todo.txt b/todo.txt
index c00b821..c7964c6 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,8 +1,11 @@
******************************************************** NEXT PATCH ********************************************************
+several small wave beam tech adjustments
******************************************************** BUGS ********************************************************
+power ups don't float up in acid anymore?
+
increase the width on the grid by a few pixels so that very small screens or people with odd fonts don't goto a new line
you have to press z once to get copy to work for simulation.enableConstructMode() sometimes
@@ -33,12 +36,13 @@ is there a way to check if the player is stuck inside the map or block
******************************************************** TODO ********************************************************
+wave tech: delay similar to foam
wave tech: dispersion - add noise and damage to waves
-wave tech: chirp - amplitude increases with time
+wave tech: chirp - amplitude and damage increases towards the end of the wavePacket
+wave tech: wave bullets are removed after doing damage, but they do something
+ more damage, explode, freeze, stun radiation
-make a system to show current gun damage in pause menu?
-
-mobs that die while frozen produce ice-IX bullets
+tech: mobs that die while frozen produce ice-IX bullets
tech: picking up heal power ups when at full health does harm equal to the heal values
benefit on pick up: