diff --git a/.DS_Store b/.DS_Store
index a86b967..89ee7b3 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/engine.js b/js/engine.js
index 034516e..c7379fd 100644
--- a/js/engine.js
+++ b/js/engine.js
@@ -41,8 +41,8 @@ function playerOnGroundCheck(event) {
m.yOff = m.yOffWhen.jump;
m.hardLandCD = m.cycle + Math.min(momentum / 6.5 - 6, 40)
//falling damage
- if (tech.isFallingDamage) {
- m.damage(Math.min(Math.sqrt(momentum - 125) * 0.01, 0.25));
+ if (tech.isFallingDamage && m.immuneCycle < m.cycle) {
+ m.damage(Math.min(Math.sqrt(momentum - 123) * 0.01, 0.25));
m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles
}
} else {
diff --git a/js/level.js b/js/level.js
index 7d63ba8..e93dc71 100644
--- a/js/level.js
+++ b/js/level.js
@@ -15,10 +15,11 @@ const level = {
// simulation.zoomScale = 1000;
// simulation.setZoom();
// simulation.enableConstructMode() //used to build maps in testing mode
- // m.setField("metamaterial cloaking")
+ // m.setField("standing wave harmonics")
// b.giveGuns("laser")
// tech.isExplodeRadio = true
- // tech.giveTech("WIMPs")
+ // for (let i = 0; i < 5; i++) tech.giveTech("spherical harmonics")
+ // tech.giveTech("expansion")
// tech.giveTech("MACHO")
// tech.giveTech("potential well")
// for (let i = 0; i < 3; i++) tech.giveTech("packet length")
@@ -36,7 +37,7 @@ const level = {
// level.gauntlet(); //before final boss level
// level.testChamber()
// level.sewers();
- // level.satellite();
+ // level.satellite();
// level.skyscrapers();
// level.aerie();
// level.rooftops();
diff --git a/js/player.js b/js/player.js
index 46be17a..2445843 100644
--- a/js/player.js
+++ b/js/player.js
@@ -1501,8 +1501,76 @@ const m = {
m.fieldBlockCD = 0;
m.fieldHarmReduction = 0.75;
m.blockingRecoil = 1 //4 is normal
- m.fieldRange = 175 + 175 * 0.25 * tech.frequencyResonance
- m.fieldShieldingScale = Math.pow(0.5, tech.frequencyResonance)
+ m.fieldRange = 175
+ m.fieldShieldingScale = Math.pow(0.5, (tech.harmonics - 3))
+ m.harmonicRadius = 1 //for smoothing function when player holds mouse (for harmonicAtomic)
+ m.harmonic3Phase = () => { //normal standard 3 different 2-d circles
+ if (tech.isStandingWaveExpand) {
+ if (input.field) {
+ const oldHarmonicRadius = m.harmonicRadius
+ m.harmonicRadius = 0.985 * m.harmonicRadius + 0.015 * 2.5
+ m.energy -= 0.3 * (m.harmonicRadius - oldHarmonicRadius)
+ } else {
+ m.harmonicRadius = 0.998 * m.harmonicRadius + 0.002 * 1
+ }
+ }
+ const fieldRange1 = (0.7 + 0.3 * Math.sin(m.cycle / 23)) * m.fieldRange * m.harmonicRadius
+ const fieldRange2 = (0.63 + 0.37 * Math.sin(m.cycle / 37)) * m.fieldRange * m.harmonicRadius
+ const fieldRange3 = (0.65 + 0.35 * Math.sin(m.cycle / 47)) * m.fieldRange * m.harmonicRadius
+ const netfieldRange = Math.max(fieldRange1, fieldRange2, fieldRange3)
+ ctx.fillStyle = "rgba(110,170,200," + Math.min(0.73, (0.04 + m.energy * (0.11 + 0.13 * Math.random()))) + ")";
+ ctx.beginPath();
+ ctx.arc(m.pos.x, m.pos.y, fieldRange1, 0, 2 * Math.PI);
+ ctx.fill();
+ ctx.beginPath();
+ ctx.arc(m.pos.x, m.pos.y, fieldRange2, 0, 2 * Math.PI);
+ ctx.fill();
+ ctx.beginPath();
+ ctx.arc(m.pos.x, m.pos.y, fieldRange3, 0, 2 * Math.PI);
+ ctx.fill();
+ m.pushMobs360(netfieldRange);
+ }
+ m.harmonicAtomic = () => { //several ellipses spinning about different axises
+ const rotation = simulation.cycle * 0.002
+ const phase = simulation.cycle * 0.03
+ if (tech.isStandingWaveExpand) {
+ if (input.field) {
+ const oldHarmonicRadius = m.harmonicRadius
+ m.harmonicRadius = 0.985 * m.harmonicRadius + 0.015 * 2.5
+ m.energy -= 0.3 * (m.harmonicRadius - oldHarmonicRadius)
+ } else {
+ m.harmonicRadius = 0.998 * m.harmonicRadius + 0.002 * 1
+ }
+ }
+ const radius = m.fieldRange * m.harmonicRadius //+ 20 * Math.sin(m.cycle * 0.05)
+ ctx.lineWidth = 1;
+ ctx.strokeStyle = "rgba(110,170,200,0.9)"
+ ctx.fillStyle = "rgba(110,170,200," + Math.min(0.7, m.energy * (0.13 + 0.15 * Math.random()) * (3 / tech.harmonics)) + ")";
+ // ctx.fillStyle = "rgba(110,170,200," + Math.min(0.7, m.energy * (0.22 - 0.01 * tech.harmonics) * (0.5 + 0.5 * Math.random())) + ")";
+ for (let i = 0; i < tech.harmonics; i++) {
+ ctx.beginPath();
+ ctx.ellipse(m.pos.x, m.pos.y, radius * Math.abs(Math.sin(phase + i / tech.harmonics * Math.PI)), radius, rotation + i / tech.harmonics * Math.PI, 0, 2 * Math.PI);
+ ctx.fill();
+ ctx.stroke();
+ }
+ m.pushMobs360(radius);
+ }
+ // m.harmonicSameAxis = () => { //several ellipses spinning about the same axis
+ // const radius = m.fieldRange
+ // const rotation = simulation.cycle * 0.025
+ // const phase = simulation.cycle * 0.031
+ // ctx.lineWidth = 1;
+ // ctx.fillStyle = "rgba(0,0,0,0.25)"
+ // ctx.strokeStyle = "#000"
+ // for (let i = 0, len = 4; i < len; i++) {
+ // ctx.beginPath();
+ // ctx.ellipse(m.pos.x, m.pos.y, radius * Math.abs(Math.sin(phase + i / len * Math.PI)), radius, rotation, 0, 2 * Math.PI);
+ // ctx.fill();
+ // ctx.stroke();
+ // }
+ // m.pushMobs360(radius);
+ // }
+ m.harmonicShield = m.harmonic3Phase
m.hold = function() {
if (m.isHolding) {
m.drawHold(m.holdingTarget);
@@ -1517,23 +1585,10 @@ const m = {
m.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists)
}
if (m.energy > 0.1 && m.fieldCDcycle < m.cycle) {
- const fieldRange1 = (0.7 + 0.3 * Math.sin(m.cycle / 23)) * m.fieldRange
- const fieldRange2 = (0.63 + 0.37 * Math.sin(m.cycle / 37)) * m.fieldRange
- const fieldRange3 = (0.65 + 0.35 * Math.sin(m.cycle / 47)) * m.fieldRange
- const netfieldRange = Math.max(fieldRange1, fieldRange2, fieldRange3)
- ctx.fillStyle = "rgba(110,170,200," + Math.min(0.73, (0.04 + m.energy * (0.11 + 0.13 * Math.random()))) + ")";
- ctx.beginPath();
- ctx.arc(m.pos.x, m.pos.y, fieldRange1, 0, 2 * Math.PI);
- ctx.fill();
- ctx.beginPath();
- ctx.arc(m.pos.x, m.pos.y, fieldRange2, 0, 2 * Math.PI);
- ctx.fill();
- ctx.beginPath();
- ctx.arc(m.pos.x, m.pos.y, fieldRange3, 0, 2 * Math.PI);
- ctx.fill();
- m.pushMobs360(netfieldRange);
- // m.pushBody360(netfieldRange); //can't throw block when pushhing blocks away
+ m.harmonicShield()
}
+
+
m.drawFieldMeter()
}
}
diff --git a/js/tech.js b/js/tech.js
index 39027aa..f5d10d2 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -4613,26 +4613,68 @@
//************************************************** field
//************************************************** tech
//**************************************************
+ // {
+ // name: "frequency resonance",
+ // description: "standing wave harmonics shield is retuned
increase size and deflecting efficiency by 50%",
+ // isFieldTech: true,
+ // maxCount: 9,
+ // count: 0,
+ // frequency: 2,
+ // allowed() {
+ // return m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics"
+ // },
+ // requires: "standing wave harmonics",
+ // effect() {
+ // tech.frequencyResonance = this.count + 1 // +1 because count updates later
+ // m.fieldRange = 175 + 175 * 0.25 * tech.frequencyResonance
+ // m.fieldShieldingScale = Math.pow(0.5, tech.frequencyResonance)
+ // },
+ // remove() {
+ // m.fieldRange = 175;
+ // m.fieldShieldingScale = 1;
+ // tech.frequencyResonance = 0
+ // }
+ // },
{
- name: "frequency resonance",
- description: "standing wave harmonics shield is retuned
increase size and deflecting efficiency by 50%",
+ name: "spherical harmonics",
+ description: "standing wave oscillates in a 3rd dimension
increasing deflecting efficiency by 40%",
isFieldTech: true,
maxCount: 9,
count: 0,
+ frequency: 4,
+ allowed() {
+ return m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics"
+ },
+ requires: "standing wave harmonics",
+ effect() {
+ tech.harmonics++
+ m.fieldShieldingScale = Math.pow(0.6, (tech.harmonics - 2))
+ m.harmonicShield = m.harmonicAtomic
+ },
+ remove() {
+ tech.harmonics = 2
+ m.fieldShieldingScale = Math.pow(0.6, (tech.harmonics - 2))
+ m.harmonicShield = m.harmonic3Phase
+ }
+ },
+ {
+ name: "expansion",
+ description: "using standing wave field drains energy
to temporarily expand its radius",
+ // description: "use energy to expand standing wave
the field slowly contracts when not used",
+ isFieldTech: true,
+ maxCount: 1,
+ count: 0,
frequency: 2,
allowed() {
return m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics"
},
requires: "standing wave harmonics",
effect() {
- tech.frequencyResonance = this.count + 1 // +1 because count updates later
- m.fieldRange = 175 + 175 * 0.25 * tech.frequencyResonance
- m.fieldShieldingScale = Math.pow(0.5, tech.frequencyResonance)
+ tech.isStandingWaveExpand = true
},
remove() {
- m.fieldRange = 175;
- m.fieldShieldingScale = 1;
- tech.frequencyResonance = 0
+ tech.isStandingWaveExpand = false
+ m.harmonicRadius = 1
}
},
{
@@ -6834,7 +6876,7 @@
droneCycleReduction: null,
droneEnergyReduction: null,
isNoHeals: null,
- frequencyResonance: null,
+ // frequencyResonance: null,
isAlwaysFire: null,
isDroneRespawn: null,
deathSpawns: null,
@@ -6853,5 +6895,7 @@
isMACHO: null,
isHarmMACHO: null,
isSneakAttack: null,
- isFallingDamage: null
+ isFallingDamage: null,
+ harmonics: null,
+ isStandingWaveExpand: null
}
\ No newline at end of file
diff --git a/todo.txt b/todo.txt
index f6659e0..b0c0c75 100644
--- a/todo.txt
+++ b/todo.txt
@@ -26,6 +26,17 @@ is there a way to check if the player is stuck inside the map or block
******************************************************** TODO ********************************************************
+spherical harmonics improve blocking efficiency
+ 9x stacks
+ gain cool multi ellipse atomic graphic
+ 1st stack gives 3x atomic graphic
+ more stacks give more ellipse for atomic graphic
+spherical harmonics unlocks tech that increases shield radius when you hold field input
+
+
+what about the single axis graphic?
+ maybe just save it for a mob
+
tech: picking up heal power ups when at full health does harm equal to the heal values
benefit on pick up: get 1% damage
@@ -228,13 +239,6 @@ look for tech that could update description text with count and tech is informat
can only use variables that change in effect() and remove()
this.description = `8% chance to duplicate spawned power ups
chance to duplicate = ${techduplicateChance}`
-standing wave harmonics tech- push things away
- push scales with mass up to about 4
- has a 25% effect on shielded mobs?
- push when using field key
- or push away at the peak of an oscillation
- or always push
-
map element - player rotates a rotor that makes a platform go up or down
use mac automator to speed up your n-gon -> git sync