wave beam

some wave beam bug fixes and balance

tech: stationary action - slower wave beam but more damage
This commit is contained in:
landgreen
2021-05-02 05:22:54 -07:00
parent 63832cd137
commit 04f29052a9
5 changed files with 41 additions and 58 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -3606,7 +3606,7 @@ const b = {
}
}, {
name: "wave beam",
description: "emit a <strong>sine wave</strong> of oscillating particles<br>propagates through <strong>walls</strong>",
description: "emit a packet of oscillating particles<br>that propagate through <strong>walls</strong>",
ammo: 0,
ammoPack: 65,
have: false,
@@ -3622,19 +3622,18 @@ const b = {
}
},
fire() {
const SPEED = 10
for (let i = 0; i < 2; i++) {
const me = bullet.length;
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 : 150) * 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 : 120) * tech.isBulletsLastLonger), // - this.packetCounter + tech.wavePacketLength, //- this.packetCounter + this.packetLength makes the entire packet go away at the same time
inertia: Infinity,
frictionAir: 0,
slow: 0,
amplitude: (m.crouch ? 10 : 20) * Math.sin(this.packetCounter * 0.088) * ((i % 2) ? (tech.isImaginaryWave ? 1 : -1) : 1),
minDmgSpeed: 0,
dmg: b.dmgScale * 0.5 * (tech.isImaginaryWave ? 3 : 1) * (0.75 + 0.25 * tech.wavePacketLength / 36), //control damage also when you divide by mob.mass
dmg: b.dmgScale * tech.waveBeamDamage * (tech.isImaginaryWave ? 3 : 1) * (0.75 + 0.25 * tech.wavePacketLength / 36), //control damage also when you divide by mob.mass
classType: "bullet",
collisionFilter: {
category: 0,
@@ -3653,27 +3652,10 @@ const b = {
slowCheck = waveSpeedBody
Matter.Body.setPosition(this, Vector.add(this.position, q[0].velocity)) //move with the medium
}
// else { // check if inside a mob
// q = Matter.Query.point(mob, this.position)
// for (let i = 0; i < q.length; i++) {
// slowCheck = 0.3;
// Matter.Body.setPosition(this, Vector.add(this.position, q[i].velocity)) //move with the medium
// let dmg = this.dmg / Math.min(10, q[i].mass)
// q[i].damage(dmg);
// q[i].foundPlayer();
// simulation.drawList.push({ //add dmg to draw queue
// x: this.position.x,
// y: this.position.y,
// radius: Math.log(2 * dmg + 1.1) * 40,
// color: 'rgba(0,0,0,0.4)',
// time: simulation.drawTime
// });
// }
// }
}
if (slowCheck !== this.slow) { //toggle velocity based on inside and outside status change
this.slow = slowCheck
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(this.velocity), SPEED * slowCheck));
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(this.velocity), tech.waveBeamSpeed * slowCheck));
}
q = Matter.Query.point(mob, this.position) // check if inside a mob
for (let i = 0; i < q.length; i++) {
@@ -3705,7 +3687,7 @@ const b = {
waveSpeedBody = 1.9
}
if (tech.waveReflections) {
const range = 120
const range = 100
bullet[me].reflectCycle = range
bullet[me].do = function() {
if (!m.isBodiesAsleep) {
@@ -3728,11 +3710,10 @@ const b = {
}
World.add(engine.world, bullet[me]); //add bullet to world
Matter.Body.setVelocity(bullet[me], {
x: SPEED * Math.cos(m.angle),
y: SPEED * Math.sin(m.angle)
x: tech.waveBeamSpeed * Math.cos(m.angle),
y: tech.waveBeamSpeed * Math.sin(m.angle)
});
const transverse = Vector.normalise(Vector.perp(bullet[me].velocity))
// const transverse = Vector.normalise(player.velocity)
}
//fire some of bullets then delay for a while
this.packetCounter++

View File

@@ -20,11 +20,11 @@ const level = {
// b.giveGuns("laser")
// tech.isExplodeRadio = true
// for (let i = 0; i < 9; i++) tech.giveTech("auto-loading heuristics")
// for (let i = 0; i < 2; i++) tech.giveTech("bound state")
// for (let i = 0; i < 9; i++) tech.giveTech("bound state")
// for (let i = 0; i < 9; i++) tech.giveTech("jabbering")
// tech.giveTech("phase velocity")
// tech.giveTech("imaginary number")
// tech.giveTech("Bayesian statistics")
// tech.giveTech("imaginary")
// for (let i = 0; i < 9; i++) tech.giveTech("stationary action")
// tech.isExplodeRadio = true;
// tech.isMineSentry = true

View File

@@ -148,7 +148,7 @@
if (tech.isOneBullet && bullet.length - b.totalBots() === 1) dmg *= 2 //3 / Math.sqrt(bullet.length + 1) //testing this tech out, seems to have too many negatives though ...
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.45
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 1.4 : 0.85
if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 1.5 : 0.85
if (tech.isTechDamage) dmg *= 1.9
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy) * 0.5
@@ -2197,7 +2197,7 @@
},
{
name: "dormancy",
description: "if a mob has <strong>died</strong> in the last <strong>5 seconds</strong><br><span style = 'font-size:93%;'>increase <strong class='color-d'>damage</strong> by <strong>40%</strong> else decrease it by <strong>15%</strong></span>",
description: "if a mob has <strong>died</strong> in the last <strong>5 seconds</strong><br><span style = 'font-size:93%;'>increase <strong class='color-d'>damage</strong> by <strong>50%</strong> else decrease it by <strong>15%</strong></span>",
maxCount: 1,
count: 0,
frequency: 2,
@@ -3614,7 +3614,7 @@
},
{
name: "jabbering",
description: "<strong>wave beam</strong> generates another <strong>packet</strong><br>wave <strong class='color-d'>damage</strong> is increased by <strong>25%</strong>",
description: "the <strong>wave beam</strong> generates another <strong>packet</strong><br>wave <strong class='color-d'>damage</strong> is increased by <strong>25%</strong>",
isGunTech: true,
maxCount: 9,
count: 0,
@@ -3649,6 +3649,26 @@
}
},
{
name: "stationary action",
description: "the <strong>wave beam</strong> propagates <strong>25%</strong> slower<br>wave <strong class='color-d'>damage</strong> is increased by <strong>40%</strong>",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
allowed() {
return tech.haveGunCheck("wave beam")
},
requires: "wave beam",
effect() {
tech.waveBeamSpeed *= 0.75;
tech.waveBeamDamage += 0.5 * 0.4
},
remove() {
tech.waveBeamSpeed = 10;
tech.waveBeamDamage = 0.5
}
},
{
name: "bound state",
description: "instead of dissipating normally<br><strong>wave beam</strong> bullets <strong>reflect</strong> backwards <strong>2</strong> times",
@@ -3668,10 +3688,10 @@
}
},
{
name: "imaginary number",
description: "the <strong>wave beam</strong> is limited to a <strong>single</strong> strand<br><strong class='color-d'>damage</strong> is increased by <strong>300%</strong>",
name: "imaginary",
description: "the <strong>wave beam</strong> is limited to a <strong>single</strong> strand<br>wave <strong class='color-d'>damage</strong> is increased by <strong>300%</strong>",
isGunTech: true,
maxCount: 9,
maxCount: 1,
count: 0,
frequency: 2,
allowed() {
@@ -6172,7 +6192,7 @@
},
requires: "at least 4 research",
effect() {
for (let i = 0; i < powerUps.research.count; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "research");
for (let i = 0; i < powerUps.research.count; i++) powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "research");
powerUps.research.count = 0
},
remove() {}
@@ -6523,5 +6543,6 @@
blockingIce: null,
isPhaseVelocity: null,
wavePacketLength: null,
isImaginaryWave: null
isImaginaryWave: null,
waveBeamSpeed: null
}

View File

@@ -1,23 +1,11 @@
******************************************************** NEXT PATCH ********************************************************
community level crossfire has been nerfed a bit
**wave beam rework**
removed tech: wave packet (this is now the default mode of wave beam)
tech: imaginary number - 50% more damage, but the wave is a single strand
tech: bound state - wave bullets reflect backwards 2 times
now stacks 9 times and works with phase velocity
tech: jabbering - wave beam fires another packet if you hold fire
also increases wave damage by 25%
some wave beam bug fixes and balance
tech: stationary action - slower wave beam but more damage
******************************************************** BUGS ********************************************************
wave beam shouldn't hit level.boost
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
@@ -64,13 +52,6 @@ nail-gun, or ....
Tech: "Quantum Tunneling" Foam travels through blocks and walls 50% faster.
wave beam needs another tech
bullets slowly get bigger?
also increase collision detection range
reduce ammo, increase damage
longitudinal vibration, increase damage
make a tech that improves all charge guns
for: pulse, foam, rail gun
effect: