base wave gun rework
  damage per hit 1.55 -> 0.33, -15% range, +20% ammo
  no pause between wave packets
  wave bullets can hit about once every 10 game cycles (1/6 of a second)
    time between hits is reduced by fire rate
  wave tech frequency has -25% damage no longer reduces fire rate
  +10% phonon damage and ammo

JUNK tech: universal healthcare - your damage heals mobs

bug fixes
This commit is contained in:
landgreen
2023-03-06 17:58:00 -08:00
parent d00a94a22b
commit 36541986ba
5 changed files with 123 additions and 114 deletions

View File

@@ -171,7 +171,6 @@ const b = {
b.activeGun = b.inventory[0] //if no active gun switch to new gun b.activeGun = b.inventory[0] //if no active gun switch to new gun
if (b.guns[b.activeGun].charge) b.guns[b.activeGun].charge = 0; //set foam charge to zero if foam is a new gun if (b.guns[b.activeGun].charge) b.guns[b.activeGun].charge = 0; //set foam charge to zero if foam is a new gun
} }
// if (tech.infiniteWaveAmmo === 2) b.guns[3].ammo = Infinity
} }
simulation.makeGunHUD(); simulation.makeGunHUD();
simulation.switchGun(); simulation.switchGun();
@@ -6367,8 +6366,8 @@ const b = {
name: "wave", //3 name: "wave", //3
description: "emit a <strong>wave packet</strong> of oscillating particles<br>that propagates through <strong>solids</strong>", description: "emit a <strong>wave packet</strong> of oscillating particles<br>that propagates through <strong>solids</strong>",
ammo: 0, ammo: 0,
ammoPack: 115, ammoPack: 135,
defaultAmmoPack: 115, defaultAmmoPack: 135,
have: false, have: false,
wavePacketCycle: 0, wavePacketCycle: 0,
delay: 40, delay: 40,
@@ -6397,7 +6396,7 @@ const b = {
ctx.lineWidth = 2 * tech.wavePacketDamage ctx.lineWidth = 2 * tech.wavePacketDamage
ctx.beginPath(); ctx.beginPath();
const end = 700 * Math.sqrt(tech.isBulletsLastLonger) * Math.pow(0.93, tech.waveReflections) // / Math.sqrt(tech.waveReflections * 0.5) //should equal about 1060 const end = 700 * Math.sqrt(tech.isBulletsLastLonger) * Math.pow(0.93, tech.waveReflections) // / Math.sqrt(tech.waveReflections * 0.5) //should equal about 1060
const damage = 1.9 * m.dmgScale * tech.wavePacketDamage * tech.waveBeamDamage * (tech.isBulletTeleport ? 1.43 : 1) * (tech.isPhaseVelocity ? 1.25 : 1) //damage is lower for large radius mobs, since they feel the waves longer const damage = 2.1 * m.dmgScale * tech.wavePacketDamage * tech.waveBeamDamage * (tech.isBulletTeleport ? 1.43 : 1) * (tech.isInfiniteWaveAmmo ? 0.75 : 1) //damage is lower for large radius mobs, since they feel the waves longer
for (let i = this.waves.length - 1; i > -1; i--) { for (let i = this.waves.length - 1; i > -1; i--) {
//draw wave //draw wave
@@ -6489,7 +6488,7 @@ const b = {
} }
}, },
fire360Longitudinal() { fire360Longitudinal() {
m.fireCDcycle = m.cycle + Math.floor((m.crouch ? 4 : 8) * b.fireCDscale * tech.infiniteWaveAmmo); // cool down m.fireCDcycle = m.cycle + Math.floor((m.crouch ? 4 : 8) * b.fireCDscale); // cool down
this.waves.push({ this.waves.push({
position: { position: {
x: m.pos.x, x: m.pos.x,
@@ -6508,7 +6507,7 @@ const b = {
ctx.beginPath(); ctx.beginPath();
// const end = 1100 * tech.isBulletsLastLonger / Math.sqrt(tech.waveReflections * 0.5) //should equal about 1767 // const end = 1100 * tech.isBulletsLastLonger / Math.sqrt(tech.waveReflections * 0.5) //should equal about 1767
const end = 1100 * tech.isBulletsLastLonger * Math.pow(0.93, tech.waveReflections) //should equal about 1767 const end = 1100 * tech.isBulletsLastLonger * Math.pow(0.93, tech.waveReflections) //should equal about 1767
const damage = 1.9 * m.dmgScale * tech.wavePacketDamage * tech.waveBeamDamage * (tech.isBulletTeleport ? 1.4 : 1) * (tech.isPhaseVelocity ? 1.25 : 1) //damage is lower for large radius mobs, since they feel the waves longer const damage = 2.1 * m.dmgScale * tech.wavePacketDamage * tech.waveBeamDamage * (tech.isBulletTeleport ? 1.4 : 1) * (tech.isInfiniteWaveAmmo ? 0.75 : 1) //damage is lower for large radius mobs, since they feel the waves longer
for (let i = this.waves.length - 1; i > -1; i--) { for (let i = this.waves.length - 1; i > -1; i--) {
const v1 = Vector.add(this.waves[i].position, Vector.mult(this.waves[i].unit1, this.waves[i].radius)) const v1 = Vector.add(this.waves[i].position, Vector.mult(this.waves[i].unit1, this.waves[i].radius))
const v2 = Vector.add(this.waves[i].position, Vector.mult(this.waves[i].unit2, this.waves[i].radius)) const v2 = Vector.add(this.waves[i].position, Vector.mult(this.waves[i].unit2, this.waves[i].radius))
@@ -6615,7 +6614,7 @@ const b = {
} }
}, },
fireLongitudinal() { fireLongitudinal() {
m.fireCDcycle = m.cycle + Math.floor((m.crouch ? 4 : 8) * b.fireCDscale * tech.infiniteWaveAmmo); // cool down m.fireCDcycle = m.cycle + Math.floor((m.crouch ? 4 : 8) * b.fireCDscale); // cool down
const halfArc = (m.crouch ? 0.0785 : 0.275) * (tech.isBulletTeleport ? 0.66 + (Math.random() - 0.5) : 1) //6.28 is a full circle, but these arcs needs to stay small because we are using small angle linear approximation, for collisions const halfArc = (m.crouch ? 0.0785 : 0.275) * (tech.isBulletTeleport ? 0.66 + (Math.random() - 0.5) : 1) //6.28 is a full circle, but these arcs needs to stay small because we are using small angle linear approximation, for collisions
// if (tech.isBulletTeleport && Math.random() < 0.04) { // if (tech.isBulletTeleport && Math.random() < 0.04) {
// const scale = 400 * Math.random() // const scale = 400 * Math.random()
@@ -6644,13 +6643,13 @@ const b = {
}) })
}, },
doTransverse() { doTransverse() {
if (this.wavePacketCycle && !input.fire) { // if (this.wavePacketCycle && !input.fire) {
this.wavePacketCycle = 0; // this.wavePacketCycle = 0;
m.fireCDcycle = m.cycle + Math.floor(this.delay * b.fireCDscale); // cool down // m.fireCDcycle = m.cycle + Math.floor(this.delay * b.fireCDscale); // cool down
} // }
}, },
fireTransverse() { fireTransverse() {
totalCycles = Math.floor(4.3 * 35 * tech.waveReflections * tech.isBulletsLastLonger / Math.sqrt(tech.waveReflections * 0.5)) totalCycles = Math.floor((3.5) * 35 * tech.waveReflections * tech.isBulletsLastLonger / Math.sqrt(tech.waveReflections * 0.5))
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), 5, 4, { 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,
@@ -6659,9 +6658,11 @@ const b = {
inertia: Infinity, inertia: Infinity,
frictionAir: 0, frictionAir: 0,
slow: 0, slow: 0,
amplitude: (m.crouch ? 5 : 10) * ((this.wavePacketCycle % 2) ? -1 : 1) * Math.sin((this.wavePacketCycle + 1) * 0.088), //0.0968 //0.1012 //0.11 //0.088 //shorten wave packet // amplitude: (m.crouch ? 5 : 10) * ((this.wavePacketCycle % 2) ? -1 : 1) * Math.sin((this.wavePacketCycle + 1) * 0.088), //0.0968 //0.1012 //0.11 //0.088 //shorten wave packet
amplitude: (m.crouch ? 6 : 12) * ((this.wavePacketCycle % 2) ? -1 : 1) * Math.sin(this.wavePacketCycle * 0.088) * Math.sin(this.wavePacketCycle * 0.04), //0.0968 //0.1012 //0.11 //0.088 //shorten wave packet
minDmgSpeed: 0, minDmgSpeed: 0,
dmg: m.dmgScale * tech.waveBeamDamage * tech.wavePacketDamage * (tech.isBulletTeleport ? 1.43 : 1), //also control damage when you divide by mob.mass dmg: m.dmgScale * tech.waveBeamDamage * tech.wavePacketDamage * (tech.isBulletTeleport ? 1.43 : 1) * (tech.isInfiniteWaveAmmo ? 0.75 : 1), //also control damage when you divide by mob.mass
dmgCoolDown: 0,
classType: "bullet", classType: "bullet",
collisionFilter: { collisionFilter: {
category: 0, category: 0,
@@ -6685,23 +6686,31 @@ const b = {
this.slow = slowCheck this.slow = slowCheck
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(this.velocity), tech.waveBeamSpeed * 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++) {
let dmg = this.dmg // / Math.min(10, q[i].mass)
q[i].damage(dmg);
if (q[i].alive) q[i].foundPlayer();
Matter.Body.setVelocity(q[i], Vector.mult(q[i].velocity, 0.9))
this.endCycle = 0; //bullet ends cycle after doing damage if (this.dmgCoolDown < 1) {
if (q[i].damageReduction) { q = Matter.Query.point(mob, this.position) // check if inside a mob
simulation.drawList.push({ //add dmg to draw queue for (let i = 0; i < q.length; i++) {
x: this.position.x, this.dmgCoolDown = 5 + Math.floor(11 * Math.random() * Math.sqrt(b.fireCDscale));
y: this.position.y, let dmg = this.dmg
radius: Math.log(dmg + 1.1) * 40 * q[i].damageReduction + 3, q[i].damage(dmg);
color: 'rgba(0,0,0,0.4)', if (q[i].alive) {
time: simulation.drawTime q[i].foundPlayer();
}); Matter.Body.setVelocity(q[i], Vector.mult(q[i].velocity, 0.9))
}
// this.endCycle = 0; //bullet ends cycle after doing damage
if (q[i].damageReduction) {
simulation.drawList.push({ //add dmg to draw queue
x: this.position.x,
y: this.position.y,
radius: Math.log(dmg + 1.1) * 40 * q[i].damageReduction + 3,
color: 'rgba(0,0,0,0.4)',
time: simulation.drawTime
});
}
} }
} else {
this.dmgCoolDown--
} }
}, },
wiggle() { wiggle() {
@@ -6736,7 +6745,7 @@ const b = {
if (tech.isPhaseVelocity) { if (tech.isPhaseVelocity) {
waveSpeedMap = 3.5 waveSpeedMap = 3.5
waveSpeedBody = 2 waveSpeedBody = 2
bullet[me].dmg *= 1.35 bullet[me].dmg *= 1.4
} }
if (tech.waveReflections) { if (tech.waveReflections) {
bullet[me].reflectCycle = totalCycles / tech.waveReflections //tech.waveLengthRange bullet[me].reflectCycle = totalCycles / tech.waveReflections //tech.waveLengthRange
@@ -6761,12 +6770,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 a packet of bullets then delay for a while
this.wavePacketCycle++ this.wavePacketCycle++
if (this.wavePacketCycle > 35) {
m.fireCDcycle = m.cycle + Math.floor(this.delay * b.fireCDscale * tech.infiniteWaveAmmo); // cool down
this.wavePacketCycle = 0;
}
}, },
fire() {} fire() {}
}, },

View File

@@ -8,8 +8,8 @@ const level = {
onLevel: -1, onLevel: -1,
levelsCleared: 0, levelsCleared: 0,
// playableLevels: ["pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion"], // playableLevels: ["pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion"],
//see level.populateLevels: (intro, ... , reservoir, reactor, ... , gauntlet, final) added later //see level.populateLevels: (intro, ... , reservoir or factory, reactor, ... , gauntlet, final) added later
playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber", "pavilion", "lock", "factory"], playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber", "pavilion", "lock"],
communityLevels: ["stronghold", "basement", "crossfire", "vats", "run", "n-gon", "house", "perplex", "coliseum", "tunnel", "islands", "temple", "dripp", "biohazard", "stereoMadness", "yingYang", "staircase", "fortress"], communityLevels: ["stronghold", "basement", "crossfire", "vats", "run", "n-gon", "house", "perplex", "coliseum", "tunnel", "islands", "temple", "dripp", "biohazard", "stereoMadness", "yingYang", "staircase", "fortress"],
trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "shotGun", "superBall", "matterWave", "missile", "stack", "mine", "grenades", "harpoon"], trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "shotGun", "superBall", "matterWave", "missile", "stack", "mine", "grenades", "harpoon"],
levels: [], levels: [],
@@ -18,7 +18,7 @@ const level = {
// simulation.enableConstructMode() //tech.giveTech('motion sickness') //used to build maps in testing mode // simulation.enableConstructMode() //tech.giveTech('motion sickness') //used to build maps in testing mode
// simulation.isHorizontalFlipped = true // simulation.isHorizontalFlipped = true
// tech.giveTech("performance") // tech.giveTech("performance")
// level.difficultyIncrease(3 * 4) //30 is near max on hard //60 is near max on why // level.difficultyIncrease(9 * 4) //30 is near max on hard //60 is near max on why
// spawn.setSpawnList(); // spawn.setSpawnList();
// spawn.setSpawnList(); // spawn.setSpawnList();
// m.maxHealth = m.health = 100 // m.maxHealth = m.health = 100
@@ -27,24 +27,24 @@ const level = {
// m.immuneCycle = Infinity //you can't take damage // m.immuneCycle = Infinity //you can't take damage
// tech.tech[297].frequency = 100 // tech.tech[297].frequency = 100
// m.couplingChange(5) // m.couplingChange(5)
// m.setField("metamaterial cloaking") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass pilot wave plasma torch // m.setField("time dilation") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass pilot wave plasma torch
// simulation.molecularMode = 2 // simulation.molecularMode = 2
// m.damage(0.1); // m.damage(0.1);
// b.giveGuns("nail gun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser // b.giveGuns("nail gun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// b.giveGuns("wave") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser // b.giveGuns("wave") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// b.guns[8].ammo = 10000 // b.guns[3].ammo = 100000000
// tech.giveTech("inductive charging") // tech.giveTech("propagation")
// tech.giveTech("laser-bot") // tech.giveTech("amplitude")
// for (let i = 0; i < 1; ++i) tech.giveTech("mass-energy equivalence") // for (let i = 0; i < 1; ++i) tech.giveTech("bound state")
// for (let i = 0; i < 1; ++i) tech.giveTech("Zectron") // for (let i = 0; i < 1; ++i) tech.giveTech("Higgs mechanism")
// for (let i = 0; i < 1; i++) tech.giveTech("CPT symmetry") // for (let i = 0; i < 1; i++) tech.giveTech("frequency")
// for (let i = 0; i < 1; i++) tech.giveTech("elasticity") // for (let i = 0; i < 1; i++) tech.giveTech("phonon")
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech"); // for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "boost"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "boost");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling");
// level.factory(); // level.factory();
// level.testing(); // level.testing();
// spawn.nodeGroup(1200, 0, "starter") // spawn.nodeGroup(1200, -300, "starter")
// spawn.mantisBoss(1900, -500) // spawn.mantisBoss(1900, -500)
// spawn.sneakBoss(1900, -500) // spawn.sneakBoss(1900, -500)
// spawn.starter(1900, -500, 200) // spawn.starter(1900, -500, 200)
@@ -164,7 +164,7 @@ const level = {
var gun = b.guns[b.inventory[tech.buffedGun]].name var gun = b.guns[b.inventory[tech.buffedGun]].name
simulation.makeTextLog(`pigeonhole principle: <strong>+${(31 * Math.max(0, b.inventory.length)).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong class="highlight">${gun}</strong>`, 600); simulation.makeTextLog(`pigeonhole principle: <strong>+${(31 * Math.max(0, b.inventory.length)).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong class="highlight">${gun}</strong>`, 600);
} }
if (tech.isSwitchReality) { if (tech.isSwitchReality && level.levelsCleared !== 0) {
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`); simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
m.switchWorlds() m.switchWorlds()
simulation.trails() simulation.trails()
@@ -194,8 +194,8 @@ const level = {
m.dmgScale = 1; //damage done by player decreases each level m.dmgScale = 1; //damage done by player decreases each level
simulation.accelScale = 1 //mob acceleration increases each level simulation.accelScale = 1 //mob acceleration increases each level
simulation.CDScale = 1 //mob CD time decreases each level simulation.CDScale = 1 //mob CD time decreases each level
simulation.dmgScale = Math.max(0.1, 0.32 * simulation.difficulty) //damage done by mobs scales with total levels simulation.dmgScale = Math.max(0.1, 0.31 * simulation.difficulty) //damage done by mobs scales with total levels
simulation.healScale = 1 / (1 + simulation.difficulty * 0.05) //a higher denominator makes for lower heals // m.health += heal * simulation.healScale; simulation.healScale = 1 / (1 + simulation.difficulty * 0.047) //a higher denominator makes for lower heals // m.health += heal * simulation.healScale;
}, },
difficultyIncrease(num = 1) { difficultyIncrease(num = 1) {
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
@@ -204,8 +204,8 @@ const level = {
if (simulation.accelScale < 6) simulation.accelScale *= 1.024 //mob acceleration increases each level if (simulation.accelScale < 6) simulation.accelScale *= 1.024 //mob acceleration increases each level
if (simulation.CDScale > 0.15) simulation.CDScale *= 0.964 //mob CD time decreases each level if (simulation.CDScale > 0.15) simulation.CDScale *= 0.964 //mob CD time decreases each level
} }
simulation.dmgScale = Math.max(0.1, 0.32 * simulation.difficulty) //damage done by mobs scales with total levels simulation.dmgScale = Math.max(0.1, 0.31 * simulation.difficulty) //damage done by mobs scales with total levels
simulation.healScale = 1 / (1 + simulation.difficulty * 0.05) //a higher denominator makes for lower heals // m.health += heal * simulation.healScale; simulation.healScale = 1 / (1 + simulation.difficulty * 0.047) //a higher denominator makes for lower heals // m.health += heal * simulation.healScale;
// console.log(`CD = ${simulation.CDScale}`) // console.log(`CD = ${simulation.CDScale}`)
}, },
difficultyDecrease(num = 1) { //used in easy mode for simulation.reset() difficultyDecrease(num = 1) { //used in easy mode for simulation.reset()
@@ -216,8 +216,8 @@ const level = {
if (simulation.CDScale < 1) simulation.CDScale /= 0.964 //mob CD time decreases each level if (simulation.CDScale < 1) simulation.CDScale /= 0.964 //mob CD time decreases each level
} }
if (simulation.difficulty < 1) simulation.difficulty = 0; if (simulation.difficulty < 1) simulation.difficulty = 0;
simulation.dmgScale = Math.max(0.1, 0.32 * simulation.difficulty) //damage done by mobs scales with total levels simulation.dmgScale = Math.max(0.1, 0.31 * simulation.difficulty) //damage done by mobs scales with total levels
simulation.healScale = 1 / (1 + simulation.difficulty * 0.05) simulation.healScale = 1 / (1 + simulation.difficulty * 0.047)
}, },
difficultyText() { difficultyText() {
if (simulation.difficultyMode === 1) { if (simulation.difficultyMode === 1) {
@@ -326,7 +326,7 @@ const level = {
} }
level.levels = shuffle(level.levels); //shuffles order of maps with seeded random level.levels = shuffle(level.levels); //shuffles order of maps with seeded random
level.levels.length = 9 //remove any extra levels past 9 level.levels.length = 9 //remove any extra levels past 9
level.levels.splice(Math.floor(Math.seededRandom(level.levels.length * 0.6, level.levels.length)), 0, "reservoir"); //add level to the back half of the randomized levels list level.levels.splice(Math.floor(Math.seededRandom(level.levels.length * 0.6, level.levels.length)), 0, Math.random() < 0.5 ? "factory" : "reservoir"); //add level to the back half of the randomized levels list
level.levels.splice(Math.floor(Math.seededRandom(level.levels.length * 0.6, level.levels.length)), 0, "reactor"); //add level to the back half of the randomized levels list level.levels.splice(Math.floor(Math.seededRandom(level.levels.length * 0.6, level.levels.length)), 0, "reactor"); //add level to the back half of the randomized levels list
if (!build.isExperimentSelection || (build.hasExperimentalMode && !simulation.isCheating)) { //experimental mode is endless, unless you only have an experiment Tech if (!build.isExperimentSelection || (build.hasExperimentalMode && !simulation.isCheating)) { //experimental mode is endless, unless you only have an experiment Tech
level.levels.unshift("intro"); //add level to the start of the randomized levels list level.levels.unshift("intro"); //add level to the start of the randomized levels list
@@ -3008,19 +3008,19 @@ const level = {
}, },
testing() { testing() {
const mover = level.mover(800, -300, 3000, 25); //x,y,width.height,VxGoal,force const mover = level.mover(2800, -300, 1000, 25); //x,y,width.height,VxGoal,force
const train = level.transport(600, -500, 500, 25, 8); //x,y,width.height,VxGoal,force const train = level.transport(2900, -500, 500, 25, 8); //x,y,width.height,VxGoal,force
spawn.bodyRect(1900, -550, 50, 50); spawn.bodyRect(1900, -550, 50, 50);
const button = level.button(350, -400) const button = level.button(2535, -200)
spawn.bodyRect(250, -450, 50, 50); //block on button // spawn.bodyRect(250, -450, 50, 50); //block on button
level.custom = () => { level.custom = () => {
//oscillate back and forth //oscillate back and forth
if (train.position.x < 800) { if (train.position.x < 2000) {
train.changeDirection(true) //go right train.changeDirection(true) //go right
} else if (train.position.x > 2000) { } else if (train.position.x > 4000) {
train.changeDirection(false) //go left train.changeDirection(false) //go left
} }
if (!button.isUp) train.move(); if (!button.isUp) train.move();
@@ -3035,7 +3035,7 @@ const level = {
level.enter.draw(); level.enter.draw();
}; };
level.customTopLayer = () => { level.customTopLayer = () => {
train.draw() // train.draw()
mover.draw(); mover.draw();
// hazard.opticalQuery(); // hazard.opticalQuery();
button.query(); button.query();
@@ -3470,7 +3470,7 @@ const level = {
movers[2].force = 0 movers[2].force = 0
spawnBlock(2730, -1600); //3315, -1600); spawnBlock(2730, -1600); //3315, -1600);
if ((simulation.cycle % (rate * 3)) === 0) { if ((simulation.cycle % (rate * 3)) === 0) {
if (bonusAmmoCount < 6 && Math.random() < 0.6) { //some extra ammo because of all the extra mobs that don't drop ammo if (bonusAmmoCount < 3 && Math.random() < 0.5) { //some extra ammo because of all the extra mobs that don't drop ammo
bonusAmmoCount++ bonusAmmoCount++
powerUps.spawn(2760, -1550, Math.random() < 0.5 ? "heal" : "ammo", false); powerUps.spawn(2760, -1550, Math.random() < 0.5 ? "heal" : "ammo", false);
} }
@@ -3595,7 +3595,6 @@ const level = {
spawn.mapRect(-1550, -3050, 6525, 1400); spawn.mapRect(-1550, -3050, 6525, 1400);
spawn.mapRect(3000, -1700, 1975, 675); //ceiling center spawn.mapRect(3000, -1700, 1975, 675); //ceiling center
spawn.mapRect(3800, -4000, 5650, 950); spawn.mapRect(3800, -4000, 5650, 950);
spawn.mapRect(3800, -4000, 1175, 2975); spawn.mapRect(3800, -4000, 1175, 2975);
spawn.mapRect(8175, -4000, 1275, 3685); //right wall spawn.mapRect(8175, -4000, 1275, 3685); //right wall
@@ -3618,7 +3617,6 @@ const level = {
spawn.mapRect(5400, -3100, 50, 250); //exit spawn.mapRect(5400, -3100, 50, 250); //exit
spawn.mapRect(4875, -2675, 675, 50); //exit spawn.mapRect(4875, -2675, 675, 50); //exit
spawn.mapRect(1925, -1325, 550, 50); //entrance spawn.mapRect(1925, -1325, 550, 50); //entrance
spawn.mapRect(2050, -1675, 50, 175); //entrance spawn.mapRect(2050, -1675, 50, 175); //entrance
spawn.mapRect(1700, -200, 750, 275); //button shelf spawn.mapRect(1700, -200, 750, 275); //button shelf
@@ -3632,9 +3630,7 @@ const level = {
spawn.mapRect(75, -775, 400, 50); spawn.mapRect(75, -775, 400, 50);
spawn.mapRect(1700, -760, 75, 35); spawn.mapRect(1700, -760, 75, 35);
spawn.mapRect(-200, -425, 150, 35); spawn.mapRect(-200, -425, 150, 35);
} }
spawn.mapRect(2400, -600, 125, 675); spawn.mapRect(2400, -600, 125, 675);
spawn.mapRect(2400, -1750, 125, 1050); spawn.mapRect(2400, -1750, 125, 1050);
spawn.mapRect(2700, -1700, 125, 85); spawn.mapRect(2700, -1700, 125, 85);
@@ -3643,12 +3639,10 @@ const level = {
spawn.randomMob(875, -375, 0.5); spawn.randomMob(875, -375, 0.5);
spawn.randomMob(1250, -575, 0.5); spawn.randomMob(1250, -575, 0.5);
spawn.randomMob(1550, -600, 0.5); spawn.randomMob(1550, -600, 0.5);
spawn.randomSmallMob(1250, -175); spawn.randomSmallMob(1250, -175);
spawn.randomSmallMob(1500, -229); spawn.randomSmallMob(1500, -229);
spawn.randomSmallMob(1850, -300); spawn.randomSmallMob(1850, -300);
powerUps.spawn(5200, -1300, "ammo"); powerUps.spawn(5200, -1300, "ammo");
}, },
final() { final() {
// color.map = "rgba(0,0,0,0.8)" // color.map = "rgba(0,0,0,0.8)"

View File

@@ -235,7 +235,7 @@ const tech = {
if (m.coupling && (m.fieldMode === 0 || m.fieldMode === 5)) dmg *= 1 + 0.15 * m.coupling if (m.coupling && (m.fieldMode === 0 || m.fieldMode === 5)) dmg *= 1 + 0.15 * m.coupling
if (m.isSneakAttack && m.sneakAttackCycle + Math.min(120, 0.5 * (m.cycle - m.enterCloakCycle)) > m.cycle) dmg *= 4.33 * (1 + 0.33 * m.coupling) if (m.isSneakAttack && m.sneakAttackCycle + Math.min(120, 0.5 * (m.cycle - m.enterCloakCycle)) > m.cycle) dmg *= 4.33 * (1 + 0.33 * m.coupling)
if (tech.deathSkipTime) dmg *= 1 + 0.6 * tech.deathSkipTime if (tech.deathSkipTime) dmg *= 1 + 0.6 * tech.deathSkipTime
if (tech.isTechDebt) dmg *= Math.min(Math.pow(0.85, tech.totalCount - 20), 4 - 0.15 * tech.totalCount) if (tech.isTechDebt) dmg *= tech.totalCount > 2 ? Math.pow(0.85, tech.totalCount - 20) : 4 - 0.15 * tech.totalCount // if (tech.isTechDebt) dmg *= Math.min(Math.pow(0.85, tech.totalCount - 20), 4 - 0.15 * tech.totalCount)
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.555 if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.555
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599 if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance()) if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
@@ -4969,16 +4969,16 @@ const tech = {
}, },
{ {
name: "phase velocity", name: "phase velocity",
description: "wave particles <strong>propagate</strong> faster as <strong>solids</strong><br><strong>+35%</strong> wave <strong class='color-d'>damage</strong>", description: "wave particles <strong>propagate</strong> faster as <strong>solids</strong><br><strong>+40%</strong> wave <strong class='color-d'>damage</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return tech.haveGunCheck("wave") return tech.haveGunCheck("wave") && !tech.isLongitudinal
}, },
requires: "wave", requires: "wave, not phonon",
effect() { effect() {
tech.isPhaseVelocity = true; tech.isPhaseVelocity = true;
}, },
@@ -5009,7 +5009,7 @@ const tech = {
}, },
{ {
name: "propagation", name: "propagation",
description: "<strong>25%</strong> wave packet propagation <strong>speed</strong><br><strong>+37%</strong> wave <strong class='color-d'>damage</strong>", description: "<strong>25%</strong> wave packet propagation <strong>speed</strong><br><strong>+41%</strong> wave <strong class='color-d'>damage</strong>",
isGunTech: true, isGunTech: true,
maxCount: 9, maxCount: 9,
count: 0, count: 0,
@@ -5020,17 +5020,17 @@ const tech = {
}, },
requires: "wave", requires: "wave",
effect() { effect() {
tech.waveBeamSpeed *= 0.8; tech.waveBeamSpeed *= 0.75;
tech.waveBeamDamage += 1.55 * 0.37 //this sets base wave damage tech.waveBeamDamage += 0.33 * 0.41 //this sets base wave damage
}, },
remove() { remove() {
tech.waveBeamSpeed = 12; tech.waveBeamSpeed = 11;
tech.waveBeamDamage = 1.55 //this sets base wave damage tech.waveBeamDamage = 0.33 //this sets base wave damage
} }
}, },
{ {
name: "bound state", name: "bound state",
description: "wave packets <strong>reflect</strong> backwards <strong>2</strong> times<br><strong>20%</strong> <strong>range</strong>", description: "wave packets <strong>reflect</strong> backwards <strong>2</strong> times<br><strong>33%</strong> <strong>range</strong>",
isGunTech: true, isGunTech: true,
maxCount: 9, maxCount: 9,
count: 0, count: 0,
@@ -5049,7 +5049,7 @@ const tech = {
}, },
{ {
name: "frequency", name: "frequency",
description: `<strong>wave</strong> has unlimited <strong class='color-ammo'>ammo</strong><br><strong>-50%</strong> wave <strong><em>fire rate</em></strong>`, description: `<strong>wave</strong> has unlimited <strong class='color-ammo'>ammo</strong><br><strong>-25%</strong> wave <strong class='color-d'>damage</strong>`,
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5058,13 +5058,13 @@ const tech = {
allowed: () => tech.haveGunCheck("wave"), allowed: () => tech.haveGunCheck("wave"),
requires: "wave", requires: "wave",
effect() { effect() {
tech.infiniteWaveAmmo = 2 tech.isInfiniteWaveAmmo = true
b.guns[3].savedAmmo = b.guns[3].ammo b.guns[3].savedAmmo = b.guns[3].ammo
b.guns[3].ammo = Infinity b.guns[3].ammo = Infinity
simulation.updateGunHUD(); simulation.updateGunHUD();
}, },
remove() { remove() {
tech.infiniteWaveAmmo = 1 tech.isInfiniteWaveAmmo = false
if (this.count > 0 && b.guns[3].savedAmmo !== undefined) { if (this.count > 0 && b.guns[3].savedAmmo !== undefined) {
b.guns[3].ammo = b.guns[3].savedAmmo b.guns[3].ammo = b.guns[3].savedAmmo
simulation.updateGunHUD(); simulation.updateGunHUD();
@@ -5082,18 +5082,18 @@ const tech = {
frequency: 3, frequency: 3,
frequencyDefault: 3, frequencyDefault: 3,
allowed() { allowed() {
return tech.haveGunCheck("wave") return tech.haveGunCheck("wave") && !tech.isPhaseVelocity
}, },
requires: "wave", requires: "wave, not phase velocity",
ammoScale: 11, ammoScale: 10,
effect() { effect() {
tech.isLongitudinal = true; tech.isLongitudinal = true;
b.guns[3].chooseFireMethod() b.guns[3].chooseFireMethod()
b.guns[3].ammoPack = b.guns[3].defaultAmmoPack / this.ammoScale b.guns[3].ammoPack = b.guns[3].defaultAmmoPack / this.ammoScale
if (tech.infiniteWaveAmmo === 1) { if (tech.isInfiniteWaveAmmo) {
b.guns[3].ammo = Math.ceil(b.guns[3].ammo / this.ammoScale);
} else {
b.guns[3].savedAmmo = Math.ceil(b.guns[3].savedAmmo / this.ammoScale); //used with low frequency b.guns[3].savedAmmo = Math.ceil(b.guns[3].savedAmmo / this.ammoScale); //used with low frequency
} else {
b.guns[3].ammo = Math.ceil(b.guns[3].ammo / this.ammoScale);
} }
simulation.updateGunHUD(); simulation.updateGunHUD();
}, },
@@ -5102,10 +5102,10 @@ const tech = {
tech.isLongitudinal = false; tech.isLongitudinal = false;
b.guns[3].chooseFireMethod() b.guns[3].chooseFireMethod()
b.guns[3].ammoPack = b.guns[3].defaultAmmoPack b.guns[3].ammoPack = b.guns[3].defaultAmmoPack
if (tech.infiniteWaveAmmo === 1) { if (tech.isInfiniteWaveAmmo) {
b.guns[3].ammo = Math.ceil(b.guns[3].ammo * this.ammoScale);
} else {
b.guns[3].savedAmmo = Math.ceil(b.guns[3].savedAmmo * this.ammoScale); //used with low frequency b.guns[3].savedAmmo = Math.ceil(b.guns[3].savedAmmo * this.ammoScale); //used with low frequency
} else {
b.guns[3].ammo = Math.ceil(b.guns[3].ammo * this.ammoScale);
} }
simulation.updateGunHUD(); simulation.updateGunHUD();
} }
@@ -6348,7 +6348,7 @@ const tech = {
isBot: true, isBot: true,
isBotTech: true, isBotTech: true,
isNonRefundable: true, isNonRefundable: true,
requires: "foam gun, bot upgrades, fractionation, pressure vessel", requires: "foam gun, not bot upgrades, fractionation, pressure vessel",
allowed() { allowed() {
return tech.haveGunCheck("foam", false) && !b.hasBotUpgrade() && !tech.isAmmoFoamSize && !tech.isFoamPressure && (build.isExperimentSelection || powerUps.research.count > 1) return tech.haveGunCheck("foam", false) && !b.hasBotUpgrade() && !tech.isAmmoFoamSize && !tech.isFoamPressure && (build.isExperimentSelection || powerUps.research.count > 1)
}, },
@@ -6776,7 +6776,7 @@ const tech = {
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return ((tech.haveGunCheck("wave") && tech.infiniteWaveAmmo !== 1) || tech.haveGunCheck("laser") || (tech.haveGunCheck("harpoon") && !tech.isRailGun)) && !tech.isEnergyNoAmmo return ((tech.haveGunCheck("wave") && !tech.isInfiniteWaveAmmo) || tech.haveGunCheck("laser") || (tech.haveGunCheck("harpoon") && !tech.isRailGun)) && !tech.isEnergyNoAmmo
}, },
requires: "harpoon, laser, wave, frequency, not railgun, non-renewables", requires: "harpoon, laser, wave, frequency, not railgun, non-renewables",
effect() { effect() {
@@ -8724,6 +8724,20 @@ const tech = {
}, },
remove() {} remove() {}
}, },
{
name: "universal healthcare",
description: "make your <strong class='color-d'>damage</strong> negative",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed: () => true,
requires: "",
effect() {
tech.damage *= -1
},
remove() {}
},
// { // {
// name: "synchrotron", // name: "synchrotron",
// descriptionFunction() { // descriptionFunction() {
@@ -11377,7 +11391,7 @@ const tech = {
isBoostPowerUps: null, isBoostPowerUps: null,
isBoostReplaceAmmo: null, isBoostReplaceAmmo: null,
isFlipFlopCoupling: null, isFlipFlopCoupling: null,
infiniteWaveAmmo: null, isInfiniteWaveAmmo: null,
isJunkDNA: null, isJunkDNA: null,
buffedGun: 0, buffedGun: 0,
isGunChoice: null, isGunChoice: null,

View File

@@ -567,13 +567,14 @@ summary {
#guns { #guns {
position: absolute; position: absolute;
top: 40px; top: 82px;
left: 15px; left: 15px;
z-index: 2; z-index: 2;
font-size: 23px; font-size: 23px;
color: #222; color: #222;
background-color: rgba(255, 255, 255, 0.4); /* background-color: rgba(255, 255, 255, 0.4); */
line-height: 120%; background-color: rgba(255, 255, 255, 0.2);
line-height: 120%;
user-select: none; user-select: none;
pointer-events: none; pointer-events: none;
padding: 0px 5px 0px 5px; padding: 0px 5px 0px 5px;
@@ -583,8 +584,8 @@ summary {
#field { #field {
position: absolute; position: absolute;
top: 15px; top: 45px;
right: 15px; left: 15px;
z-index: 2; z-index: 2;
font-size: 23px; font-size: 23px;
color: #000; color: #000;
@@ -601,7 +602,7 @@ summary {
#tech { #tech {
position: absolute; position: absolute;
top: 60px; top: 15px;
right: 15px; right: 15px;
z-index: 2; z-index: 2;
font-size: 20px; font-size: 20px;

View File

@@ -1,29 +1,25 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
map: factory base wave gun rework
this is completely unbalanced, so let me know if what rough edges need to be sanded damage per hit 1.55 -> 0.33, -15% range, +20% ammo
found on seed 47086 level 6 no pause between wave packets
tech: ternary - +40 damage if any gun has ammo divisible by 3 wave bullets can hit about once every 10 game cycles (1/6 of a second)
time between hits is reduced by fire rate
wave tech frequency has -25% damage no longer reduces fire rate
+10% phonon damage and ammo
level element: transport - horizontal moving platforms JUNK tech: universal healthcare - your damage heals mobs
level element: mover - stationary platform that pushes the player horizontally
to see examples of transport and mover look in level.testing() bug fixes
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
level element - mover, transport level element - mover, transport
test effect of changing m.Vx on things like: shooting bullets? test effect of changing m.Vx on things like: shooting bullets?
add mobs?
extend the recentered friction zero to other things extend the recentered friction zero to other things
like blocks the player stands on? like blocks the player stands on?
maybe zero on the horizontal velocity of whatever the player is standing on maybe zero on the horizontal velocity of whatever the player is standing on
remove the pause on wave between wave packets
maybe don't do packets, do sine wave beats instead?
wave tech don't end wave bullets on hitting mob, instead add a short cooldown, 1/4 of a second between hurting mobs
maybe fire rate could lower the frequency that wave bullets damage mobs as they pass through them
add a graphic to show the time when doing damage
extend uncertainty to superballs extend uncertainty to superballs
maybe make aiming them more random? maybe make aiming them more random?