more wave beam adjustments
This commit is contained in:
21
js/bullet.js
21
js/bullet.js
@@ -342,6 +342,7 @@ const b = {
|
|||||||
if (mob[i].shield) dmg *= 2.5 //balancing explosion dmg to shields
|
if (mob[i].shield) dmg *= 2.5 //balancing explosion dmg to shields
|
||||||
if (Matter.Query.ray(map, mob[i].position, where).length > 0) dmg *= 0.5 //reduce damage if a wall is in the way
|
if (Matter.Query.ray(map, mob[i].position, where).length > 0) dmg *= 0.5 //reduce damage if a wall is in the way
|
||||||
mobs.statusDoT(mob[i], dmg * damageScale * 0.25, 240) //apply radiation damage status effect on direct hits
|
mobs.statusDoT(mob[i], dmg * damageScale * 0.25, 240) //apply radiation damage status effect on direct hits
|
||||||
|
if (tech.isExplosionStun) mobs.statusStun(mob[i], 60)
|
||||||
mob[i].locatePlayer();
|
mob[i].locatePlayer();
|
||||||
damageScale *= 0.87 //reduced damage for each additional explosion target
|
damageScale *= 0.87 //reduced damage for each additional explosion target
|
||||||
}
|
}
|
||||||
@@ -3614,7 +3615,7 @@ const b = {
|
|||||||
ammoPack: 75,
|
ammoPack: 75,
|
||||||
have: false,
|
have: false,
|
||||||
wavePacketCycle: 0,
|
wavePacketCycle: 0,
|
||||||
delay: 40,
|
delay: 45,
|
||||||
do() {
|
do() {
|
||||||
if (this.wavePacketCycle && !input.fire) {
|
if (this.wavePacketCycle && !input.fire) {
|
||||||
this.wavePacketCycle = 0;
|
this.wavePacketCycle = 0;
|
||||||
@@ -3623,16 +3624,17 @@ const b = {
|
|||||||
},
|
},
|
||||||
damage: 1,
|
damage: 1,
|
||||||
fire() {
|
fire() {
|
||||||
for (let i = 0; i < 2; i++) {
|
totalCycles = Math.floor(4.3 * tech.wavePacketLength * tech.waveReflections * tech.isBulletsLastLonger)
|
||||||
|
// for (let i = 0; i < 2; i++) {
|
||||||
const me = bullet.length;
|
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, {
|
bullet[me] = Bodies.polygon(m.pos.x + 25 * Math.cos(m.angle), m.pos.y + 25 * Math.sin(m.angle), 5, 4, {
|
||||||
angle: m.angle,
|
angle: m.angle,
|
||||||
cycle: -0.5,
|
cycle: -0.5,
|
||||||
endCycle: simulation.cycle + Math.floor((tech.waveReflections ? Infinity : 4.3 * tech.wavePacketLength) * tech.isBulletsLastLonger),
|
endCycle: simulation.cycle + totalCycles,
|
||||||
inertia: Infinity,
|
inertia: Infinity,
|
||||||
frictionAir: 0,
|
frictionAir: 0,
|
||||||
slow: 0,
|
slow: 0,
|
||||||
amplitude: (m.crouch ? 10 : 20) * Math.sin(this.wavePacketCycle * tech.wavePacketFrequency) * ((i % 2) ? -1 : 1),
|
amplitude: (m.crouch ? 10 : 20) * Math.sin(this.wavePacketCycle * tech.wavePacketFrequency) * ((this.wavePacketCycle % 2) ? -1 : 1),
|
||||||
minDmgSpeed: 0,
|
minDmgSpeed: 0,
|
||||||
dmg: b.dmgScale * tech.waveBeamDamage * tech.wavePacketDamage, //also control damage when you divide by mob.mass
|
dmg: b.dmgScale * tech.waveBeamDamage * tech.wavePacketDamage, //also control damage when you divide by mob.mass
|
||||||
classType: "bullet",
|
classType: "bullet",
|
||||||
@@ -3688,15 +3690,14 @@ const b = {
|
|||||||
waveSpeedBody = 1.9
|
waveSpeedBody = 1.9
|
||||||
}
|
}
|
||||||
if (tech.waveReflections) {
|
if (tech.waveReflections) {
|
||||||
const range = 100
|
bullet[me].reflectCycle = totalCycles / tech.waveReflections //tech.waveLengthRange
|
||||||
bullet[me].reflectCycle = range
|
|
||||||
bullet[me].do = function() {
|
bullet[me].do = function() {
|
||||||
if (!m.isBodiesAsleep) {
|
if (!m.isBodiesAsleep) {
|
||||||
this.query()
|
this.query()
|
||||||
if (this.cycle > this.reflectCycle) {
|
if (this.cycle > this.reflectCycle) {
|
||||||
this.reflectCycle += range
|
this.reflectCycle += totalCycles / tech.waveReflections
|
||||||
Matter.Body.setVelocity(this, Vector.mult(this.velocity, -1));
|
Matter.Body.setVelocity(this, Vector.mult(this.velocity, -1));
|
||||||
if (this.reflectCycle > range * (1 + tech.waveReflections)) this.endCycle = 0;
|
// if (this.reflectCycle > tech.waveLengthRange * (1 + tech.waveReflections)) this.endCycle = 0;
|
||||||
}
|
}
|
||||||
this.wiggle()
|
this.wiggle()
|
||||||
}
|
}
|
||||||
@@ -3715,7 +3716,7 @@ const b = {
|
|||||||
y: tech.waveBeamSpeed * Math.sin(m.angle)
|
y: tech.waveBeamSpeed * Math.sin(m.angle)
|
||||||
});
|
});
|
||||||
const transverse = Vector.normalise(Vector.perp(bullet[me].velocity))
|
const transverse = Vector.normalise(Vector.perp(bullet[me].velocity))
|
||||||
}
|
// }
|
||||||
//fire some of bullets then delay for a while
|
//fire some of bullets then delay for a while
|
||||||
this.wavePacketCycle++
|
this.wavePacketCycle++
|
||||||
if (this.wavePacketCycle > tech.wavePacketLength) {
|
if (this.wavePacketCycle > tech.wavePacketLength) {
|
||||||
|
|||||||
10
js/level.js
10
js/level.js
@@ -15,14 +15,14 @@ const level = {
|
|||||||
// level.difficultyIncrease(30)
|
// level.difficultyIncrease(30)
|
||||||
// simulation.zoomScale = 1000;
|
// simulation.zoomScale = 1000;
|
||||||
// simulation.setZoom();
|
// simulation.setZoom();
|
||||||
// m.setField("nano-scale manufacturing")
|
// m.setField("metamaterial cloaking")
|
||||||
// b.giveGuns("wave beam")
|
// b.giveGuns("wave beam")
|
||||||
// tech.isExplodeRadio = true
|
// tech.isExplodeRadio = true
|
||||||
// tech.giveTech("phase velocity")
|
// tech.giveTech("phase velocity")
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("wavelength")
|
// for (let i = 0; i < 9; i++) tech.giveTech("packet length")
|
||||||
// for (let i = 0; i < 1; i++) tech.giveTech("bound state")
|
// for (let i = 0; i < 3; i++) tech.giveTech("bound state")
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("propagation")
|
// for (let i = 0; i < 9; i++) tech.giveTech("propagation")
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("amplitude")
|
// for (let i = 0; i < 9; i++) tech.giveTech("amplitude")
|
||||||
// tech.isExplodeRadio = true;
|
// tech.isExplodeRadio = true;
|
||||||
|
|
||||||
// tech.isMineSentry = true
|
// tech.isMineSentry = true
|
||||||
|
|||||||
@@ -1958,7 +1958,7 @@ const m = {
|
|||||||
|
|
||||||
//120 cycles after shooting (or using field) enable cloak
|
//120 cycles after shooting (or using field) enable cloak
|
||||||
if (m.energy < 0.05 && m.fireCDcycle < m.cycle && !input.fire) m.fireCDcycle = m.cycle
|
if (m.energy < 0.05 && m.fireCDcycle < m.cycle && !input.fire) m.fireCDcycle = m.cycle
|
||||||
if (m.fireCDcycle + 50 < m.cycle) {
|
if (m.fireCDcycle + 50 < m.cycle && !input.fire) { //automatically cloak if not firing
|
||||||
if (!m.isCloak) {
|
if (!m.isCloak) {
|
||||||
m.isCloak = true //enter cloak
|
m.isCloak = true //enter cloak
|
||||||
if (tech.isIntangible) {
|
if (tech.isIntangible) {
|
||||||
|
|||||||
54
js/tech.js
54
js/tech.js
@@ -3614,46 +3614,43 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "bound state",
|
name: "bound state",
|
||||||
description: "instead of dissipating normally<br>wave packets <strong>reflect</strong> backwards <strong>2</strong> times",
|
description: "instead of dissipating normally<br>wave packets <strong>reflect</strong> backwards <strong>1</strong> times",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.haveGunCheck("wave beam") && tech.wavePacketLength === 36
|
return tech.haveGunCheck("wave beam")
|
||||||
},
|
},
|
||||||
requires: "wave beam, not wavelength",
|
requires: "wave beam",
|
||||||
effect() {
|
effect() {
|
||||||
tech.waveReflections += 2
|
tech.waveReflections++
|
||||||
// tech.waveFrequency = 0.2
|
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.waveReflections = 0
|
tech.waveReflections = 1
|
||||||
// tech.waveFrequency = 0.35 //this is also set in "wavelength"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "wavelength",
|
name: "packet length",
|
||||||
description: "wave packet <strong>length</strong> and <strong>duration</strong><br>is increased by <strong>50%</strong>", // description: "holding fire allows the <strong>wave beam</strong> to emits a second <strong>packet</strong><br>at zero ammo cost",
|
description: "wave packet <strong>length</strong> and <strong>duration</strong><br>is increased by <strong>50%</strong>", // description: "holding fire allows the <strong>wave beam</strong> to emits a second <strong>packet</strong><br>at zero ammo cost",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 9,
|
maxCount: 3,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.haveGunCheck("wave beam") && !tech.waveReflections
|
return tech.haveGunCheck("wave beam")
|
||||||
},
|
},
|
||||||
requires: "wave beam, not bound state",
|
requires: "wave beam",
|
||||||
effect() {
|
effect() {
|
||||||
const scale = 1.5
|
const scale = 1.5 - 0.025 * this.count
|
||||||
tech.wavePacketLength *= scale //if you change this to not be 36 update /36 in wave .dmg
|
tech.waveLengthRange *= Math.sqrt(scale)
|
||||||
|
tech.wavePacketLength *= scale
|
||||||
tech.wavePacketFrequency /= scale
|
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() {
|
remove() {
|
||||||
tech.wavePacketFrequency = 0.088 //shorten wave packet
|
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.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
|
tech.waveLengthRange = 140;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -3680,7 +3677,7 @@
|
|||||||
name: "propagation",
|
name: "propagation",
|
||||||
description: "wave packet propagation <strong>speed</strong> is <strong>25%</strong> slower<br>wave <strong class='color-d'>damage</strong> is increased by <strong>50%</strong>",
|
description: "wave packet propagation <strong>speed</strong> is <strong>25%</strong> slower<br>wave <strong class='color-d'>damage</strong> is increased by <strong>50%</strong>",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 3,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
@@ -3689,11 +3686,11 @@
|
|||||||
requires: "wave beam",
|
requires: "wave beam",
|
||||||
effect() {
|
effect() {
|
||||||
tech.waveBeamSpeed *= 0.75;
|
tech.waveBeamSpeed *= 0.75;
|
||||||
tech.waveBeamDamage += 0.55 * 0.5
|
tech.waveBeamDamage += 1.2 * 0.5
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.waveBeamSpeed = 10;
|
tech.waveBeamSpeed = 10;
|
||||||
tech.waveBeamDamage = 0.55 //this sets base wave beam damage
|
tech.waveBeamDamage = 1.2 //this sets base wave beam damage
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -3714,24 +3711,6 @@
|
|||||||
tech.isPhaseVelocity = false;
|
tech.isPhaseVelocity = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// name: "imaginary",
|
|
||||||
// description: "the <strong>wavePacket</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: 1,
|
|
||||||
// count: 0,
|
|
||||||
// frequency: 2,
|
|
||||||
// allowed() {
|
|
||||||
// return tech.haveGunCheck("wave beam")
|
|
||||||
// },
|
|
||||||
// requires: "wave beam",
|
|
||||||
// effect() {
|
|
||||||
// tech.isImaginaryWave = true
|
|
||||||
// },
|
|
||||||
// remove() {
|
|
||||||
// tech.isImaginaryWave = false
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
name: "cruise missile",
|
name: "cruise missile",
|
||||||
description: "<strong>missiles</strong> travel <strong>63%</strong> slower,<br>but have a <strong>50%</strong> larger <strong class='color-e'>explosive</strong> payload",
|
description: "<strong>missiles</strong> travel <strong>63%</strong> slower,<br>but have a <strong>50%</strong> larger <strong class='color-e'>explosive</strong> payload",
|
||||||
@@ -6575,4 +6554,5 @@
|
|||||||
isImaginaryWave: null,
|
isImaginaryWave: null,
|
||||||
waveBeamSpeed: null,
|
waveBeamSpeed: null,
|
||||||
wavePacketAmplitude: null,
|
wavePacketAmplitude: null,
|
||||||
|
waveLengthRange: null,
|
||||||
}
|
}
|
||||||
9
todo.txt
9
todo.txt
@@ -1,11 +1,9 @@
|
|||||||
******************************************************** NEXT PATCH ********************************************************
|
******************************************************** NEXT PATCH ********************************************************
|
||||||
|
|
||||||
several small wave beam tech adjustments
|
more wave beam balance
|
||||||
|
|
||||||
******************************************************** BUGS ********************************************************
|
******************************************************** 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
|
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
|
you have to press z once to get copy to work for simulation.enableConstructMode() sometimes
|
||||||
@@ -36,11 +34,12 @@ is there a way to check if the player is stuck inside the map or block
|
|||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
wave tech: delay similar to foam
|
wave tech: delay similar to quantum foam
|
||||||
|
firing makes the entire packet, but with a delay?
|
||||||
wave tech: dispersion - add noise and damage to waves
|
wave tech: dispersion - add noise and damage to waves
|
||||||
wave tech: chirp - amplitude and damage increases towards the end of the wavePacket
|
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
|
wave tech: wave bullets are removed after doing damage, but they do something
|
||||||
more damage, explode, freeze, stun radiation
|
more damage, explode, freeze,
|
||||||
|
|
||||||
tech: mobs that die while frozen produce ice-IX bullets
|
tech: mobs that die while frozen produce ice-IX bullets
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user